silverstripe-cms/client/dist/js/TinyMCE_sslink-internal.js
Guy Sartorelli ddbe4ea4ce
DEP Upgrade build stack (#2795)
* DEP Upgrade webpack config and various deps

* DEP Update code to work with upgraded libraries

* MNT run yarn build
2022-12-19 10:20:52 +13:00

1 line
160 KiB
JavaScript

!function(){"use strict";var e,t,r={745:function(e,t,r){var n=r(394);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},648:function(e){e.exports=Injector},595:function(e){e.exports=InsertLinkModal},363:function(e){e.exports=React},394:function(e){e.exports=ReactDom},624:function(e){e.exports=ReactRedux},265:function(e){e.exports=ShortcodeSerialiser},196:function(e){e.exports=TinyMCEActionRegistrar},754:function(e){e.exports=i18n},311:function(e){e.exports=jQuery},535:function(e,t,r){r.r(t),r.d(t,{ApolloCache:function(){return Kn},ApolloClient:function(){return Gn},ApolloConsumer:function(){return Zi},ApolloError:function(){return Qr},ApolloLink:function(){return xe},ApolloProvider:function(){return Xi},Cache:function(){return Hn},DocumentType:function(){return to},HttpLink:function(){return Tt},InMemoryCache:function(){return Ai},MissingFieldError:function(){return $n},NetworkStatus:function(){return Nr},Observable:function(){return Z},ObservableQuery:function(){return Lr},checkFetcher:function(){return at},concat:function(){return Ui},createHttpLink:function(){return xt},createSignalIfSupported:function(){return Et},defaultDataIdFromObject:function(){return er},defaultPrinter:function(){return gt},disableExperimentalFragmentVariables:function(){return Hi.disableExperimentalFragmentVariables},disableFragmentWarnings:function(){return Hi.disableFragmentWarnings},empty:function(){return Li},enableExperimentalFragmentVariables:function(){return Hi.enableExperimentalFragmentVariables},execute:function(){return Te},fallbackHttpConfig:function(){return bt},from:function(){return zi},fromError:function(){return kt},fromPromise:function(){return Ji},getApolloContext:function(){return $i},gql:function(){return Hi.gql},isApolloError:function(){return Cr},isReference:function(){return oe},makeReference:function(){return ie},makeVar:function(){return Nn},mergeOptions:function(){return Jn},operationName:function(){return ao},parseAndCheckHttpResponse:function(){return ot},parser:function(){return so},resetApolloContext:function(){return $i},resetCaches:function(){return Hi.resetCaches},rewriteURIForGET:function(){return St},selectHttpOptionsAndBody:function(){return _t},selectHttpOptionsAndBodyInternal:function(){return wt},selectURI:function(){return Be},serializeFetchParameter:function(){return ze},setLogVerbosity:function(){return b},split:function(){return Bi},throwServerError:function(){return et},toPromise:function(){return Wi},useApolloClient:function(){return eo},useFragment_experimental:function(){return go},useLazyQuery:function(){return vo},useMutation:function(){return yo},useQuery:function(){return lo},useReactiveVar:function(){return bo},useSubscription:function(){return mo}});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function u(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}Object.create;function c(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;var l="Invariant Violation",f=Object.setPrototypeOf,p=void 0===f?function(e,t){return e.__proto__=t,e}:f,h=function(e){function t(r){void 0===r&&(r=l);var n=e.call(this,"number"==typeof r?l+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=l,p(n,t.prototype),n}return i(t,e),t}(Error);function d(e,t){if(!e)throw new h(t)}var v=["debug","log","warn","error","silent"],y=v.indexOf("log");function m(e){return function(){if(v.indexOf(e)>=y){var t=console[e]||console.log;return t.apply(console,arguments)}}}function b(e){var t=v[y];return y=Math.max(0,v.indexOf(e)),t}!function(e){e.debug=m("debug"),e.log=m("log"),e.warn=m("warn"),e.error=m("error")}(d||(d={}));function g(e){try{return e()}catch(e){}}var _=g((function(){return globalThis}))||g((function(){return window}))||g((function(){return self}))||g((function(){return global}))||g((function(){return g.constructor("return this")()})),w="__",O=[w,w].join("DEV");var E=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(_,O,{value:"production"!==g((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),_[O]}}();function S(e){try{return e()}catch(e){}}var k=S((function(){return globalThis}))||S((function(){return window}))||S((function(){return self}))||S((function(){return global}))||S((function(){return S.constructor("return this")()})),D=!1;function x(){D&&(delete k.process,D=!1)}function T(e,t){if(!Boolean(e))throw new Error(t)}!k||S((function(){return"production"}))||S((function(){return process}))||(Object.defineProperty(k,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),D=!0);function P(e){return j(e,[])}function j(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:j(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(j(e[n],t));1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`);return"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+j(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class I{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||T(!1,`Body must be a string. Received: ${P(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||T(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||T(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function R(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function C(e,t,r){return t&&q(e.prototype,t),r&&q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}x(),__DEV__?d("boolean"==typeof E,E):d("boolean"==typeof E,38);var N=function(){return"function"==typeof Symbol},Q=function(e){return N()&&Boolean(Symbol[e])},V=function(e){return Q(e)?Symbol[e]:"@@"+e};N()&&!Q("observable")&&(Symbol.observable=Symbol("observable"));var M=V("iterator"),A=V("observable"),L=V("species");function z(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function B(e){var t=e.constructor;return void 0!==t&&null===(t=t[L])&&(t=void 0),void 0!==t?t:Z}function U(e){return e instanceof Z}function W(e){W.log?W.log(e):setTimeout((function(){throw e}))}function J(e){Promise.resolve().then((function(){try{e()}catch(e){W(e)}}))}function H(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=z(t,"unsubscribe");r&&r.call(t)}}catch(e){W(e)}}function Y(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function G(e,t,r){e._state="running";var n=e._observer;try{var i=z(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(Y(e),!i)throw r;i.call(n,r);break;case"complete":Y(e),i&&i.call(n)}}catch(e){W(e)}"closed"===e._state?H(e):"running"===e._state&&(e._state="ready")}function K(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void J((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(G(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void G(e,t,r);e._queue.push({type:t,value:r})}}var $=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new X(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(Y(this),H(this))},C(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),X=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){K(this._subscription,"next",e)},t.error=function(e){K(this._subscription,"error",e)},t.complete=function(){K(this._subscription,"complete")},C(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Z=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new $(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(B(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(B(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=B(this),n=arguments.length>1,i=!1,o=arguments[1],a=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=B(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=B(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[A]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=z(t,A);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return U(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(Q("iterator")&&(n=z(t,M)))return new r((function(e){J((function(){if(!e.closed){for(var r,i=R(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){J((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){J((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},C(e,null,[{key:L,get:function(){return this}}]),e}();function ee(e){return null!==e&&"object"==typeof e}function te(e,t){var r=t,n=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new h("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new h(43);"FragmentDefinition"===e.kind&&n.push(e)})),void 0===r&&(__DEV__?d(1===n.length,"Found ".concat(n.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):d(1===n.length,44),r=n[0].name.value),o(o({},e),{definitions:c([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function re(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function ne(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?d(n,"No fragment named ".concat(r)):d(n,45),n||null;default:return null}}function ie(e){return{__ref:String(e)}}function oe(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function ae(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 i={};r.fields.map((function(e){return ae(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return ae(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 __DEV__?new h('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new h(54);e[t.value]=null}}N()&&Object.defineProperty(Z,Symbol("extensions"),{value:{symbol:A,hostReportError:W},configurable:!0});var se=["connection","include","skip","client","rest","export"],ue=Object.assign((function(e,t,r){if(t&&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={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(ce(i),")")}return r.connection.key}var o=e;if(t){var a=ce(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach((function(e){-1===se.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(ce(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=ce;return ce=e,t}}),ce=function(e){return JSON.stringify(e,le)};function le(e,t){return ee(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function fe(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return ae(r,n,i,t)})),r}return null}function pe(e){return e.alias?e.alias.value:e.name.value}function he(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(de(o)){if("__typename"===o.name.value)return e[pe(o)]}else{var a=he(e,ne(o,r).selectionSet,r);if("string"==typeof a)return a}}}function de(e){return"Field"===e.kind}function ve(e){return"InlineFragment"===e.kind}function ye(e){__DEV__?d(e&&"Document"===e.kind,'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'):d(e&&"Document"===e.kind,46);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new h('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new h(47);return e}));return __DEV__?d(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):d(t.length<=1,48),e}function me(e){return ye(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function be(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function ge(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function _e(e){var t=me(e);return __DEV__?d(t&&"query"===t.operation,"Must contain a query definition."):d(t&&"query"===t.operation,49),t}function we(e){var t;ye(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new h("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new h(53)}function Oe(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&ae(t,e.variable.name,e.defaultValue)})),t}function Ee(e,t){return t?t(e):Z.of()}function Se(e){return"function"==typeof e?new xe(e):e}function ke(e){return e.request.length<=1}var De=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return i(t,e),t}(Error),xe=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Z.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(Se).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=Se(r),o=Se(n||new e(Ee));return ke(i)&&ke(o)?new e((function(e){return t(e)?i.request(e)||Z.of():o.request(e)||Z.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Z.of():o.request(e,r)||Z.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=o({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r=o(o({},r),"function"==typeof e?e(r):e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return o({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?be(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new h("illegal argument: ".concat(i)):new h(26)}return e}(t))))||Z.of()},e.concat=function(t,r){var n=Se(t);if(ke(n))return __DEV__&&d.warn(new De("You are calling concat on a terminating link, which will have no effect",n)),n;var i=Se(r);return ke(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Z.of()}))||Z.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Z.of()}))||Z.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(Ee)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new h("request is not implemented"):new h(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),Te=xe.execute;class Pe{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class je{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ie={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Re=new Set(Object.keys(Ie));function Fe(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Re.has(t)}var qe,Ce;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(qe||(qe={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(Ce||(Ce={}));const Ne=Object.freeze({});function Qe(e,t,r=Ie){const n=new Map;for(const e of Object.values(Ce))n.set(e,Ve(t,e));let i,o,a,s=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],h=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===h.length?void 0:p[p.length-1],f=a,a=h.pop(),m)if(s){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(a){if(o=s?c:u[c],f=a[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var d,v;Fe(f)||T(!1,`Invalid AST Node: ${P(f)}.`);const r=e?null===(d=n.get(f.kind))||void 0===d?void 0:d.leave:null===(v=n.get(f.kind))||void 0===v?void 0:v.enter;if(b=null==r?void 0:r.call(t,f,o,a,p,h),b===Ne)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Fe(b)){p.pop();continue}f=b}}var y;if(void 0===b&&m&&l.push([o,f]),e)p.pop();else i={inArray:s,index:c,keys:u,edits:l,prev:i},s=Array.isArray(f),u=s?f:null!==(y=r[f.kind])&&void 0!==y?y:[],c=-1,l=[],a&&h.push(a),a=f}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Ve(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Me(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?d(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):d(r&&1===r.length,40);var i=r[0];__DEV__?d(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):d(i.name&&"if"===i.name.value,41);var o=i.value;__DEV__?d(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):d(o&&("Variable"===o.kind||"BooleanValue"===o.kind),42),t.push({directive:e,ifArgument:i})}}));return t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?d(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):d(void 0!==i,39)):i=n.value.value,"skip"===r.name.value?!i:i}))}function Ae(e,t,r){var n=new Set(e),i=n.size;return Qe(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ne}}),r?!n.size:n.size<i}function Le(e){return e&&Ae(["client","export"],e,!0)}var ze=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new h("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new h(23);throw n.parseError=e,n}return r},Be=function(e,t){var r=e.getContext().uri;return r||("function"==typeof t?t(e):t||"/graphql")},Ue="function"==typeof WeakMap&&"ReactNative"!==g((function(){return navigator.product})),We="function"==typeof WeakSet,Je="function"==typeof Symbol&&"function"==typeof Symbol.for,He=Je&&Symbol.asyncIterator,Ye="function"==typeof g((function(){return window.document.createElement})),Ge=g((function(){return navigator.userAgent.indexOf("jsdom")>=0}))||!1,Ke=Ye&&!Ge;function $e(e){var t=null,r=null,n=!1,i=[],o=[];function a(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",a),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return He&&(c[Symbol.asyncIterator]=function(){return this}),c}function Xe(e){var t={next:function(){return e.read()}};return He&&(t[Symbol.asyncIterator]=function(){return this}),t}function Ze(e){var t,r,n,i=e;if(e.body&&(i=e.body),function(e){return!(!He||!e[Symbol.asyncIterator])}(i))return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(i);if(function(e){return!!e.getReader}(i))return Xe(i.getReader());if(function(e){return!!e.stream}(i))return Xe(i.stream().getReader());if(function(e){return!!e.arrayBuffer}(i))return t=i.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},He&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(i))return $e(i);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var et=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},tt=Object.prototype.hasOwnProperty;function rt(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function nt(e,t){if(e.status>=300){et(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status))}try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function it(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function ot(e){return function(t){return t.text().then((function(e){return nt(t,e)})).then((function(r){return t.status>=300&&et(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||tt.call(r,"data")||tt.call(r,"errors")||et(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var at=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new h("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new h(22)};function st(e){return 9===e||32===e}const ut=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ct(e){return lt[e.charCodeAt(0)]}const lt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function ft(e){return Qe(e,pt)}const pt={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ht(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=vt("(",ht(e.variableDefinitions,", "),")"),r=ht([e.operation,ht([e.name,t]),ht(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+vt(" = ",r)+vt(" ",ht(n," "))},SelectionSet:{leave:({selections:e})=>dt(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=vt("",e,": ")+t;let a=o+vt("(",ht(r,", "),")");return a.length>80&&(a=o+vt("(\n",yt(ht(r,"\n")),"\n)")),ht([a,ht(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+vt(" ",ht(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>ht(["...",vt("on ",e),ht(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${vt("(",ht(r,", "),")")} on ${t} ${vt("",ht(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||st(e.charCodeAt(0)))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,u=e.endsWith("\\"),c=s||u,l=!(null!=t&&t.minimize)&&(!i||e.length>70||c||o||a);let f="";const p=i&&st(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(ut,ct)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ht(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ht(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+vt("(",ht(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>vt("",e,"\n")+ht(["schema",ht(t," "),dt(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>vt("",e,"\n")+ht(["scalar",t,ht(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>vt("",e,"\n")+ht(["type",t,vt("implements ",ht(r," & ")),ht(n," "),dt(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>vt("",e,"\n")+t+(mt(r)?vt("(\n",yt(ht(r,"\n")),"\n)"):vt("(",ht(r,", "),")"))+": "+n+vt(" ",ht(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>vt("",e,"\n")+ht([t+": "+r,vt("= ",n),ht(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>vt("",e,"\n")+ht(["interface",t,vt("implements ",ht(r," & ")),ht(n," "),dt(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>vt("",e,"\n")+ht(["union",t,ht(r," "),vt("= ",ht(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>vt("",e,"\n")+ht(["enum",t,ht(r," "),dt(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>vt("",e,"\n")+ht([t,ht(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>vt("",e,"\n")+ht(["input",t,ht(r," "),dt(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>vt("",e,"\n")+"directive @"+t+(mt(r)?vt("(\n",yt(ht(r,"\n")),"\n)"):vt("(",ht(r,", "),")"))+(n?" repeatable":"")+" on "+ht(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ht(["extend schema",ht(e," "),dt(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ht(["extend scalar",e,ht(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ht(["extend type",e,vt("implements ",ht(t," & ")),ht(r," "),dt(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ht(["extend interface",e,vt("implements ",ht(t," & ")),ht(r," "),dt(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>ht(["extend union",e,ht(t," "),vt("= ",ht(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>ht(["extend enum",e,ht(t," "),dt(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>ht(["extend input",e,ht(t," "),dt(r)]," ")}};function ht(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function dt(e){return vt("{\n",yt(ht(e,"\n")),"\n}")}function vt(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function yt(e){return vt(" ",e.replace(/\n/g,"\n "))}function mt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var bt={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},gt=function(e,t){return t(e)};function _t(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return r.unshift(t),wt.apply(void 0,c([e,gt],r,!1))}function wt(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i={},a={};r.forEach((function(e){i=o(o(o({},i),e.options),{headers:o(o({},i.headers),e.headers)}),e.credentials&&(i.credentials=e.credentials),a=o(o({},a),e.http)})),i.headers=Ot(i.headers,a.preserveHeaderCase);var s=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:s,variables:c};return a.includeExtensions&&(f.extensions=u),a.includeQuery&&(f.query=t(l,ft)),{options:i,body:f}}function Ot(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}var Et=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function St(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=ze(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=ze(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}function kt(e){return new Z((function(t){t.error(e)}))}var Dt=g((function(){return fetch})),xt=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,n=e.fetch,i=e.print,c=void 0===i?gt:i,l=e.includeExtensions,f=e.preserveHeaderCase,p=e.useGETForQueries,h=e.includeUnusedVariables,d=void 0!==h&&h,v=a(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&at(n||Dt);var y={http:{includeExtensions:l,preserveHeaderCase:f},options:v.fetchOptions,credentials:v.credentials,headers:v.headers};return new xe((function(e){var t=Be(e,r),i=e.getContext(),a={};if(i.clientAwareness){var l=i.clientAwareness,f=l.name,h=l.version;f&&(a["apollographql-client-name"]=f),h&&(a["apollographql-client-version"]=h)}var v,m=o(o({},a),i.headers),b={http:i.http,options:i.fetchOptions,credentials:i.credentials,headers:m},_=wt(e,c,bt,y,b),w=_.options,O=_.body;if(O.variables&&!d){var E=new Set(Object.keys(O.variables));Qe(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&E.delete(e.name.value)}}),E.size&&(O.variables=o({},O.variables),E.forEach((function(e){delete O.variables[e]})))}if(!w.signal){var S=Et(),k=S.controller,D=S.signal;(v=k)&&(w.signal=D)}if(p&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(w.method="GET"),Ae(["defer"],e.query)&&(w.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===w.method){var x=St(t,O),T=x.newURI,P=x.parseError;if(P)return kt(P);t=T}else try{w.body=ze(O,"Payload")}catch(P){return kt(P)}return new Z((function(r){return(n||g((function(){return fetch}))||Dt)(t,w).then((function(t){var n;e.setContext({response:t});var i=null===(n=t.headers)||void 0===n?void 0:n.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?function(e,t){var r,n,i;return s(this,void 0,void 0,(function(){var o,a,s,c,l,f,p,h,d,v,y,m,b,g,_,w,O,E,S,k;return u(this,(function(u){switch(u.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");o=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),s="boundary=",c=(null==a?void 0:a.includes(s))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(s))+s.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Ze(e),h=!0,u.label=1;case 1:return h?[4,p.next()]:[3,3];case 2:for(d=u.sent(),v=d.value,y=d.done,m="string"==typeof v?v:o.decode(v),h=!y,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,k=[f.slice(0,b),f.slice(b+l.length)],f=k[1],(g=k[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=rt(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");E=g.slice(_);try{S=nt(e,E.replace("\r\n","")),(Object.keys(S).length>1||"data"in S||"incremental"in S||"errors"in S)&&(null===(n=t.next)||void 0===n||n.call(t,S))}catch(e){it(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(i=t.complete)||void 0===i||i.call(t),[2]}}))}))}(t,r):function(e,t,r){ot(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return it(e,r)}))}(t,e,r)})).catch((function(e){return it(e,r)})),function(){v&&v.abort()}}))}))},Tt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,xt(t).request)||this;return r.options=t,r}return i(t,e),t}(xe),Pt=Object.prototype,jt=Pt.toString,It=Pt.hasOwnProperty,Rt=Function.prototype.toString,Ft=new Map;function qt(e,t){try{return Ct(e,t)}finally{Ft.clear()}}function Ct(e,t){if(e===t)return!0;var r,n,i,o=jt.call(e);if(o!==jt.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(Mt(e,t))return!0;var a=Nt(e),s=Nt(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!It.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!Ct(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(Mt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var h=f.next();if(h.done)break;var d=h.value,v=d[0],y=d[1];if(!t.has(v))return!1;if(p&&!Ct(y,t.get(v)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Rt.call(e);return b===Rt.call(t)&&(n=Vt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function Nt(e){return Object.keys(e).filter(Qt,e)}function Qt(e){return void 0!==this[e]}var Vt="{ [native code] }";function Mt(e,t){var r=Ft.get(e);if(r){if(r.has(t))return!0}else Ft.set(e,r=new Set);return r.add(t),!1}var At=function(){return Object.create(null)},Lt=Array.prototype,zt=Lt.forEach,Bt=Lt.slice,Ut=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=At),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return zt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Bt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}();function Wt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Jt=Object.prototype.hasOwnProperty;function Ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Yt(e)}function Yt(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new Kt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var Gt=function(e,t,r){return this.merge(e[r],t[r])},Kt=function(){function e(e){void 0===e&&(e=Gt),this.reconciler=e,this.isObject=ee,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return ee(t)&&ee(e)?(Object.keys(t).forEach((function(i){if(Jt.call(e,i)){var o=e[i];if(t[i]!==o){var a=r.reconciler.apply(r,c([e,t,i],n,!1));a!==o&&((e=r.shallowCopyForMerge(e))[i]=a)}}else(e=r.shallowCopyForMerge(e))[i]=t[i]})),e):t},e.prototype.shallowCopyForMerge=function(e){return ee(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):o({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}(),$t=Object.prototype.hasOwnProperty;function Xt(e){return null==e}var Zt=Array.isArray;function er(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Xt(n)?Xt(i)?void 0:{_id:i}:{id:n}),Xt(n)&&!Xt(i)&&(n=i),!Xt(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var tr={dataIdFromObject:er,addTypename:!0,resultCaching:!0,canonizeResults:!1};function rr(e){var t=e.canonizeResults;return void 0===t?tr.canonizeResults:t}var nr=/^[_a-z][_0-9a-z]*/i;function ir(e){var t=e.match(nr);return t?t[0]:e}function or(e,t,r){return!!ee(t)&&(Zt(t)?t.every((function(t){return or(e,t,r)})):e.selections.every((function(e){if(de(e)&&Me(e,r)){var n=pe(e);return $t.call(t,n)&&(!e.selectionSet||or(e.selectionSet,t[n],r))}return!0})))}function ar(e){return ee(e)&&!oe(e)&&!Zt(e)}function sr(e,t){var r=re(ge(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var ur,cr,lr=function(){function e(){this.known=new(We?WeakSet:Set),this.pool=new Ut(Ue),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return ee(e)&&this.known.has(e)},e.prototype.pass=function(e){if(ee(e)){var t=function(e){return ee(e)?Zt(e)?e.slice(0):o({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(ee(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(s=this.pool.lookupArray(n)).array||(this.known.add(s.array=n),__DEV__&&Object.freeze(n)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),fr=Object.assign((function(e){if(ee(e)){void 0===ur&&pr();var t=ur.admit(e),r=cr.get(t);return void 0===r&&cr.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:pr});function pr(){ur=new lr,cr=new(Ue?WeakMap:Map)}function hr(e,t,r){return new Z((function(n){var i=n.next,o=n.error,a=n.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--s,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,s||a&&a.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function dr(e){return e.errors&&e.errors.length>0||!1}function vr(e,t,r){var n=0;return e.forEach((function(r,i){t.call(this,r,i,e)&&(e[n++]=r)}),r),e.length=n,e}var yr={kind:"Field",name:{kind:"Name",value:"__typename"}};function mr(e,t){return!e||e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&mr(t[e.name.value],t)}))}function br(e){return mr(me(e)||function(e){__DEV__?d("Document"===e.kind,'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'):d("Document"===e.kind,50),__DEV__?d(e.definitions.length<=1,"Fragment must have exactly one definition."):d(e.definitions.length<=1,51);var t=e.definitions[0];return __DEV__?d("FragmentDefinition"===t.kind,"Must be a fragment definition."):d("FragmentDefinition"===t.kind,52),t}(e),re(ge(e)))?null:e}function gr(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function _r(e,t){var r=Object.create(null),n=[],i=Object.create(null),a=[],s=br(Qe(t,{Variable:{enter:function(e,t,n){"VariableDefinition"!==n.kind&&(r[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(gr(e))))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&n.push({name:e.value.name.value})})),t.selectionSet&&Er(t.selectionSet).forEach((function(e){a.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){i[e.name.value]=!0}},Directive:{enter:function(t){if(gr(e)(t))return null}}}));return s&&vr(n,(function(e){return!!e.name&&!r[e.name]})).length&&(s=function(e,t){var r=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return br(Qe(t,{OperationDefinition:{enter:function(t){return o(o({},t),{variableDefinitions:t.variableDefinitions?t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))})):[]})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var n=0;if(t.arguments&&t.arguments.forEach((function(e){r(e)&&(n+=1)})),1===n)return null}}},Argument:{enter:function(e){if(r(e))return null}}}))}(n,s)),s&&vr(a,(function(e){return!!e.name&&!i[e.name]})).length&&(s=function(e,t){function r(t){if(e.some((function(e){return e.name===t.name.value})))return null}return br(Qe(t,{FragmentSpread:{enter:r},FragmentDefinition:{enter:r}}))}(a,s)),s}var wr=Object.assign((function(e){return Qe(e,{SelectionSet:{enter:function(e,t,r){if(!r||"OperationDefinition"!==r.kind){var n=e.selections;if(n)if(!n.some((function(e){return de(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var i=r;if(!(de(i)&&i.directives&&i.directives.some((function(e){return"export"===e.name.value}))))return o(o({},e),{selections:c(c([],n,!0),[yr],!1)})}}}}})}),{added:function(e){return e===yr}}),Or={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&d.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}};function Er(e){var t=[];return e.selections.forEach((function(e){(de(e)||ve(e))&&e.selectionSet?Er(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function Sr(e){return"query"===we(e).operation?e:Qe(e,{OperationDefinition:{enter:function(e){return o(o({},e),{operation:"query"})}}})}var kr=new Map;function Dr(e){var t=kr.get(e)||1;return kr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function xr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function Tr(e){function t(t){Object.defineProperty(e,t,{value:Z})}return Je&&Symbol.species&&t(Symbol.species),t("@@species"),e}function Pr(e){return e&&"function"==typeof e.then}var jr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),xr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),xr(r.observers,"error",e))},complete:function(){var e=r.sub;if(null!==e){var t=r.sources.shift();t?Pr(t)?t.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=t.subscribe(r.handlers):(e&&setTimeout((function(){return e.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),xr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Z(t)]),Pr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return i(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Z);Tr(jr);var Ir=Object.prototype.toString;function Rr(e){return Fr(e)}function Fr(e,t){switch(Ir.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=Fr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=Fr(e[r],t)})),n;default:return e}}function qr(e){return Array.isArray(e)&&e.length>0}function Cr(e){return e.hasOwnProperty("graphQLErrors")}var Nr,Qr=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.clientErrors,s=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(qr((n=l).graphQLErrors)||qr(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return i(t,e),t}(Error);function Vr(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(Nr||(Nr={}));var Mr=Object.assign,Ar=Object.hasOwnProperty,Lr=function(e){function t(t){var r=t.queryManager,n=t.queryInfo,i=t.options,a=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Br)}catch(e){}var r=!a.observers.size;a.observers.add(e);var n=a.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&a.reobserve().catch((function(){})),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}}))||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=n,a.queryManager=r,a.isTornDown=!1;var s=r.defaultOptions.watchQuery,u=(void 0===s?{}:s).fetchPolicy,c=void 0===u?"cache-first":u,l=i.fetchPolicy,f=void 0===l?c:l,p=i.initialFetchPolicy,h=void 0===p?"standby"===f?c:f:p;a.options=o(o({},i),{initialFetchPolicy:h,fetchPolicy:f}),a.queryId=n.queryId||r.generateQueryId();var d=me(a.query);return a.queryName=d&&d.name&&d.name.value,a}return i(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),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.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||Nr.ready,n=o(o({},t),{loading:Vr(r),networkStatus:r}),i=this.options.fetchPolicy,a=void 0===i?"cache-first":i;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var s=this.queryInfo.getDiff();(s.complete||this.options.returnPartialData)&&(n.data=s.result),qt(n.data,{})&&(n.data=void 0),s.complete?(delete n.partial,!s.complete||n.networkStatus!==Nr.loading||"cache-first"!==a&&"cache-only"!==a||(n.networkStatus=Nr.ready,n.loading=!1)):n.partial=!0,!__DEV__||s.complete||this.options.partialRefetch||n.loading||n.data||n.error||Ur(s.missing)}return e&&this.updateLastResult(n),n},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!qt(this.last.result,e)||t&&!qt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||qt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},n=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===n?n:"no-cache"===n?"no-cache":"network-only",__DEV__&&e&&Ar.call(e,"variables")){var i=_e(this.query),a=i.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&d.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=i.name)||void 0===t?void 0:t.value)||JSON.stringify(i),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!qt(this.options.variables,e)&&(r.variables=this.options.variables=o(o({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,Nr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=o(o({},e.query?e:o(o(o(o({},this.options),{query:this.query}),e),{variables:o(o({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),n=this.queryManager.generateQueryId(),i=this.queryInfo,a=i.networkStatus;i.networkStatus=Nr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var s=new Set;return this.queryManager.fetchQuery(n,r,Nr.fetchMore).then((function(o){return t.queryManager.removeQuery(n),i.networkStatus===Nr.fetchMore&&(i.networkStatus=a),t.queryManager.cache.batch({update:function(n){var i=e.updateQuery;i?n.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return i(e,{fetchMoreResult:o.data,variables:r.variables})})):n.writeQuery({query:r.query,variables:r.variables,data:o.data})},onWatchUpdated:function(e){s.add(e.query)}}),o})).finally((function(){s.has(t.query)||zr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).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):__DEV__&&d.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return qt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},Nr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?d(r,"Attempted to start a polling query without a polling interval."):d(r,12),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(Vr(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},Nr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=o(o({},this.last),{result:this.queryManager.assumeImmutableResults?e:Rr(e),variables:t}),qr(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var n=t===Nr.refetch||t===Nr.fetchMore||t===Nr.poll,i=this.options.variables,a=this.options.fetchPolicy,s=Wt(this.options,e||{}),u=n?s:Mr(this.options,s);n||(this.updatePolling(),e&&e.variables&&!qt(e.variables,i)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===a&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=Nr.setVariables)));var c=u.variables&&o({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return n||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),xr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=o(o({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:Nr.error,loading:!1});this.updateLastResult(r,t),xr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Z);function zr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Br(e){__DEV__&&d.error("Unhandled error",e.message,e.stack)}function Ur(e){__DEV__&&e&&__DEV__&&d.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}Tr(Lr);var Wr=null,Jr={},Hr=1,Yr="@wry/context:Slot",Gr=Array,Kr=Gr[Yr]||function(){var e=function(){function e(){this.id=["slot",Hr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Wr;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Jr)break;return e!==Wr&&(Wr.slots[this.id]=t),!0}return Wr&&(Wr.slots[this.id]=Jr),!1},e.prototype.getValue=function(){if(this.hasValue())return Wr.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=Wr;Wr={parent:a,slots:o};try{return t.apply(n,r)}finally{Wr=a}},e.bind=function(e){var t=Wr;return function(){var r=Wr;try{return Wr=t,e.apply(this,arguments)}finally{Wr=r}}},e.noContext=function(e,t,r){if(!Wr)return e.apply(r,t);var n=Wr;try{return Wr=null,e.apply(r,t)}finally{Wr=n}},e}();try{Object.defineProperty(Gr,Yr,{value:Gr[Yr]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();Kr.bind,Kr.noContext;function $r(){}var Xr,Zr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),en=new Kr,tn=Object.prototype.hasOwnProperty,rn=void 0===(Xr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Xr;function nn(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var on=[];function an(e,t){if(!e)throw new Error(t||"assertion failure")}function sn(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var un=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!fn(this))return cn(this),this.value[0]},e.prototype.recompute=function(e){return an(!this.recomputing,"already recomputing"),cn(this),fn(this)?function(e,t){bn(e),en.withValue(e,ln,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{nn(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){if(e.dirty=!1,fn(e))return;hn(e)}(e);return sn(e.value)}(this,e):sn(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,pn(this),nn(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),bn(this),dn(this,(function(t,r){t.setDirty(),gn(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=on.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(rn(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),on.push(this.deps),this.deps=null)},e.count=0,e}();function cn(e){var t=en.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),fn(e)?vn(t,e):yn(t,e),t}function ln(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function fn(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function pn(e){dn(e,vn)}function hn(e){dn(e,yn)}function dn(e,t){var r=e.parents.size;if(r)for(var n=rn(e.parents),i=0;i<r;++i)t(n[i],e)}function vn(e,t){an(e.childValues.has(t)),an(fn(t));var r=!fn(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=on.pop()||new Set;e.dirtyChildren.add(t),r&&pn(e)}function yn(e,t){an(e.childValues.has(t)),an(!fn(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),mn(e,t),fn(e)||hn(e)}function mn(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(on.length<100&&on.push(r),e.dirtyChildren=null))}function bn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){gn(e,r)})),e.forgetDeps(),an(null===e.dirtyChildren)}function gn(e,t){t.parents.delete(e),e.childValues.delete(t),mn(e,t)}var _n={setDirty:!0,dispose:!0,forget:!0};function wn(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=en.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(nn(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&tn.call(_n,r)?r:"setDirty";rn(n).forEach((function(e){return e[i]()})),t.delete(e),nn(n)}},n}function On(){var e=new Ut("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}On();var En=new Set;function Sn(e,t){void 0===t&&(t=Object.create(null));var r=new Zr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||On(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=r.get(o);a||(r.set(o,a=new un(e)),a.subscribe=t.subscribe,a.forget=function(){return r.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return r.set(o,a),En.add(r),en.hasValue()||(En.forEach((function(e){return e.clean()})),En.clear()),s};function a(e){var t=r.get(e);t&&t.setDirty()}function s(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var kn=null,Dn={},xn=1;function Tn(e){try{return e()}catch(e){}}var Pn="@wry/context:Slot",jn=Tn((function(){return globalThis}))||Tn((function(){return r.g}))||Object.create(null),In=jn["@wry/context:Slot"]||Array["@wry/context:Slot"]||function(e){try{Object.defineProperty(jn,Pn,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",xn++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=kn;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Dn)break;return e!==kn&&(kn.slots[this.id]=t),!0}return kn&&(kn.slots[this.id]=Dn),!1},e.prototype.getValue=function(){if(this.hasValue())return kn.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=kn;kn={parent:a,slots:o};try{return t.apply(n,r)}finally{kn=a}},e.bind=function(e){var t=kn;return function(){var r=kn;try{return kn=t,e.apply(this,arguments)}finally{kn=r}}},e.noContext=function(e,t,r){if(!kn)return e.apply(r,t);var n=kn;try{return kn=null,e.apply(r,t)}finally{kn=n}},e}());In.bind,In.noContext;var Rn=new In,Fn=new WeakMap;function qn(e){var t=Fn.get(e);return t||Fn.set(e,t={vars:new Set,dep:wn()}),t}function Cn(e){qn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function Nn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){qn(e).dep.dirty(n),Qn(e)}));var a=Array.from(r);r.clear(),a.forEach((function(t){return t(e)}))}}else{var s=Rn.getValue();s&&(i(s),qn(s).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),qn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function Qn(e){e.broadcastWatches&&e.broadcastWatches()}var Vn=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=Ht(t.resolvers,e)})):this.resolvers=Ht(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,i=e.variables,a=e.onlyRunForcedResolvers,c=void 0!==a&&a;return s(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.resolveDocument(t,r.data,n,i,this.fragmentMatcher,c).then((function(e){return o(o({},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 Ae(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){ye(e);var t=_r([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Qe(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return de(e)&&"__typename"===e.name.value})))return null}}})),t}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return o(o({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),s(this,void 0,void 0,(function(){return u(this,(function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return o(o({},t),e.exportedVariables)}))]:[2,o({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Qe(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 Ne}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Sr(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,n,i,a){return void 0===r&&(r={}),void 0===n&&(n={}),void 0===i&&(i=function(){return!0}),void 0===a&&(a=!1),s(this,void 0,void 0,(function(){var s,c,l,f,p,h,d,v,y;return u(this,(function(u){return s=we(e),c=ge(e),l=re(c),f=s.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",d=(h=this).cache,v=h.client,y={fragmentMap:l,context:o(o({},r),{cache:d,client:v}),variables:n,fragmentMatcher:i,defaultOperationType:p,exportedVariables:{},onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,t,y).then((function(e){return{result:e,exportedVariables:y.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r){return s(this,void 0,void 0,(function(){var n,i,o,a,c,l=this;return u(this,(function(f){return n=r.fragmentMap,i=r.context,o=r.variables,a=[t],c=function(e){return s(l,void 0,void 0,(function(){var s,c;return u(this,(function(u){return Me(e,o)?de(e)?[2,this.resolveField(e,t,r).then((function(t){var r;void 0!==t&&a.push(((r={})[pe(e)]=t,r))}))]:(ve(e)?s=e:(s=n[e.name.value],__DEV__?d(s,"No fragment named ".concat(e.name.value)):d(s,11)),s&&s.typeCondition&&(c=s.typeCondition.name.value,r.fragmentMatcher(t,c,i))?[2,this.resolveSelectionSet(s.selectionSet,t,r).then((function(e){a.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return Yt(a)}))]}))}))},e.prototype.resolveField=function(e,t,r){return s(this,void 0,void 0,(function(){var n,i,o,a,s,c,l,f,p,h=this;return u(this,(function(u){return n=r.variables,i=e.name.value,o=pe(e),a=i!==o,s=t[o]||t[i],c=Promise.resolve(s),r.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(l=t.__typename||r.defaultOperationType,(f=this.resolvers&&this.resolvers[l])&&(p=f[a?i:o])&&(c=Promise.resolve(Rn.withValue(this.cache,p,[t,fe(e,n),r.context,{field:e,fragmentMap:r.fragmentMap}])))),[2,c.then((function(t){return void 0===t&&(t=s),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}(),Mn=new(Ue?WeakMap:Map);function An(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return Mn.set(e,(Mn.get(e)+1)%1e15),r.apply(this,arguments)})}function Ln(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var zn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;Mn.has(r)||(Mn.set(r,0),An(r,"evict"),An(r,"modify"),An(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||Nr.loading;return this.variables&&this.networkStatus!==Nr.loading&&!qt(this.variables,e.variables)&&(t=Nr.setVariables),qt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){Ln(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&qt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||qt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():zr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;Ln(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(Vr(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var n=o(o({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&qt(n,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=n))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===Mn.get(this.cache)&&qt(t,r.variables)&&qt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=qr(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&qr(e.incremental)){var a=this.getDiff().result,s=new Kt;e.incremental.forEach((function(e){for(var t=e.data,r=e.path,n=e.errors,i=r.length-1;i>=0;--i){var u=r[i],c=!isNaN(+u)?[]:{};c[u]=t,t=c}n&&o.push.apply(o,n),a=s.merge(a,t)})),e.data=a}this.graphQLErrors=o,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(Bn(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:Mn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var a=i.getDiffOptions(r.variables),s=o.diff(a);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Nr.ready},e.prototype.markError=function(e){return this.networkStatus=Nr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function Bn(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!dr(e);return!n&&r&&e.data&&(n=!0),n}var Un=Object.prototype.hasOwnProperty,Wn=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,a=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ue?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new Vn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new h("QueryManager stopped while query was in flight"):new h(13))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,n=e.mutation,i=e.variables,a=e.optimisticResponse,c=e.updateQueries,l=e.refetchQueries,f=void 0===l?[]:l,p=e.awaitRefetchQueries,h=void 0!==p&&p,v=e.update,y=e.onQueryUpdated,m=e.fetchPolicy,b=void 0===m?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":m,g=e.errorPolicy,_=void 0===g?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":g,w=e.keepRootFields,O=e.context;return s(this,void 0,void 0,(function(){var e,t,r,s,l,p;return u(this,(function(u){switch(u.label){case 0:return __DEV__?d(n,"mutation option is required. You must specify your GraphQL document in the mutation option."):d(n,14),__DEV__?d("network-only"===b||"no-cache"===b,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):d("network-only"===b||"no-cache"===b,15),e=this.generateMutationId(),t=this.transform(n),r=t.document,s=t.hasClientExports,n=this.cache.transformForLink(r),i=this.getVariables(n,i),s?[4,this.localState.addExportedVariables(n,i,O)]:[3,2];case 1:i=u.sent(),u.label=2;case 2:return l=this.mutationStore&&(this.mutationStore[e]={mutation:n,variables:i,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:n,variables:i,fetchPolicy:b,errorPolicy:_,context:O,updateQueries:c,update:v,keepRootFields:w}),this.broadcastQueries(),p=this,[2,new Promise((function(t,r){return hr(p.getObservableFromLink(n,o(o({},O),{optimisticResponse:a}),i,!1),(function(t){if(dr(t)&&"none"===_)throw new Qr({graphQLErrors:t.errors});l&&(l.loading=!1,l.error=null);var r=o({},t);return"function"==typeof f&&(f=f(r)),"ignore"===_&&dr(r)&&delete r.errors,p.markMutationResult({mutationId:e,result:r,document:n,variables:i,fetchPolicy:b,errorPolicy:_,context:O,update:v,updateQueries:c,awaitRefetchQueries:h,refetchQueries:f,removeOptimistic:a?e:void 0,onQueryUpdated:y,keepRootFields:w})})).subscribe({next:function(e){p.broadcastQueries(),t(e)},error:function(t){l&&(l.loading=!1,l.error=t),a&&p.cache.removeOptimistic(e),p.broadcastQueries(),r(t instanceof Qr?t:new Qr({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var n=e.result,i=[],a="no-cache"===e.fetchPolicy;if(!a&&Bn(n,e.errorPolicy)){i.push({result:n.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables});var s=e.updateQueries;s&&this.queries.forEach((function(e,o){var a=e.observableQuery,u=a&&a.queryName;if(u&&Un.call(s,u)){var c=s[u],l=r.queries.get(o),f=l.document,p=l.variables,h=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),d=h.result;if(h.complete&&d){var v=c(d,{mutationResult:n,queryName:f&&be(f)||void 0,queryVariables:p});v&&i.push({result:v,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(i.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var u=[];if(this.refetchQueries({updateCache:function(t){a||i.forEach((function(e){return t.write(e)}));var s=e.update;if(s){if(!a){var u=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});u.complete&&!n.incremental&&(n=o(o({},n),{data:u.result}))}s(t,n,{context:e.context,variables:e.variables})}a||e.keepRootFields||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return u.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(u).then((function(){return n}))}return Promise.resolve(n)},e.prototype.markMutationOptimistic=function(e,t){var r=this,n="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult(o(o({},t),{result:{data:n}}),e)}catch(e){__DEV__&&d.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),n=_r([Or],ye(r)),i=this.localState.clientQuery(r),a=n&&this.localState.serverQuery(n),s={document:r,hasClientExports:Le(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:i,serverQuery:a,defaultVars:Oe(me(r)),asQuery:o(o({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?o(o({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,s)};u(e),u(r),u(i),u(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return o(o({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=o(o({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new zn(this),r=new Lr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?d(e.query,"query option is required. You must specify your GraphQL document in the query option."):d(e.query,16),__DEV__?d("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):d("Document"===e.query.kind,17),__DEV__?d(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):d(!e.returnPartialData,18),__DEV__?d(!e.pollInterval,"pollInterval option only supported on watchQuery."):d(!e.pollInterval,19),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new h("Store reset while query was in flight (not completed in link chain)"):new h(20)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=Nr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,n=new Map,i=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?n.set(e,!1):ee(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?n.set(t.transform(e).document,!1):ee(e)&&e.query&&i.add(e)})),this.queries.forEach((function(t,i){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void r.set(i,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&n.has(s)||a&&n.has(a))&&(r.set(i,o),s&&n.set(s,!0),a&&n.set(a,!0))}})),i.size&&i.forEach((function(e){var n=Dr("legacyOneTimeQuery"),i=t.getQuery(n).init({document:e.query,variables:e.variables}),a=new Lr({queryManager:t,queryInfo:i,options:o(o({},e),{fetchPolicy:"network-only"})});d(a.queryId===n),i.setObservableQuery(a),r.set(n,a)})),__DEV__&&n.size&&n.forEach((function(e,t){e||__DEV__&&d.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,s,e).map((function(o){if("no-cache"!==n&&(Bn(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),dr(o))throw new Qr({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,s).then(u);return new Z((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,n){var i,a,s=this;void 0===n&&(n=null!==(i=null==t?void 0:t.queryDeduplication)&&void 0!==i?i:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:be(u)||void 0,context:this.prepareContext(o(o({},t),{forceFetch:!n}))};if(t=f.context,n){var p=c.get(u)||new Map;c.set(u,p);var h=fr(r);if(!(a=p.get(h))){var d=new jr([Te(l,f)]);p.set(h,a=d),d.beforeNext((function(){p.delete(h)&&p.size<1&&c.delete(u)}))}}else a=new jr([Te(l,f)])}else a=new jr([Z.of({data:{}})]),t=this.prepareContext(t);var v=this.transform(e).clientQuery;return v&&(a=hr(a,(function(e){return s.localState.runResolvers({document:v,remoteResult:e,context:t,variables:r})}))),a},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId();r=Rr(r);var i=this.cache.transformForLink(this.transform(e.document).document);return hr(this.getObservableFromLink(i,r.context,r.variables),(function(o){var a=qr(o.errors)?o.errors.slice(0):[];"incremental"in o&&qr(o.incremental)&&o.incremental.forEach((function(e){e.errors&&a.push.apply(a,e.errors)}));var s=qr(a);if(n>=e.lastRequestId){if(s&&"none"===r.errorPolicy)throw e.markError(new Qr({graphQLErrors:a}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:Nr.ready};return s&&"ignore"!==r.errorPolicy&&(u.errors=a,u.networkStatus=Nr.error),u}),(function(t){var r=Cr(t)?t:new Qr({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=Nr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?s&&s.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?s&&s.errorPolicy||"none":l,p=t.returnPartialData,h=void 0!==p&&p,d=t.notifyOnNetworkStatusChange,v=void 0!==d&&d,y=t.context,m=void 0===y?{}:y,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:h,notifyOnNetworkStatusChange:v,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(a,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&a.observableQuery&&a.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new jr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?Dr("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof zn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=u(i,a,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var n=this,i=t.query,a=t.variables,s=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,h=e.networkStatus;e.init({document:this.transform(i).document,variables:a,networkStatus:r});var d=function(){return e.getDiff(a)},v=function(t,r){void 0===r&&(r=e.networkStatus||Nr.loading);var s=t.result;!__DEV__||l||qt(s,{})||Ur(t.missing);var u=function(e){return Z.of(o({data:e,loading:Vr(r),networkStatus:r},t.complete?null:{partial:!0}))};return s&&n.transform(i).hasForcedResolvers?n.localState.runResolvers({document:i,remoteResult:{data:s},context:f,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):u(s)},y="no-cache"===s?0:r===Nr.refetch&&"merge"!==u?1:2,m=function(){return n.getResultsFromLink(e,y,{variables:a,context:f,fetchPolicy:s,errorPolicy:c})},b=p&&"number"==typeof h&&h!==r&&Vr(r);switch(s){default:case"cache-first":return(g=d()).complete?[v(g,e.markReady())]:l||b?[v(g),m()]:[m()];case"cache-and-network":var g;return(g=d()).complete||l||b?[v(g),m()]:[m()];case"cache-only":return[v(d(),e.markReady())];case"network-only":return b?[v(d()),m()]:[m()];case"no-cache":return b?[v(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new zn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return o(o({},t),{clientAwareness:this.clientAwareness})},e}();function Jn(e,t){return Wt(e,t,t.variables&&{variables:o(o({},e&&e.variables),t.variables)})}var Hn,Yn=!1,Gn=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,s=void 0!==a&&a,u=e.ssrForceFetchDelay,c=void 0===u?0:u,l=e.connectToDevTools,f=void 0===l?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:l,p=e.queryDeduplication,v=void 0===p||p,y=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,E=e.version,S=e.link;if(S||(S=r?new Tt({uri:r,credentials:n,headers:i}):xe.empty()),!o)throw __DEV__?new h("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new h(9);if(this.link=S,this.cache=o,this.disableNetworkFetches=s||c>0,this.queryDeduplication=v,this.defaultOptions=y||Object.create(null),this.typeDefs=_,c&&setTimeout((function(){return t.disableNetworkFetches=!1}),c),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),f&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Yn&&__DEV__&&(Yn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var k=window.navigator,D=k&&k.userAgent,x=void 0;"string"==typeof D&&(D.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":D.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&d.log("Download the Apollo DevTools for a better development experience: "+x)}this.version="3.7.1",this.localState=new Vn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new Wn({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:v,ssrMode:s,clientAwareness:{name:O,version:E},localState:this.localState,assumeImmutableResults:b,onBroadcast:f?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Jn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=o(o({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Jn(this.defaultOptions.query,e)),__DEV__?d("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):d("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=o(o({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Jn(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){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Te(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).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({discardWatches:!0})})).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.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&d.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(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.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();Hn||(Hn={});var Kn=function(){function e(){this.getFragmentDoc=Sn(te)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(o(o({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read(o(o({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,n=a(e,["id","data"]);return this.write(Object.assign(n,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,n=e.fragment,i=e.fragmentName,o=a(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(o,{query:this.getFragmentDoc(n,i),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var n=r.readQuery(e),i=t(n);return null==i?n:(r.writeQuery(o(o({},e),{data:i})),i)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var n=r.readFragment(e),i=t(n);return null==i?n:(r.writeFragment(o(o({},e),{data:i})),i)}})},e}(),$n=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((a={})[s.path[u]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return i(t,e),t}(Error);function Xn(e){var t=new Set([e]);return t.forEach((function(e){ee(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(r){ee(e[r])&&t.add(e[r])}))})),e}function Zn(e){return __DEV__&&Xn(e),e}var ei=Object.create(null),ti=function(){return ei},ri=Object.create(null),ni=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Zn(oe(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return oe(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return ie(e);if(oe(e))return e;var n=r.policies.identify(e)[0];if(n){var i=ie(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return o({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),$t.call(this.data,e)){var r=this.data[e];if(r&&$t.call(r,t))return r[t]}return"__typename"===t&&$t.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof si?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),$t.call(this.data,e)?this.data[e]:this instanceof si?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;oe(e)&&(e=e.__ref),oe(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?d("string"==typeof r,"store.merge expects a string ID"):d("string"==typeof r,1);var a=new Kt(ci).merge(i,o);if(this.data[r]=a,a!==i&&(delete this.refs[r],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=ir(e);t===e||n.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||n instanceof si||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,n=this.lookup(e);if(n){var i=Object.create(null),a=!1,s=!0,u={DELETE:ei,INVALIDATE:ri,isReference:oe,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||ie(e)}:t,{store:r})}};if(Object.keys(n).forEach((function(c){var l=ir(c),f=n[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var h=p===ti?ei:p(Zn(f),o(o({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));h===ri?r.group.dirty(e,c):(h===ei&&(h=void 0),h!==f&&(i[c]=h,a=!0,f=h))}void 0!==f&&(s=!1)}})),a)return this.merge(e,i),s&&(this instanceof si?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,a?((n={})[a]=ti,n):ti)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&($t.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof si&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){$t.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&$t.call(e,r)||t.delete(r)})),e){var r=e.__META,n=a(e,["__META"]);Object.keys(n).forEach((function(e){t.merge(e,n[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof si?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){$t.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof si;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!$t.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){oe(e)&&(t[e.__ref]=!0),ee(e)&&Object.keys(e).forEach((function(t){var r=e[t];ee(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),ii=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?wn():null,this.keyMaker=new Ut(Ue)},e.prototype.depend=function(e,t){if(this.d){this.d(oi(e,t));var r=ir(t);r!==t&&this.d(oi(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(oi(e,t),"__exists"===t?"forget":"setDirty")},e}();function oi(e,t){return t+"#"+e}function ai(e,t){li(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new ii(i))||this;return a.stump=new ui(a),a.storageTrie=new Ut(Ue),o&&a.replace(o),a}return i(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(ni||(ni={}));var si=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return i(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){qt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return o(o({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return $t.call(this.data,t)?o(o({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(ni),ui=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new ii(t.group.caching,t.group))||this}return i(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(si);function ci(e,t,r){var n=e[r],i=t[r];return qt(n,i)?n:i}function li(e){return!!(e instanceof ni&&e.group.caching)}function fi(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var pi=function(){function e(e){var t=this;this.knownResults=new(Ue?WeakMap:Map),this.config=Wt(e,{addTypename:!1!==e.addTypename,canonizeResults:rr(e)}),this.canon=e.canon||new lr,this.executeSelectionSet=Sn((function(e){var r,n=e.context.canonizeResults,i=fi(e);i[3]=!n;var a=(r=t.executeSelectionSet).peek.apply(r,i);return a?n?o(o({},a),{result:t.canon.admit(a.result)}):a:(ai(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:fi,makeCacheKey:function(e,t,r,n){if(li(r.store))return r.store.makeCacheKey(e,oe(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=Sn((function(e){return ai(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(li(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new lr},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,n=e.rootId,i=void 0===n?"ROOT_QUERY":n,a=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;a=o(o({},Oe(_e(r))),a);var p,h=ie(i),d=this.executeSelectionSet({selectionSet:we(r).selectionSet,objectOrReference:h,enclosingRef:h,context:o({store:t,query:r,policies:f,variables:a,varString:fr(a),canonizeResults:l},sr(r,this.config.fragments))});if(d.missing&&(p=[new $n(hi(d.missing),d.missing,r,a)],!u))throw p[0];return{result:d.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(li(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(oe(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var a,s=o.variables,u=o.policies,c=o.store.getFieldValue(n,"__typename"),l=[],f=new Kt;function p(e,t){var r;return e.missing&&(a=f.merge(a,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof c&&!u.rootIdsByTypename[c]&&l.push({__typename:c});var d=new Set(r.selections);d.forEach((function(e){var r,v;if(Me(e,s))if(de(e)){var y=u.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=pe(e);void 0===y?wr.added(e)||(a=f.merge(a,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(oe(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Zt(y)?y=p(t.executeSubSelectedArray({field:e,array:y,enclosingRef:i,context:o}),m):e.selectionSet?null!=y&&(y=p(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:y,enclosingRef:oe(y)?y:i,context:o}),m)):o.canonizeResults&&(y=t.canon.pass(y)),void 0!==y&&l.push(((v={})[m]=y,v))}else{var b=ne(e,o.lookupFragment);if(!b&&e.kind===Ce.FRAGMENT_SPREAD)throw __DEV__?new h("No fragment named ".concat(e.name.value)):new h(5);b&&u.fragmentMatches(b,c)&&b.selectionSet.selections.forEach(d.add,d)}}));var v={result:Yt(l),missing:a},y=o.canonizeResults?this.canon.admit(v):Zn(v);return y.result&&this.knownResults.set(y.result,r),y},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new Kt;function u(e,r){var n;return e.missing&&(t=s.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:Zt(e)?u(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?u(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:oe(e)?e:o,context:a}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){ee(r)&&(__DEV__?d(!oe(r),"Missing selection set for object of type ".concat(function(e,t){return oe(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):d(!oe(r),6),Object.values(r).forEach(n.add,n))}))}}(a.store,n,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function hi(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var di=Object.create(null);function vi(e){var t=JSON.stringify(e);return di[t]||(di[t]=Object.create(null))}function yi(e){var t=vi(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=bi(e,(function(e){var i=wi(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&$t.call(t,e[0])&&(i=wi(t,e,_i)),__DEV__?d(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):d(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function mi(e){var t=vi(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=bi(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return wi(t,e)}else{var a=r.slice(1);if(i&&$t.call(i,a)){var s=e.slice(0);return s[0]=a,wi(i,s)}}else if(n&&qr(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&fe(c,i);return l&&wi(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function bi(e,t){var r=new Kt;return gi(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function gi(e){var t=vi(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Zt(t)?(gi(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Zt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function _i(e,t){return e[t]}function wi(e,t,r){return r=r||_i,Oi(t.reduce((function e(t,n){return Zt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function Oi(e){return ee(e)?Zt(e)?e.map(Oi):bi(Object.keys(e).sort(),(function(t){return wi(e,t)})):e}function Ei(e){return void 0!==e.args?e.args:e.field?fe(e.field,e.variables):null}ue.setStringify(fr);var Si=function(){},ki=function(e,t){return t.fieldName},Di=function(e,t,r){return(0,r.mergeObjects)(e,t)},xi=function(e,t){return t},Ti=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=o({dataIdFromObject:er},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,n=this,i=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(i===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,s=t&&t.storeObject||e,u=o(o({},t),{typename:i,storeObject:s,readField:t&&t.readField||function(){var e=ji(arguments,s);return n.readField(e,{store:n.cache.data,variables:e.variables})}}),c=i&&this.getTypePolicy(i),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Zt(f)){a=f;break}l=yi(f)}return a=a?String(a):void 0,u.keyObject?[a,u.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var n=e[r],i=n.queryType,o=n.mutationType,s=n.subscriptionType,u=a(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),o&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),$t.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?Di:!1===t?xi:e.merge}a(n,t.merge),n.keyFn=!1===i?Si:Zt(i)?yi(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?ki:Zt(s)?mi(s):"function"==typeof s?s:n.keyFn,"function"==typeof u&&(n.read=u),a(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||ki)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?d(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):d(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(nr);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!$t.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);n&&n.size&&n.forEach((function(e){var n=t.getTypePolicy(e),i=n.fields,o=a(n,["fields"]);Object.assign(r,o),Object.assign(r.fields,i)}))}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],u=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},c=!(!r||!this.fuzzySubtypes.size),l=!1,f=0;f<s.length;++f){var p=s[f];if(p.has(o))return a.has(o)||(l&&__DEV__&&d.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;p.forEach(u),c&&f===s.length-1&&or(e.selectionSet,r,n)&&(c=!1,l=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&u(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var a={typename:r,fieldName:n,field:e.field||null,variables:e.variables},s=Ei(e);o;){var u=o(s,a);if(!Zt(u)){t=u||n;break}o=mi(u)}return void 0===t&&(t=e.field?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 i=n.name,o=n.value;return ae(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 ae(n,r,i,t)}))),ue(e.name.value,n,r)}(e.field,e.variables):ue(n,Ei(e))),!1===t?n:n===ir(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=ir(i),a=t.store.getFieldValue(r,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=Pi(this,r,e,t,t.store.getStorage(oe(r)?r.__ref:r,i));return Rn.withValue(this.cache,u,[a,c])}return a}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,a=r.typename,s=r.merge;return s===Di?Ii(n.store)(e,t):s===xi?t:(n.overwrite&&(e=void 0),s(e,t,Pi(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function Pi(e,t,r,n,i){var o=e.getStoreFieldName(r),a=ir(o),s=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:Ei(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:oe,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(ji(arguments,t,s),n)},mergeObjects:Ii(n.store)}}function ji(e,t,r){var n,i,a,s=e[0],u=e[1],c=e.length;return"string"==typeof s?n={fieldName:s,from:c>1?u:t}:(n=o({},s),$t.call(n,"from")||(n.from=t)),__DEV__&&void 0===n.from&&__DEV__&&d.warn("Undefined 'from' passed to readField with arguments ".concat((i=Array.from(e),a=Dr("stringifyForDisplay"),JSON.stringify(i,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("<undefined>")))),void 0===n.variables&&(n.variables=r),n}function Ii(e){return function(t,r){if(Zt(t)||Zt(r))throw __DEV__?new h("Cannot automatically merge arrays"):new h(4);if(ee(t)&&ee(r)){var n=e.getFieldValue(t,"__typename"),i=e.getFieldValue(r,"__typename");if(n&&i&&n!==i)return r;if(oe(t)&&ar(r))return e.merge(t.__ref,r),t;if(ar(t)&&oe(r))return e.merge(t,r.__ref),r;if(ar(t)&&ar(r))return o(o({},t),r)}return r}}function Ri(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:o(o({},e),{clientOnly:t,deferred:r})),i}var Fi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,n=t.query,i=t.result,a=t.dataId,s=t.variables,u=t.overwrite,c=me(n),l=new Kt;s=o(o({},Oe(c)),s);var f=o(o({store:e,written:Object.create(null),merge:function(e,t){return l.merge(e,t)},variables:s,varString:fr(s)},sr(n,this.fragments)),{overwrite:!!u,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),p=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:c.selectionSet,mergeTree:{map:new Map},context:f});if(!oe(p))throw __DEV__?new h("Could not identify object ".concat(JSON.stringify(i))):new h(7);return f.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=ie(n);if(o&&o.map.size){var u=r.applyMerges(o,s,i,f);if(oe(u))return;i=u}if(__DEV__&&!f.overwrite){var c=Object.create(null);a.forEach((function(e){e.selectionSet&&(c[e.name.value]=!0)}));Object.keys(i).forEach((function(e){(function(e){return!0===c[ir(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(!o)return;var a=i(t);if(!a)return;if(oe(o))return;if(qt(o,a))return;if(Object.keys(o).every((function(e){return void 0!==n.getFieldValue(a,e)})))return;var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),u=ir(r),c="".concat(s,".").concat(u);if(Mi.has(c))return;Mi.add(c);var l=[];Zt(o)||Zt(a)||[o,a].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||l.includes(t)||l.push(t)}));__DEV__&&d.warn("Cache data may be lost when replacing the ".concat(u," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(l.length?"either ensure all objects of type "+l.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(c," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}(s,i,e,f.store)}))}e.merge(n,i)})),e.retain(p.__ref),p},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,a=e.context,s=e.mergeTree,u=this.cache.policies,c=Object.create(null),l=r&&u.rootTypenamesById[r]||he(n,i,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof l&&(c.__typename=l);var f=function(){var e=ji(arguments,c,a.variables);if(oe(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var r=u.readField(o(o({},e),{from:t.storeObject}),a);if(void 0!==r)return r}}return u.readField(e,a)},p=new Set;this.flattenFields(i,n,a,l).forEach((function(e,r){var i,o=pe(r),a=n[o];if(p.add(r),void 0!==a){var h=u.getStoreFieldName({typename:l,fieldName:r.name.value,field:r,variables:e.variables}),v=Ci(s,h),y=t.processFieldValue(a,r,r.selectionSet?Ri(e,!1,!1):e,v),m=void 0;r.selectionSet&&(oe(y)||ar(y))&&(m=f("__typename",y));var b=u.getMergeFunction(l,r.name.value,m);b?v.info={field:r,typename:l,merge:b}:Vi(s,h),c=e.merge(c,((i={})[h]=y,i))}else!__DEV__||e.clientOnly||e.deferred||wr.added(r)||u.getReadFunction(l,r.name.value)||__DEV__&&d.error("Missing field '".concat(pe(r),"' while writing result ").concat(JSON.stringify(n,null,2)).substring(0,1e3))}));try{var h=u.identify(n,{typename:l,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:c,readField:f}),v=h[0],y=h[1];r=r||v,y&&(c=a.merge(c,y))}catch(e){if(!r)throw e}if("string"==typeof r){var m=ie(r),b=a.written[r]||(a.written[r]=[]);if(b.indexOf(i)>=0)return m;if(b.push(i),this.reader&&this.reader.isFresh(n,m,i,a))return m;var g=a.incomingById.get(r);return g?(g.storeObject=a.merge(g.storeObject,c),g.mergeTree=Ni(g.mergeTree,s),p.forEach((function(e){return g.fieldNodeSet.add(e)}))):a.incomingById.set(r,{storeObject:c,mergeTree:Qi(s)?void 0:s,fieldNodeSet:p}),m}return c},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Zt(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,r,Ci(n,o));return Vi(n,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?Rr(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=he(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,a=new Ut(!1);return function e(s,u){var c=a.lookup(s,u.clientOnly,u.deferred);c.visited||(c.visited=!0,s.selections.forEach((function(a){if(Me(a,r.variables)){var s=u.clientOnly,c=u.deferred;if(s&&c||!qr(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(s=!0),"defer"===t){var n=fe(e,r.variables);n&&!1===n.if||(c=!0)}})),de(a)){var l=i.get(a);l&&(s=s&&l.clientOnly,c=c&&l.deferred),i.set(a,Ri(r,s,c))}else{var f=ne(a,r.lookupFragment);if(!f&&a.kind===Ce.FRAGMENT_SPREAD)throw __DEV__?new h("No fragment named ".concat(a.name.value)):new h(8);f&&o.fragmentMatches(f,n,t,r.variables)&&e(f.selectionSet,Ri(r,s,c))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,n,i){var a,s=this;if(e.map.size&&!oe(r)){var u,c=Zt(r)||!oe(t)&&!ar(t)?void 0:t,l=r;c&&!i&&(i=[oe(c)?c.__ref:c]);var f=function(e,t){return Zt(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=f(c,t),o=f(l,t);if(void 0!==o){i&&i.push(t);var a=s.applyMerges(e,r,o,n,i);a!==o&&(u=u||new Map).set(t,a),i&&d(i.pop()===t)}})),u&&(r=Zt(l)?l.slice(0):o({},l),u.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(a=n.store).getStorage.apply(a,i)):r},e}(),qi=[];function Ci(e,t){var r=e.map;return r.has(t)||r.set(t,qi.pop()||{map:new Map}),r.get(t)}function Ni(e,t){if(e===t||!t||Qi(t))return e;if(!e||Qi(e))return t;var r=e.info&&t.info?o(o({},e.info),t.info):e.info||t.info,n=e.map.size&&t.map.size,i={info:r,map:n?new Map:e.map.size?e.map:t.map};if(n){var a=new Set(t.map.keys());e.map.forEach((function(e,r){i.map.set(r,Ni(e,t.map.get(r))),a.delete(r)})),a.forEach((function(r){i.map.set(r,Ni(t.map.get(r),e.map.get(r)))}))}return i}function Qi(e){return!e||!(e.info||e.map.size)}function Vi(e,t){var r=e.map,n=r.get(t);n&&Qi(n)&&(qi.push(n),r.delete(t))}var Mi=new Set;var Ai=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=Nn,r.txCount=0,r.config=function(e){return Wt(tr,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new Ti({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return i(t,e),t.prototype.init=function(){var e=this.data=new ni.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new Fi(this,this.storeReader=new pi({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:rr(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=Sn((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(li(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,fr({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore(o(o({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof $n)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if($t.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore(o(o({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||function(e){qn(e).vars.forEach((function(t){return t.attachCache(e)}))}(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&Cn(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){fr.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(oe(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&d.warn(e)}},t.prototype.evict=function(e){if(!e.id){if($t.call(e,"id"))return!1;e=o(o({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),fr.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),Cn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,n=e.update,i=e.optimistic,a=void 0===i||i,s=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var i=r,o=i.data,a=i.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=n(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},l=new Set;return u&&!this.txCount&&this.broadcastWatches(o(o({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,c):!1===a?c(this.data):c(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),u&&l.size?(this.broadcastWatches(o(o({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=wr(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&qt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(Kn),Li=xe.empty,zi=xe.from,Bi=xe.split,Ui=xe.concat;function Wi(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&d.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Ji(e){return new Z((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}var Hi=GraphQLTag;b(E?"log":"silent");var Yi=r(363),Gi=r.t(Yi,2),Ki=Je?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function $i(){var e=Yi.createContext[Ki];return e||(Object.defineProperty(Yi.createContext,Ki,{value:e=Yi.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}var Xi=function(e){var t=e.client,r=e.children,n=$i();return Yi.createElement(n.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?d(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):d(e.client,28),Yi.createElement(n.Provider,{value:e},r)}))},Zi=function(e){var t=$i();return Yi.createElement(t.Consumer,null,(function(t){return __DEV__?d(t&&t.client,'Could not find "client" in the context of ApolloConsumer. Wrap the root component in an <ApolloProvider>.'):d(t&&t.client,27),e.children(t.client)}))};function eo(e){var t=(0,Yi.useContext)($i()),r=e||t.client;return __DEV__?d(!!r,'Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.'):d(!!r,31),r}var to,ro=!1,no=Gi.useSyncExternalStore||function(e,t,r){var n=t();__DEV__&&!ro&&n!==t()&&(ro=!0,__DEV__&&d.error("The result of getSnapshot should be cached to avoid an infinite loop"));var i=Yi.useState({inst:{value:n,getSnapshot:t}}),o=i[0].inst,a=i[1];return Ke?Yi.useLayoutEffect((function(){Object.assign(o,{value:n,getSnapshot:t}),io(o)&&a({inst:o})}),[e,n,t]):Object.assign(o,{value:n,getSnapshot:t}),Yi.useEffect((function(){return io(o)&&a({inst:o}),e((function(){io(o)&&a({inst:o})}))}),[e]),n};function io(e){var t=e.value,r=e.getSnapshot;try{return t!==r()}catch(e){return!0}}!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(to||(to={}));var oo=new Map;function ao(e){var t;switch(e){case to.Query:t="Query";break;case to.Mutation:t="Mutation";break;case to.Subscription:t="Subscription"}return t}function so(e){var t,r,n=oo.get(e);if(n)return n;__DEV__?d(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):d(!!e&&!!e.kind,32);for(var i=[],o=[],a=[],s=[],u=0,c=e.definitions;u<c.length;u++){var l=c[u];if("FragmentDefinition"!==l.kind){if("OperationDefinition"===l.kind)switch(l.operation){case"query":o.push(l);break;case"mutation":a.push(l);break;case"subscription":s.push(l)}}else i.push(l)}__DEV__?d(!i.length||o.length||a.length||s.length,"Passing only a fragment to 'graphql' is not yet supported. You must include a query, subscription or mutation as well"):d(!i.length||o.length||a.length||s.length,33),__DEV__?d(o.length+a.length+s.length<=1,"react-apollo only supports a query, subscription, or a mutation per HOC. "+"".concat(e," had ").concat(o.length," queries, ").concat(s.length," ")+"subscriptions and ".concat(a.length," mutations. ")+"You can use 'compose' to join multiple operation types to a component"):d(o.length+a.length+s.length<=1,34),r=o.length?to.Query:to.Mutation,o.length||a.length||(r=to.Subscription);var f=o.length?o:a.length?a:s;__DEV__?d(1===f.length,"react-apollo only supports one definition per HOC. ".concat(e," had ")+"".concat(f.length," definitions. ")+"You can use 'compose' to join multiple operation types to a component"):d(1===f.length,35);var p=f[0];t=p.variableDefinitions||[];var h={name:p.name&&"Name"===p.name.kind?p.name.value:"data",type:r,variables:t};return oo.set(e,h),h}function uo(e,t){var r=so(e),n=ao(t),i=ao(r.type);__DEV__?d(r.type===t,"Running a ".concat(n," requires a graphql ")+"".concat(n,", but a ").concat(i," was used instead.")):d(r.type===t,36)}var co=Object.prototype.hasOwnProperty;function lo(e,t){return void 0===t&&(t=Object.create(null)),fo(eo(t.client),e).useQuery(t)}function fo(e,t){var r=(0,Yi.useRef)();r.current&&e===r.current.client&&t===r.current.query||(r.current=new po(e,t,r.current));var n=r.current,i=(0,Yi.useState)(0),o=(i[0],i[1]);return n.forceUpdate=function(){o((function(e){return e+1}))},n}var po=function(){function e(e,t,r){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(We?WeakSet:Set),this.ssrDisabledResult=Zn({loading:!0,data:void 0,error:void 0,networkStatus:Nr.loading}),this.skipStandbyResult=Zn({loading:!1,data:void 0,error:void 0,networkStatus:Nr.ready}),this.toQueryResultCache=new(Ue?WeakMap:Map),uo(t,to.Query);var n=r&&r.result,i=n&&n.data;i&&(this.previousData=i)}return e.prototype.forceUpdate=function(){__DEV__&&d.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(){var e=this;return new Promise((function(t){e.asyncResolveFns.add(t),e.optionsToIgnoreOnce.add(e.watchQueryOptions),e.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,Yi.useContext)($i()).renderPromises,this.useOptions(e);var r=this.useObservableQuery(),n=no((0,Yi.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,n=r.getCurrentResult();e&&e.loading===n.loading&&e.networkStatus===n.networkStatus&&qt(e.data,n.data)||t.setResult(n)},n=function(o){var a=r.last;i.unsubscribe();try{r.resetLastResults(),i=r.subscribe(e,n)}finally{r.last=a}if(!co.call(o,"graphQLErrors"))throw o;var s=t.result;(!s||s&&s.loading||!qt(o,s.error))&&t.setResult({data:s&&s.data,error:o,loading:!1,networkStatus:Nr.error})},i=r.subscribe(e,n);return function(){return i.unsubscribe()}}),[r,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(n);var i=this.toQueryResult(n);return!i.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(i)})),this.asyncResolveFns.clear()),i},e.prototype.useOptions=function(t){var r,n=this.createWatchQueryOptions(this.queryHookOptions=t),i=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(i)&&qt(n,i)||(this.watchQueryOptions=n,i&&this.observable&&(this.optionsToIgnoreOnce.delete(i),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(r=this.result)||void 0===r?void 0:r.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push(Wt(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(Jn)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var r=e.skip,n=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,a(e,["skip","ssr","onCompleted","onError","defaultOptions"])),i=Object.assign(n,{query:this.query});if(!this.renderPromises||"network-only"!==i.fetchPolicy&&"cache-and-network"!==i.fetchPolicy||(i.fetchPolicy="cache-first"),i.variables||(i.variables={}),r){var o=i.fetchPolicy,s=void 0===o?this.getDefaultFetchPolicy():o,u=i.initialFetchPolicy,c=void 0===u?s:u;Object.assign(i,{initialFetchPolicy:c,fetchPolicy:"standby"})}else i.fetchPolicy||(i.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return i},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,Yi.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;e.loading||Promise.resolve().then((function(){e.error?t.onError(e.error):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&d.warn(e)}))},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var r=e.data,n=(e.partial,a(e,["data","partial"]));return this.toQueryResultCache.set(e,t=o(o(o({data:r},n),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&qr(e.errors)&&(t.error=new Qr({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:Nr.refetch}),this.observable.refetch())},e}(),ho=["refetch","reobserve","fetchMore","updateQuery","startPolling","subscribeToMore"];function vo(e,t){var r=fo(eo(t&&t.client),e),n=(0,Yi.useRef)(),i=n.current?Jn(t,n.current):t,a=r.useQuery(o(o({},i),{skip:!n.current})),s=a.observable.options.initialFetchPolicy||r.getDefaultFetchPolicy(),u=Object.assign(a,{called:!!n.current}),c=(0,Yi.useMemo)((function(){for(var e={},t=function(t){var i=u[t];e[t]=function(){return n.current||(n.current=Object.create(null),r.forceUpdate()),i.apply(this,arguments)}},i=0,o=ho;i<o.length;i++){t(o[i])}return e}),[]);return Object.assign(u,c),[(0,Yi.useCallback)((function(e){n.current=e?o(o({},e),{fetchPolicy:e.fetchPolicy||s}):{fetchPolicy:s};var t=r.asyncUpdate().then((function(e){return Object.assign(e,c)}));return t.catch((function(){})),t}),[]),u]}function yo(e,t){var r=eo(null==t?void 0:t.client);uo(e,to.Mutation);var n=(0,Yi.useState)({called:!1,loading:!1,client:r}),i=n[0],a=n[1],s=(0,Yi.useRef)({result:i,mutationId:0,isMounted:!0,client:r,mutation:e,options:t});Object.assign(s.current,{client:r,options:t,mutation:e});var u=(0,Yi.useCallback)((function(e){void 0===e&&(e={});var t=s.current,r=t.client,n=t.options,i=t.mutation,u=o(o({},n),{mutation:i});s.current.result.loading||u.ignoreResults||!s.current.isMounted||a(s.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:r});var c=++s.current.mutationId,l=Jn(u,e);return r.mutate(l).then((function(t){var n,i,o,u=t.data,f=t.errors,p=f&&f.length>0?new Qr({graphQLErrors:f}):void 0;if(c===s.current.mutationId&&!l.ignoreResults){var h={called:!0,loading:!1,data:u,error:p,client:r};s.current.isMounted&&!qt(s.current.result,h)&&a(s.current.result=h)}return null===(i=null===(n=s.current.options)||void 0===n?void 0:n.onCompleted)||void 0===i||i.call(n,t.data,l),null===(o=e.onCompleted)||void 0===o||o.call(e,t.data,l),t})).catch((function(t){var n,i,o,u;if(c===s.current.mutationId&&s.current.isMounted){var f={loading:!1,error:t,data:void 0,called:!0,client:r};qt(s.current.result,f)||a(s.current.result=f)}if((null===(n=s.current.options)||void 0===n?void 0:n.onError)||l.onError)return null===(o=null===(i=s.current.options)||void 0===i?void 0:i.onError)||void 0===o||o.call(i,t,l),null===(u=e.onError)||void 0===u||u.call(e,t,l),{data:void 0,errors:t};throw t}))}),[]),c=(0,Yi.useCallback)((function(){s.current.isMounted&&a({called:!1,loading:!1,client:r})}),[]);return(0,Yi.useEffect)((function(){return s.current.isMounted=!0,function(){s.current.isMounted=!1}}),[]),[u,o({reset:c},i)]}function mo(e,t){var r=(0,Yi.useRef)(!1),n=eo(null==t?void 0:t.client);uo(e,to.Subscription);var i=(0,Yi.useState)({loading:!(null==t?void 0:t.skip),error:void 0,data:void 0,variables:null==t?void 0:t.variables}),o=i[0],a=i[1];r.current||(r.current=!0,(null==t?void 0:t.onSubscriptionData)&&__DEV__&&d.warn(t.onData?"'useSubscription' supports only the 'onSubscriptionData' or 'onData' option, but not both. Only the 'onData' option will be used.":"'onSubscriptionData' is deprecated and will be removed in a future major version. Please use the 'onData' option instead."),(null==t?void 0:t.onSubscriptionComplete)&&__DEV__&&d.warn(t.onComplete?"'useSubscription' supports only the 'onSubscriptionComplete' or 'onComplete' option, but not both. Only the 'onComplete' option will be used.":"'onSubscriptionComplete' is deprecated and will be removed in a future major version. Please use the 'onComplete' option instead."));var s=(0,Yi.useState)((function(){return(null==t?void 0:t.skip)?null:n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})})),u=s[0],c=s[1],l=(0,Yi.useRef)(!1);(0,Yi.useEffect)((function(){return function(){l.current=!0}}),[]);var f=(0,Yi.useRef)({client:n,subscription:e,options:t});return(0,Yi.useEffect)((function(){var r,i,o,s,u=null==t?void 0:t.shouldResubscribe;"function"==typeof u&&(u=!!u(t)),(null==t?void 0:t.skip)?(!(null==t?void 0:t.skip)!=!(null===(r=f.current.options)||void 0===r?void 0:r.skip)||l.current)&&(a({loading:!1,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(null),l.current=!1):(!1===u||n===f.current.client&&e===f.current.subscription&&(null==t?void 0:t.fetchPolicy)===(null===(i=f.current.options)||void 0===i?void 0:i.fetchPolicy)&&!(null==t?void 0:t.skip)==!(null===(o=f.current.options)||void 0===o?void 0:o.skip)&&qt(null==t?void 0:t.variables,null===(s=f.current.options)||void 0===s?void 0:s.variables))&&!l.current||(a({loading:!0,data:void 0,error:void 0,variables:null==t?void 0:t.variables}),c(n.subscribe({query:e,variables:null==t?void 0:t.variables,fetchPolicy:null==t?void 0:t.fetchPolicy,context:null==t?void 0:t.context})),l.current=!1),Object.assign(f.current,{client:n,subscription:e,options:t})}),[n,e,t,l.current]),(0,Yi.useEffect)((function(){if(u){var e=u.subscribe({next:function(e){var r,i,o={loading:!1,data:e.data,error:void 0,variables:null==t?void 0:t.variables};a(o),(null===(r=f.current.options)||void 0===r?void 0:r.onData)?f.current.options.onData({client:n,data:o}):(null===(i=f.current.options)||void 0===i?void 0:i.onSubscriptionData)&&f.current.options.onSubscriptionData({client:n,subscriptionData:o})},error:function(e){var r,n;a({loading:!1,data:void 0,error:e,variables:null==t?void 0:t.variables}),null===(n=null===(r=f.current.options)||void 0===r?void 0:r.onError)||void 0===n||n.call(r,e)},complete:function(){var e,t;(null===(e=f.current.options)||void 0===e?void 0:e.onComplete)?f.current.options.onComplete():(null===(t=f.current.options)||void 0===t?void 0:t.onSubscriptionComplete)&&f.current.options.onSubscriptionComplete()}});return function(){e.unsubscribe()}}}),[u]),o}function bo(e){var t=e(),r=(0,Yi.useState)(t)[1];return(0,Yi.useEffect)((function(){var n=e();if(t===n)return e.onNextChange(r);r(n)}),[t]),t}function go(e){var t=eo().cache,r=e.fragment,n=e.fragmentName,i=e.from,s=e.optimistic,u=void 0===s||s,c=a(e,["fragment","fragmentName","from","optimistic"]),l=o(o({},c),{id:"string"==typeof i?i:t.identify(i),query:t.getFragmentDoc(r,n),optimistic:u}),f=(0,Yi.useRef)(),p=t.diff(l);return no((function(e){return t.watch(o(o({},l),{immediate:!0,callback:function(t){qt(t,p)||(f.current=_o(p=t),e())}}))}),(function(){var e=_o(p);return f.current&&qt(f.current.data,e.data)?f.current:f.current=e}))}function _o(e){var t={data:e.result,complete:!!e.complete};return e.missing&&(t.missing=Yt(e.missing.map((function(e){return e.missing})))),t}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var o=n[e]={exports:{}};return r[e](o,o.exports,i),o.exports}t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},i.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&r;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){a[e]=function(){return r[e]}}));return a.default=function(){return r},i.d(o,a),o},i.d=function(e,t){for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};!function(){var e=f(i(754)),t=f(i(196)),r=f(i(363)),n=i(745),o=i(535),a=i(624),s=f(i(311)),u=f(i(265)),c=i(595),l=i(648);function f(e){return e&&e.__esModule?e:{default:e}}const p="sslinkinternal";t.default.addAction("sslink",{text:e.default._t("CMS.LINKLABEL_PAGE","Page on this site"),onAction:e=>e.execCommand(p),priority:90},editorIdentifier).addCommandWithUrlTest(p,/^\[sitetree_link.+]$/);const h={init(e){e.addCommand(p,(()=>{(0,s.default)(`#${e.id}`).entwine("ss").openLinkInternalDialog()}))}},d="insert-link__dialog-wrapper--internal",v=(0,l.provideInjector)((0,c.createInsertLinkModal)("SilverStripe\\CMS\\Controllers\\CMSPageEditController","editorInternalLink"));s.default.entwine("ss",(t=>{t("textarea.htmleditor").entwine({openLinkInternalDialog(){let e=t(`#${d}`);e.length||(e=t(`<div id="${d}" />`),t("body").append(e)),e.addClass("insert-link__dialog-wrapper"),e.setElement(this),e.open()}}),t(`#${d}`).entwine({ReactRoot:null,renderModal(t){var i=this;const s=ss.store,u=ss.apolloClient,c=this.getOriginalAttributes(),l=this.getRequireLinkText();let f=this.getReactRoot();f||(f=(0,n.createRoot)(this[0]),this.setReactRoot(f)),f.render(r.default.createElement(o.ApolloProvider,{client:u},r.default.createElement(a.Provider,{store:s},r.default.createElement(v,{isOpen:t,onInsert:function(){return i.handleInsert(...arguments)},onClosed:()=>this.close(),title:e.default._t("CMS.LINK_PAGE","Link to a page"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:c,identifier:"Admin.InsertLinkInternalModal",requireLinkText:l}))))},getRequireLinkText(){const e=this.getElement().getEditor(),t=e.getInstance().selection,r=e.getSelection();return"A"!==t.getNode().tagName&&""===r.trim()},buildAttributes(e){return{href:`${u.default.serialise({name:"sitetree_link",properties:{id:e.PageID}},!0)}${e.Anchor&&e.Anchor.length?`#${e.Anchor}`:""}`,target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes(){const e=this.getElement().getEditor(),r=t(e.getSelectedNode()),n=(r.attr("href")||"").split("#");if(!n[0])return{};const i=u.default.match("sitetree_link",!1,n[0]);return i?{PageID:i.properties.id?parseInt(i.properties.id,10):0,Anchor:n[1]||"",Description:r.attr("title"),TargetBlank:!!r.attr("target")}:{}}})})),tinymce.PluginManager.add(p,(e=>h.init(e)))}()}();