(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{18:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return K})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return M})),r.d(t,"d",(function(){return X})),r.d(t,"e",(function(){return ee})),r.d(t,"f",(function(){return re})),r.d(t,"g",(function(){return N})),r.d(t,"h",(function(){return T})),r.d(t,"i",(function(){return R})),r.d(t,"j",(function(){return V})),r.d(t,"k",(function(){return D})),r.d(t,"l",(function(){return L})),r.d(t,"m",(function(){return C})),r.d(t,"n",(function(){return _})),r.d(t,"o",(function(){return A})),r.d(t,"p",(function(){return y})),r.d(t,"q",(function(){return ue})),r.d(t,"r",(function(){return I})),r.d(t,"s",(function(){return x})),r.d(t,"t",(function(){return j})),r.d(t,"u",(function(){return S})),r.d(t,"v",(function(){return w})),r.d(t,"w",(function(){return Q})),r.d(t,"x",(function(){return ie})),r.d(t,"y",(function(){return ae})),r.d(t,"z",(function(){return le})),r.d(t,"A",(function(){return he})),r.d(t,"B",(function(){return pe})),r.d(t,"C",(function(){return Z})),r.d(t,"D",(function(){return Y})),r.d(t,"E",(function(){return O})),r.d(t,"F",(function(){return E})),r.d(t,"G",(function(){return d})),r.d(t,"H",(function(){return k})),r.d(t,"I",(function(){return se}));var n=r(84),o=r(34),c=r(14),l=r(619),f=r.n(l);r(126);function h(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var c={};r.fields.map((function(e){return h(c,e.name,e.value,n)})),e[t.value]=c}else if(function(e){return"Variable"===e.kind}(r)){var l=(n||{})[r.name.value];e[t.value]=l}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return h(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw new o.a(17);e[t.value]=null}}function d(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var o=n.name,c=n.value;return h(r[e.name.value],o,c,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,o=e.value;return h(n,r,o,t)}))),y(e.name.value,n,r)}var v=["connection","include","skip","client","rest","export"];function y(e,t,r){if(r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var o=t,c={};return n.forEach((function(e){c[e]=o[e]})),r.connection.key+"("+JSON.stringify(c)+")"}return r.connection.key}var l=e;if(t){var h=f()(t);l+="("+h+")"}return r&&Object.keys(r).forEach((function(e){-1===v.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?l+="@"+e+"("+JSON.stringify(r[e])+")":l+="@"+e)})),l}function m(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,o=e.value;return h(r,n,o,t)})),r}return null}function O(e){return e.alias?e.alias.value:e.name.value}function j(e){return"Field"===e.kind}function w(e){return"InlineFragment"===e.kind}function S(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function k(e,t){return void 0===t&&(t=!1),Object(c.a)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function Q(e){return null!=e&&"object"==typeof e&&"json"===e.type}function R(e,t){if(e.directives&&e.directives.length){var r={};return e.directives.forEach((function(e){r[e.name.value]=m(e,t)})),r}return null}function E(e,t){return void 0===t&&(t={}),(r=e.directives,r?r.filter(F).map((function(e){var t=e.arguments;e.name.value,Object(o.b)(t&&1===t.length,14);var r=t[0];Object(o.b)(r.name&&"if"===r.name.value,15);var n=r.value;return Object(o.b)(n&&("Variable"===n.kind||"BooleanValue"===n.kind),16),{directive:e,ifArgument:r}})):[]).every((function(e){var r=e.directive,n=e.ifArgument,c=!1;return"Variable"===n.value.kind?(c=t[n.value.name.value],Object(o.b)(void 0!==c,13)):c=n.value.value,"skip"===r.name.value?!c:c}));var r}function x(e,t){return function(e){var t=[];return Object(n.b)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function I(e){return e&&x(["client"],e)&&x(["export"],e)}function F(e){var t=e.name.value;return"skip"===t||"include"===t}function D(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new o.a(11);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&(Object(o.b)(1===n.length,12),r=n[0].name.value),Object(c.a)(Object(c.a)({},e),{definitions:Object(c.f)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions)})}function M(e){for(var t=[],r=1;r1){var n=[];t=ye(t,n);for(var i=1;i-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach((function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map((function(e){return e.name})))})),t},e}(),k=Object.prototype.hasOwnProperty,Q=function(){function e(data){var e=this;void 0===data&&(data=Object.create(null)),this.data=data,this.depend=Object(y.b)((function(t){return e.data[t]}),{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){k.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach((function(r){t.set(r,e[r])})),Object.keys(this.data).forEach((function(r){k.call(e,r)||t.delete(r)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function R(e){return new Q(e)}var E=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.cacheKeyRoot,c=void 0===n?new y.a(o.e):n,l=r.freezeResults,f=void 0!==l&&l,h=this,d=h.executeStoreQuery,v=h.executeSelectionSet,m=h.executeSubSelectedArray;this.freezeResults=f,this.executeStoreQuery=Object(y.b)((function(e){return d.call(t,e)}),{makeCacheKey:function(e){var t=e.query,r=e.rootValue,n=e.contextValue,o=e.variableValues,l=e.fragmentMatcher;if(n.store instanceof Q)return c.lookup(n.store,t,l,JSON.stringify(o),r.id)}}),this.executeSelectionSet=Object(y.b)((function(e){return v.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,r=e.rootValue,n=e.execContext;if(n.contextValue.store instanceof Q)return c.lookup(n.contextValue.store,t,n.fragmentMatcher,JSON.stringify(n.variableValues),r.id)}}),this.executeSubSelectedArray=Object(y.b)((function(e){return m.call(t,e)}),{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.execContext;if(n.contextValue.store instanceof Q)return c.lookup(n.contextValue.store,t,r,JSON.stringify(n.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(Object(n.a)(Object(n.a)({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.variables,c=e.previousResult,l=e.returnPartialData,f=void 0===l||l,h=e.rootId,d=void 0===h?"ROOT_QUERY":h,y=e.fragmentMatcherFunction,O=e.config,j=Object(o.o)(r);n=Object(o.c)({},Object(o.h)(j),n);var w={store:t,dataIdFromObject:O&&O.dataIdFromObject,cacheRedirects:O&&O.cacheRedirects||{}},S=this.executeStoreQuery({query:r,rootValue:{type:"id",id:d,generated:!0,typename:"Query"},contextValue:w,variableValues:n,fragmentMatcher:y}),k=S.missing&&S.missing.length>0;return k&&!f&&S.missing.forEach((function(e){if(!e.tolerable)throw new m.a(8)})),c&&Object(v.a)(c,S.result)&&(S.result=c),{result:S.result,complete:!k}},e.prototype.executeStoreQuery=function(e){var t=e.query,r=e.rootValue,n=e.contextValue,c=e.variableValues,l=e.fragmentMatcher,f=void 0===l?I:l,h=Object(o.l)(t),d=Object(o.j)(t),v={query:t,fragmentMap:Object(o.g)(d),contextValue:n,variableValues:c,fragmentMatcher:f};return this.executeSelectionSet({selectionSet:h.selectionSet,rootValue:r,execContext:v})},e.prototype.executeSelectionSet=function(e){var t=this,r=e.selectionSet,c=e.rootValue,l=e.execContext,f=l.fragmentMap,h=l.contextValue,d=l.variableValues,v={result:null},y=[],object=h.store.get(c.id),O=object&&object.__typename||"ROOT_QUERY"===c.id&&"Query"||void 0;function j(e){var t;return e.missing&&(v.missing=v.missing||[],(t=v.missing).push.apply(t,e.missing)),e.result}return r.selections.forEach((function(e){var r;if(Object(o.F)(e,d))if(Object(o.t)(e)){var v=j(t.executeField(object,O,e,l));void 0!==v&&y.push(((r={})[Object(o.E)(e)]=v,r))}else{var w=void 0;if(Object(o.v)(e))w=e;else if(!(w=f[e.name.value]))throw new m.a(9);var S=w.typeCondition&&w.typeCondition.name.value,k=!S||l.fragmentMatcher(c,S,h);if(k){var Q=t.executeSelectionSet({selectionSet:w.selectionSet,rootValue:c,execContext:l});"heuristic"===k&&Q.missing&&(Q=Object(n.a)(Object(n.a)({},Q),{missing:Q.missing.map((function(e){return Object(n.a)(Object(n.a)({},e),{tolerable:!0})}))})),y.push(j(Q))}}})),v.result=Object(o.B)(y),this.freezeResults,v},e.prototype.executeField=function(object,e,t,r){var n=r.variableValues,c=r.contextValue,l=function(object,e,t,r,n,c){c.resultKey;var l=c.directives,f=t;(r||l)&&(f=Object(o.p)(f,r,l));var h=void 0;if(object&&void 0===(h=object[f])&&n.cacheRedirects&&"string"==typeof e){var d=n.cacheRedirects[e];if(d){var v=d[t];v&&(h=v(object,r,{getCacheKey:function(e){var t=n.dataIdFromObject(e);return t&&Object(o.H)({id:t,typename:e.__typename})}}))}}if(void 0===h)return{result:h,missing:[{object:object,fieldName:f,tolerable:!1}]};Object(o.w)(h)&&(h=h.json);return{result:h}}(object,e,t.name.value,Object(o.b)(t,n),c,{resultKey:Object(o.E)(t),directives:Object(o.i)(t,n)});return Array.isArray(l.result)?this.combineExecResults(l,this.executeSubSelectedArray({field:t,array:l.result,execContext:r})):t.selectionSet?null==l.result?l:this.combineExecResults(l,this.executeSelectionSet({selectionSet:t.selectionSet,rootValue:l.result,execContext:r})):(x(t,l.result),this.freezeResults,l)},e.prototype.combineExecResults=function(){for(var e,t=[],r=0;r=0)return!0;r[e].push(t)}else r[e]=[t];return!1}var V={fragmentMatcher:new w,dataIdFromObject:function(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null},addTypename:!0,resultCaching:!0,freezeResults:!1};var A=Object.prototype.hasOwnProperty,L=function(e){function t(t,r,n){var o=e.call(this,Object.create(null))||this;return o.optimisticId=t,o.parent=r,o.transaction=n,o}return Object(n.c)(t,e),t.prototype.toObject=function(){return Object(n.a)(Object(n.a)({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return A.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(F),N=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;r.watches=new Set,r.typenameDocumentCache=new Map,r.cacheKeyRoot=new y.a(o.e),r.silenceBroadcast=!1,r.config=Object(n.a)(Object(n.a)({},V),t),r.config.customResolvers&&(r.config.cacheRedirects=r.config.customResolvers),r.config.cacheResolvers&&(r.config.cacheRedirects=r.config.cacheResolvers),r.addTypename=!!r.config.addTypename,r.data=r.config.resultCaching?new Q:new F,r.optimisticData=r.data,r.storeWriter=new M,r.storeReader=new E({cacheKeyRoot:r.cacheKeyRoot,freezeResults:t.freezeResults});var c=r,l=c.maybeBroadcastWatch;return r.maybeBroadcastWatch=Object(y.b)((function(e){return l.call(r,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return c.data instanceof Q?c.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),r}return Object(n.c)(t,e),t.prototype.restore=function(data){return data&&this.data.replace(data),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:r,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:r}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,r=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:r,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new m.a(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],r=0,n=this.optimisticData;n instanceof L;)n.optimisticId===e?++r:t.push(n),n=n.parent;if(r>0){for(this.optimisticData=n;t.length>0;){var o=t.pop();this.performTransaction(o.transaction,o.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var data=this.data,r=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new L(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=r,this.data=data}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Object(o.a)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach((function(t){return e.maybeBroadcastWatch(t)}))},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(d)},616:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,b){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])},n(e,b)},function(e,b){function t(){this.constructor=e}n(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}),c=this&&this.__assign||function(){return c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i0}var w,S=function(e){function t(r){var n,o,c=r.graphQLErrors,l=r.networkError,f=r.errorMessage,h=r.extraInfo,d=e.call(this,f)||this;return d.graphQLErrors=c||[],d.networkError=l||null,d.message=f||(o="",j((n=d).graphQLErrors)&&n.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";o+="GraphQL error: "+t+"\n"})),n.networkError&&(o+="Network error: "+n.networkError.message+"\n"),o=o.replace(/\n$/,"")),d.extraInfo=h,d.__proto__=t.prototype,d}return Object(o.c)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(w||(w={}));var k=function(e){function t(t){var r=t.queryManager,n=t.options,o=t.shouldSubscribe,l=void 0===o||o,f=e.call(this,(function(e){return f.onSubscribe(e)}))||this;f.observers=new Set,f.subscriptions=new Set,f.isTornDown=!1,f.options=n,f.variables=n.variables||{},f.queryId=r.generateQueryId(),f.shouldSubscribe=l;var h=Object(c.m)(n.query);return f.queryName=h&&h.name&&h.name.value,f.queryManager=r,f}return Object(o.c)(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){o.unsubscribe()}),0)},error:r},o=e.subscribe(n)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:n.error}}var t,r,c,l=this.queryManager.getCurrentQueryResult(this),data=l.data,f=l.partial,h=this.queryManager.queryStore.get(this.queryId),d=this.options.fetchPolicy,v="network-only"===d||"no-cache"===d;if(h){var y=h.networkStatus;if(r=h,void 0===(c=this.options.errorPolicy)&&(c="none"),r&&(r.networkError||"none"===c&&j(r.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:y,error:new S({graphQLErrors:h.graphQLErrors,networkError:h.networkError})};h.variables&&(this.options.variables=Object(o.a)(Object(o.a)({},this.options.variables),h.variables),this.variables=this.options.variables),t={data:data,loading:m(y),networkStatus:y},h.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=h.graphQLErrors)}else{var O=v||f&&"cache-only"!==d;t={data:data,loading:O,networkStatus:O?n.loading:n.ready}}return f||this.updateLastResult(Object(o.a)(Object(o.a)({},t),{stale:!1})),Object(o.a)(Object(o.a)({},t),{partial:f})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(l.a)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new v.a(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(l.a)(this.variables,e)||(this.variables=Object(o.a)(Object(o.a)({},this.variables),e)),Object(l.a)(this.options.variables,this.variables)||(this.options.variables=Object(o.a)(Object(o.a)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,Object(o.a)(Object(o.a)({},this.options),{fetchPolicy:t}),w.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(v.b)(e.updateQuery,2);var r=Object(o.a)(Object(o.a)({},e.query?e:Object(o.a)(Object(o.a)(Object(o.a)({},this.options),e),{variables:Object(o.a)(Object(o.a)({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),n=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(n,r,w.normal,this.queryId).then((function(o){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:o.data,variables:r.variables})})),t.queryManager.stopQuery(n),o}),(function(e){throw t.queryManager.stopQuery(n),e}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var o=t.variables;return n(e,{subscriptionData:r,variables:o})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=Object(o.a)(Object(o.a)({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var r=e.fetchPolicy;return this.setVariables(this.options.variables,t!==r&&("cache-only"===t||"standby"===t||"network-only"===r),e.fetchResults)},t.prototype.setVariables=function(e,t,r){return void 0===t&&(t=!1),void 0===r&&(r=!0),this.isTornDown=!1,e=e||this.variables,!t&&Object(l.a)(e,this.variables)?this.observers.size&&r?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=t.getQueryWithPreviousResult(this.queryId),n=r.previousResult,o=r.variables,l=r.document,f=Object(c.I)((function(){return e(n,{variables:o})}));f&&(t.dataStore.markUpdateQueryResult(l,o,f),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){E(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:Object(c.f)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var r=e._subscription._observer;r&&!r.error&&(r.error=Q)}catch(e){}var n=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),n&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,r=this.queryId;this.shouldSubscribe&&t.addObservableQuery(r,this),this.options.pollInterval&&(E(this),t.startPollingQuery(this.options,r));var c=function(t){e.updateLastResult(Object(o.a)(Object(o.a)({},e.lastResult),{errors:t.graphQLErrors,networkStatus:n.error,loading:!1})),R(e.observers,"error",e.lastError=t)};t.observeQuery(r,this.options,{next:function(r){if(e.lastError||e.isDifferentFromLastResult(r)){var n=e.updateLastResult(r),o=e.options,c=o.query,f=o.variables,h=o.fetchPolicy;t.transform(c).hasClientExports?t.getLocalState().addExportedVariables(c,f).then((function(o){var f=e.variables;e.variables=e.options.variables=o,!r.loading&&n&&"cache-only"!==h&&t.transform(c).serverQuery&&!Object(l.a)(f,o)?e.refetch():R(e.observers,"next",r)})):R(e.observers,"next",r)}},error:c}).catch(c)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(sub){return sub.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(O);function Q(e){}function R(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function E(e){var t=e.options.fetchPolicy;Object(v.b)("cache-first"!==t&&"cache-only"!==t,3)}var x=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,r){this.store[e]={mutation:t,variables:r||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var r=this.store[e];r&&(r.loading=!1,r.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),I=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Object(v.b)(!t||t.document===e.document||Object(l.a)(t.document,e.document),19);var r,o=!1,c=null;e.storePreviousVariables&&t&&t.networkStatus!==n.loading&&(Object(l.a)(t.variables,e.variables)||(o=!0,c=t.variables)),r=o?n.setVariables:e.isPoll?n.poll:e.isRefetch?n.refetch:n.loading;var f=[];t&&t.graphQLErrors&&(f=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:c,networkError:null,graphQLErrors:f,networkStatus:r,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=n.fetchMore)},e.prototype.markQueryResult=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=j(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=n.ready,"string"==typeof r&&this.store[r]&&(this.store[r].networkStatus=n.ready))},e.prototype.markQueryError=function(e,t,r){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=n.error,"string"==typeof r&&this.markQueryResultClient(r,!0))},e.prototype.markQueryResultClient=function(e,t){var r=this.store&&this.store[e];r&&(r.networkError=null,r.previousVariables=null,t&&(r.networkStatus=n.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(r){e.indexOf(r)<0?t.stopQuery(r):t.store[r].networkStatus=n.loading}))},e}();var F=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,o=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(c.A)(t.resolvers,e)})):this.resolvers=Object(c.A)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,n=e.context,c=e.variables,l=e.onlyRunForcedResolvers,f=void 0!==l&&l;return Object(o.b)(this,void 0,void 0,(function(){return Object(o.d)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,n,c,this.fragmentMatcher,f).then((function(e){return Object(o.a)(Object(o.a)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Object(c.s)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(c.C)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(o.a)(Object(o.a)({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(v.b)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),Object(o.b)(this,void 0,void 0,(function(){return Object(o.d)(this,(function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(data){return Object(o.a)(Object(o.a)({},t),data.exportedVariables)}))]:[2,Object(o.a)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(y.b)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return y.a}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(c.d)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,l,f){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===l&&(l=function(){return!0}),void 0===f&&(f=!1),Object(o.b)(this,void 0,void 0,(function(){var h,d,v,y,m,O,j,w,S;return Object(o.d)(this,(function(k){var Q;return h=Object(c.l)(e),d=Object(c.j)(e),v=Object(c.g)(d),y=h.operation,m=y?(Q=y).charAt(0).toUpperCase()+Q.slice(1):"Query",j=(O=this).cache,w=O.client,S={fragmentMap:v,context:Object(o.a)(Object(o.a)({},r),{cache:j,client:w}),variables:n,fragmentMatcher:l,defaultOperationType:m,exportedVariables:{},onlyRunForcedResolvers:f},[2,this.resolveSelectionSet(h.selectionSet,t,S).then((function(e){return{result:e,exportedVariables:S.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return Object(o.b)(this,void 0,void 0,(function(){var n,l,f,h,d,y=this;return Object(o.d)(this,(function(m){return n=r.fragmentMap,l=r.context,f=r.variables,h=[t],d=function(e){return Object(o.b)(y,void 0,void 0,(function(){var d,y;return Object(o.d)(this,(function(o){return Object(c.F)(e,f)?Object(c.t)(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&h.push(((r={})[Object(c.E)(e)]=t,r))}))]:(Object(c.v)(e)?d=e:(d=n[e.name.value],Object(v.b)(d,7)),d&&d.typeCondition&&(y=d.typeCondition.name.value,r.fragmentMatcher(t,y,l))?[2,this.resolveSelectionSet(d.selectionSet,t,r).then((function(e){h.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(d)).then((function(){return Object(c.B)(h)}))]}))}))},e.prototype.resolveField=function(e,t,r){return Object(o.b)(this,void 0,void 0,(function(){var n,l,f,h,d,v,y,m,O,j=this;return Object(o.d)(this,(function(o){return n=r.variables,l=e.name.value,f=Object(c.E)(e),h=l!==f,d=t[f]||t[l],v=Promise.resolve(d),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(y=t.__typename||r.defaultOperationType,(m=this.resolvers&&this.resolvers[y])&&(O=m[h?l:f])&&(v=Promise.resolve(O(t,Object(c.b)(e,n),r.context,{field:e,fragmentMap:r.fragmentMap})))),[2,v.then((function(t){return void 0===t&&(t=d),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(r.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?j.resolveSubSelectedArray(e,t,r):e.selectionSet?j.resolveSelectionSet(e.selectionSet,t,r):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r){var n=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?n.resolveSubSelectedArray(e,t,r):e.selectionSet?n.resolveSelectionSet(e.selectionSet,t,r):void 0})))},e}();function D(e){var t=new Set,sub=null;return new O((function(r){return t.add(r),sub=sub||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(r)&&!t.size&&sub&&(sub.unsubscribe(),sub=null)}}))}var M=Object.prototype.hasOwnProperty,P=function(){function e(e){var link=e.link,t=e.queryDeduplication,r=void 0!==t&&t,n=e.store,o=e.onBroadcast,l=void 0===o?function(){}:o,f=e.ssrMode,h=void 0!==f&&f,d=e.clientAwareness,v=void 0===d?{}:d,y=e.localState,m=e.assumeImmutableResults;this.mutationStore=new x,this.queryStore=new I,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(c.e?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=link,this.queryDeduplication=r,this.dataStore=n,this.onBroadcast=l,this.clientAwareness=v,this.localState=y||new F({cache:n.getCache()}),this.ssrMode=h,this.assumeImmutableResults=!!m}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.fetchQueryRejectFns.forEach((function(e){e(new v.a(8))}))},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,n=e.optimisticResponse,l=e.updateQueries,f=e.refetchQueries,h=void 0===f?[]:f,d=e.awaitRefetchQueries,y=void 0!==d&&d,m=e.update,O=e.errorPolicy,w=void 0===O?"none":O,k=e.fetchPolicy,Q=e.context,R=void 0===Q?{}:Q;return Object(o.b)(this,void 0,void 0,(function(){var e,f,d,O=this;return Object(o.d)(this,(function(Q){switch(Q.label){case 0:return Object(v.b)(t,9),Object(v.b)(!k||"no-cache"===k,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),r=this.getVariables(t,r),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,r,R)]:[3,2];case 1:r=Q.sent(),Q.label=2;case 2:return f=function(){var e={};return l&&O.queries.forEach((function(t,r){var n=t.observableQuery;if(n){var o=n.queryName;o&&M.call(l,o)&&(e[r]={updater:l[o],query:O.queryStore.get(r)})}})),e},this.mutationStore.initMutation(e,t,r),this.dataStore.markMutationInit({mutationId:e,document:t,variables:r,updateQueries:f(),update:m,optimisticResponse:n}),this.broadcastQueries(),d=this,[2,new Promise((function(l,v){var O,Q;d.getObservableFromLink(t,Object(o.a)(Object(o.a)({},R),{optimisticResponse:n}),r,!1).subscribe({next:function(n){Object(c.q)(n)&&"none"===w?Q=new S({graphQLErrors:n.errors}):(d.mutationStore.markMutationResult(e),"no-cache"!==k&&d.dataStore.markMutationResult({mutationId:e,result:n,document:t,variables:r,updateQueries:f(),update:m}),O=n)},error:function(t){d.mutationStore.markMutationError(e,t),d.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),d.broadcastQueries(),d.setQuery(e,(function(){return{document:null}})),v(new S({networkError:t}))},complete:function(){if(Q&&d.mutationStore.markMutationError(e,Q),d.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),d.broadcastQueries(),Q)v(Q);else{"function"==typeof h&&(h=h(O));var t=[];j(h)&&h.forEach((function(e){if("string"==typeof e)d.queries.forEach((function(r){var n=r.observableQuery;n&&n.queryName===e&&t.push(n.refetch())}));else{var r={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(r.context=e.context),t.push(d.query(r))}})),Promise.all(y?t:[]).then((function(){d.setQuery(e,(function(){return{document:null}})),"ignore"===w&&O&&Object(c.q)(O)&&delete O.errors,l(O)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,r,n){return Object(o.b)(this,void 0,void 0,(function(){var l,f,h,d,v,y,m,O,j,k,Q,R,E,x,I,F,D,M,P=this;return Object(o.d)(this,(function(C){switch(C.label){case 0:return l=t.metadata,f=void 0===l?null:l,h=t.fetchPolicy,d=void 0===h?"cache-first":h,v=t.context,y=void 0===v?{}:v,m=this.transform(t.query).document,O=this.getVariables(m,t.variables),this.transform(m).hasClientExports?[4,this.localState.addExportedVariables(m,O,y)]:[3,2];case 1:O=C.sent(),C.label=2;case 2:if(t=Object(o.a)(Object(o.a)({},t),{variables:O}),Q=k="network-only"===d||"no-cache"===d,k||(R=this.dataStore.getCache().diff({query:m,variables:O,returnPartialData:!0,optimistic:!1}),E=R.complete,x=R.result,Q=!E||"cache-and-network"===d,j=x),I=Q&&"cache-only"!==d&&"standby"!==d,Object(c.s)(["live"],m)&&(I=!0),F=this.idCounter++,D="no-cache"!==d?this.updateQueryWatch(e,m,t):void 0,this.setQuery(e,(function(){return{document:m,lastRequestId:F,invalidated:!0,cancel:D}})),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:m,storePreviousVariables:I,variables:O,isPoll:r===w.poll,isRefetch:r===w.refetch,metadata:f,fetchMoreForQueryId:n}),this.broadcastQueries(),I){if(M=this.fetchRequest({requestId:F,queryId:e,document:m,options:t,fetchMoreForQueryId:n}).catch((function(t){throw t.hasOwnProperty("graphQLErrors")?t:(F>=P.getQuery(e).lastRequestId&&(P.queryStore.markQueryError(e,t,n),P.invalidate(e),P.invalidate(n),P.broadcastQueries()),new S({networkError:t}))})),"cache-and-network"!==d)return[2,M];M.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!I),this.invalidate(e),this.invalidate(n),this.transform(m).hasForcedResolvers?[2,this.localState.runResolvers({document:m,remoteResult:{data:j},context:y,variables:O,onlyRunForcedResolvers:!0}).then((function(r){return P.markQueryResult(e,r,t,n),P.broadcastQueries(),r}))]:(this.broadcastQueries(),[2,{data:j}])}}))}))},e.prototype.markQueryResult=function(e,t,r,n){var o=r.fetchPolicy,c=r.variables,l=r.errorPolicy;"no-cache"===o?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,c,n,"ignore"===l||"all"===l)},e.prototype.queryListenerForObserver=function(e,t,r){var n=this;function o(e,t){if(r[e])try{r[e](t)}catch(e){}}return function(r,c){if(n.invalidate(e,!1),r){var l=n.getQuery(e),f=l.observableQuery,h=l.document,d=f?f.options.fetchPolicy:t.fetchPolicy;if("standby"!==d){var v=m(r.networkStatus),y=f&&f.getLastResult(),O=!(!y||y.networkStatus===r.networkStatus),w=t.returnPartialData||!c&&r.previousVariables||O&&t.notifyOnNetworkStatusChange||"cache-only"===d||"cache-and-network"===d;if(!v||w){var k=j(r.graphQLErrors),Q=f&&f.options.errorPolicy||t.errorPolicy||"none";if("none"===Q&&k||r.networkError)return o("error",new S({graphQLErrors:r.graphQLErrors,networkError:r.networkError}));try{var data=void 0,R=void 0;if(c)"no-cache"!==d&&"network-only"!==d&&n.setQuery(e,(function(){return{newData:null}})),data=c.result,R=!c.complete;else{var E=f&&f.getLastError(),x="none"!==Q&&(E&&E.graphQLErrors)!==r.graphQLErrors;if(y&&y.data&&!x)data=y.data,R=!1;else{var I=n.dataStore.getCache().diff({query:h,variables:r.previousVariables||r.variables,returnPartialData:!0,optimistic:!0});data=I.result,R=!I.complete}}var F=R&&!(t.returnPartialData||"cache-only"===d),D={data:F?y&&y.data:data,loading:v,networkStatus:r.networkStatus,stale:F};"all"===Q&&k&&(D.errors=r.graphQLErrors),o("next",D)}catch(e){o("error",new S({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.dataStore.getCache(),n=r.transformDocument(e),o=Object(c.D)(r.transformForLink(n)),l=this.localState.clientQuery(n),f=this.localState.serverQuery(o),h={document:n,hasClientExports:Object(c.r)(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:l,serverQuery:f,defaultVars:Object(c.h)(Object(c.m)(n))},d=function(e){e&&!t.has(e)&&t.set(e,h)};d(e),d(n),d(l),d(f)}return t.get(e)},e.prototype.getVariables=function(e,t){return Object(o.a)(Object(o.a)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(v.b)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=Object(o.a)({},e);return new k({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(v.b)(e.query,12),Object(v.b)("Document"===e.query.kind,13),Object(v.b)(!e.returnPartialData,14),Object(v.b)(!e.pollInterval,15),new Promise((function(r,n){var o=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+o.queryId,n),o.result().then(r,n).then((function(){return t.fetchQueryRejectFns.delete("query:"+o.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,r){var n=this,o=this.getQuery(e).cancel;o&&o();return this.dataStore.getCache().watch({query:t,variables:r.variables,optimistic:!0,previousResult:function(){var t=null,r=n.getQuery(e).observableQuery;if(r){var o=r.getLastResult();o&&(t=o.data)}return t},callback:function(t){n.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new v.a(16))}));var e=[];return this.queries.forEach((function(t,r){t.observableQuery&&e.push(r)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.queries.forEach((function(n,o){var c=n.observableQuery;if(c){var l=c.options.fetchPolicy;c.resetLastResults(),"cache-only"===l||!e&&"standby"===l||r.push(c.refetch()),t.setQuery(o,(function(){return{newData:null}})),t.invalidate(o)}})),this.broadcastQueries(),Promise.all(r)},e.prototype.observeQuery=function(e,t,r){return this.addQueryListener(e,this.queryListenerForObserver(e,t,r)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,r){return this.addQueryListener(e,r),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,o=e.variables;r=this.transform(r).document,o=this.getVariables(r,o);var l=function(e){return t.getObservableFromLink(r,{},e,!1).map((function(o){if(n&&"no-cache"===n||(t.dataStore.markSubscriptionResult(o,r,e),t.broadcastQueries()),Object(c.q)(o))throw new S({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var f=this.localState.addExportedVariables(r,o).then(l);return new O((function(e){var sub=null;return f.then((function(t){return sub=t.subscribe(e)}),e.error),function(){return sub&&sub.unsubscribe()}}))}return l(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var r=e.options,n=r.variables,o=r.query,c=r.fetchPolicy,l=r.returnPartialData,f=e.getLastResult(),h=this.getQuery(e.queryId).newData;if(h&&h.complete)return{data:h.result,partial:!1};if("no-cache"===c||"network-only"===c)return{data:void 0,partial:!1};var d=this.dataStore.getCache().diff({query:o,variables:n,previousResult:f?f.data:void 0,returnPartialData:!0,optimistic:t}),v=d.result,y=d.complete;return{data:y||l?v:void 0,partial:!y}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var r=this.getQuery(e).observableQuery;Object(v.b)(r,17),t=r}else t=e;var n=t.options,o=n.variables,c=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:o,document:c}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,r){t.invalidated&&t.listeners.forEach((function(n){n&&n(e.queryStore.get(r),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var l,f=this;void 0===n&&(n=this.queryDeduplication);var d=this.transform(e).serverQuery;if(d){var v=this.inFlightLinkObservables,link=this.link,y={query:d,variables:r,operationName:Object(c.n)(d)||void 0,context:this.prepareContext(Object(o.a)(Object(o.a)({},t),{forceFetch:!n}))};if(t=y.context,n){var m=v.get(d)||new Map;v.set(d,m);var j=JSON.stringify(r);if(!(l=m.get(j))){m.set(j,l=D(Object(h.b)(link,y)));var w=function(){m.delete(j),m.size||v.delete(d),S.unsubscribe()},S=l.subscribe({next:w,error:w,complete:w})}}else l=D(Object(h.b)(link,y))}else l=O.of({data:{}}),t=this.prepareContext(t);var k=this.transform(e).clientQuery;return k&&(l=function(e,t){return new O((function(r){var n=r.next,o=r.error,c=r.complete,l=0,f=!1,h={next:function(e){++l,new Promise((function(r){r(t(e))})).then((function(e){--l,n&&n.call(r,e),f&&h.complete()}),(function(e){--l,o&&o.call(r,e)}))},error:function(e){o&&o.call(r,e)},complete:function(){f=!0,l||c&&c.call(r)}},sub=e.subscribe(h);return function(){return sub.unsubscribe()}}))}(l,(function(e){return f.localState.runResolvers({document:k,remoteResult:e,context:t,variables:r})}))),l},e.prototype.fetchRequest=function(e){var t,r,o=this,c=e.requestId,l=e.queryId,f=e.document,h=e.options,d=e.fetchMoreForQueryId,v=h.variables,y=h.errorPolicy,m=void 0===y?"none":y,O=h.fetchPolicy;return new Promise((function(e,y){var w=o.getObservableFromLink(f,h.context,v),k="fetchRequest:"+l;o.fetchQueryRejectFns.set(k,y);var Q=function(){o.fetchQueryRejectFns.delete(k),o.setQuery(l,(function(e){e.subscriptions.delete(R)}))},R=w.map((function(e){if(c>=o.getQuery(l).lastRequestId&&(o.markQueryResult(l,e,h,d),o.queryStore.markQueryResult(l,e,d),o.invalidate(l),o.invalidate(d),o.broadcastQueries()),"none"===m&&j(e.errors))return y(new S({graphQLErrors:e.errors}));if("all"===m&&(r=e.errors),d||"no-cache"===O)t=e.data;else{var n=o.dataStore.getCache().diff({variables:v,query:f,optimistic:!1,returnPartialData:!0}),w=n.result;(n.complete||h.returnPartialData)&&(t=w)}})).subscribe({error:function(e){Q(),y(e)},complete:function(){Q(),e({data:t,errors:r,loading:!1,networkStatus:n.ready,stale:!1})}});o.setQuery(l,(function(e){e.subscriptions.add(R)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var r=this.getQuery(e),n=Object(o.a)(Object(o.a)({},r),t(r));this.queries.set(e,n)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(o.a)(Object(o.a)({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==n.ready&&t.networkStatus!==n.error},e.prototype.startPollingQuery=function(e,t,r){var n=this,c=e.pollInterval;if(Object(v.b)(c,18),!this.ssrMode){var l=this.pollingInfoByQueryId.get(t);l||this.pollingInfoByQueryId.set(t,l={}),l.interval=c,l.options=Object(o.a)(Object(o.a)({},e),{fetchPolicy:"network-only"});var f=function(){var e=n.pollingInfoByQueryId.get(t);e&&(n.checkInFlight(t)?h():n.fetchQuery(t,e.options,w.poll).then(h,h))},h=function(){var e=n.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(f,e.interval))};r&&this.addQueryListener(t,r),h()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),C=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,r,n,o){void 0===o&&(o=!1);var l=!Object(c.q)(e);o&&Object(c.q)(e)&&e.data&&(l=!0),!n&&l&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:r})},e.prototype.markSubscriptionResult=function(e,t,r){Object(c.q)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:r})},e.prototype.markMutationInit=function(e){var t,r=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(n){var o=r.cache;r.cache=n;try{r.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{r.cache=o}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(c.q)(e.result)){var r=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],n=e.updateQueries;n&&Object.keys(n).forEach((function(o){var l=n[o],f=l.query,h=l.updater,d=t.cache.diff({query:f.document,variables:f.variables,returnPartialData:!0,optimistic:!1}),v=d.result;if(d.complete){var y=Object(c.I)((function(){return h(v,{mutationResult:e.result,queryName:Object(c.n)(f.document)||void 0,queryVariables:f.variables})}));y&&r.push({result:y,dataId:"ROOT_QUERY",query:f.document,variables:f.variables})}})),this.cache.performTransaction((function(t){r.forEach((function(e){return t.write(e)}));var n=e.update;n&&Object(c.I)((function(){return n(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,r){this.cache.write({result:r,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),_=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.cache,n=e.ssrMode,o=void 0!==n&&n,c=e.ssrForceFetchDelay,l=void 0===c?0:c,f=e.connectToDevTools,d=e.queryDeduplication,y=void 0===d||d,m=e.defaultOptions,O=e.assumeImmutableResults,j=void 0!==O&&O,w=e.resolvers,S=e.typeDefs,k=e.fragmentMatcher,Q=e.name,R=e.version,link=e.link;if(!link&&w&&(link=h.a.empty()),!link||!r)throw new v.a(4);this.link=link,this.cache=r,this.store=new C(r),this.disableNetworkFetches=o||l>0,this.queryDeduplication=y,this.defaultOptions=m||{},this.typeDefs=S,l&&setTimeout((function(){return t.disableNetworkFetches=!1}),l),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);void 0!==f&&(f&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new F({cache:r,client:this,resolvers:w,fragmentMatcher:k}),this.queryManager=new P({link:this.link,store:this.store,queryDeduplication:y,ssrMode:o,clientAwareness:{name:Q,version:R},localState:this.localState,assumeImmutableResults:j,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(o.a)(Object(o.a)({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(o.a)(Object(o.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(o.a)(Object(o.a)({},this.defaultOptions.query),e)),Object(v.b)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(o.a)(Object(o.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(o.a)(Object(o.a)({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Object(h.b)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}()},747:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n,o=function(){for(var s=0,i=0,e=arguments.length;i0&&n[n.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]0&&n[n.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!n||c[1]>n[0]&&c[1]this.maxSize&&!this.paused?[4,this.purge()]:[3,2];case 1:return t.sent(),this.paused=!0,[2];case 2:return this.paused?[2]:[4,this.storage.write(data)];case 3:return t.sent(),this.log.info("string"==typeof data?"Persisted cache of size "+data.length+" characters":"Persisted cache"),[3,5];case 4:throw e=t.sent(),this.log.error("Error persisting cache",e),e;case 5:return[2]}}))}))},e.prototype.restore=function(){return y(this,void 0,void 0,(function(){var data,e;return m(this,(function(t){switch(t.label){case 0:return t.trys.push([0,5,,6]),[4,this.storage.read()];case 1:return null==(data=t.sent())?[3,3]:[4,this.cache.restore(data)];case 2:return t.sent(),this.log.info("string"==typeof data?"Restored cache of size "+data.length+" characters":"Restored cache"),[3,4];case 3:this.log.info("No stored cache to restore"),t.label=4;case 4:return[3,6];case 5:throw e=t.sent(),this.log.error("Error restoring cache",e),e;case 6:return[2]}}))}))},e.prototype.purge=function(){return y(this,void 0,void 0,(function(){var e;return m(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.storage.purge()];case 1:return t.sent(),this.log.info("Purged cache storage"),[3,3];case 2:throw e=t.sent(),this.log.error("Error purging cache storage",e),e;case 3:return[2]}}))}))},e}(),j=function(e){var t=e.cache;return function(e){var r=t.write,n=t.evict,o=t.modify;return t.write=function(){for(var n=[],o=0;o=300&&d(e,t,"Response not successful: Received status code "+e.status),Array.isArray(t)||t.hasOwnProperty("data")||t.hasOwnProperty("errors")||d(e,t,"Server response was missing for query '"+(Array.isArray(n)?n.map((function(e){return e.operationName})):n.operationName)+"'."),t}))})).then((function(e){return r.next(e),r.complete(),e})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){Q&&Q.abort()}}))}))};!function(e){function t(t){return e.call(this,y(t).request)||this}Object(n.c)(t,e)}(o.a)},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return S})),r.d(t,"b",(function(){return k})),r.d(t,"c",(function(){return h}));var n=r(70),o=r(34),c=r(14),l=r(18);!function(e){function t(t,link){var r=e.call(this,t)||this;return r.link=link,r}Object(c.c)(t,e)}(Error);function f(link){return link.request.length<=1}function h(e){return new n.a((function(t){t.error(e)}))}function d(e,t){var r=Object(c.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?Object(c.a)({},r,e(r)):Object(c.a)({},r,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(c.a)({},r)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,r=e.variables,n=e.operationName;return JSON.stringify([n,t,r])}(t)}}),t}function v(e,t){return t?t(e):n.a.of()}function y(e){return"function"==typeof e?new S(e):e}function m(){return new S((function(){return n.a.of()}))}function O(e){return 0===e.length?m():e.map(y).reduce((function(e,t){return e.concat(t)}))}function j(e,t,r){var o=y(t),c=y(r||new S(v));return f(o)&&f(c)?new S((function(t){return e(t)?o.request(t)||n.a.of():c.request(t)||n.a.of()})):new S((function(t,r){return e(t)?o.request(t,r)||n.a.of():c.request(t,r)||n.a.of()}))}var w=function(e,t){var r=y(e);if(f(r))return r;var o=y(t);return f(o)?new S((function(e){return r.request(e,(function(e){return o.request(e)||n.a.of()}))||n.a.of()})):new S((function(e,t){return r.request(e,(function(e){return o.request(e,t)||n.a.of()}))||n.a.of()}))},S=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,r,n){return this.concat(j(t,r,n||new e(v)))},e.prototype.concat=function(e){return w(this,e)},e.prototype.request=function(e,t){throw new o.a(1)},e.empty=m,e.from=O,e.split=j,e.execute=k,e}();function k(link,e){return link.request(d(e.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(l.n)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r