enqueueScripts([function(){ (window.webpackJsonpvtex_render_runtime_8_134_8=window.webpackJsonpvtex_render_runtime_8_134_8||[]).push([["apollo"],{111:function(e,t,r){e.exports=global.ApolloLinkPersistedQueries=r(590)},112:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));r(136),r(134);var n=r(12),i=r(26),o=r(30),a=r(86),s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.uri,r=void 0===t?"/graphql":t,s=e.fetch,u=void 0===s?fetch:s,c=e.fetchOptions,l=e.credentials,f=e.headers,p=e.includeExtensions,d={http:{includeExtensions:p},options:c,credentials:l,headers:f};return new n.a((function(e){var t=Object(o.f)(e,r),n=e.getContext(),s={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:n.headers},c=Object(o.e)(e,o.c,d,s),l=c.options,f=c.body,p=Object(a.a)(f),h=Object(o.g)(f,"Payload");return p.length?(delete l.headers["content-type"],l.body=new FormData,l.body.append("operations",h),l.body.append("map",JSON.stringify(p.reduce((function(e,t,r){var n=t.path;return e["".concat(r)]=[n],e}),{}))),p.forEach((function(e,t){var r=e.file;return l.body.append(t,r,r.name)}))):l.body=h,new i.default((function(r){var n=Object(o.b)(),i=n.controller,a=n.signal;return i&&(l.signal=a),u(t,l).then((function(t){return e.setContext({response:t}),t})).then(Object(o.d)(e)).then((function(e){r.next(e),r.complete()})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&r.next(e.result),r.error(e))})),function(){i&&i.abort()}}))}))}},114:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(1),i=r(12),o=r(26),a=r(30),s=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,s=e.fetch,u=e.includeExtensions,c=e.useGETForQueries,l=Object(n.__rest)(e,["uri","fetch","includeExtensions","useGETForQueries"]);Object(a.a)(s),s||(s=fetch);var f={http:{includeExtensions:u},options:l.fetchOptions,credentials:l.credentials,headers:l.headers};return new i.a((function(e){var t=Object(a.f)(e,r),u=e.getContext(),l={};if(u.clientAwareness){var p=u.clientAwareness,d=p.name,h=p.version;d&&(l["apollographql-client-name"]=d),h&&(l["apollographql-client-version"]=h)}var v,b=Object(n.__assign)({},l,u.headers),y={http:u.http,options:u.fetchOptions,credentials:u.credentials,headers:b},m=Object(a.e)(e,a.c,f,y),g=m.options,O=m.body;if(!g.signal){var j=Object(a.b)(),S=j.controller,w=j.signal;(v=S)&&(g.signal=w)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),"GET"===g.method){var Q=function(e,t){var r=[],n=function(e,t){r.push(e+"="+encodeURIComponent(t))};"query"in t&&n("query",t.query);t.operationName&&n("operationName",t.operationName);if(t.variables){var i=void 0;try{i=Object(a.g)(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=Object(a.g)(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",u=e,c=e.indexOf("#");-1!==c&&(s=e.substr(c),u=e.substr(0,c));var l=-1===u.indexOf("?")?"?":"&";return{newURI:u+l+r.join("&")+s}}(t,O),_=Q.newURI,k=Q.parseError;if(k)return Object(i.d)(k);t=_}else try{g.body=Object(a.g)(O,"Payload")}catch(k){return Object(i.d)(k)}return new o.default((function(r){return s(t,g).then((function(t){return e.setContext({response:t}),t})).then(Object(a.d)(e)).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(){v&&v.abort()}}))}))};!function(e){function t(t){return e.call(this,s(t).request)||this}Object(n.__extends)(t,e)}(i.a)},118:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=n.__importDefault(r(26)),o=r(3);t.getOperationName=o.getOperationName;var a=r(4);t.validateOperation=function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r1&&void 0!==arguments[1]?arguments[1]:"Error writing query from render-server in Apollo's cache";return function(){var r=Object(o.a)(i.a.mark((function r(n){var o;return i.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n&&0!==n.length){r.next=2;break}return r.abrupt("return");case 2:return o=u.canUseDOM?f:l,r.next=5,o(n,e,t);case 5:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()},l=function(e,t,r){return e.map((function(e){var n=e.data,i=e.query,o=e.variables;try{t.writeQuery({query:Object(a.parse)(i),data:JSON.parse(n),variables:o})}catch(e){r&&console.warn(r,e)}}))},f=function(e,t,r){return Promise.all(e.map((function(e){var n=e.data,i=e.query,o=e.variables;return Object(s.a)((function(e){try{t.writeQuery({query:Object(a.parse)(i),data:JSON.parse(n),variables:o})}catch(e){r&&console.warn(r,e)}e()}))})))}},159:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(1),i=r(12),o=r(26);function a(e){return new i.a((function(t,r){return new o.default((function(n){var i,o,a;try{i=r(t).subscribe({next:function(i){i.errors&&(a=e({graphQLErrors:i.errors,response:i,operation:t,forward:r}))?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.next(i)},error:function(i){(a=e({operation:t,networkError:i,graphQLErrors:i&&i.result&&i.result.errors,forward:r}))?o=a.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)}):n.error(i)},complete:function(){a||n.complete.bind(n)()}})}catch(i){e({networkError:i,operation:t,forward:r}),n.error(i)}return function(){i&&i.unsubscribe(),o&&i.unsubscribe()}}))}))}!function(e){function t(t){var r=e.call(this)||this;return r.link=a(t),r}Object(n.__extends)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(i.a)},3:function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"addTypenameToDocument",(function(){return Y})),r.d(t,"argumentsObjectFromField",(function(){return v})),r.d(t,"assign",(function(){return I})),r.d(t,"buildQueryFromSelectionSet",(function(){return ie})),r.d(t,"canUseWeakMap",(function(){return ae})),r.d(t,"checkDocument",(function(){return M})),r.d(t,"cloneDeep",(function(){return ue})),r.d(t,"createFragmentMap",(function(){return W})),r.d(t,"getDefaultValues",(function(){return z})),r.d(t,"getDirectiveInfoFromField",(function(){return Q})),r.d(t,"getDirectiveNames",(function(){return k})),r.d(t,"getDirectivesFromDocument",(function(){return te})),r.d(t,"getEnv",(function(){return ce})),r.d(t,"getFragmentDefinition",(function(){return L})),r.d(t,"getFragmentDefinitions",(function(){return V})),r.d(t,"getFragmentQueryDocument",(function(){return D})),r.d(t,"getInclusionDirectives",(function(){return E})),r.d(t,"getMainDefinition",(function(){return A})),r.d(t,"getMutationDefinition",(function(){return F})),r.d(t,"getOperationDefinition",(function(){return P})),r.d(t,"getOperationDefinitionOrDie",(function(){return C})),r.d(t,"getOperationName",(function(){return N})),r.d(t,"getQueryDefinition",(function(){return T})),r.d(t,"getStoreKeyName",(function(){return h})),r.d(t,"graphQLResultHasError",(function(){return ve})),r.d(t,"hasClientExports",(function(){return x})),r.d(t,"hasDirectives",(function(){return R})),r.d(t,"isDevelopment",(function(){return pe})),r.d(t,"isEnv",(function(){return le})),r.d(t,"isField",(function(){return y})),r.d(t,"isIdValue",(function(){return g})),r.d(t,"isInlineFragment",(function(){return m})),r.d(t,"isJsonValue",(function(){return j})),r.d(t,"isNumberValue",(function(){return l})),r.d(t,"isProduction",(function(){return fe})),r.d(t,"isScalarValue",(function(){return c})),r.d(t,"isTest",(function(){return de})),r.d(t,"maybeDeepFreeze",(function(){return be})),r.d(t,"mergeDeep",(function(){return me})),r.d(t,"mergeDeepArray",(function(){return ge})),r.d(t,"removeArgumentsFromDocument",(function(){return re})),r.d(t,"removeClientSetsFromDocument",(function(){return oe})),r.d(t,"removeConnectionDirectiveFromDocument",(function(){return X})),r.d(t,"removeDirectivesFromDocument",(function(){return G})),r.d(t,"removeFragmentSpreadFromDocument",(function(){return ne})),r.d(t,"resultKeyNameFromField",(function(){return b})),r.d(t,"shouldInclude",(function(){return _})),r.d(t,"storeKeyNameFromField",(function(){return p})),r.d(t,"stripSymbols",(function(){return _e})),r.d(t,"toIdValue",(function(){return O})),r.d(t,"tryFunctionOrLogError",(function(){return he})),r.d(t,"valueFromNode",(function(){return w})),r.d(t,"valueToObjectRepresentation",(function(){return f})),r.d(t,"variablesInOperation",(function(){return U})),r.d(t,"warnOnceInDevelopment",(function(){return Qe}));var n=r(15),i=r(4),o=r(1),a=r(148),s=r.n(a),u=r(28);function c(e){return["StringValue","BooleanValue","EnumValue"].indexOf(e.kind)>-1}function l(e){return["IntValue","FloatValue"].indexOf(e.kind)>-1}function f(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 o={};r.fields.map((function(e){return f(o,e.name,e.value,n)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(r)){var a=(n||{})[r.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return f(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 i.InvariantError(17);e[t.value]=null}}function p(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 i=n.name,o=n.value;return f(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return f(n,r,i,t)}))),h(e.name.value,n,r)}r.d(t,"isEqual",(function(){return u.a}));var d=["connection","include","skip","client","rest","export"];function h(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 i=t,o={};return n.forEach((function(e){o[e]=i[e]})),r.connection.key+"("+JSON.stringify(o)+")"}return r.connection.key}var a=e;if(t){var u=s()(t);a+="("+u+")"}return r&&Object.keys(r).forEach((function(e){-1===d.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?a+="@"+e+"("+JSON.stringify(r[e])+")":a+="@"+e)})),a}function v(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return f(r,n,i,t)})),r}return null}function b(e){return e.alias?e.alias.value:e.name.value}function y(e){return"Field"===e.kind}function m(e){return"InlineFragment"===e.kind}function g(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function O(e,t){return void 0===t&&(t=!1),Object(o.__assign)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function j(e){return null!=e&&"object"==typeof e&&"json"===e.type}function S(e){throw new i.InvariantError(18)}function w(e,t){switch(void 0===t&&(t=S),e.kind){case"Variable":return t(e);case"NullValue":return null;case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"ListValue":return e.values.map((function(e){return w(e,t)}));case"ObjectValue":for(var r={},n=0,i=e.fields;n-1}))}function x(e){return e&&R(["client"],e)&&R(["export"],e)}function q(e){var t=e.name.value;return"skip"===t||"include"===t}function E(e){return e?e.filter(q).map((function(e){var t=e.arguments;e.name.value;Object(i.invariant)(t&&1===t.length,4);var r=t[0];Object(i.invariant)(r.name&&"if"===r.name.value,5);var n=r.value;return Object(i.invariant)(n&&("Variable"===n.kind||"BooleanValue"===n.kind),6),{directive:e,ifArgument:r}})):[]}function D(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.InvariantError(1);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&(Object(i.invariant)(1===n.length,2),r=n[0].name.value),Object(o.__assign)({},e,{definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}].concat(e.definitions)})}function I(e){for(var t=[],r=1;r1){var n=[];t=Se(t,n);for(var i=1;i=300&&s(t,r,"Response not successful: Received status code "+t.status),Array.isArray(r)||r.hasOwnProperty("data")||r.hasOwnProperty("errors")||s(t,r,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),r}))}},c=function(e){if(!e&&"undefined"==typeof fetch){throw"undefined"==typeof window&&"node-fetch",new o.InvariantError(1)}},l=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},f=function(e,t){for(var r=[],o=2;o0}var v,b=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.networkError,s=r.errorMessage,u=r.extraInfo,c=e.call(this,s)||this;return c.graphQLErrors=o||[],c.networkError=a||null,c.message=s||(i="",h((n=c).graphQLErrors)&&n.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";i+="GraphQL error: "+t+"\n"})),n.networkError&&(i+="Network error: "+n.networkError.message+"\n"),i=i.replace(/\n$/,"")),c.extraInfo=u,c.__proto__=t.prototype,c}return Object(i.__extends)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(v||(v={}));var y=function(e){function t(t){var r=t.queryManager,n=t.options,i=t.shouldSubscribe,a=void 0===i||i,s=e.call(this,(function(e){return s.onSubscribe(e)}))||this;s.observers=new Set,s.subscriptions=new Set,s.isTornDown=!1,s.options=n,s.variables=n.variables||{},s.queryId=r.generateQueryId(),s.shouldSubscribe=a;var u=Object(o.getOperationDefinition)(n.query);return s.queryName=u&&u.name&&u.name.value,s.queryManager=r,s}return Object(i.__extends)(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(){i.unsubscribe()}),0)},error:r},i=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,o,a=this.queryManager.getCurrentQueryResult(this),s=a.data,u=a.partial,c=this.queryManager.queryStore.get(this.queryId),l=this.options.fetchPolicy,f="network-only"===l||"no-cache"===l;if(c){var d=c.networkStatus;if(r=c,void 0===(o=this.options.errorPolicy)&&(o="none"),r&&(r.networkError||"none"===o&&h(r.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:d,error:new b({graphQLErrors:c.graphQLErrors,networkError:c.networkError})};c.variables&&(this.options.variables=Object(i.__assign)({},this.options.variables,c.variables),this.variables=this.options.variables),t={data:s,loading:p(d),networkStatus:d},c.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=c.graphQLErrors)}else{var v=f||u&&"cache-only"!==l;t={data:s,loading:v,networkStatus:v?n.loading:n.ready}}return u||this.updateLastResult(Object(i.__assign)({},t,{stale:!1})),Object(i.__assign)({},t,{partial:u})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(a.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 l.InvariantError(3)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(a.a)(this.variables,e)||(this.variables=Object(i.__assign)({},this.variables,e)),Object(a.a)(this.options.variables,this.variables)||(this.options.variables=Object(i.__assign)({},this.options.variables,this.variables)),this.queryManager.fetchQuery(this.queryId,Object(i.__assign)({},this.options,{fetchPolicy:t}),v.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(l.invariant)(e.updateQuery,4);var r=Object(i.__assign)({},e.query?e:Object(i.__assign)({},this.options,e,{variables:Object(i.__assign)({},this.variables,e.variables)}),{fetchPolicy:"network-only"}),n=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(n,r,v.normal,this.queryId).then((function(i){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:r.variables})})),t.queryManager.stopQuery(n),i}),(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 i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},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(i.__assign)({},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(a.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,i=r.variables,a=r.document,s=Object(o.tryFunctionOrLogError)((function(){return e(n,{variables:i})}));s&&(t.dataStore.markUpdateQueryResult(a,i,s),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){O(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(o.cloneDeep)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var r=e._subscription._observer;r&&!r.error&&(r.error=m)}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&&(O(this),t.startPollingQuery(this.options,r));var o=function(t){e.updateLastResult(Object(i.__assign)({},e.lastResult,{errors:t.graphQLErrors,networkStatus:n.error,loading:!1})),g(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),i=e.options,o=i.query,s=i.variables,u=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,s).then((function(i){var s=e.variables;e.variables=e.options.variables=i,!r.loading&&n&&"cache-only"!==u&&t.transform(o).serverQuery&&!Object(a.a)(s,i)?e.refetch():g(e.observers,"next",r)})):g(e.observers,"next",r)}},error:o}).catch(o)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(d);function m(e){}function g(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function O(e){var t=e.options.fetchPolicy;Object(l.invariant)("cache-first"!==t&&"cache-only"!==t,5)}var j=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}(),S=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(l.invariant)(!t||t.document===e.document||Object(a.a)(t.document,e.document),19);var r,i=!1,o=null;e.storePreviousVariables&&t&&t.networkStatus!==n.loading&&(Object(a.a)(t.variables,e.variables)||(i=!0,o=t.variables)),r=i?n.setVariables:e.isPoll?n.poll:e.isRefetch?n.refetch:n.loading;var s=[];t&&t.graphQLErrors&&(s=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:o,networkError:null,graphQLErrors:s,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=h(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 w=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(o.mergeDeep)(t.resolvers,e)})):this.resolvers=Object(o.mergeDeep)(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,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return Object(i.__awaiter)(this,void 0,void 0,(function(){return Object(i.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,n,o,this.fragmentMatcher,s).then((function(e){return Object(i.__assign)({},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(o.hasDirectives)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(o.removeClientSetsFromDocument)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(i.__assign)({},e,{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(l.invariant)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),Object(i.__awaiter)(this,void 0,void 0,(function(){return Object(i.__generator)(this,(function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return Object(i.__assign)({},t,e.exportedVariables)}))]:[2,Object(i.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(f.c)(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 f.a}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(o.buildQueryFromSelectionSet)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,a,s){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===a&&(a=function(){return!0}),void 0===s&&(s=!1),Object(i.__awaiter)(this,void 0,void 0,(function(){var u,c,l,f,p,d,h,v,b;return Object(i.__generator)(this,(function(y){var m;return u=Object(o.getMainDefinition)(e),c=Object(o.getFragmentDefinitions)(e),l=Object(o.createFragmentMap)(c),f=u.operation,p=f?(m=f).charAt(0).toUpperCase()+m.slice(1):"Query",h=(d=this).cache,v=d.client,b={fragmentMap:l,context:Object(i.__assign)({},r,{cache:h,client:v}),variables:n,fragmentMatcher:a,defaultOperationType:p,exportedVariables:{},onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(u.selectionSet,t,b).then((function(e){return{result:e,exportedVariables:b.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,(function(){var n,a,s,u,c,f=this;return Object(i.__generator)(this,(function(p){return n=r.fragmentMap,a=r.context,s=r.variables,u=[t],c=function(e){return Object(i.__awaiter)(f,void 0,void 0,(function(){var c,f;return Object(i.__generator)(this,(function(i){return Object(o.shouldInclude)(e,s)?Object(o.isField)(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&u.push(((r={})[Object(o.resultKeyNameFromField)(e)]=t,r))}))]:(Object(o.isInlineFragment)(e)?c=e:(c=n[e.name.value],Object(l.invariant)(c,7)),c&&c.typeCondition&&(f=c.typeCondition.name.value,r.fragmentMatcher(t,f,a))?[2,this.resolveSelectionSet(c.selectionSet,t,r).then((function(e){u.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return Object(o.mergeDeepArray)(u)}))]}))}))},e.prototype.resolveField=function(e,t,r){return Object(i.__awaiter)(this,void 0,void 0,(function(){var n,a,s,u,c,l,f,p,d,h=this;return Object(i.__generator)(this,(function(i){return n=r.variables,a=e.name.value,s=Object(o.resultKeyNameFromField)(e),u=a!==s,c=t[s]||t[a],l=Promise.resolve(c),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=t.__typename||r.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?a:s])&&(l=Promise.resolve(d(t,Object(o.argumentsObjectFromField)(e,n),r.context,{field:e})))),[2,l.then((function(t){return void 0===t&&(t=c),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)?h.resolveSubSelectedArray(e,t,r):e.selectionSet?h.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 Q(e){var t=new Set,r=null;return new d((function(n){return t.add(n),r=r||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(n)&&!t.size&&r&&(r.unsubscribe(),r=null)}}))}var _=Object.prototype.hasOwnProperty,k=function(){function e(e){var t=e.link,r=e.queryDeduplication,n=void 0!==r&&r,i=e.store,a=e.onBroadcast,s=void 0===a?function(){}:a,u=e.ssrMode,c=void 0!==u&&u,l=e.clientAwareness,f=void 0===l?{}:l,p=e.localState,d=e.assumeImmutableResults;this.mutationStore=new j,this.queryStore=new S,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(o.canUseWeakMap?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=n,this.dataStore=i,this.onBroadcast=s,this.clientAwareness=f,this.localState=p||new w({cache:i.getCache()}),this.ssrMode=c,this.assumeImmutableResults=!!d}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.fetchQueryRejectFns.forEach((function(e){e(new l.InvariantError(8))}))},e.prototype.mutate=function(e){var t=e.mutation,r=e.variables,n=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.awaitRefetchQueries,f=void 0!==c&&c,p=e.update,d=e.errorPolicy,v=void 0===d?"none":d,y=e.fetchPolicy,m=e.context,g=void 0===m?{}:m;return Object(i.__awaiter)(this,void 0,void 0,(function(){var e,s,c,d=this;return Object(i.__generator)(this,(function(m){switch(m.label){case 0:return Object(l.invariant)(t,9),Object(l.invariant)(!y||"no-cache"===y,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,g)]:[3,2];case 1:r=m.sent(),m.label=2;case 2:return s=function(){var e={};return a&&d.queries.forEach((function(t,r){var n=t.observableQuery;if(n){var i=n.queryName;i&&_.call(a,i)&&(e[r]={updater:a[i],query:d.queryStore.get(r)})}})),e},this.mutationStore.initMutation(e,t,r),this.dataStore.markMutationInit({mutationId:e,document:t,variables:r,updateQueries:s(),update:p,optimisticResponse:n}),this.broadcastQueries(),c=this,[2,new Promise((function(a,l){var d,m;c.getObservableFromLink(t,Object(i.__assign)({},g,{optimisticResponse:n}),r,!1).subscribe({next:function(n){Object(o.graphQLResultHasError)(n)&&"none"===v?m=new b({graphQLErrors:n.errors}):(c.mutationStore.markMutationResult(e),"no-cache"!==y&&c.dataStore.markMutationResult({mutationId:e,result:n,document:t,variables:r,updateQueries:s(),update:p}),d=n)},error:function(t){c.mutationStore.markMutationError(e,t),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),c.broadcastQueries(),c.setQuery(e,(function(){return{document:null}})),l(new b({networkError:t}))},complete:function(){if(m&&c.mutationStore.markMutationError(e,m),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:n}),c.broadcastQueries(),m)l(m);else{"function"==typeof u&&(u=u(d));var t=[];h(u)&&u.forEach((function(e){if("string"==typeof e)c.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(c.query(r))}})),Promise.all(f?t:[]).then((function(){c.setQuery(e,(function(){return{document:null}})),"ignore"===v&&d&&Object(o.graphQLResultHasError)(d)&&delete d.errors,a(d)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,r,n){return Object(i.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,d,h,y,m,g,O,j,S,w,Q,_,k=this;return Object(i.__generator)(this,(function(R){switch(R.label){case 0:return a=t.metadata,s=void 0===a?null:a,u=t.fetchPolicy,c=void 0===u?"cache-first":u,l=t.context,f=void 0===l?{}:l,p=this.transform(t.query).document,d=this.getVariables(p,t.variables),this.transform(p).hasClientExports?[4,this.localState.addExportedVariables(p,d,f)]:[3,2];case 1:d=R.sent(),R.label=2;case 2:if(t=Object(i.__assign)({},t,{variables:d}),m=y="network-only"===c||"no-cache"===c,y||(g=this.dataStore.getCache().diff({query:p,variables:d,returnPartialData:!0,optimistic:!1}),O=g.complete,j=g.result,m=!O||"cache-and-network"===c,h=j),S=m&&"cache-only"!==c&&"standby"!==c,Object(o.hasDirectives)(["live"],p)&&(S=!0),w=this.idCounter++,Q="no-cache"!==c?this.updateQueryWatch(e,p,t):void 0,this.setQuery(e,(function(){return{document:p,lastRequestId:w,invalidated:!0,cancel:Q}})),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:p,storePreviousVariables:S,variables:d,isPoll:r===v.poll,isRefetch:r===v.refetch,metadata:s,fetchMoreForQueryId:n}),this.broadcastQueries(),S){if(_=this.fetchRequest({requestId:w,queryId:e,document:p,options:t,fetchMoreForQueryId:n}).catch((function(t){throw t.hasOwnProperty("graphQLErrors")?t:(w>=k.getQuery(e).lastRequestId&&(k.queryStore.markQueryError(e,t,n),k.invalidate(e),k.invalidate(n),k.broadcastQueries()),new b({networkError:t}))})),"cache-and-network"!==c)return[2,_];_.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!S),this.invalidate(e),this.invalidate(n),this.transform(p).hasForcedResolvers?[2,this.localState.runResolvers({document:p,remoteResult:{data:h},context:f,variables:d,onlyRunForcedResolvers:!0}).then((function(r){return k.markQueryResult(e,r,t,n),k.broadcastQueries(),r}))]:(this.broadcastQueries(),[2,{data:h}])}}))}))},e.prototype.markQueryResult=function(e,t,r,n){var i=r.fetchPolicy,o=r.variables,a=r.errorPolicy;"no-cache"===i?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,n,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,r){var n=this;function i(e,t){if(r[e])try{r[e](t)}catch(e){}}return function(r,o){if(n.invalidate(e,!1),r){var a=n.getQuery(e),s=a.observableQuery,u=a.document,c=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==c){var l=p(r.networkStatus),f=s&&s.getLastResult(),d=!(!f||f.networkStatus===r.networkStatus),v=t.returnPartialData||!o&&r.previousVariables||d&&t.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!l||v){var y=h(r.graphQLErrors),m=s&&s.options.errorPolicy||t.errorPolicy||"none";if("none"===m&&y||r.networkError)return i("error",new b({graphQLErrors:r.graphQLErrors,networkError:r.networkError}));try{var g=void 0,O=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&n.setQuery(e,(function(){return{newData:null}})),g=o.result,O=!o.complete;else{var j=s&&s.getLastError(),S="none"!==m&&(j&&j.graphQLErrors)!==r.graphQLErrors;if(f&&f.data&&!S)g=f.data,O=!1;else{var w=n.dataStore.getCache().diff({query:u,variables:r.previousVariables||r.variables,returnPartialData:!0,optimistic:!0});g=w.result,O=!w.complete}}var Q=O&&!(t.returnPartialData||"cache-only"===c),_={data:Q?f&&f.data:g,loading:l,networkStatus:r.networkStatus,stale:Q};"all"===m&&y&&(_.errors=r.graphQLErrors),i("next",_)}catch(e){i("error",new b({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.dataStore.getCache(),n=r.transformDocument(e),i=Object(o.removeConnectionDirectiveFromDocument)(r.transformForLink(n)),a=this.localState.clientQuery(n),s=this.localState.serverQuery(i),u={document:n,hasClientExports:Object(o.hasClientExports)(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:a,serverQuery:s,defaultVars:Object(o.getDefaultValues)(Object(o.getOperationDefinition)(n))},c=function(e){e&&!t.has(e)&&t.set(e,u)};c(e),c(n),c(a),c(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return Object(i.__assign)({},this.transform(e).defaultVars,t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(l.invariant)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var r=Object(i.__assign)({},e);return new y({queryManager:this,options:r,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(l.invariant)(e.query,12),Object(l.invariant)("Document"===e.query.kind,13),Object(l.invariant)(!e.returnPartialData,14),Object(l.invariant)(!e.pollInterval,15),new Promise((function(r,n){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,n),i.result().then(r,n).then((function(){return t.fetchQueryRejectFns.delete("query:"+i.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,i=this.getQuery(e).cancel;i&&i();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 i=r.getLastResult();i&&(t=i.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 l.InvariantError(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,i){var o=n.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||r.push(o.refetch()),t.setQuery(i,(function(){return{newData:null}})),t.invalidate(i)}})),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,i=e.variables;r=this.transform(r).document,i=this.getVariables(r,i);var a=function(e){return t.getObservableFromLink(r,{},e,!1).map((function(i){if(n&&"no-cache"===n||(t.dataStore.markSubscriptionResult(i,r,e),t.broadcastQueries()),Object(o.graphQLResultHasError)(i))throw new b({graphQLErrors:i.errors});return i}))};if(this.transform(r).hasClientExports){var s=this.localState.addExportedVariables(r,i).then(a);return new d((function(e){var t=null;return s.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return a(i)},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,i=r.query,o=r.fetchPolicy,a=r.returnPartialData,s=e.getLastResult(),u=this.getQuery(e.queryId).newData;if(u&&u.complete)return{data:u.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:n,previousResult:s?s.data:void 0,returnPartialData:!0,optimistic:t}),l=c.result,f=c.complete;return{data:f||a?l:void 0,partial:!f}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var r=this.getQuery(e).observableQuery;Object(l.invariant)(r,17),t=r}else t=e;var n=t.options,i=n.variables,o=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},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 a,s=this;void 0===n&&(n=this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var l=this.inFlightLinkObservables,f=this.link,p={query:c,variables:r,operationName:Object(o.getOperationName)(c)||void 0,context:this.prepareContext(Object(i.__assign)({},t,{forceFetch:!n}))};if(t=p.context,n){var h=l.get(c)||new Map;l.set(c,h);var v=JSON.stringify(r);if(!(a=h.get(v))){h.set(v,a=Q(Object(u.c)(f,p)));var b=function(){h.delete(v),h.size||l.delete(c),y.unsubscribe()},y=a.subscribe({next:b,error:b,complete:b})}}else a=Q(Object(u.c)(f,p))}else a=d.of({data:{}}),t=this.prepareContext(t);var m=this.transform(e).clientQuery;return m&&(a=function(e,t){return new d((function(r){var n=r.next,i=r.error,o=r.complete,a=0,s=!1,u={next:function(e){++a,new Promise((function(r){r(t(e))})).then((function(e){--a,n&&n.call(r,e),s&&u.complete()}),(function(e){--a,i&&i.call(r,e)}))},error:function(e){i&&i.call(r,e)},complete:function(){s=!0,a||o&&o.call(r)}},c=e.subscribe(u);return function(){return c.unsubscribe()}}))}(a,(function(e){return s.localState.runResolvers({document:m,remoteResult:e,context:t,variables:r})}))),a},e.prototype.fetchRequest=function(e){var t,r,i=this,o=e.requestId,a=e.queryId,s=e.document,u=e.options,c=e.fetchMoreForQueryId,l=u.variables,f=u.errorPolicy,p=void 0===f?"none":f,d=u.fetchPolicy;return new Promise((function(e,f){var v=i.getObservableFromLink(s,u.context,l),y="fetchRequest:"+a;i.fetchQueryRejectFns.set(y,f);var m=function(){i.fetchQueryRejectFns.delete(y),i.setQuery(a,(function(e){e.subscriptions.delete(g)}))},g=v.map((function(e){if(o>=i.getQuery(a).lastRequestId&&(i.markQueryResult(a,e,u,c),i.queryStore.markQueryResult(a,e,c),i.invalidate(a),i.invalidate(c),i.broadcastQueries()),"none"===p&&h(e.errors))return f(new b({graphQLErrors:e.errors}));if("all"===p&&(r=e.errors),c||"no-cache"===d)t=e.data;else{var n=i.dataStore.getCache().diff({variables:l,query:s,optimistic:!1,returnPartialData:!0}),v=n.result;(n.complete||u.returnPartialData)&&(t=v)}})).subscribe({error:function(e){m(),f(e)},complete:function(){m(),e({data:t,errors:r,loading:!1,networkStatus:n.ready,stale:!1})}});i.setQuery(a,(function(e){e.subscriptions.add(g)}))}))},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(i.__assign)({},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(i.__assign)({},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,o=e.pollInterval;if(Object(l.invariant)(o,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(t);a||this.pollingInfoByQueryId.set(t,a={}),a.interval=o,a.options=Object(i.__assign)({},e,{fetchPolicy:"network-only"});var s=function(){var e=n.pollingInfoByQueryId.get(t);e&&(n.checkInFlight(t)?u():n.fetchQuery(t,e.options,v.poll).then(u,u))},u=function(){var e=n.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(s,e.interval))};r&&this.addQueryListener(t,r),u()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),R=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,r,n,i){void 0===i&&(i=!1);var a=!Object(o.graphQLResultHasError)(e);i&&Object(o.graphQLResultHasError)(e)&&e.data&&(a=!0),!n&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:r})},e.prototype.markSubscriptionResult=function(e,t,r){Object(o.graphQLResultHasError)(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 i=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=i}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(o.graphQLResultHasError)(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(i){var a=n[i],s=a.query,u=a.updater,c=t.cache.diff({query:s.document,variables:s.variables,returnPartialData:!0,optimistic:!1}),l=c.result;if(c.complete){var f=Object(o.tryFunctionOrLogError)((function(){return u(l,{mutationResult:e.result,queryName:Object(o.getOperationName)(s.document)||void 0,queryVariables:s.variables})}));f&&r.push({result:f,dataId:"ROOT_QUERY",query:s.document,variables:s.variables})}})),this.cache.performTransaction((function(t){r.forEach((function(e){return t.write(e)}));var n=e.update;n&&Object(o.tryFunctionOrLogError)((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}(),x=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.cache,n=e.ssrMode,i=void 0!==n&&n,o=e.ssrForceFetchDelay,a=void 0===o?0:o,s=e.connectToDevTools,c=e.queryDeduplication,f=void 0===c||c,p=e.defaultOptions,d=e.assumeImmutableResults,h=void 0!==d&&d,v=e.resolvers,b=e.typeDefs,y=e.fragmentMatcher,m=e.name,g=e.version,O=e.link;if(!O&&v&&(O=u.a.empty()),!O||!r)throw new l.InvariantError(1);this.link=O,this.cache=r,this.store=new R(r),this.disableNetworkFetches=i||a>0,this.queryDeduplication=f,this.defaultOptions=p||{},this.typeDefs=b,a&&setTimeout((function(){return t.disableNetworkFetches=!1}),a),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!==s&&(s&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.4",this.localState=new w({cache:r,client:this,resolvers:v,fragmentMatcher:y}),this.queryManager=new k({link:this.link,store:this.store,queryDeduplication:f,ssrMode:i,clientAwareness:{name:m,version:g},localState:this.localState,assumeImmutableResults:h,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(i.__assign)({},this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(i.__assign)({},e,{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(i.__assign)({},this.defaultOptions.query,e)),Object(l.invariant)("cache-and-network"!==e.fetchPolicy,2),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(i.__assign)({},e,{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(i.__assign)({},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(u.c)(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}()},590:function(e,t,r){"use strict";r.r(t),r.d(t,"VERSION",(function(){return s})),r.d(t,"defaultGenerateHash",(function(){return u})),r.d(t,"defaultOptions",(function(){return c})),r.d(t,"createPersistedQueryLink",(function(){return h}));var n=r(12),i=r(26),o=r(21),a=r(591),s=1,u=function(e){return a().update(Object(o.a)(e)).digest("hex")},c={generateHash:u,disable:function(e){var t=e.graphQLErrors,r=e.operation;if(t&&t.some((function(e){return"PersistedQueryNotSupported"===e.message})))return!0;var n=r.getContext().response;return!(!n||!n.status||400!==n.status&&500!==n.status)},useGETForHashedQueries:!1};function l(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}var f=Object.prototype.hasOwnProperty,p="function"==typeof Symbol?Symbol.for("__createPersistedQueryLink_hashes"):"__createPersistedQueryLink_hashes",d=0,h=function(e){void 0===e&&(e={});var t=Object.assign({},c,e),r=t.generateHash,o=t.disable,a=t.useGETForHashedQueries,u=!0,h="forLink"+d++;function v(e){if(!e||"object"!=typeof e)return r(e);f.call(e,p)||Object.defineProperty(e,p,{value:Object.create(null),enumerable:!1});var t=e[p];return f.call(t,h)?t[h]:t[h]=r(e)}return new n.a((function(e,t){if(!t)throw new Error("PersistedQueryLink cannot be the last link in the chain.");var r,n=e.query;if(u)try{e.extensions.persistedQuery={version:s,sha256Hash:v(n)}}catch(e){r=e}return new i.default((function(n){if(!r){var i,s,c=!1,f=!1,p=function(r,n){var a=r.response,l=r.networkError;if(!c&&(a&&a.errors||l)){c=!0;var p={response:a,networkError:l,operation:e,graphQLErrors:a?a.errors:void 0};if(u=!o(p),a&&a.errors&&a.errors.some((function(e){return"PersistedQueryNotFound"===e.message}))||!u)return i&&i.unsubscribe(),e.setContext({http:{includeQuery:!0,includeExtensions:u}}),f&&e.setContext({fetchOptions:s}),void(i=t(e).subscribe(d))}n()},d={next:function(e){p({response:e},(function(){return n.next(e)}))},error:function(e){p({networkError:e},(function(){return n.error(e)}))},complete:n.complete.bind(n)};return e.setContext({http:{includeQuery:!u,includeExtensions:u}}),a&&u&&function(e){return!e.query.definitions.some(l)}(e)&&(e.setContext((function(e){var t=e.fetchOptions,r=void 0===t?{}:t;return s=r,{fetchOptions:Object.assign({},r,{method:"GET"})}})),f=!0),i=t(e).subscribe(d),function(){i&&i.unsubscribe()}}n.error(r)}))}))}},624:function(e,t,r){"use strict";r.r(t),r.d(t,"getApolloContext",(function(){return s})),r.d(t,"resetApolloContext",(function(){return u})),r.d(t,"ApolloProvider",(function(){return l})),r.d(t,"ApolloConsumer",(function(){return f})),r.d(t,"Query",(function(){return D})),r.d(t,"Mutation",(function(){return I})),r.d(t,"Subscription",(function(){return F})),r.d(t,"graphql",(function(){return U})),r.d(t,"withQuery",(function(){return A})),r.d(t,"withMutation",(function(){return W})),r.d(t,"withSubscription",(function(){return z})),r.d(t,"withApollo",(function(){return B})),r.d(t,"useQuery",(function(){return j})),r.d(t,"useLazyQuery",(function(){return S})),r.d(t,"useMutation",(function(){return Q})),r.d(t,"useSubscription",(function(){return k})),r.d(t,"useApolloClient",(function(){return R})),r.d(t,"getMarkupFromTree",(function(){return J})),r.d(t,"getDataFromTree",(function(){return K})),r.d(t,"renderToStringWithData",(function(){return H}));var n,i=r(0),o=r.n(i),a=r(4);function s(){return n||(n=o.a.createContext({})),n}function u(){n=o.a.createContext({})}var c,l=function(e){var t=e.client,r=e.children,n=s();return o.a.createElement(n.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),Object(a.invariant)(e.client,6),o.a.createElement(n.Provider,{value:e},r)}))},f=function(e){var t=s();return o.a.createElement(t.Consumer,null,(function(t){return Object(a.invariant)(t&&t.client,5),e.children(t.client)}))};!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(c||(c={}));var p=new Map;function d(e){var t;switch(e){case c.Query:t="Query";break;case c.Mutation:t="Mutation";break;case c.Subscription:t="Subscription"}return t}function h(e){var t,r,n=p.get(e);if(n)return n;Object(a.invariant)(!!e&&!!e.kind,1);var i=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),o=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),s=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),u=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));Object(a.invariant)(!i.length||o.length||s.length||u.length,2),Object(a.invariant)(o.length+s.length+u.length<=1,3),r=o.length?c.Query:c.Mutation,o.length||s.length||(r=c.Subscription);var l=o.length?o:s.length?s:u;Object(a.invariant)(1===l.length,4);var f=l[0];t=f.variableDefinitions||[];var d={name:f.name&&"Name"===f.name.kind?f.name.value:"data",type:r,variables:t};return p.set(e,d),d}var v=r(1),b=r(47),y=r(28),m=function(){function e(e,t){this.isMounted=!1,this.previousOptions={},this.context={},this.options={},this.options=e||{},this.context=t||{}}return e.prototype.getOptions=function(){return this.options},e.prototype.setOptions=function(e,t){void 0===t&&(t=!1),t&&!Object(y.a)(this.options,e)&&(this.previousOptions=this.options),this.options=e},e.prototype.unmount=function(){this.isMounted=!1},e.prototype.refreshClient=function(){var e=this.options&&this.options.client||this.context&&this.context.client;Object(a.invariant)(!!e,2);var t=!1;return e!==this.client&&(t=!0,this.client=e,this.cleanup()),{client:this.client,isNew:t}},e.prototype.verifyDocumentType=function(e,t){var r=h(e);d(t),d(r.type);Object(a.invariant)(r.type===t,3)},e}(),g=function(e){function t(t){var r=t.options,n=t.context,i=t.forceUpdate,o=e.call(this,r,n)||this;return o.previousData={},o.currentObservable={},o.runLazy=!1,o.runLazyQuery=function(e){o.cleanup(),o.runLazy=!0,o.lazyOptions=e,o.forceUpdate()},o.getExecuteResult=function(){var e=o.getQueryResult();return o.startQuerySubscription(),e},o.obsRefetch=function(e){return o.currentObservable.query.refetch(e)},o.obsFetchMore=function(e){return o.currentObservable.query.fetchMore(e)},o.obsUpdateQuery=function(e){return o.currentObservable.query.updateQuery(e)},o.obsStartPolling=function(e){o.currentObservable&&o.currentObservable.query&&o.currentObservable.query.startPolling(e)},o.obsStopPolling=function(){o.currentObservable&&o.currentObservable.query&&o.currentObservable.query.stopPolling()},o.obsSubscribeToMore=function(e){return o.currentObservable.query.subscribeToMore(e)},o.forceUpdate=i,o}return Object(v.__extends)(t,e),t.prototype.execute=function(){this.refreshClient();var e=this.getOptions(),t=e.skip,r=e.query;return(t||r!==this.previousData.query)&&(this.removeQuerySubscription(),this.previousData.query=r),this.updateObservableQuery(),this.isMounted&&this.startQuerySubscription(),this.getExecuteSsrResult()||this.getExecuteResult()},t.prototype.executeLazy=function(){return this.runLazy?[this.runLazyQuery,this.execute()]:[this.runLazyQuery,{loading:!1,networkStatus:b.c.ready,called:!1,data:void 0}]},t.prototype.fetchData=function(){var e=this.getOptions();if(e.skip||!1===e.ssr)return!1;var t=this.currentObservable.query;return!!t.getCurrentResult().loading&&t.result()},t.prototype.afterExecute=function(e){var t=this,r=(void 0===e?{}:e).lazy,n=void 0!==r&&r;return this.isMounted=!0,n&&!this.runLazy||(this.handleErrorOrCompleted(),setTimeout((function(){t.currentObservable.query&&t.currentObservable.query.resetQueryStoreErrors()}))),this.previousOptions=this.getOptions(),this.unmount.bind(this)},t.prototype.cleanup=function(){this.removeQuerySubscription(),delete this.currentObservable.query,delete this.previousData.result},t.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this);return this.lazyOptions&&(t.variables=Object(v.__assign)({},t.variables,this.lazyOptions.variables),t.context=Object(v.__assign)({},t.context,this.lazyOptions.context)),this.runLazy&&delete t.skip,t},t.prototype.getExecuteSsrResult=function(){var e,t=this.context&&this.context.renderPromises,r=!1===this.getOptions().ssr,n=this.refreshClient().client.disableNetworkFetches,i={loading:!0,networkStatus:b.c.loading,called:!0,data:void 0};return r&&(t||n)?i:(t&&(e=this.context.renderPromises.addQueryPromise(this,this.getExecuteResult)||i),e)},t.prototype.prepareObservableQueryOptions=function(){var e=this.getOptions();this.verifyDocumentType(e.query,c.Query);var t=e.displayName||"Query";return this.context&&this.context.renderPromises&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e.fetchPolicy="cache-first"),Object(v.__assign)({},e,{displayName:t,context:e.context,metadata:{reactComponent:{displayName:t}}})},t.prototype.initializeObservableQuery=function(){if(this.context&&this.context.renderPromises&&(this.currentObservable.query=this.context.renderPromises.getSSRObservable(this.getOptions())),!this.currentObservable.query){var e=this.prepareObservableQueryOptions();this.previousData.observableQueryOptions=Object(v.__assign)({},e,{children:null}),this.currentObservable.query=this.refreshClient().client.watchQuery(Object(v.__assign)({},e)),this.context&&this.context.renderPromises&&this.context.renderPromises.registerSSRObservable(this.currentObservable.query,e)}},t.prototype.updateObservableQuery=function(){if(this.currentObservable.query){var e=Object(v.__assign)({},this.prepareObservableQueryOptions(),{children:null});Object(y.a)(e,this.previousData.observableQueryOptions)||(this.previousData.observableQueryOptions=e,this.currentObservable.query.setOptions(e).catch((function(){})))}else this.initializeObservableQuery()},t.prototype.startQuerySubscription=function(){var e=this;if(!this.currentObservable.subscription&&!this.getOptions().skip){var t=this.currentObservable.query;this.currentObservable.subscription=t.subscribe({next:function(t){var r=t.loading,n=t.networkStatus,i=t.data,o=e.previousData.result;o&&o.loading===r&&o.networkStatus===n&&Object(y.a)(o.data,i)||e.forceUpdate()},error:function(t){if(e.resubscribeToQuery(),!t.hasOwnProperty("graphQLErrors"))throw t;var r=e.previousData.result;(r&&r.loading||!Object(y.a)(t,e.previousData.error))&&(e.previousData.error=t,e.forceUpdate())}})}},t.prototype.resubscribeToQuery=function(){this.removeQuerySubscription();var e=this.currentObservable.query.getLastError(),t=this.currentObservable.query.getLastResult();this.currentObservable.query.resetLastResults(),this.startQuerySubscription(),Object.assign(this.currentObservable.query,{lastError:e,lastResult:t})},t.prototype.getQueryResult=function(){var e=this.observableQueryFields(),t=this.getOptions();if(t.skip)e=Object(v.__assign)({},e,{data:void 0,error:void 0,loading:!1,called:!0});else{var r=this.currentObservable.query.getCurrentResult(),n=r.loading,i=r.partial,o=r.networkStatus,a=r.errors,s=r.error,u=r.data;if(a&&a.length>0&&(s=new b.b({graphQLErrors:a})),e=Object(v.__assign)({},e,{loading:n,networkStatus:o,error:s,called:!0}),n){var c=this.previousData.result&&this.previousData.result.data;e.data=c&&u?Object(v.__assign)({},c,u):c||u}else if(s)Object.assign(e,{data:(this.currentObservable.query.getLastResult()||{}).data});else{var l=this.currentObservable.query.options.fetchPolicy;if(t.partialRefetch&&!u&&i&&"cache-only"!==l)return Object.assign(e,{loading:!0,networkStatus:b.c.loading}),e.refetch(),e;e.data=u}}return e.client=this.client,this.previousData.loading=this.previousData.result&&this.previousData.result.loading||!1,this.previousData.result=e,e},t.prototype.handleErrorOrCompleted=function(){var e=this.currentObservable.query;if(e){var t=e.getCurrentResult(),r=t.data,n=t.loading,i=t.error;if(!n){var o=this.getOptions(),a=o.query,s=o.variables,u=o.onCompleted,c=o.onError;if(this.previousOptions&&!this.previousData.loading&&Object(y.a)(this.previousOptions.query,a)&&Object(y.a)(this.previousOptions.variables,s))return;u&&!i?u(r):c&&i&&c(i)}}},t.prototype.removeQuerySubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},t.prototype.observableQueryFields=function(){return{variables:this.currentObservable.query.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(m);function O(e,t,r){void 0===r&&(r=!1);var n=Object(i.useContext)(s()),o=Object(i.useReducer)((function(e){return e+1}),0),a=o[0],u=o[1],c=t?Object(v.__assign)({},t,{query:e}):{query:e},l=Object(i.useRef)();l.current||(l.current=new g({options:c,context:n,forceUpdate:u}));var f=l.current;f.setOptions(c),f.context=n;var p,d,h,b={options:Object(v.__assign)({},c,{onError:void 0,onCompleted:void 0}),context:n,tick:a},m=(p=function(){return r?f.executeLazy():f.execute()},d=b,(h=Object(i.useRef)()).current&&Object(y.a)(d,h.current.key)||(h.current={key:d,value:p()}),h.current.value),O=r?m[1]:m;return Object(i.useEffect)((function(){return f.afterExecute({lazy:r})}),r?void 0:[O.loading,O.networkStatus,O.error,O.data]),Object(i.useEffect)((function(){return function(){return f.cleanup()}}),[]),m}function j(e,t){return O(e,t,!1)}function S(e,t){return O(e,t,!0)}var w=function(e){function t(t){var r=t.options,n=t.context,i=t.result,o=t.setResult,a=e.call(this,r,n)||this;return a.runMutation=function(e){void 0===e&&(e={}),a.onMutationStart();var t=a.generateNewMutationId();return a.mutate(e).then((function(e){return a.onMutationCompleted(e,t),e})).catch((function(e){if(a.onMutationError(e,t),!a.getOptions().onError)throw e}))},a.verifyDocumentType(r.mutation,c.Mutation),a.result=i,a.setResult=o,a.mostRecentMutationId=0,a}return Object(v.__extends)(t,e),t.prototype.execute=function(e){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,c.Mutation),e.client=this.refreshClient().client,[this.runMutation,e]},t.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},t.prototype.cleanup=function(){},t.prototype.mutate=function(e){var t=this.getOptions(),r=t.mutation,n=t.variables,i=t.optimisticResponse,o=t.update,a=t.context,s=void 0===a?{}:a,u=t.awaitRefetchQueries,c=void 0!==u&&u,l=t.fetchPolicy,f=Object(v.__assign)({},e),p=Object.assign({},n,f.variables);return delete f.variables,this.refreshClient().client.mutate(Object(v.__assign)({mutation:r,optimisticResponse:i,refetchQueries:f.refetchQueries||this.getOptions().refetchQueries,awaitRefetchQueries:c,update:o,context:s,fetchPolicy:l,variables:p},f))},t.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},t.prototype.onMutationCompleted=function(e,t){var r=this.getOptions(),n=r.onCompleted,i=r.ignoreResults,o=e.data,a=e.errors,s=a&&a.length>0?new b.b({graphQLErrors:a}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:o,error:s}),n&&n(o)},t.prototype.onMutationError=function(e,t){var r=this.getOptions().onError;this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0}),r&&r(e)},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){!this.isMounted||this.previousResult&&Object(y.a)(this.previousResult,e)||(this.setResult(e),this.previousResult=e)},t}(m);function Q(e,t){var r=Object(i.useContext)(s()),n=Object(i.useState)({called:!1,loading:!1}),o=n[0],a=n[1],u=t?Object(v.__assign)({},t,{mutation:e}):{mutation:e},c=Object(i.useRef)();var l=(c.current||(c.current=new w({options:u,context:r,result:o,setResult:a})),c.current);return l.setOptions(u),l.context=r,Object(i.useEffect)((function(){return l.afterExecute()})),l.execute(o)}var _=function(e){function t(t){var r=t.options,n=t.context,i=t.setResult,o=e.call(this,r,n)||this;return o.currentObservable={},o.setResult=i,o.initialize(r),o}return Object(v.__extends)(t,e),t.prototype.execute=function(e){if(!0===this.getOptions().skip)return this.cleanup(),{loading:!1,error:void 0,data:void 0,variables:this.getOptions().variables};var t=e;this.refreshClient().isNew&&(t=this.getLoadingResult());var r=this.getOptions().shouldResubscribe;return"function"==typeof r&&(r=!!r(this.getOptions())),!1!==r&&this.previousOptions&&Object.keys(this.previousOptions).length>0&&(this.previousOptions.subscription!==this.getOptions().subscription||!Object(y.a)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),t=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),Object(v.__assign)({},t,{variables:this.getOptions().variables})},t.prototype.afterExecute=function(){this.isMounted=!0},t.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},t.prototype.initialize=function(e){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},t.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},t.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},t.prototype.updateResult=function(e){this.isMounted&&this.setResult(e)},t.prototype.updateCurrentData=function(e){var t=this.getOptions().onSubscriptionData;this.updateResult({data:e.data,loading:!1,error:void 0}),t&&t({client:this.refreshClient().client,subscriptionData:e})},t.prototype.updateError=function(e){this.updateResult({error:e,loading:!1})},t.prototype.completeSubscription=function(){var e=this.getOptions().onSubscriptionComplete;e&&e(),this.endSubscription()},t.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},t}(m);function k(e,t){var r=Object(i.useContext)(s()),n=t?Object(v.__assign)({},t,{subscription:e}):{subscription:e},o=Object(i.useState)({loading:!n.skip,error:void 0,data:void 0}),a=o[0],u=o[1],c=Object(i.useRef)();var l=(c.current||(c.current=new _({options:n,context:r,setResult:u})),c.current);return l.setOptions(n,!0),l.context=r,Object(i.useEffect)((function(){return l.afterExecute()})),Object(i.useEffect)((function(){return l.cleanup.bind(l)}),[]),l.execute(a)}function R(){var e=o.a.useContext(s()).client;return Object(a.invariant)(e,1),e}var x=function(){function e(){this.queryPromises=new Map,this.queryInfoTrie=new Map}return e.prototype.registerSSRObservable=function(e,t){this.lookupQueryInfo(t).observable=e},e.prototype.getSSRObservable=function(e){return this.lookupQueryInfo(e).observable},e.prototype.addQueryPromise=function(e,t){return this.lookupQueryInfo(e.getOptions()).seen?t():(this.queryPromises.set(e.getOptions(),new Promise((function(t){t(e.fetchData())}))),null)},e.prototype.hasPromises=function(){return this.queryPromises.size>0},e.prototype.consumeAndAwaitPromises=function(){var e=this,t=[];return this.queryPromises.forEach((function(r,n){e.lookupQueryInfo(n).seen=!0,t.push(r)})),this.queryPromises.clear(),Promise.all(t)},e.prototype.lookupQueryInfo=function(e){var t=this.queryInfoTrie,r=e.query,n=e.variables,i=t.get(r)||new Map;t.has(r)||t.set(r,i);var o=JSON.stringify(n),a=i.get(o)||{seen:!1,observable:null};return i.has(o)||i.set(o,a),a},e}(),q=r(2),E=r.n(q);function D(e){var t=e.children,r=j(e.query,Object(v.__rest)(e,["children","query"]));return t&&r?t(r):null}function I(e){var t=Q(e.mutation,e),r=t[0],n=t[1];return e.children?e.children(r,n):null}function F(e){var t=k(e.subscription,e);return e.children&&t?e.children(t):null}(D||(D={})).propTypes={client:E.a.object,children:E.a.func.isRequired,fetchPolicy:E.a.string,notifyOnNetworkStatusChange:E.a.bool,onCompleted:E.a.func,onError:E.a.func,pollInterval:E.a.number,query:E.a.object.isRequired,variables:E.a.object,ssr:E.a.bool,partialRefetch:E.a.bool,returnPartialData:E.a.bool},(I||(I={})).propTypes={mutation:E.a.object.isRequired,variables:E.a.object,optimisticResponse:E.a.oneOfType([E.a.object,E.a.func]),refetchQueries:E.a.oneOfType([E.a.arrayOf(E.a.oneOfType([E.a.string,E.a.object])),E.a.func]),awaitRefetchQueries:E.a.bool,update:E.a.func,children:E.a.func.isRequired,onCompleted:E.a.func,onError:E.a.func,fetchPolicy:E.a.string},(F||(F={})).propTypes={subscription:E.a.object.isRequired,variables:E.a.object,children:E.a.func,onSubscriptionData:E.a.func,onSubscriptionComplete:E.a.func,shouldResubscribe:E.a.oneOfType([E.a.func,E.a.bool])};var M=r(77),P=r.n(M),C=function(){return{}},N=function(){return!1};function V(e){return e.displayName||e.name||"Component"}function T(e,t){for(var r={},n=0,i=e.variables;n0&&(c.variables=T(r,s)),o.a.createElement(D,Object(v.__assign)({},c,{displayName:i,skip:u,query:e}),(function(e){e.client;var r,i,c=e.data,l=Object(v.__rest)(e,["client","data"]);if(t.withRef&&(a.withRef=!0,s=Object.assign({},s,{ref:a.setWrappedInstance})),u)return o.a.createElement(n,Object(v.__assign)({},s,{}));var p=Object.assign(l,c||{}),d=t.name||"data",h=((r={})[d]=p,r);if(t.props){var b=((i={})[d]=p,i.ownProps=s,i);h=f=t.props(b,f)}return o.a.createElement(n,Object(v.__assign)({},s,h))}))},s.displayName=i,s.WrappedComponent=n,s}(L);return P()(a,n,{})}}function W(e,t){void 0===t&&(t={});var r=h(e),n=t.options,i=void 0===n?C:n,a=t.alias,s=void 0===a?"Apollo":a,u=i;return"function"!=typeof u&&(u=function(){return i}),function(n){var i=s+"("+V(n)+")",a=function(a){function s(){return null!==a&&a.apply(this,arguments)||this}return Object(v.__extends)(s,a),s.prototype.render=function(){var i=this.props,a=u(i);return t.withRef&&(this.withRef=!0,i=Object.assign({},i,{ref:this.setWrappedInstance})),!a.variables&&r.variables.length>0&&(a.variables=T(r,i)),o.a.createElement(I,Object(v.__assign)({ignoreResults:!0},a,{mutation:e}),(function(e,r){var a,s,u=r.data,c=Object(v.__rest)(r,["data"]),l=Object.assign(c,u||{}),f=t.name||"mutate",p=t.name?f+"Result":"result",d=((a={})[f]=e,a[p]=l,a);if(t.props){var h=((s={})[f]=e,s[p]=l,s.ownProps=i,s);d=t.props(h)}return o.a.createElement(n,Object(v.__assign)({},i,d))}))},s.displayName=i,s.WrappedComponent=n,s}(L);return P()(a,n,{})}}function z(e,t){void 0===t&&(t={});var r=h(e),n=t.options,i=void 0===n?C:n,a=t.skip,s=void 0===a?N:a,u=t.alias,c=void 0===u?"Apollo":u,l=t.shouldResubscribe,f=i;"function"!=typeof f&&(f=function(){return i});var p,d=s;return"function"!=typeof d&&(d=function(){return s}),function(n){var i=c+"("+V(n)+")",a=function(a){function s(e){var t=a.call(this,e)||this;return t.state={resubscribe:!1},t}return Object(v.__extends)(s,a),s.prototype.componentDidUpate=function(e){l&&this.setState({resubscribe:l(e,this.props)})},s.prototype.render=function(){var a=this,s=this.props,u=d(s),c=u?Object.create(null):f(s);return!u&&!c.variables&&r.variables.length>0&&(c.variables=T(r,s)),o.a.createElement(F,Object(v.__assign)({},c,{displayName:i,skip:u,subscription:e,shouldResubscribe:this.state.resubscribe}),(function(e){var r,i,c=e.data,l=Object(v.__rest)(e,["data"]);if(t.withRef&&(a.withRef=!0,s=Object.assign({},s,{ref:a.setWrappedInstance})),u)return o.a.createElement(n,Object(v.__assign)({},s,{}));var f=Object.assign(l,c||{}),d=t.name||"data",h=((r={})[d]=f,r);if(t.props){var b=((i={})[d]=f,i.ownProps=s,i);h=p=t.props(b,p)}return o.a.createElement(n,Object(v.__assign)({},s,h))}))},s.displayName=i,s.WrappedComponent=n,s}(L);return P()(a,n,{})}}function U(e,t){switch(void 0===t&&(t={}),h(e).type){case c.Mutation:return W(e,t);case c.Subscription:return z(e,t);case c.Query:default:return A(e,t)}}function B(e,t){void 0===t&&(t={});var r="withApollo("+function(e){return e.displayName||e.name||"Component"}(e)+")",n=function(n){function i(e){var t=n.call(this,e)||this;return t.setWrappedInstance=t.setWrappedInstance.bind(t),t}return Object(v.__extends)(i,n),i.prototype.getWrappedInstance=function(){return Object(a.invariant)(t.withRef,1),this.wrappedInstance},i.prototype.setWrappedInstance=function(e){this.wrappedInstance=e},i.prototype.render=function(){var r=this;return o.a.createElement(f,null,(function(n){var i=Object.assign({},r.props,{client:n,ref:t.withRef?r.setWrappedInstance:void 0});return o.a.createElement(e,Object(v.__assign)({},i))}))},i.displayName=r,i.WrappedComponent=e,i}(o.a.Component);return P()(n,e,{})}function K(e,t){return void 0===t&&(t={}),J({tree:e,context:t,renderFunction:r(73).renderToStaticMarkup})}function J(e){var t=e.tree,n=e.context,i=void 0===n?{}:n,a=e.renderFunction,u=void 0===a?r(73).renderToStaticMarkup:a,c=new x;return Promise.resolve().then((function e(){var r=s(),n=u(o.a.createElement(r.Provider,{value:Object(v.__assign)({},i,{renderPromises:c})},t));return c.hasPromises()?c.consumeAndAwaitPromises().then(e):n}))}function H(e){return J({tree:e,renderFunction:r(73).renderToString})}},77:function(e,t,r){"use strict";var n=r(610),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var i=d(r);i&&i!==h&&e(t,i,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var s=u(t),v=u(r),b=0;b-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}(),y=Object.prototype.hasOwnProperty,m=function(){function e(e){var t=this;void 0===e&&(e=Object.create(null)),this.data=e,this.depend=Object(f.b)((function(e){return t.data[e]}),{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){y.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){y.call(e,r)||t.delete(r)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function g(e){return new m(e)}var O=function(){function e(e){var t=this,r=void 0===e?{}:e,n=r.cacheKeyRoot,o=void 0===n?new f.a(i.canUseWeakMap):n,a=r.freezeResults,s=void 0!==a&&a,u=this.executeStoreQuery,c=this.executeSelectionSet,l=this.executeSubSelectedArray;this.freezeResults=s,this.executeStoreQuery=Object(f.b)((function(e){return u.call(t,e)}),{makeCacheKey:function(e){var t=e.query,r=e.rootValue,n=e.contextValue,i=e.variableValues,a=e.fragmentMatcher;if(n.store instanceof m)return o.lookup(n.store,t,a,JSON.stringify(i),r.id)}}),this.executeSelectionSet=Object(f.b)((function(e){return c.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,r=e.rootValue,n=e.execContext;if(n.contextValue.store instanceof m)return o.lookup(n.contextValue.store,t,n.fragmentMatcher,JSON.stringify(n.variableValues),r.id)}}),this.executeSubSelectedArray=Object(f.b)((function(e){return l.call(t,e)}),{makeCacheKey:function(e){var t=e.field,r=e.array,n=e.execContext;if(n.contextValue.store instanceof m)return o.lookup(n.contextValue.store,t,r,JSON.stringify(n.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(Object(n.__assign)({},e,{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.variables,o=e.previousResult,a=e.returnPartialData,s=void 0===a||a,u=e.rootId,c=void 0===u?"ROOT_QUERY":u,f=e.fragmentMatcherFunction,d=e.config,h=Object(i.getQueryDefinition)(r);n=Object(i.assign)({},Object(i.getDefaultValues)(h),n);var v={store:t,dataIdFromObject:d&&d.dataIdFromObject,cacheRedirects:d&&d.cacheRedirects||{}},b=this.executeStoreQuery({query:r,rootValue:{type:"id",id:c,generated:!0,typename:"Query"},contextValue:v,variableValues:n,fragmentMatcher:f}),y=b.missing&&b.missing.length>0;return y&&!s&&b.missing.forEach((function(e){if(!e.tolerable)throw new p.InvariantError(8)})),o&&Object(l.a)(o,b.result)&&(b.result=o),{result:b.result,complete:!y}},e.prototype.executeStoreQuery=function(e){var t=e.query,r=e.rootValue,n=e.contextValue,o=e.variableValues,a=e.fragmentMatcher,s=void 0===a?S:a,u=Object(i.getMainDefinition)(t),c=Object(i.getFragmentDefinitions)(t),l={query:t,fragmentMap:Object(i.createFragmentMap)(c),contextValue:n,variableValues:o,fragmentMatcher:s};return this.executeSelectionSet({selectionSet:u.selectionSet,rootValue:r,execContext:l})},e.prototype.executeSelectionSet=function(e){var t=this,r=e.selectionSet,o=e.rootValue,a=e.execContext,s=a.fragmentMap,u=a.contextValue,c=a.variableValues,l={result:null},f=[],d=u.store.get(o.id),h=d&&d.__typename||"ROOT_QUERY"===o.id&&"Query"||void 0;function v(e){var t;return e.missing&&(l.missing=l.missing||[],(t=l.missing).push.apply(t,e.missing)),e.result}return r.selections.forEach((function(e){var r;if(Object(i.shouldInclude)(e,c))if(Object(i.isField)(e)){var l=v(t.executeField(d,h,e,a));void 0!==l&&f.push(((r={})[Object(i.resultKeyNameFromField)(e)]=l,r))}else{var b=void 0;if(Object(i.isInlineFragment)(e))b=e;else if(!(b=s[e.name.value]))throw new p.InvariantError(9);var y=b.typeCondition&&b.typeCondition.name.value,m=!y||a.fragmentMatcher(o,y,u);if(m){var g=t.executeSelectionSet({selectionSet:b.selectionSet,rootValue:o,execContext:a});"heuristic"===m&&g.missing&&(g=Object(n.__assign)({},g,{missing:g.missing.map((function(e){return Object(n.__assign)({},e,{tolerable:!0})}))})),f.push(v(g))}}})),l.result=Object(i.mergeDeepArray)(f),this.freezeResults,l},e.prototype.executeField=function(e,t,r,n){var o=n.variableValues,a=n.contextValue,s=function(e,t,r,n,o,a){a.resultKey;var s=a.directives,u=r;(n||s)&&(u=Object(i.getStoreKeyName)(u,n,s));var c=void 0;if(e&&void 0===(c=e[u])&&o.cacheRedirects&&"string"==typeof t){var l=o.cacheRedirects[t];if(l){var f=l[r];f&&(c=f(e,n,{getCacheKey:function(e){var t=o.dataIdFromObject(e);return t&&Object(i.toIdValue)({id:t,typename:e.__typename})}}))}}if(void 0===c)return{result:c,missing:[{object:e,fieldName:u,tolerable:!1}]};Object(i.isJsonValue)(c)&&(c=c.json);return{result:c}}(e,t,r.name.value,Object(i.argumentsObjectFromField)(r,o),a,{resultKey:Object(i.resultKeyNameFromField)(r),directives:Object(i.getDirectiveInfoFromField)(r,o)});return Array.isArray(s.result)?this.combineExecResults(s,this.executeSubSelectedArray({field:r,array:s.result,execContext:n})):r.selectionSet?null==s.result?s:this.combineExecResults(s,this.executeSelectionSet({selectionSet:r.selectionSet,rootValue:s.result,execContext:n})):(j(r,s.result),this.freezeResults,s)},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 x={fragmentMatcher:new v,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 q=Object.prototype.hasOwnProperty,E=function(e){function t(t,r,n){var i=e.call(this,Object.create(null))||this;return i.optimisticId=t,i.parent=r,i.transaction=n,i}return Object(n.__extends)(t,e),t.prototype.toObject=function(){return Object(n.__assign)({},this.parent.toObject(),this.data)},t.prototype.get=function(e){return q.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(w),D=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 f.a(i.canUseWeakMap),r.silenceBroadcast=!1,r.config=Object(n.__assign)({},x,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 m:new w,r.optimisticData=r.data,r.storeWriter=new _,r.storeReader=new O({cacheKeyRoot:r.cacheKeyRoot,freezeResults:t.freezeResults});var o=r,a=o.maybeBroadcastWatch;return r.maybeBroadcastWatch=Object(f.b)((function(e){return a.call(r,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return o.data instanceof m?o.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),r}return Object(n.__extends)(t,e),t.prototype.restore=function(e){return e&&this.data.replace(e),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 p.InvariantError(1)},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 E;)n.optimisticId===e?++r:t.push(n),n=n.parent;if(r>0){for(this.optimisticData=n;t.length>0;){var i=t.pop();this.performTransaction(i.transaction,i.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var r=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new E(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=r}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(i.addTypenameToDocument)(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}(c)}}]); }], document.currentScript.dataset.index)