/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/apollo-client-classic@1.9.4/apollo.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("whatwg-fetch"),require("graphql/language/printer"),require("redux"),require("graphql-anywhere"),require("symbol-observable"),require("apollo-link-core")):"function"==typeof define&&define.amd?define(["exports","whatwg-fetch","graphql/language/printer","redux","graphql-anywhere","symbol-observable","apollo-link-core"],t):t(e.apollo={},null,e.printer,e.Redux,e.graphqlAnywhere,e.$$observable,e.apolloLinkCore)}(this,(function(e,t,r,n,o,i,a){"use strict";function s(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 s(o,e.name,e.value,n)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(r)){var i=(n||{})[r.name.value];e[t.value]=i}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return s(r,t,e,n),r[t.value]}));else{if(!function(e){return"EnumValue"===e.kind}(r))throw new Error('The inline argument "'+t.value+'" of kind "'+r.kind+'" is not supported.\n                    Use variables instead of inline arguments to overcome this limitation.');e[t.value]=r.value}}function u(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,i={};return n.forEach((function(e){i[e]=o[e]})),r.connection.key+"("+JSON.stringify(i)+")"}return r.connection.key}return t?e+"("+JSON.stringify(t)+")":e}function c(e){return e.errors&&e.errors.length}function l(e){return null!=e&&"object"==typeof e&&"id"===e.type}function h(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.forEach((function(t){null!=t&&Object.keys(t).forEach((function(r){e[r]=t[r]}))})),e}o=o&&o.hasOwnProperty("default")?o.default:o,i=i&&i.hasOwnProperty("default")?i.default:i;var f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function p(e){d(e);var t=null;if(e.definitions.forEach((function(e){"OperationDefinition"===e.kind&&"mutation"===e.operation&&(t=e)})),!t)throw new Error("Must contain a mutation definition.");return t}function d(e){if("Document"!==e.kind)throw new Error('Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql');var t=!1;e.definitions.forEach((function(e){switch(e.kind){case"FragmentDefinition":break;case"OperationDefinition":if(t)throw new Error("Queries must have exactly one operation definition.");t=!0;break;default:throw new Error('Schema type definitions not allowed in queries. Found: "'+e.kind+'"')}}))}function y(e){var t=null;return e.definitions.forEach((function(e){"OperationDefinition"===e.kind&&e.name&&(t=e.name.value)})),t}function v(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function m(e){d(e);var t=null;if(e.definitions.map((function(e){"OperationDefinition"===e.kind&&"query"===e.operation&&(t=e)})),!t)throw new Error("Must contain a query definition.");return t}function g(e){d(e);var t=null;if(e.definitions.map((function(e){"OperationDefinition"===e.kind&&(t=e)})),!t)throw new Error("Must contain a query definition.");return t}function b(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function w(e,t){var r=t,n=[];if(e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new Error("Found a "+e.operation+" operation"+(e.name?" named '"+e.name.value+"'":"")+". No operations are allowed when using a fragment as a query. Only fragments are allowed.");"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r){if(1!==n.length)throw new Error("Found "+n.length+" fragments. `fragmentName` must be provided when there is not exactly 1 fragment.");r=n[0].name.value}return f({},e,{definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}].concat(e.definitions)})}function q(e){if(e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter((function(e){return e.defaultValue})).map((function(e){var t=e.variable,r=e.defaultValue,n={};return s(n,t.name,r),n}));return h.apply(void 0,[{}].concat(t))}return{}}function O(e){if(Array.isArray(e))return e.map((function(e){return O(e)}));if(null!==e&&"object"==typeof e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=O(e[r]));return t}return e}var I={kind:"Field",name:{kind:"Name",value:"__typename"}};function E(e,t){if(void 0===t&&(t=!1),e.selections){if(!t)e.selections.some((function(e){return"Field"===e.kind&&"__typename"===e.name.value}))||e.selections.push(I);e.selections.forEach((function(e){"Field"===e.kind?0!==e.name.value.lastIndexOf("__",0)&&e.selectionSet&&E(e.selectionSet):"InlineFragment"===e.kind&&e.selectionSet&&E(e.selectionSet)}))}}function S(e){e.selections&&(e.selections.forEach((function(e){"Field"===e.kind&&e&&e.directives&&(e.directives=e.directives.filter((function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||console.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),!t})))})),e.selections.forEach((function(e){"Field"===e.kind?e.selectionSet&&S(e.selectionSet):"InlineFragment"===e.kind&&e.selectionSet&&S(e.selectionSet)})))}function Q(e){d(e);var t=O(e);return t.definitions.forEach((function(e){var t="OperationDefinition"===e.kind;E(e.selectionSet,t)})),t}function k(e){d(e);var t=O(e);return t.definitions.forEach((function(e){S(e.selectionSet)})),t}var R,P=(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),M=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function _(e){return M({},e,{query:r.print(e.query)})}var F=function(){function e(e,t){if(void 0===t&&(t={}),!e)throw new Error("A remote endpoint is required for a network layer");if("string"!=typeof e)throw new Error("Remote endpoint must be a string");this._uri=e,this._opts=M({},t),this._middlewares=[],this._afterwares=[]}return e.prototype.query=function(e){return new Promise((function(e,t){t(new Error("BaseNetworkInterface should not be used directly"))}))},e}(),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return P(t,e),t.prototype.applyMiddlewares=function(e){var t=this;return new Promise((function(r,n){var o,i,a,s=e.request,u=e.options;o=t._middlewares.slice(),i=t,(a=function(e){if(e)n(e);else if(o.length>0){var t=o.shift();t&&t.applyMiddleware.apply(i,[{request:s,options:u},a])}else r({request:s,options:u})})()}))},t.prototype.applyAfterwares=function(e){var t=this,r=e.response,n=e.options;return new Promise((function(e,o){var i,a,s,u={response:r,options:n};i=t._afterwares.slice(),a=t,(s=function(){if(i.length>0){var t=i.shift();t&&t.applyAfterware.apply(a,[u,s])}else e(u)})()}))},t.prototype.fetchFromRemoteEndpoint=function(e){var t=e.request,r=e.options;return fetch(this._uri,M({},this._opts,{body:JSON.stringify(_(t)),method:"POST"},r,{headers:M({Accept:"*/*","Content-Type":"application/json"},r.headers)}))},t.prototype.query=function(e){var t=this,r=M({},this._opts);return this.applyMiddlewares({request:e,options:r}).then((function(e){return e.request.query&&(e.request.query=k(e.request.query)),e})).then((function(e){return t.fetchFromRemoteEndpoint.call(t,e)})).then((function(e){return t.applyAfterwares({response:e,options:r})})).then((function(t){var r=t.response,n=r;return n.json().then((function(t){if(t.hasOwnProperty("data")||t.hasOwnProperty("errors"))return t;throw new Error("Server response was missing for query '"+e.debugName+"'.")})).catch((function(e){var t=new Error("Network request failed with status "+r.status+' - "'+r.statusText+'"');throw t.response=n,t.parseError=e,t}))}))},t.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function");t._middlewares.push(e)})),this},t.prototype.useAfter=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyAfterware)throw new Error("Afterware must implement the applyAfterware function");t._afterwares.push(e)})),this},t}(F);function N(e,t){if(void 0===t&&(t={}),!e)throw new Error("You must pass an options argument to createNetworkInterface.");var r,n;return"string"==typeof e?(console.warn('Passing the URI as the first argument to createNetworkInterface is deprecated as of Apollo Client 0.5. Please pass it as the "uri" property of the network interface options.'),n=t.opts,r=e):(n=e.opts,r=e.uri),new T(r,n)}var A=function(){function e(e){var t=e.batchInterval,r=e.batchMax,n=void 0===r?0:r,o=e.batchFetchFunction;this.queuedRequests=[],this.queuedRequests=[],this.batchInterval=t,this.batchMax=n,this.batchFetchFunction=o}return e.prototype.enqueueRequest=function(e){var t={request:e};return this.queuedRequests.push(t),t.promise=new Promise((function(e,r){t.resolve=e,t.reject=r})),1===this.queuedRequests.length&&this.scheduleQueueConsumption(),this.queuedRequests.length===this.batchMax&&this.consumeQueue(),t.promise},e.prototype.consumeQueue=function(){var e=this.queuedRequests.map((function(e){return e.request})),t=[],r=[],n=[];return this.queuedRequests.forEach((function(e,o){t.push(e.promise),r.push(e.resolve),n.push(e.reject)})),this.queuedRequests=[],this.batchFetchFunction(e).then((function(e){e.forEach((function(e,t){r[t](e)}))})).catch((function(e){n.forEach((function(t,r){n[r](e)}))})),t},e.prototype.scheduleQueueConsumption=function(){var e=this;setTimeout((function(){e.queuedRequests.length&&e.consumeQueue()}),this.batchInterval)},e}(),j=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),L=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},x=function(e){function t(t){var r=t.uri,n=t.batchInterval,o=void 0===n?10:n,i=t.batchMax,a=void 0===i?0:i,s=t.fetchOpts,u=e.call(this,r,s)||this;if("number"!=typeof o)throw new Error("batchInterval must be a number, got "+o);if("number"!=typeof a)throw new Error("batchMax must be a number, got "+a);return u.batcher=new A({batchInterval:o,batchMax:a,batchFetchFunction:u.batchQuery.bind(u)}),u}return j(t,e),t.prototype.query=function(e){return this.batcher.enqueueRequest(e)},t.prototype.batchQuery=function(e){var t=this,r=L({},this._opts),n=this.applyBatchMiddlewares({requests:e,options:r});return new Promise((function(e,r){n.then((function(n){return n.requests.forEach((function(e){e.query&&(e.query=k(e.query))})),t.batchedFetchFromRemoteEndpoint(n).then((function(e){var r=e;return r.ok?e.json():t.applyBatchAfterwares({responses:[r],options:n.options}).then((function(){var e=new Error("Network request failed with status "+r.status+' - "'+r.statusText+'"');throw e.response=r,e}))})).then((function(o){if("function"!=typeof o.map)throw new Error("BatchingNetworkInterface: server response is not an array");t.applyBatchAfterwares({responses:o,options:n.options}).then((function(t){e(t.responses)})).catch((function(e){r(e)}))}))})).catch((function(e){r(e)}))}))},t.prototype.applyBatchMiddlewares=function(e){var t=this,r=e.requests,n=e.options;return new Promise((function(e,o){var i,a,s;i=t._middlewares.slice(),a=t,(s=function(){if(i.length>0){var t=i.shift();t&&t.applyBatchMiddleware.apply(a,[{requests:r,options:n},s])}else e({requests:r,options:n})})()}))},t.prototype.applyBatchAfterwares=function(e){var t=this,r=e.responses,n=e.options;return new Promise((function(e,o){var i,a,s,u={responses:r,options:n};i=t._afterwares.slice(),a=t,(s=function(){if(i.length>0){var t=i.shift();t&&t.applyBatchAfterware.apply(a,[u,s])}else e(u)})()}))},t.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyBatchMiddleware)throw new Error("Batch middleware must implement the applyBatchMiddleware function");t._middlewares.push(e)})),this},t.prototype.useAfter=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyBatchAfterware)throw new Error("Batch afterware must implement the applyBatchAfterware function");t._afterwares.push(e)})),this},t.prototype.batchedFetchFromRemoteEndpoint=function(e){var t={};h(t,e.options);var r=e.requests.map((function(e){return _(e)}));return fetch(this._uri,L({},this._opts,{body:JSON.stringify(r),method:"POST"},t,{headers:L({Accept:"*/*","Content-Type":"application/json"},t.headers)}))},t}(F);function C(e){return"APOLLO_QUERY_RESULT"===e.type}function D(e){return"APOLLO_MUTATION_RESULT"===e.type}function U(e){return"APOLLO_SUBSCRIPTION_RESULT"===e.type}function B(e){return("undefined"!=typeof process&&process.env.NODE_ENV?process.env.NODE_ENV:"development")===e}function V(){return!0===B("production")}function Y(){return!0===B("test")}var W=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),H=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return W(t,e),t}(Error);function J(e,t){var r=new G("Error writing result to store for query "+(t.loc&&t.loc.source&&t.loc.source.body));return r.message+="/n"+e.message,r.stack=e.stack,r}function K(e){var t=e.dataId,r=e.result,n=e.document,o=e.store,i=void 0===o?{}:o,a=e.variables,s=e.dataIdFromObject,u=e.fragmentMatcherFunction,c=g(n),l=c.selectionSet,f=b(v(n));a=h({},q(c),a);try{return $({result:r,dataId:t,selectionSet:l,context:{store:i,processedData:{},variables:a,dataIdFromObject:s,fragmentMap:f,fragmentMatcherFunction:u}})}catch(e){throw J(e,n)}}function $(e){var t=e.result,r=e.dataId,n=e.selectionSet,o=e.context,i=o.variables,a=o.store,c=(o.dataIdFromObject,o.fragmentMap);return n.selections.forEach((function(e){var n,a=function(e,t){if(void 0===t&&(t={}),!e.directives)return!0;var r=!0;return e.directives.forEach((function(e){if("skip"===e.name.value||"include"===e.name.value){var n=e.arguments||[],o=e.name.value;if(1!==n.length)throw new Error("Incorrect number of arguments for the @"+o+" directive.");var i=n[0];if(!i.name||"if"!==i.name.value)throw new Error("Invalid argument for the @"+o+" directive.");var a=n[0].value,s=!1;if(a&&"BooleanValue"===a.kind)s=a.value;else{if("Variable"!==a.kind)throw new Error("Argument for the @"+o+" directive must be a variable or a bool ean value.");if(void 0===(s=t[a.name.value]))throw new Error("Invalid variable referenced in @"+o+" directive.")}"skip"===o&&(s=!s),s||(r=!1)}})),r}(e,i);if(function(e){return"Field"===e.kind}(e)){var h=(n=e).alias?n.alias.value:n.name.value,f=t[h];a&&(void 0!==f?function(e){var t,r=e.field,n=e.value,o=e.dataId,i=e.context,a=i.variables,c=i.dataIdFromObject,h=i.store,f=function(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,i=n.value;return s(r[e.name.value],o,i,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,o=e.value;return s(n,r,o,t)}))),u(e.name.value,n,r)}(r,a),p=!1,d="";if(r.selectionSet&&null!==n)if(Array.isArray(n)){t=ee(n,o+"."+f,r.selectionSet,i)}else{var y=o+"."+f,v=!0;if(X(y)||(y="$"+y),c){var m=c(n);if(m&&X(m))throw new Error('IDs returned by dataIdFromObject cannot begin with the "$" character.');m&&(y=m,v=!1)}if(Z(y,r,i.processedData)||$({dataId:y,result:n,selectionSet:r.selectionSet,context:i}),t={type:"id",id:y,generated:v},h[o]&&h[o][f]!==t){var g=h[o][f];if(l(t)&&t.generated&&l(g)&&!g.generated)throw new Error("Store error: the application attempted to write an object with no provided id but the store already contains an id of "+g.id+" for this object.");l(g)&&g.generated&&(d=g.id,p=!0)}}else t=null!=n&&"object"==typeof n?{type:"json",json:n}:n;var b,w=H({},h[o],((b={})[f]=t,b));p&&z(d,t.id,h);h[o]&&t===h[o][f]||(h[o]=w)}({dataId:r,value:f,field:e,context:o}):o.fragmentMatcherFunction&&(V()||console.warn("Missing field "+h+" in "+JSON.stringify(t,null,2).substring(0,100))))}else{var p=void 0;if(function(e){return"InlineFragment"===e.kind}(e))p=e;else if(!(p=(c||{})[e.name.value]))throw new Error("No fragment named "+e.name.value+".");var d=!0;if(o.fragmentMatcherFunction&&p.typeCondition){var y={store:{self:t},returnPartialData:!1,hasMissingField:!1,customResolvers:{}};d=o.fragmentMatcherFunction({type:"id",id:"self",generated:!1},p.typeCondition.name.value,y),y.returnPartialData&&console.error("WARNING: heuristic fragment matching going on!")}a&&d&&$({result:t,selectionSet:p.selectionSet,dataId:r,context:o})}})),a}function X(e){return"$"===e[0]}function z(e,t,r){var n=r[e],o=r[t];Object.keys(n).forEach((function(i){var a=n[i],s=o[i];l(a)&&X(a.id)&&l(s)&&z(a.id,s.id,r),delete r[e],r[t]=H({},n,o)}))}function Z(e,t,r){if(!r)return!1;if(r[e]){if(r[e].indexOf(t)>=0)return!0;r[e].push(t)}else r[e]=[t];return!1}function ee(e,t,r,n){return e.map((function(e,o){if(null===e)return null;var i=t+"."+o;if(Array.isArray(e))return ee(e,i,r,n);var a=!0;if(n.dataIdFromObject){var s=n.dataIdFromObject(e);s&&(i=s,a=!1)}return Z(i,r,n.processedData)||$({dataId:i,result:e,selectionSet:r,context:n}),{type:"id",id:i,generated:a}}))}var te=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},re=[];function ne(e){if(0===e.optimistic.length)return e.data;var t=e.optimistic.map((function(e){return e.data}));return h.apply(void 0,[{},e.data].concat(t))}function oe(e,t,r,n){if(void 0===e&&(e=re),function(e){return"APOLLO_MUTATION_INIT"===e.type}(t)&&t.optimisticResponse){var o={type:"APOLLO_MUTATION_RESULT",result:{data:"function"==typeof t.optimisticResponse?t.optimisticResponse(t.variables):t.optimisticResponse},document:t.mutation,operationName:t.operationName,variables:t.variables,mutationId:t.mutationId,extraReducers:t.extraReducers,updateQueries:t.updateQueries,update:t.update},i={action:o,data:ie(ne(te({},r,{optimistic:e})),o,r.queries,r.mutations,n),mutationId:t.mutationId};return e.concat([i])}return(function(e){return"APOLLO_MUTATION_ERROR"===e.type}(t)||D(t))&&e.some((function(e){return e.mutationId===t.mutationId}))?function(e,t,r,n){void 0===t&&(t=re);var o=h({},r.data),i=t.filter((function(t){return!e(t)})).map((function(e){var t=ie(o,e.action,r.queries,r.mutations,n);return h(o,t),te({},e,{data:t})}));return i}((function(e){return e.mutationId===t.mutationId}),e,r,n):e}function ie(e,t,r,n,o){var i=qe(e,t,o),a={};return Object.keys(i).forEach((function(t){i[t]!==e[t]&&(a[t]=i[t])})),a}function ae(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(null!=e&&"object"==typeof e&&null!=t&&"object"==typeof t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(!Object.prototype.hasOwnProperty.call(t,r))return!1;if(!ae(e[r],t[r]))return!1}for(var r in t)if(!Object.prototype.hasOwnProperty.call(e,r))return!1;return!0}return!1}var se=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ue="undefined"!=typeof Symbol?Symbol("id"):"@@id";function ce(e){return he(se({},e,{returnPartialData:!1})).result}var le=function(e,t,r,n,o){var i=o.resultKey,a=o.directives;!function(e){if(!l(e))throw new Error("Encountered a sub-selection on the query, but the store doesn't have an object reference. This should never happen during normal use unless you have custom code that is directly manipulating the store; please file an issue.")}(t);var s,c=t.id,h=n.store[c],f=u(e,r,a),p=(h||{})[f];if(void 0===p){if(n.customResolvers&&h&&(h.__typename||"ROOT_QUERY"===c)){var d=h.__typename||"Query",y=n.customResolvers[d];if(y){var v=y[e];v&&(p=v(h,r))}}if(void 0===p){if(!n.returnPartialData)throw new Error("Can't find field "+f+" on object ("+c+") "+JSON.stringify(h,null,2)+".");return n.hasMissingField=!0,p}}return null!=(s=p)&&"object"==typeof s&&"json"===s.type?t.previousResult&&ae(t.previousResult[i],p.json)?t.previousResult[i]:p.json:(t.previousResult&&(p=fe(p,t.previousResult[i])),p)};function he(e){var t=e.store,r=e.query,n=e.variables,i=e.previousResult,a=e.returnPartialData,s=void 0===a||a,u=e.rootId,c=void 0===u?"ROOT_QUERY":u,l=e.fragmentMatcherFunction,f=e.config;n=h({},q(m(r)),n);var p={store:t,returnPartialData:s,customResolvers:f&&f.customResolvers||{},hasMissingField:!1};return{result:o(le,r,{type:"id",id:c,previousResult:i},p,n,{fragmentMatcher:l,resultMapper:pe}),isMissing:p.hasMissingField}}function fe(e,t){if(l(e))return se({},e,{previousResult:t});if(Array.isArray(e)){var r={};return Array.isArray(t)&&t.forEach((function(e){e&&e[ue]&&(r[e[ue]]=e)})),e.map((function(e,n){var o=t&&t[n];return l(e)&&(o=r[e.id]||o),fe(e,o)}))}return e}function pe(e,t){if(t.previousResult){var r=Object.keys(e);if(Object.keys(t.previousResult).reduce((function(e,t){return e&&r.indexOf(t)>-1}),!0)&&r.reduce((function(r,n){return r&&de(e[n],t.previousResult[n])}),!0))return t.previousResult}return Object.defineProperty(e,ue,{enumerable:!1,configurable:!1,writable:!1,value:t.id}),e}function de(e,t){return e===t||!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.reduce((function(e,r,n){return e&&de(r,t[n])}),!0)}var ye=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ve=function(){function e(e,t,r,n){this.store=e,this.reduxRootSelector=t,this.reducerConfig=n,this.fragmentMatcher=r}return e.prototype.readQuery=function(e){var t=e.query,r=e.variables;return this.reducerConfig.addTypename&&(t=Q(t)),ce({rootId:"ROOT_QUERY",store:ne(this.reduxRootSelector(this.store.getState())),query:t,variables:r,fragmentMatcherFunction:this.fragmentMatcher.match,config:this.reducerConfig})},e.prototype.readFragment=function(e){var t=e.id,r=e.fragment,n=e.fragmentName,o=e.variables,i=w(r,n),a=ne(this.reduxRootSelector(this.store.getState()));return void 0===a[t]?null:(this.reducerConfig.addTypename&&(i=Q(i)),ce({rootId:t,store:a,query:i,variables:o,fragmentMatcherFunction:this.fragmentMatcher.match,config:this.reducerConfig}))},e.prototype.writeQuery=function(e){var t=e.data,r=e.query,n=e.variables;this.reducerConfig.addTypename&&(r=Q(r)),this.store.dispatch({type:"APOLLO_WRITE",writes:[{rootId:"ROOT_QUERY",result:t,document:r,operationName:y(r),variables:n||{}}]})},e.prototype.writeFragment=function(e){var t=e.data,r=e.id,n=e.fragment,o=e.fragmentName,i=e.variables,a=w(n,o);this.reducerConfig.addTypename&&(a=Q(a)),this.store.dispatch({type:"APOLLO_WRITE",writes:[{rootId:r,result:t,document:a,operationName:y(a),variables:i||{}}]})},e}(),me=function(){function e(e,t){this.data=ye({},e),this.reducerConfig=t,this.writes=[],this.isFinished=!1}return e.prototype.finish=function(){this.assertNotFinished();var e=this.writes;return this.writes=[],this.isFinished=!0,e},e.prototype.readQuery=function(e){var t=e.query,r=e.variables;return this.assertNotFinished(),this.reducerConfig.addTypename&&(t=Q(t)),ce({rootId:"ROOT_QUERY",store:this.data,query:t,variables:r,config:this.reducerConfig,fragmentMatcherFunction:this.reducerConfig.fragmentMatcher})},e.prototype.readFragment=function(e){var t=e.id,r=e.fragment,n=e.fragmentName,o=e.variables;if(this.assertNotFinished(),!r)throw new Error("fragment option is required. Please pass a GraphQL fragment to readFragment.");var i=this.data,a=w(r,n);return this.reducerConfig.addTypename&&(a=Q(a)),void 0===i[t]?null:ce({rootId:t,store:i,query:a,variables:o,config:this.reducerConfig,fragmentMatcherFunction:this.reducerConfig.fragmentMatcher})},e.prototype.writeQuery=function(e){var t=e.data,r=e.query,n=e.variables;this.assertNotFinished(),this.reducerConfig.addTypename&&(r=Q(r)),this.applyWrite({rootId:"ROOT_QUERY",result:t,document:r,operationName:y(r),variables:n||{}})},e.prototype.writeFragment=function(e){var t=e.data,r=e.id,n=e.fragment,o=e.fragmentName,i=e.variables;if(this.assertNotFinished(),!n)throw new Error("fragment option is required. Please pass a GraphQL fragment to writeFragment.");var a=w(n,o);this.reducerConfig.addTypename&&(a=Q(a)),this.applyWrite({rootId:r,result:t,document:a,operationName:y(a),variables:i||{}})},e.prototype.assertNotFinished=function(){if(this.isFinished)throw new Error("Cannot call transaction methods after the transaction has finished.")},e.prototype.applyWrite=function(e){K({result:e.result,dataId:e.rootId,document:e.document,variables:e.variables,store:this.data,dataIdFromObject:this.reducerConfig.dataIdFromObject||function(){return null},fragmentMatcherFunction:this.reducerConfig.fragmentMatcher}),this.writes.push(e)},e}(),ge=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function be(e){try{return e()}catch(e){console.error&&console.error(e)}}var we=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e};function qe(e,t,r){void 0===e&&(e={});var n=t;if(C(t)){if(t.fetchMoreForQueryId)return e;if(!c(t.result)){var o=we({},e),i=K({result:t.result.data,dataId:"ROOT_QUERY",document:t.document,variables:t.variables,store:o,dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher});return t.extraReducers&&t.extraReducers.forEach((function(e){i=e(i,n)})),i}}else if(U(t)){if(!c(t.result)){o=we({},e);var a=K({result:t.result.data,dataId:"ROOT_SUBSCRIPTION",document:t.document,variables:t.variables,store:o,dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher});return t.extraReducers&&t.extraReducers.forEach((function(e){a=e(a,n)})),a}}else if(D(n)){if(!n.result.errors){o=we({},e);var s=K({result:n.result.data,dataId:"ROOT_MUTATION",document:n.document,variables:n.variables,store:o,dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher}),u=n.updateQueries;if(u&&Object.keys(u).filter((function(e){return u[e]})).forEach((function(t){var o=u[t],i=o.query,a=o.reducer,c=he({store:e,query:i.document,variables:i.variables,returnPartialData:!0,fragmentMatcherFunction:r.fragmentMatcher,config:r}),l=c.result;if(!c.isMissing){var h=be((function(){return a(l,{mutationResult:n.result,queryName:y(i.document),queryVariables:i.variables})}));h&&(s=K({result:h,dataId:"ROOT_QUERY",document:i.document,variables:i.variables,store:s,dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher}))}})),n.update){var l=n.update,h=new me(s,r);be((function(){return l(h,n.result)}));var f=h.finish();s=qe(s,{type:"APOLLO_WRITE",writes:f},r)}return n.extraReducers&&n.extraReducers.forEach((function(e){s=e(s,n)})),s}}else{if(function(e){return"APOLLO_UPDATE_QUERY_RESULT"===e.type}(n))return function(e,t,r){var n=t.variables,o=t.document;return K({result:t.newResult,dataId:"ROOT_QUERY",variables:n,document:o,store:ge({},e),dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher})}(e,n,r);if(function(e){return"APOLLO_STORE_RESET"===e.type}(t))return{};if(function(e){return"APOLLO_WRITE"===e.type}(t))return t.writes.reduce((function(e,t){return K({result:t.result,dataId:t.rootId,document:t.document,variables:t.variables,store:e,dataIdFromObject:r.dataIdFromObject,fragmentMatcherFunction:r.fragmentMatcher})}),we({},e))}return e}var Oe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ie=function(e){return function(e){return function(t){try{return e(t)}catch(e){throw console.error("Caught an exception!",e),console.error(e.stack),e}}}},Ee=function(e,t){var r={error:e};return C(t)?r.queryId=t.queryId:U(t)?r.subscriptionId=t.subscriptionId:D(t)&&(r.mutationId=t.mutationId),r};function Se(e){return function(t,r){void 0===t&&(t={});try{var n={data:qe(t.data,r,e),optimistic:[],reducerError:null};return n.optimistic=oe(t.optimistic,r,n,e),t.data===n.data&&t.optimistic===n.optimistic&&t.reducerError===n.reducerError?t:n}catch(e){return Oe({},t,{reducerError:Ee(e,r)})}}}function Qe(e){var t=void 0===e?{}:e,r=t.reduxRootKey,o=void 0===r?"apollo":r,i=t.initialState,a=t.config,s=void 0===a?{}:a,u=t.reportCrashes,c=void 0===u||u,l=t.logger,h=[],f=[];if(c&&f.push(Ie),l&&f.push(l),f.length>0&&h.push(n.applyMiddleware.apply(void 0,f)),"undefined"!=typeof window){var p=window;p.devToolsExtension&&h.push(p.devToolsExtension())}var d,y=n.compose;if(i&&i[o]&&i[o].queries)throw new Error("Apollo initial state may not contain queries, only data");if(i&&i[o]&&i[o].mutations)throw new Error("Apollo initial state may not contain mutations, only data");return n.createStore(n.combineReducers(((d={})[o]=Se(s),d)),i,y.apply(void 0,h))}var ke=function(){function e(e){this.subscriberFunction=e}return e.prototype[i]=function(){return this},e.prototype.subscribe=function(e){var t=this.subscriberFunction(e);return void 0!==t.unsubscribe?t:{unsubscribe:t}},e}(),Re=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Pe,Me,_e=function(e){function t(t){var r,n,o=t.graphQLErrors,i=t.networkError,a=t.errorMessage,s=t.extraInfo,u=e.call(this,a)||this;return u.graphQLErrors=o||[],u.networkError=i||null,u.message=a||(r=u,n="",Array.isArray(r.graphQLErrors)&&0!==r.graphQLErrors.length&&r.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";n+="GraphQL error: "+t+"\n"})),r.networkError&&(n+="Network error: "+r.networkError.message+"\n"),n=n.replace(/\n$/,"")),u.extraInfo=s,u}return Re(t,e),t}(Error);function Fe(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){!e.hasOwnProperty(t)||null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||Fe(e[t])})),e}function Te(e){return!0===B("development")||Y()?Fe(e):e}function Ne(e){return e<7}!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(Pe||(Pe={})),(Me=e.NetworkStatus||(e.NetworkStatus={}))[Me.loading=1]="loading",Me[Me.setVariables=2]="setVariables",Me[Me.fetchMore=3]="fetchMore",Me[Me.refetch=4]="refetch",Me[Me.poll=6]="poll",Me[Me.ready=7]="ready",Me[Me.error=8]="error";var Ae=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),je=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Le=function(t){function r(e){var r=e.scheduler,n=e.options,o=e.shouldSubscribe,i=void 0===o||o,a=this,s=r.queryManager,u=s.generateQueryId();return(a=t.call(this,(function(e){return a.onSubscribe(e)}))||this).isCurrentlyPolling=!1,a.options=n,a.variables=a.options.variables||{},a.scheduler=r,a.queryManager=s,a.queryId=u,a.shouldSubscribe=i,a.observers=[],a.subscriptionHandles=[],a}return Ae(r,t),r.prototype.result=function(){var e=this;return new Promise((function(t,r){var n=null,o={next:function(r){t(r),0===e.observers.filter((function(e){return e!==o})).length&&e.queryManager.removeQuery(e.queryId),setTimeout((function(){n.unsubscribe()}),0)},error:function(e){r(e)}};n=e.subscribe(o)}))},r.prototype.currentResult=function(){var t=this.queryManager.getCurrentQueryResult(this,!0),r=t.data,n=t.partial,o=this.queryManager.queryStore.get(this.queryId);if(o&&(o.graphQLErrors&&o.graphQLErrors.length>0||o.networkError)){var i=new _e({graphQLErrors:o.graphQLErrors,networkError:o.networkError});return{data:{},loading:!1,networkStatus:o.networkStatus,error:i}}var a,s=!o||o.networkStatus===e.NetworkStatus.loading,u="network-only"===this.options.fetchPolicy&&s||n&&"cache-only"!==this.options.fetchPolicy,c={data:r,loading:Ne(a=o?o.networkStatus:u?e.NetworkStatus.loading:e.NetworkStatus.ready),networkStatus:a};if(!n){this.lastResult=je({},c,{stale:!1})}return je({},c,{partial:n})},r.prototype.getLastResult=function(){return this.lastResult},r.prototype.refetch=function(e){if(this.variables=je({},this.variables,e),"cache-only"===this.options.fetchPolicy)return Promise.reject(new Error("cache-only fetchPolicy option should not be used together with query refetch."));this.options.variables=je({},this.options.variables,this.variables);var t=je({},this.options,{fetchPolicy:"network-only"});return this.queryManager.fetchQuery(this.queryId,t,Pe.refetch).then((function(e){return Te(e)}))},r.prototype.fetchMore=function(e){var t=this;if(!e.updateQuery)throw new Error("updateQuery option is required. This function defines how to update the query data with the new results.");return Promise.resolve().then((function(){var r=t.queryManager.generateQueryId(),n=null;if(e.query)n=e;else{var o=je({},t.variables,e.variables);n=je({},t.options,e,{variables:o})}return n=je({},n,{query:n.query,fetchPolicy:"network-only"}),t.queryManager.fetchQuery(r,n,Pe.normal,t.queryId)})).then((function(r){var n=r.data,o=e.updateQuery;return t.updateQuery((function(e,t){var r=t.variables;return o(e,{fetchMoreResult:n,queryVariables:r})})),r}))},r.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(r){if(e.updateQuery){var n=e.updateQuery;t.updateQuery((function(e,t){var o=t.variables;return n(e,{subscriptionData:{data:r},variables:o})}))}},error:function(t){e.onError?e.onError(t):console.error("Unhandled GraphQL subscription error",t)}});return this.subscriptionHandles.push(r),function(){var e=t.subscriptionHandles.indexOf(r);e>=0&&(t.subscriptionHandles.splice(e,1),r.unsubscribe())}},r.prototype.setOptions=function(e){var t=this.options;this.options=je({},this.options,e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var r="network-only"!==t.fetchPolicy&&"network-only"===e.fetchPolicy||"cache-only"===t.fetchPolicy&&"cache-only"!==e.fetchPolicy||"standby"===t.fetchPolicy&&"standby"!==e.fetchPolicy||!1;return this.setVariables(this.options.variables,r,e.fetchResults)},r.prototype.setVariables=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0);var n=je({},this.variables,e);return ae(n,this.variables)&&!t?0!==this.observers.length&&r?this.result():new Promise((function(e){return e()})):(this.variables=n,this.options.variables=n,0===this.observers.length?new Promise((function(e){return e()})):this.queryManager.fetchQuery(this.queryId,je({},this.options,{variables:this.variables})).then((function(e){return Te(e)})))},r.prototype.updateQuery=function(e){var t=this.queryManager.getQueryWithPreviousResult(this.queryId),r=t.previousResult,n=t.variables,o=t.document,i=be((function(){return e(r,{variables:n})}));i&&this.queryManager.store.dispatch({type:"APOLLO_UPDATE_QUERY_RESULT",newResult:i,variables:n,document:o,operationName:y(o)})},r.prototype.stopPolling=function(){this.isCurrentlyPolling&&(this.scheduler.stopPollingQuery(this.queryId),this.options.pollInterval=void 0,this.isCurrentlyPolling=!1)},r.prototype.startPolling=function(e){if("cache-first"===this.options.fetchPolicy||"cache-only"===this.options.fetchPolicy)throw new Error("Queries that specify the cache-first and cache-only fetchPolicies cannot also be polling queries.");this.isCurrentlyPolling&&(this.scheduler.stopPollingQuery(this.queryId),this.isCurrentlyPolling=!1),this.options.pollInterval=e,this.isCurrentlyPolling=!0,this.scheduler.startPollingQuery(this.options,this.queryId)},r.prototype.onSubscribe=function(e){var t=this;return this.observers.push(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),1===this.observers.length&&this.setUpQuery(),{unsubscribe:function(){t.observers.some((function(t){return t===e}))&&(t.observers=t.observers.filter((function(t){return t!==e})),0===t.observers.length&&t.tearDownQuery())}}},r.prototype.setUpQuery=function(){var e=this;if(this.shouldSubscribe&&this.queryManager.addObservableQuery(this.queryId,this),this.options.pollInterval){if("cache-first"===this.options.fetchPolicy||"cache-only"===this.options.fetchPolicy)throw new Error("Queries that specify the cache-first and cache-only fetchPolicies cannot also be polling queries.");this.isCurrentlyPolling=!0,this.scheduler.startPollingQuery(this.options,this.queryId)}var t={next:function(t){e.lastResult=t,e.observers.forEach((function(e){e.next&&e.next(t)}))},error:function(t){e.observers.forEach((function(e){e.error?e.error(t):console.error("Unhandled error",t.message,t.stack)})),e.lastError=t}};this.queryManager.startQuery(this.queryId,this.options,this.queryManager.queryListenerForObserver(this.queryId,this.options,t))},r.prototype.tearDownQuery=function(){this.isCurrentlyPolling&&(this.scheduler.stopPollingQuery(this.queryId),this.isCurrentlyPolling=!1),this.subscriptionHandles.forEach((function(e){return e.unsubscribe()})),this.subscriptionHandles=[],this.queryManager.stopQuery(this.queryId),this.shouldSubscribe&&this.queryManager.removeObservableQuery(this.queryId),this.observers=[]},r}(ke),xe=Object.create({});var Ce=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,r){if(!this.isReady)throw new Error("FragmentMatcher.match() was called before FragmentMatcher.init()");var n=r.store[e.id];if(!n)return!1;if(!n.__typename)throw new Error("Cannot match fragment because __typename property is missing: "+JSON.stringify(n));if(n.__typename===t)return!0;var o=this.possibleTypesMap[t];return!!(o&&o.indexOf(n.__typename)>-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}(),De=!1,Ue=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,r){var n,o,i=r.store[e.id];return!!i&&(i.__typename?(i.__typename===t||(n="You are using the simple (heuristic) fragment matcher, but your queries contain union or interface types.\n     Apollo Client will not be able to able to accurately map fragments.To make this error go away, use the IntrospectionFragmentMatcher as described in the docs: http://dev.apollodata.com/react/initialization.html#fragment-matcher",void 0===(o="error")&&(o="warn"),V()||xe[n]||(Y()||(xe[n]=!0),"error"===o?console.error(n):console.warn(n)),r.returnPartialData=!0),!0):(De||(console.warn("You're using fragments in your queries, but either don't have the addTypename:\n  true option set in Apollo Client, or you are trying to write a fragment to the store without the __typename.\n   Please turn on the addTypename option and include __typename when writing fragments so that Apollo Client\n   can accurately match fragments."),console.warn("Could not find __typename on Fragment ",t,i),console.warn("DEPRECATION WARNING: using fragments without __typename is unsupported behavior and will be removed in future versions of Apollo client. You should fix this and set addTypename to true now."),Y()||(De=!0)),r.returnPartialData=!0,!0))},e}(),Be=function(){function e(e){this.networkInterface=e,this.inFlightRequestPromises={}}return e.prototype.query=function(e,t){var r=this;if(void 0===t&&(t=!0),!t)return this.networkInterface.query(e);var n=this.getKey(e);return this.inFlightRequestPromises[n]||(this.inFlightRequestPromises[n]=this.networkInterface.query(e)),this.inFlightRequestPromises[n].then((function(e){return delete r.inFlightRequestPromises[n],e})).catch((function(e){throw delete r.inFlightRequestPromises[n],e}))},e.prototype.getKey=function(e){return r.print(e.query)+"|"+JSON.stringify(e.variables)+"|"+e.operationName},e}(),Ve=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ye=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(e){return this.store[e]},t.prototype.initQuery=function(t){var r=this.store[t.queryId];if(r&&r.queryString!==t.queryString)throw new Error("Internal Error: may not update existing query string in store");var n,o=!1,i=null;t.storePreviousVariables&&r&&r.networkStatus!==e.NetworkStatus.loading&&(ae(r.variables,t.variables)||(o=!0,i=r.variables)),n=o?e.NetworkStatus.setVariables:t.isPoll?e.NetworkStatus.poll:t.isRefetch?e.NetworkStatus.refetch:e.NetworkStatus.loading,this.store[t.queryId]={queryString:t.queryString,document:t.document,variables:t.variables,previousVariables:i,networkError:null,graphQLErrors:[],networkStatus:n,metadata:t.metadata},"string"==typeof t.fetchMoreForQueryId&&(this.store[t.fetchMoreForQueryId].networkStatus=e.NetworkStatus.fetchMore)},t.prototype.markQueryResult=function(t,r,n){this.store[t]&&(this.store[t].networkError=null,this.store[t].graphQLErrors=r.errors&&r.errors.length?r.errors:[],this.store[t].previousVariables=null,this.store[t].networkStatus=e.NetworkStatus.ready,"string"==typeof n&&(this.store[n].networkStatus=e.NetworkStatus.ready))},t.prototype.markQueryError=function(t,r,n){this.store[t]&&(this.store[t].networkError=r,this.store[t].networkStatus=e.NetworkStatus.error,"string"==typeof n&&this.markQueryError(n,r,void 0))},t.prototype.markQueryResultClient=function(t,r){this.store[t]&&(this.store[t].networkError=null,this.store[t].previousVariables=null,this.store[t].networkStatus=r?e.NetworkStatus.ready:e.NetworkStatus.loading)},t.prototype.stopQuery=function(e){delete this.store[e]},t.prototype.reset=function(t){var r=this;this.store=Object.keys(this.store).filter((function(e){return t.indexOf(e)>-1})).reduce((function(t,n){return t[n]=Ve({},r.store[n],{networkStatus:e.NetworkStatus.loading}),t}),{})},t}();var We=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]={mutationString:t,variables:r||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){this.store[e].loading=!1,this.store[e].error=t},e.prototype.markMutationResult=function(e){this.store[e].loading=!1,this.store[e].error=null},e.prototype.reset=function(){this.store={}},e}(),He=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ge=function(){function t(e){var t=e.queryManager;this.queryManager=t,this.pollingTimers={},this.inFlightQueries={},this.registeredQueries={},this.intervalQueries={}}return t.prototype.checkInFlight=function(t){var r=this.queryManager.queryStore.get(t);return r&&r.networkStatus!==e.NetworkStatus.ready&&r.networkStatus!==e.NetworkStatus.error},t.prototype.fetchQuery=function(e,t,r){var n=this;return new Promise((function(o,i){n.queryManager.fetchQuery(e,t,r).then((function(e){o(e)})).catch((function(e){i(e)}))}))},t.prototype.startPollingQuery=function(e,t,r){if(!e.pollInterval)throw new Error("Attempted to start a polling query without a polling interval.");return this.queryManager.ssrMode||(this.registeredQueries[t]=e,r&&this.queryManager.addQueryListener(t,r),this.addQueryOnInterval(t,e)),t},t.prototype.stopPollingQuery=function(e){delete this.registeredQueries[e]},t.prototype.fetchQueriesOnInterval=function(e){var t=this;this.intervalQueries[e]=this.intervalQueries[e].filter((function(e){if(!t.registeredQueries.hasOwnProperty(e))return!1;if(t.checkInFlight(e))return!0;var r=t.registeredQueries[e],n=He({},r);return n.fetchPolicy="network-only",t.fetchQuery(e,n,Pe.poll),!0})),0===this.intervalQueries[e].length&&(clearInterval(this.pollingTimers[e]),delete this.intervalQueries[e])},t.prototype.addQueryOnInterval=function(e,t){var r=this,n=t.pollInterval;if(!n)throw new Error("A poll interval is required to start polling query with id '"+e+"'.");this.intervalQueries.hasOwnProperty(n.toString())&&this.intervalQueries[n].length>0?this.intervalQueries[n].push(e):(this.intervalQueries[n]=[e],this.pollingTimers[n]=setInterval((function(){r.fetchQueriesOnInterval(n)}),n))},t.prototype.registerPollingQuery=function(e){if(!e.pollInterval)throw new Error("Attempted to register a non-polling query with the scheduler.");return new Le({scheduler:this,options:e})},t}(),Je=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ke=function(){function t(e){var t,r=e.networkInterface,n=e.store,o=e.reduxRootSelector,i=e.reducerConfig,a=void 0===i?{}:i,s=e.fragmentMatcher,u=e.addTypename,c=void 0===u||u,l=e.queryDeduplication,h=void 0!==l&&l,f=e.ssrMode,p=void 0!==f&&f,d=this;(this.mutationStore=new We,this.queryStore=new Ye,this.idCounter=1,this.lastRequestId={},this.disableBroadcasting=!1,this.networkInterface=r,this.deduplicator=new Be(r),this.store=n,this.reduxRootSelector=o,this.reducerConfig=a,this.pollingTimers={},this.queryListeners={},this.queryDocuments={},this.addTypename=c,this.queryDeduplication=h,this.ssrMode=p,this.fragmentMatcher=void 0===s?new Ue:s,this.scheduler=new Ge({queryManager:this}),this.fetchQueryPromises={},this.observableQueries={},this.queryIdsByName={},this.store.subscribe)&&this.store.subscribe((function(){var e=t||{},r=Object.keys(e).length;ae(e,t=d.getApolloState())&&r||d.broadcastQueries()}))}return t.prototype.broadcastNewStore=function(e){this.broadcastQueries()},t.prototype.mutate=function(e){var t=this,n=e.mutation,o=e.variables,i=e.optimisticResponse,a=e.updateQueries,s=e.refetchQueries,u=void 0===s?[]:s,c=e.update;if(!n)throw new Error("mutation option is required. You must specify your GraphQL document in the mutation option.");var l=this.generateQueryId();this.addTypename&&(n=Q(n)),o=h({},q(p(n)),o);var f=r.print(n),d={query:n,variables:o,operationName:y(n)};this.queryDocuments[l]=n;var v=function(){var e={};return a&&Object.keys(a).forEach((function(r){return(t.queryIdsByName[r]||[]).forEach((function(n){e[n]={reducer:a[r],query:t.queryStore.get(n)}}))})),e};return this.store.dispatch({type:"APOLLO_MUTATION_INIT",mutationString:f,mutation:n,variables:o||{},operationName:y(n),mutationId:l,optimisticResponse:i,extraReducers:this.getExtraReducers(),updateQueries:v(),update:c}),this.mutationStore.initMutation(l,f,o),new Promise((function(e,r){t.networkInterface.query(d).then((function(i){if(i.errors){var a=new _e({graphQLErrors:i.errors});return t.store.dispatch({type:"APOLLO_MUTATION_ERROR",error:a,mutationId:l}),t.mutationStore.markMutationError(l,a),delete t.queryDocuments[l],void r(a)}t.store.dispatch({type:"APOLLO_MUTATION_RESULT",result:i,mutationId:l,document:n,operationName:y(n),variables:o||{},extraReducers:t.getExtraReducers(),updateQueries:v(),update:c}),t.mutationStore.markMutationResult(l);var s=t.getApolloState().reducerError;s&&s.mutationId===l?r(s.error):("function"==typeof u&&(u=u(i)||[]),"string"==typeof u[0]?u.forEach((function(e){t.refetchQueryByName(e)})):u.forEach((function(e){t.query({query:e.query,variables:e.variables,fetchPolicy:"network-only"})})),delete t.queryDocuments[l],e(i))})).catch((function(e){t.store.dispatch({type:"APOLLO_MUTATION_ERROR",error:e,mutationId:l}),delete t.queryDocuments[l],r(new _e({networkError:e}))}))}))},t.prototype.fetchQuery=function(e,n,o,i){var a,s=this,u=n.variables,c=void 0===u?{}:u,l=n.metadata,h=void 0===l?null:l,f=n.fetchPolicy,p=void 0===f?"cache-first":f,d=this.transformQueryDocument(n).queryDoc,v=r.print(d),m="network-only"===p;if(o!==Pe.refetch&&"network-only"!==p){var g=he({query:d,store:this.reduxRootSelector(this.store.getState()).data,variables:c,returnPartialData:!0,fragmentMatcherFunction:this.fragmentMatcher.match,config:this.reducerConfig});m=g.isMissing||"cache-and-network"===p,a=g.result}var b=m&&"cache-only"!==p&&"standby"!==p,w=this.generateRequestId();if(this.queryDocuments[e]=d,this.queryStore.initQuery({queryId:e,queryString:v,document:d,storePreviousVariables:b,variables:c,isPoll:o===Pe.poll,isRefetch:o===Pe.refetch,metadata:h,fetchMoreForQueryId:i}),this.broadcastQueries(),t.EMIT_REDUX_ACTIONS&&this.store.dispatch({type:"APOLLO_QUERY_INIT",queryString:v,document:d,operationName:y(d),variables:c,fetchPolicy:p,queryId:e,requestId:w,storePreviousVariables:b,isPoll:o===Pe.poll,isRefetch:o===Pe.refetch,fetchMoreForQueryId:i,metadata:h}),this.lastRequestId[e]=w,(!b||"cache-and-network"===p)&&(this.queryStore.markQueryResultClient(e,!b),this.broadcastQueries(),t.EMIT_REDUX_ACTIONS&&this.store.dispatch({type:"APOLLO_QUERY_RESULT_CLIENT",result:{data:a},variables:c,document:d,operationName:y(d),complete:!b,queryId:e,requestId:w})),b){var q=this.fetchRequest({requestId:w,queryId:e,document:d,options:n,fetchMoreForQueryId:i}).catch((function(r){throw r.hasOwnProperty("graphQLErrors")?r:(w>=(s.lastRequestId[e]||1)&&(t.EMIT_REDUX_ACTIONS&&s.store.dispatch({type:"APOLLO_QUERY_ERROR",error:r,queryId:e,requestId:w,fetchMoreForQueryId:i}),s.queryStore.markQueryError(e,r,i),s.broadcastQueries()),s.removeFetchQueryPromise(w),new _e({networkError:r}))}));if("cache-and-network"!==p)return q}return Promise.resolve({data:a})},t.prototype.queryListenerForObserver=function(e,t,r){var n=this,o=!1;return function(i){if(i){i=n.queryStore.get(e);var a=n.observableQueries[e],s=a?a.observableQuery:null,u=s?s.options.fetchPolicy:t.fetchPolicy;if("standby"!==u){var c=s?s.getLastResult():null,l=i.previousVariables||"cache-only"===u||"cache-and-network"===u,h=c&&i.networkStatus!==c.networkStatus;if(!Ne(i.networkStatus)||h&&t.notifyOnNetworkStatusChange||l)if(i.graphQLErrors&&i.graphQLErrors.length>0||i.networkError){var f=new _e({graphQLErrors:i.graphQLErrors,networkError:i.networkError});if(o=!0,r.error)try{r.error(f)}catch(e){setTimeout((function(){throw e}),0)}else setTimeout((function(){throw f}),0),V()||console.info("An unhandled error was thrown because no error handler is registered for the query "+i.queryString)}else try{var p=he({store:n.getDataWithOptimisticResults(),query:n.queryDocuments[e],variables:i.previousVariables||i.variables,config:n.reducerConfig,fragmentMatcherFunction:n.fragmentMatcher.match,previousResult:c&&c.data}),d=p.result,y=p.isMissing,v=void 0;if(v=y&&"cache-only"!==u?{data:c&&c.data,loading:Ne(i.networkStatus),networkStatus:i.networkStatus,stale:!0}:{data:d,loading:Ne(i.networkStatus),networkStatus:i.networkStatus,stale:!1},r.next)if(!(c&&v&&c.networkStatus===v.networkStatus&&c.stale===v.stale&&c.data===v.data)||o)try{r.next(Te(v))}catch(e){setTimeout((function(){throw e}),0)}o=!1}catch(e){return o=!0,void(r.error&&r.error(new _e({networkError:e})))}}}}},t.prototype.watchQuery=function(e,t){if(void 0===t&&(t=!0),e.returnPartialData)throw new Error("returnPartialData option is no longer supported since Apollo Client 1.0.");if(e.forceFetch)throw new Error("forceFetch option is no longer supported since Apollo Client 1.0. Use fetchPolicy instead.");if(e.noFetch)throw new Error("noFetch option is no longer supported since Apollo Client 1.0. Use fetchPolicy instead.");if("standby"===e.fetchPolicy)throw new Error('client.watchQuery cannot be called with fetchPolicy set to "standby"');var r=m(e.query);if(r.variableDefinitions&&r.variableDefinitions.length){var n=q(r);e.variables=h({},n,e.variables)}void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var o=Je({},e);return new Le({scheduler:this.scheduler,options:o,shouldSubscribe:t})},t.prototype.query=function(e){var t=this;if(!e.query)throw new Error("query option is required. You must specify your GraphQL document in the query option.");if("Document"!==e.query.kind)throw new Error('You must wrap the query string in a "gql" tag.');if(e.returnPartialData)throw new Error("returnPartialData option only supported on watchQuery.");if(e.pollInterval)throw new Error("pollInterval option only supported on watchQuery.");if(e.forceFetch)throw new Error("forceFetch option is no longer supported since Apollo Client 1.0. Use fetchPolicy instead.");if(e.noFetch)throw new Error("noFetch option is no longer supported since Apollo Client 1.0. Use fetchPolicy instead.");if(void 0!==e.notifyOnNetworkStatusChange)throw new Error('Cannot call "query" with "notifyOnNetworkStatusChange" option. Only "watchQuery" has that option.');e.notifyOnNetworkStatusChange=!1;var r=this.idCounter,n=new Promise((function(o,i){return t.addFetchQueryPromise(r,n,o,i),t.watchQuery(e,!1).result().then((function(e){t.removeFetchQueryPromise(r),o(e)})).catch((function(e){t.removeFetchQueryPromise(r),i(e)}))}));return n},t.prototype.generateQueryId=function(){var e=this.idCounter.toString();return this.idCounter++,e},t.prototype.stopQueryInStore=function(e){this.queryStore.stopQuery(e),this.broadcastQueries(),t.EMIT_REDUX_ACTIONS&&this.store.dispatch({type:"APOLLO_QUERY_STOP",queryId:e})},t.prototype.getApolloState=function(){return this.reduxRootSelector(this.store.getState())},t.prototype.selectApolloState=function(e){return this.reduxRootSelector(e.getState())},t.prototype.getInitialState=function(){return{data:this.getApolloState().data}},t.prototype.getDataWithOptimisticResults=function(){return ne(this.getApolloState())},t.prototype.addQueryListener=function(e,t){this.queryListeners[e]=this.queryListeners[e]||[],this.queryListeners[e].push(t)},t.prototype.addFetchQueryPromise=function(e,t,r,n){this.fetchQueryPromises[e.toString()]={promise:t,resolve:r,reject:n}},t.prototype.removeFetchQueryPromise=function(e){delete this.fetchQueryPromises[e.toString()]},t.prototype.addObservableQuery=function(e,t){this.observableQueries[e]={observableQuery:t};var r=m(t.options.query);if(r.name&&r.name.value){var n=r.name.value;this.queryIdsByName[n]=this.queryIdsByName[n]||[],this.queryIdsByName[n].push(t.queryId)}},t.prototype.removeObservableQuery=function(e){var t=this.observableQueries[e].observableQuery,r=m(t.options.query),n=r.name?r.name.value:null;delete this.observableQueries[e],n&&(this.queryIdsByName[n]=this.queryIdsByName[n].filter((function(e){return!(t.queryId===e)})))},t.prototype.resetStore=function(){var e=this;Object.keys(this.fetchQueryPromises).forEach((function(t){(0,e.fetchQueryPromises[t].reject)(new Error("Store reset while query was in flight."))})),this.queryStore.reset(Object.keys(this.observableQueries)),this.store.dispatch({type:"APOLLO_STORE_RESET",observableQueryIds:Object.keys(this.observableQueries)}),this.mutationStore.reset();var t=[];return Object.keys(this.observableQueries).forEach((function(r){e.queryStore.get(r);var n=e.observableQueries[r].observableQuery.options.fetchPolicy;"cache-only"!==n&&"standby"!==n&&t.push(e.observableQueries[r].observableQuery.refetch())})),Promise.all(t)},t.prototype.startQuery=function(e,t,r){return this.addQueryListener(e,r),this.fetchQuery(e,t).catch((function(e){})),e},t.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=r;this.addTypename&&(n=Q(n));var o,i=h({},q(g(r)),e.variables),a={query:n,variables:i,operationName:y(n)},s=[];return new ke((function(e){if(s.push(e),1===s.length){o=t.networkInterface.subscribe(a,(function(e,r){e?s.forEach((function(t){t.error&&t.error(e)})):(t.store.dispatch({type:"APOLLO_SUBSCRIPTION_RESULT",document:n,operationName:y(n),result:{data:r},variables:i,subscriptionId:o,extraReducers:t.getExtraReducers()}),s.forEach((function(e){e.next&&e.next(r)})))}))}return{unsubscribe:function(){0===(s=s.filter((function(t){return t!==e}))).length&&t.networkInterface.unsubscribe(o)},_networkSubscriptionId:o}}))},t.prototype.removeQuery=function(e){delete this.queryListeners[e],delete this.queryDocuments[e]},t.prototype.stopQuery=function(e){this.removeQuery(e),this.stopQueryInStore(e)},t.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!1);var r=this.getQueryParts(e),n=r.variables,o=r.document,i=e.getLastResult(),a={store:t?this.getDataWithOptimisticResults():this.getApolloState().data,query:o,variables:n,config:this.reducerConfig,previousResult:i?i.data:void 0,fragmentMatcherFunction:this.fragmentMatcher.match};try{return Te({data:ce(a),partial:!1})}catch(e){return Te({data:{},partial:!0})}},t.prototype.getQueryWithPreviousResult=function(e,t){var r;if(void 0===t&&(t=!1),"string"==typeof e){if(!this.observableQueries[e])throw new Error("ObservableQuery with this id doesn't exist: "+e);r=this.observableQueries[e].observableQuery}else r=e;var n=this.getQueryParts(r),o=n.variables,i=n.document;return{previousResult:this.getCurrentQueryResult(r,t).data,variables:o,document:i}},t.prototype.getQueryParts=function(e){var t=e.options,r=e.options.query;return this.addTypename&&(r=Q(r)),{variables:t.variables,document:r}},t.prototype.transformQueryDocument=function(e){var t=e.query;return this.addTypename&&(t=Q(t)),{queryDoc:t}},t.prototype.getExtraReducers=function(){var e=this;return Object.keys(this.observableQueries).map((function(t){var r,n,o,i,a=e.observableQueries[t].observableQuery,s=a.options;return s.reducer?(r=s.reducer,n=e.addTypename?Q(s.query):s.query,o=a.variables||{},i=e.reducerConfig,function(e,t){var a,s=he({store:e,query:n,variables:o,returnPartialData:!0,fragmentMatcherFunction:i.fragmentMatcher,config:i}),u=s.result;if(s.isMissing)return e;try{a=r(u,t,o)}catch(e){throw console.warn("Unhandled error in result reducer",e),e}return u!==a?K({dataId:"ROOT_QUERY",result:a,store:e,document:n,variables:o,dataIdFromObject:i.dataIdFromObject,fragmentMatcherFunction:i.fragmentMatcher}):e}):null})).filter((function(e){return null!==e}))},t.prototype.fetchRequest=function(t){var r=this,n=t.requestId,o=t.queryId,i=t.document,a=t.options,s=t.fetchMoreForQueryId,u=a.variables,c={query:i,variables:u,operationName:y(i)},l=new Promise((function(t,a){r.addFetchQueryPromise(n,l,t,a),r.deduplicator.query(c,r.queryDeduplication).then((function(e){var t=r.getExtraReducers();if(n>=(r.lastRequestId[o]||1)){r.disableBroadcasting=!0,r.store.dispatch({type:"APOLLO_QUERY_RESULT",document:i,variables:u||{},operationName:y(i),result:e,queryId:o,requestId:n,fetchMoreForQueryId:s,extraReducers:t}),r.disableBroadcasting=!1;var a=r.getApolloState().reducerError;a&&a.queryId===o||(r.queryStore.markQueryResult(o,e,s),r.broadcastQueries())}if(r.removeFetchQueryPromise(n),e.errors)throw new _e({graphQLErrors:e.errors});return e})).then((function(a){var c;if(s)c=a.data;else try{c=ce({store:r.getApolloState().data,variables:u,query:i,config:r.reducerConfig,fragmentMatcherFunction:r.fragmentMatcher.match})}catch(e){}var l=r.getApolloState().reducerError;return l&&l.queryId===o?Promise.reject(l.error):(r.removeFetchQueryPromise(n),t({data:c,loading:!1,networkStatus:e.NetworkStatus.ready,stale:!1}),Promise.resolve())})).catch((function(e){a(e)}))}));return l},t.prototype.refetchQueryByName=function(e){var t=this,r=this.queryIdsByName[e];return void 0===r?void console.warn("Warning: unknown query with name "+e+" asked to refetch"):Promise.all(r.map((function(e){return t.observableQueries[e].observableQuery.refetch()})))},t.prototype.broadcastQueries=function(){var e=this;this.disableBroadcasting||Object.keys(this.queryListeners).forEach((function(t){var r=e.queryListeners[t];r&&r.forEach((function(r){r&&r(e.queryStore.get(t))}))}))},t.prototype.generateRequestId=function(){var e=this.idCounter;return this.idCounter++,e},t.EMIT_REDUX_ACTIONS=!0,t}(),$e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Xe="apollo";function ze(e){return e[Xe]}function Ze(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}var et=!1,tt=function(){function e(e){void 0===e&&(e={});var t=this;this.middleware=function(){return function(e){return t.setStore(e),function(r){return function(n){var o=t.queryManager.selectApolloState(e),i=r(n);return t.queryManager.selectApolloState(e)!==o&&t.queryManager.broadcastNewStore(e.getState()),t.devToolsHookCb&&t.devToolsHookCb({action:n,state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.queryManager.getDataWithOptimisticResults()}),i}}}};var r=e.dataIdFromObject,n=e.networkInterface,o=e.reduxRootSelector,i=e.initialState,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,h=void 0===l?0:l,f=e.addTypename,p=void 0===f||f,d=e.customResolvers,y=e.connectToDevTools,v=e.fragmentMatcher,m=e.queryDeduplication,g=void 0===m||m;if("function"==typeof o)this.reduxRootSelector=o;else if(void 0!==o)throw new Error('"reduxRootSelector" must be a function.');this.fragmentMatcher=void 0===v?new Ue:v;var b;if(n instanceof a.ApolloLink){var w=0;this.networkInterface={query:(b=function(e){return a.execute(n,e)},function(e){return new Promise((function(t,r){var n=!1,o=b(e).subscribe({next:function(e){n?console.warn("Apollo Client does not support multiple results from an Observable"):(t(e),n=!0)},error:r,complete:function(){return o.unsubscribe()}})}))}),subscribe:function(e,r){t.subscriptionMap||(t.subscriptionMap=new Map);var o=a.execute(n,e).subscribe({next:function(e){return r(void 0,e)},error:function(e){return r([e])},complete:r}),i=w.toString();return t.subscriptionMap.set(i,o),w++,i},unsubscribe:function(e){if(t.subscriptionMap){var r=t.subscriptionMap.get(e);r&&r.unsubscribe()}}}}else this.networkInterface=n||N({uri:"/graphql"});this.initialState=i||{},this.addTypename=p,this.disableNetworkFetches=c||h>0,this.dataId=r=r||Ze,this.dataIdFromObject=this.dataId,this.fieldWithArgs=u,this.queryDeduplication=g,this.ssrMode=c,h&&setTimeout((function(){return t.disableNetworkFetches=!1}),h),this.reducerConfig={dataIdFromObject:r,customResolvers:d,addTypename:p,fragmentMatcher:this.fragmentMatcher.match},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.setStore=this.setStore.bind(this),this.resetStore=this.resetStore.bind(this);var q=!V()&&"undefined"!=typeof window&&!window.__APOLLO_CLIENT__;(void 0===y?q:y)&&(window.__APOLLO_CLIENT__=this),et||V()||(et=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&void 0===window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__&&navigator.userAgent.indexOf("Chrome")>-1&&console.debug("Download the Apollo DevTools for a better development experience: https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm")),this.version="1.9.4"}return e.prototype.watchQuery=function(e){return this.initStore(),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=$e({},e,{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){if(this.initStore(),"cache-and-network"===e.fetchPolicy)throw new Error("cache-and-network fetchPolicy can only be used with watchQuery");return this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=$e({},e,{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.initStore(),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.initStore(),this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e){return this.initProxy().readQuery(e)},e.prototype.readFragment=function(e){return this.initProxy().readFragment(e)},e.prototype.writeQuery=function(e){return this.initProxy().writeQuery(e)},e.prototype.writeFragment=function(e){return this.initProxy().writeFragment(e)},e.prototype.reducer=function(){return Se(this.reducerConfig)},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.initStore=function(){var e=this;if(!this.store){if(this.reduxRootSelector)throw new Error('Cannot initialize the store because "reduxRootSelector" is provided. reduxRootSelector should only be used when the store is created outside of the client. This may lead to unexpected results when querying the store internally. Please remove that option from ApolloClient constructor.');this.setStore(Qe({reduxRootKey:Xe,initialState:this.initialState,config:this.reducerConfig,logger:function(t){return function(t){return function(r){var n=t(r);return e.devToolsHookCb&&e.devToolsHookCb({action:r,state:{queries:e.queryManager.queryStore.getStore(),mutations:e.queryManager.mutationStore.getStore()},dataWithOptimisticResults:e.queryManager.getDataWithOptimisticResults()}),n}}}}))}},e.prototype.resetStore=function(){return this.queryManager?this.queryManager.resetStore():null},e.prototype.getInitialState=function(){return this.initStore(),this.queryManager.getInitialState()},e.prototype.setStore=function(e){var t;if(void 0===(t=this.reduxRootSelector?this.reduxRootSelector:ze)(e.getState()))throw new Error('Existing store does not use apolloReducer. Please make sure the store is properly configured and "reduxRootSelector" is correctly specified.');this.store=e,this.queryManager=new Ke({networkInterface:this.networkInterface,reduxRootSelector:t,store:e,addTypename:this.addTypename,reducerConfig:this.reducerConfig,queryDeduplication:this.queryDeduplication,fragmentMatcher:this.fragmentMatcher,ssrMode:this.ssrMode})},e.prototype.initProxy=function(){return this.proxy||(this.initStore(),this.proxy=new ve(this.store,this.reduxRootSelector||ze,this.fragmentMatcher,this.reducerConfig)),this.proxy},e}();e.createNetworkInterface=N,e.createBatchingNetworkInterface=function(e){if(!e)throw new Error("You must pass an options argument to createNetworkInterface.");return new x({uri:e.uri,batchInterval:e.batchInterval,batchMax:e.batchMax,fetchOpts:e.opts||{}})},e.createApolloStore=Qe,e.createApolloReducer=Se,e.readQueryFromStore=ce,e.writeQueryToStore=function(e){var t=e.result,r=e.query,n=e.store,o=void 0===n?{}:n,i=e.variables,a=e.dataIdFromObject,s=e.fragmentMap,u=void 0===s?{}:s,c=e.fragmentMatcherFunction,l=m(r);i=h({},q(l),i);try{return $({dataId:"ROOT_QUERY",result:t,selectionSet:l.selectionSet,context:{store:o,processedData:{},variables:i,dataIdFromObject:a,fragmentMap:u,fragmentMatcherFunction:c}})}catch(e){throw J(e,r)}},e.addTypenameToDocument=Q,e.createFragmentMap=b,e.ApolloError=_e,e.getQueryDefinition=m,e.getMutationDefinition=p,e.getFragmentDefinitions=v,e.toIdValue=function(e,t){return void 0===t&&(t=!1),{type:"id",id:e,generated:t}},e.IntrospectionFragmentMatcher=Ce,e.printAST=r.print,e.HTTPFetchNetworkInterface=T,e.HTTPBatchedNetworkInterface=x,e.ObservableQuery=Le,e.ApolloClient=tt,e.default=tt,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=/sm/f6e51a4bcda875c10b63fa4bc330c7383566e604bdc6055601f7be2e9061194a.map