1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,819247,e=>{"use strict";var t=e.i(843476);e.i(556854);var r=e.i(838373),i=e.i(271645);let n=(0,i.createContext)({sendEvent:()=>{}}),s=` 2 query GetCustomer { 3 customer { 4 firstName 5 lastName 6 customerCode 7 shortCode 8 } 9 } 10`,a="fjordline_gtm_customer_info";function o(){try{let e=sessionStorage.getItem(a);if(!e)return null;let t=JSON.parse(e);if(Date.now()-t.timestamp>3e5)return sessionStorage.removeItem(a),null;return t.data}catch{return null}}let l=(0,i.lazy)(()=>e.A(285511).then(e=>({default:e.GoogleTagManager})));function c(r){let{children:c,gtmId:u,graphqlUrl:h,token:d,auth:p,preview:f,skipScriptInjection:m}=r,[y,g]=(0,i.useState)(null);(0,i.useEffect)(()=>{e.A(285511).then(e=>{g(()=>e.sendGTMEvent)})},[]);let b=function({token:e,graphqlUrl:t,gtmId:r,sendEvent:n}){return!function({token:e,graphqlUrl:t,sendEvent:r=function(e){let t=window.dataLayer||[];window.dataLayer=t,t.push(e)}}){let{customer:n}=function(e,t,r){let[n,l]=(0,i.useState)(()=>o()),[c,u]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(!t||!e){l(null);try{sessionStorage.removeItem(a)}catch{}return}let i=o();i?l(i):(async()=>{u(!0);try{let t=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({query:s})});if(!t.ok){console.warn(`[GTM] Customer fetch returned ${t.status}`),l(null),u(!1);return}let{data:i}=await t.json(),n=i?.customer??null;n&&function(e){try{let t={data:e,timestamp:Date.now()};sessionStorage.setItem(a,JSON.stringify(t))}catch{}}(n),l(n)}catch(e){console.warn("[GTM] Failed to fetch customer:",e),l(null)}finally{u(!1)}})()},[e,t,r]),{customer:n,loading:c}}(e,!!e,t||"");(0,i.useEffect)(()=>{n?.shortCode&&r({event:"shortCode",shortCode:n.shortCode})},[n,r])}({token:e,graphqlUrl:t,sendEvent:n}),(0,i.useMemo)(()=>({sendEvent:n,gtmId:r}),[n,r])}({token:d,graphqlUrl:h,gtmId:u??"",sendEvent:(0,i.useCallback)(e=>{y&&y(e)},[y])});return u?(0,t.jsxs)(n.Provider,{value:b,children:[!m&&(0,t.jsx)(i.Suspense,{fallback:null,children:(0,t.jsx)(l,{gtmId:u,auth:p,preview:f})}),c]}):(console.warn("GTM ID is not provided. Google Tag Manager will not be initialized."),null)}e.i(387644),e.s(["GTMWrapper",0,function({children:e,gtmId:i,graphqlUrl:n}){let{token:s}=(0,r.useKeycloak)();return(0,t.jsx)(c,{gtmId:i,graphqlUrl:n,token:s,children:e})}],819247)},711028,e=>{"use strict";let t,r,i,n;var s,a,o,l,c,u,h,d,p,f,m,y,g,b,v=e.i(843476),E=e.i(96623);function k(e,t){if(!e)throw Error(t)}(s=p||(p={})).NAME="Name",s.DOCUMENT="Document",s.OPERATION_DEFINITION="OperationDefinition",s.VARIABLE_DEFINITION="VariableDefinition",s.SELECTION_SET="SelectionSet",s.FIELD="Field",s.ARGUMENT="Argument",s.FRAGMENT_SPREAD="FragmentSpread",s.INLINE_FRAGMENT="InlineFragment",s.FRAGMENT_DEFINITION="FragmentDefinition",s.VARIABLE="Variable",s.INT="IntValue",s.FLOAT="FloatValue",s.STRING="StringValue",s.BOOLEAN="BooleanValue",s.NULL="NullValue",s.ENUM="EnumValue",s.LIST="ListValue",s.OBJECT="ObjectValue",s.OBJECT_FIELD="ObjectField",s.DIRECTIVE="Directive",s.NAMED_TYPE="NamedType",s.LIST_TYPE="ListType",s.NON_NULL_TYPE="NonNullType",s.SCHEMA_DEFINITION="SchemaDefinition",s.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",s.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",s.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",s.FIELD_DEFINITION="FieldDefinition",s.INPUT_VALUE_DEFINITION="InputValueDefinition",s.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",s.UNION_TYPE_DEFINITION="UnionTypeDefinition",s.ENUM_TYPE_DEFINITION="EnumTypeDefinition",s.ENUM_VALUE_DEFINITION="EnumValueDefinition",s.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",s.DIRECTIVE_DEFINITION="DirectiveDefinition",s.SCHEMA_EXTENSION="SchemaExtension",s.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",s.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",s.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",s.UNION_TYPE_EXTENSION="UnionTypeExtension",s.ENUM_TYPE_EXTENSION="EnumTypeExtension",s.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",s.TYPE_COORDINATE="TypeCoordinate",s.MEMBER_COORDINATE="MemberCoordinate",s.ARGUMENT_COORDINATE="ArgumentCoordinate",s.DIRECTIVE_COORDINATE="DirectiveCoordinate",s.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate";function O(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){let r;if(null===e)return"null";if(t.includes(e))return"[Circular]";let i=[...t,e];if("function"==typeof e.toJSON){let t=e.toJSON();if(t!==e)return"string"==typeof t?t:O(t,i)}else if(Array.isArray(e)){var n,s,a=e,o=i;if(0===a.length)return"[]";if(o.length>2)return"[Array]";let t=Math.min(10,a.length),r=a.length-t,l=[];for(let e=0;e<t;++e)l.push(O(a[e],o));return 1===r?l.push("... 1 more item"):r>1&&l.push(`... ${r} more items`),"["+l.join(", ")+"]"}return n=e,s=i,0===(r=Object.entries(n)).length?"{}":s.length>2?"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(n)+"]":"{ "+r.map(([e,t])=>e+": "+O(t,s)).join(", ")+" }"}(e,t);default:return String(e)}}class S{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 w{constructor(e,t,r,i,n,s){this.kind=e,this.start=t,this.end=r,this.line=i,this.column=n,this.value=s,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}}}let T={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","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:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
10Value:[],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"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},x=new Set(Object.keys(T));function N(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&x.has(t)}(a=f||(f={})).QUERY="query",a.MUTATION="mutation",a.SUBSCRIPTION="subscription";let I=Object.freeze({});function C(e,t,r=T){let i,n,s,a=new Map;for(let e of Object.values(p))a.set(e,function(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let o=Array.isArray(e),l=[e],c=-1,u=[],h=e,d=[],f=[];do{var m,y,g;let e,p=++c===l.length,b=p&&0!==u.length;if(p){if(n=0===f.length?void 0:d[d.length-1],h=s,s=f.pop(),b)if(o){h=h.slice();let e=0;for(let[t,r]of u){let i=t-e;null===r?(h.splice(i,1),e++):h[i]=r}}else for(let[e,t]of(h={...h},u))h[e]=t;c=i.index,l=i.keys,u=i.edits,o=i.inArray,i=i.prev}else if(s){if(null==(h=s[n=o?c:l[c]]))continue;d.push(n)}if(!Array.isArray(h)){N(h)||k(!1,`Invalid AST Node: ${O(h,[])}.`);let r=p?null==(m=a.get(h.kind))?void 0:m.leave:null==(y=a.get(h.kind))?void 0:y.enter;if((e=null==r?void 0:r.call(t,h,n,s,d,f))===I)break;if(!1===e){if(!p){d.pop();continue}}else if(void 0!==e&&(u.push([n,e]),!p))if(N(e))h=e;else{d.pop();continue}}void 0===e&&b&&u.push([n,h]),p?d.pop():(i={inArray:o,index:c,keys:l,edits:u,prev:i},l=(o=Array.isArray(h))?h:null!=(g=r[h.kind])?g:[],c=-1,u=[],s&&f.push(s),s=h)}while(void 0!==i)return 0!==u.length?u[u.length-1][1]:e}function _(e){try{return e()}catch{}}let D=_(()=>globalThis)||_(()=>window)||_(()=>self)||_(()=>e.g)||_(function(){return _.constructor("return this")()}),A="4.1.7",R=new Map;function F(e){let t=R.get(e)||1;return R.set(e,t+1),`${e}:${t}:${Math.random().toString(36).slice(2)}`}let M="Invariant Violation";class P extends Error{constructor(e=M){super(e),this.name=M,Object.setPrototypeOf(this,P.prototype)}}let j=["debug","log","warn","error","silent"],L=j.indexOf("silent");function q(e,...t){if(!e)throw Q(...t)}function V(e){return function(t,...r){if(j.indexOf(e)>=L){let i=console[e]||console.log;if("number"==typeof t){let e=t;(t=z(e))||(t=W(e,r),r=[])}i(t,...r)}}}function Q(e,...t){return new P(z(e,t)||W(e,t))}q.debug=V("debug"),q.log=V("log"),q.warn=V("warn"),q.error=V("error");let B=Symbol.for("ApolloErrorMessageHandler_"+A);function U(e){if("string"==typeof e)return e;try{return(function(e,t=0){let r=F("stringifyForDisplay");return JSON.stringify(e,(e,t)=>void 0===t?r:t,t).split(JSON.stringify(r)).join("<undefined>")})(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function z(e,t=[]){if(e)return D[B]&&D[B](e,t.map(U))}function W(e,t=[]){if(e)return"string"==typeof e?t.reduce((e,t)=>
10e.replace(/%[sdfo]/,U(t)),e):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:A,message:e,args:t.map(U)}))}`}let $={...D[Symbol.for("apollo.cacheSize")]};function K(e,t){return e.definitions.find(e=>"OperationDefinition"===e.kind&&!!e.name)?.name.value??t}let G=()=>Object.create(null),{forEach:Y,slice:J}=Array.prototype,{hasOwnProperty:H}=Object.prototype;class X{constructor(e=!0,t=G){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return Y.call(e,e=>t=t.getChildTrie(e)),H.call(t,"data")?t.data:t.data=this.makeData(J.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let r=0,i=e.length;t&&r<i;++r){let i=t.mapFor(e[r],!1);t=i&&i.get(e[r])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){let r=e[0],i=this.mapFor(r,!1),n=i&&i.get(r);n&&(t=n.removeArray(J.call(e,1)),n.data||n.weak||n.strong&&n.strong.size||i.delete(r))}else t=this.data,delete this.data;return t}getChildTrie(e){let t=this.mapFor(e,!0),r=t.get(e);return r||t.set(e,r=new X(this.weakness,this.makeData)),r}mapFor(e,t){return this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function Z(){}class ee{constructor(e=1/0,t=Z){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let 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)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){let 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)}}function et(){}let er="u">typeof WeakRef?WeakRef:function(e){return{deref:()=>e}},ei="u">typeof WeakMap?WeakMap:Map,en="u">typeof FinalizationRegistry?FinalizationRegistry:function(){return{register:et,unregister:et}};class es{constructor(e=1/0,t=et){this.max=e,this.dispose=t,this.map=new ei,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{let e=this.unfinalizedNodes.values();for(let t=0;t<10024;t++){let t=e.next().value;if(!t)break;this.unfinalizedNodes.delete(t);let r=t.key;delete t.key,t.keyRef=new er(r),this.registry.register(r,t,t)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new en(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){let t=this.getNode(e);return t&&t.value}getNode(e){let t=this.map.get(e);if(t&&t!==this.newest){let{older:e,newer:r}=t;r&&(r.older=e),e&&(e.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t}set(e,t){let 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.scheduleFinalization(r),this.map.set(e,r),this.size++,r.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;let t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){let t=this.map.get(e);return!!t&&(this.deleteNode(t),!0)}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}let ea=new WeakSet;function eo(e){!(e.size<=(e.max||-1))&&(ea.has(e)||(ea.add(e),setTimeout(()=>{e.clean(),ea.delete(e)},100)))}let el=function(e,t){let r=new es(e,t);return r.set=function(e,t){let r=es.prototype.set.call(this,e,t);return eo(this),r},r},ec=function(e,t){let r=new ee(e,t);return r.set=function(e,t){let r=ee.prototype.set.call(this,e,t);return eo(this),r},r};function eu(e,{max:t,makeCacheKey:r=e=>e}){let i=new X(!0),n=new el(t);return(...t)=>{let s=i.lookupArray(r(t)),a=n.get(s);if(a){if(a.error)throw a.error;return a.result}let o=n.set(s,{});try{return o.result=e(...t)}catch(e){throw o.error=e,e}}}let eh=eu((e,t)=>{q(e&&"Document"===e.kind,1);let r=e.definitions.filter(e=>"OperationDefinition"===e.kind);t&&q(1==r.length&&r[0].operation===t,4,t,t,r[0].operation),C(e,{Field(t,i,n,s){if(t.alias&&("__typename"===t.alias.value||t.alias.value.startsWith("__ac_"))&&t.alias.value!==t.name.value){let i=e,n=[];for(let e of s)(i=i[e]).kind===p.FIELD&&n.push(i.alias?.value||i.name.value);
10throw n.splice(-1,1,t.name.value),Q(5,t.alias.value,n.join("."),r[0].operation,K(e,"(anonymous)"))}}})},{max:$.checkDocument||2e3});function ed(e){return eh(e),e.definitions.filter(e=>"OperationDefinition"===e.kind)[0]}class ep{static empty(){return new ep(()=>E.EMPTY)}static from(e){if(0===e.length)return ep.empty();let[t,...r]=e;return t.concat(...r)}static split(e,t,r=new ep((e,t)=>t(e))){return Object.assign(new ep((i,n)=>e(i)?t.request(i,n):r.request(i,n)),{left:t,right:r})}static execute(e,t,r){return e.request(function(e,{client:t}){let r={query:e.query,variables:e.variables||{},extensions:e.extensions||{},operationName:K(e.query),operationType:ed(e.query).operation},i={...e.context},n=()=>Object.freeze({...i});return Object.defineProperty(r,"setContext",{enumerable:!1,value:e=>{i="function"==typeof e?{...i,...e(n())}:{...i,...e}}}),Object.defineProperty(r,"getContext",{enumerable:!1,value:n}),Object.defineProperty(r,"client",{enumerable:!1,value:t}),r}(t,r),()=>E.EMPTY)}static concat(...e){return ep.from(e)}constructor(e){e&&(this.request=e)}split(e,t,r){return this.concat(ep.split(e,t,r))}concat(...e){return 0===e.length?this:e.reduce(this.combine.bind(this),this)}combine(e,t){return Object.assign(new ep((r,i)=>e.request(r,e=>t.request(e,i))),{left:e,right:t})}request(e,t){throw Q(65)}left;right}let{toString:ef,hasOwnProperty:em}=Object.prototype,ey=Function.prototype.toString,eg=new Map;function eb(e,t){try{return function e(t,r){if(t===r)return!0;let i=ef.call(t);if(i!==ef.call(r))return!1;switch(i){case"[object Array]":if(t.length!==r.length)break;case"[object Object]":{if(eO(t,r))return!0;let i=ev(t),n=ev(r),s=i.length;if(s!==n.length)return!1;for(let e=0;e<s;++e)if(!em.call(r,i[e]))return!1;for(let n=0;n<s;++n){let s=i[n];if(!e(t[s],r[s]))return!1}return!0}case"[object Error]":return t.name===r.name&&t.message===r.message;case"[object Number]":if(t!=t)return r!=r;case"[object Boolean]":case"[object Date]":return+t==+r;case"[object RegExp]":case"[object String]":return t==`${r}`;case"[object Map]":case"[object Set]":{if(t.size!==r.size)return!1;if(eO(t,r))return!0;let n=t.entries(),s="[object Map]"===i;for(;;){let t=n.next();if(t.done)break;let[i,a]=t.value;if(!r.has(i)||s&&!e(a,r.get(i)))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]":t=new Uint8Array(t),r=new Uint8Array(r);case"[object DataView]":{let e=t.byteLength;if(e===r.byteLength)for(;e--&&t[e]===r[e];);return -1===e}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{var n,s;let e,i=ey.call(t);if(i!==ey.call(r))return!1;return n=i,s=ek,!((e=n.length-s.length)>=0)||n.indexOf(s,e)!==e}}return!1}(e,t)}finally{eg.clear()}}function ev(e){return Object.keys(e).filter(eE,e)}function eE(e){return void 0!==this[e]}let ek="{ [native code] }";function eO(e,t){let r=eg.get(e);if(r){if(r.has(t))return!0}else eg.set(e,r=new Set);return r.add(t),!1}let eS=null,ew={},eT=1;function ex(e){try{return e()}catch(e){}}let eN="@wry/context:Slot",eI=ex(()=>globalThis)||ex(()=>e.g)||Object.create(null),eC=eI[eN]||Array[eN]||function(e){try{Object.defineProperty(eI,eN,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(class{constructor(){this.id=["slot",eT++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=eS;e;e=e.parent)if(this.id in e.slots){let t=e.slots[this.id];if(t===ew)break;return e!==eS&&(eS.slots[this.id]=t),!0}return eS&&(eS.slots[this.id]=ew),!1}getValue(){if(this.hasValue())return eS.slots[this.id]}withValue(e,t,r,i){let n={__proto__:null,[this.id]:e},s=eS;eS={parent:s,slots:n};try{return t.apply(i,r)}finally{eS=s}}static bind(e){let t=eS;return function(){let r=eS;try{return eS=t,e.apply(this,arguments)}finally{eS=r}}}static noContext(e,t,r){if(!eS)return e.apply(r,t);{let i=eS;try{return eS=null,e.apply(r,t)}finally{eS=i}}}}),{bind:e_,noContext:eD}=eC,eA=new eC,{hasOwnProperty:eR}=Object.prototype,eF=Array.from||function(e){let t=[];
10return e.forEach(e=>t.push(e)),t};function eM(e){let{unsubscribe:t}=e;"function"==typeof t&&(e.unsubscribe=void 0,t())}let eP=[];function ej(e,t){if(!e)throw Error(t||"assertion failure")}function eL(e,t){let r=e.length;return r>0&&r===t.length&&e[r-1]===t[r-1]}function eq(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}class eV{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++eV.count}peek(){if(1===this.value.length&&!eU(this))return eQ(this),this.value[0]}recompute(e){var t,r,i;return ej(!this.recomputing,"already recomputing"),eQ(this),eU(this)?(t=this,r=e,eG(t),eA.withValue(t,eB,[t,r]),function(e,t){if("function"==typeof e.subscribe)try{eM(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(t,r)&&((i=t).dirty=!1,eU(i)||function(e){ez(e,e$)}(i)),eq(t.value)):eq(this.value)}setDirty(){var e;this.dirty||(this.dirty=!0,e=this,ez(e,eW),eM(this))}dispose(){this.setDirty(),eG(this),ez(this,(e,t)=>{e.setDirty(),eY(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=eP.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(eF(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),eP.push(this.deps),this.deps=null)}}function eQ(e){let t=eA.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),eU(e)?eW(t,e):e$(t,e),t}function eB(e,t){let r;e.recomputing=!0;let{normalizeResult:i}=e;i&&1===e.value.length&&(r=e.value.slice(0)),e.value.length=0;try{if(e.value[0]=e.fn.apply(null,t),i&&r&&!eL(r,e.value))try{e.value[0]=i(e.value[0],r[0])}catch(e){}}catch(t){e.value[1]=t}e.recomputing=!1}function eU(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}eV.count=0;function ez(e,t){let r=e.parents.size;if(r){let i=eF(e.parents);for(let n=0;n<r;++n)t(i[n],e)}}function eW(e,t){ej(e.childValues.has(t)),ej(eU(t));let r=!eU(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=eP.pop()||new Set;e.dirtyChildren.add(t),r&&ez(e,eW)}function e$(e,t){ej(e.childValues.has(t)),ej(!eU(t));let r=e.childValues.get(t);0===r.length?e.childValues.set(t,t.value.slice(0)):eL(r,t.value)||e.setDirty(),eK(e,t),eU(e)||ez(e,e$)}function eK(e,t){let r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(eP.length<100&&eP.push(r),e.dirtyChildren=null))}function eG(e){e.childValues.size>0&&e.childValues.forEach((t,r)=>{eY(e,r)}),e.forgetDeps(),ej(null===e.dirtyChildren)}function eY(e,t){t.parents.delete(e),e.childValues.delete(t),eK(e,t)}let eJ={setDirty:!0,dispose:!0,forget:!0};function eH(e){let t=new Map,r=e&&e.subscribe;function i(e){let i=eA.getValue();if(i){let n=t.get(e);n||t.set(e,n=new Set),i.dependOn(n),"function"==typeof r&&(eM(n),n.unsubscribe=r(e))}}return i.dirty=function(e,r){let i=t.get(e);if(i){let n=r&&eR.call(eJ,r)?r:"setDirty";eF(i).forEach(e=>e[n]()),t.delete(e),eM(i)}},i}function eX(...e){return(t||(t=new X("function"==typeof WeakMap))).lookupArray(e)}let eZ=new Set;function e0(e,{max:t=65536,keyArgs:r,makeCacheKey:i=eX,normalizeResult:n,subscribe:s,cache:a=ee}=Object.create(null)){let o="function"==typeof a?new a(t,e=>e.dispose()):a,l=function(){let t=i.apply(null,r?r.apply(null,arguments):arguments);if(void 0===t)return e.apply(null,arguments);let a=o.get(t);a||(o.set(t,a=new eV(e)),a.normalizeResult=n,a.subscribe=s,a.forget=()=>o.delete(t));let l=a.recompute(Array.prototype.slice.call(arguments));return o.set(t,a),eZ.add(o),eA.hasValue()||(eZ.forEach(e=>e.clean()),eZ.clear()),l};function c(e){let t=e&&o.get(e);t&&t.setDirty()}function u(e){let t=e&&o.get(e);if(t)return t.peek()}function h(e){return!!e&&o.delete(e)}return Object.defineProperty(l,"size",{get:()=>o.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:t,keyArgs:r,makeCacheKey:i,normalizeResult:n,subscribe:s,cache:o}),l.dirtyKey=c,l.dirty=function(){c(i.apply(null,arguments))},l.peekKey=u,l.peek=function(){return u(i.apply(null,arguments))},l.forgetKey=h,l.forget=function(){return h(i.apply(null,arguments))},l.makeCacheKey=i,l.getKey=r?function(){return i.apply(null,r.apply(null,arguments))}:i,Object.freeze(l)}let e1={kind:p.FIELD,name:{kind:p.NAME,value:"__typename"}},e2=Object.assign(function(e){return C(e,{SelectionSet:{enter(e,t,r){if(r&&r.kind===p.OPERATION_DEFINITION)return;let{selections:i}=e;if(!(!i||i.some(e=>e.kind===p.FIELD&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))))&&!(r.kind===p.FIELD&&r.directives&&r.directives.some(e=>"export"===e.name.value)))return{...e,selections:[...i,e1]}}}})},{added:e=>e===e1}),e3=Object.assign(function(e){return JSON.stringify(e,e4)},{reset(){r=new ec($.canonicalStringify||1e3)}});function e4(e,t){if(t&&"object"==typeof t){let e=Object.getPrototypeOf(t);if(e===Object.prototype||null===e){let i=Object.keys(t);if(i.every(e8))return t;let n=JSON.stringify(i),s=r.get(n);if(!s){i.sort();let e=JSON.stringify(i);s=r.get(e)||i,r.set(n,s),r.set(e,s)}let a=Object.create(e);
10return s.forEach(e=>{a[e]=t[e]}),a}}return t}function e8(e,t,r){return 0===t||r[t-1]<=e}function e9(e){return e}e3.reset();class e5{transform;cached;resultCache=new WeakSet;getCacheKey(e){return[e]}static identity(){return new e5(e9,{cache:!1})}static split(e,t,r=e5.identity()){return Object.assign(new e5(i=>(e(i)?t:r).transformDocument(i),{cache:!1}),{left:t,right:r})}constructor(e,t={}){this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=!1!==t.cache,this.resetCache()}resetCache(){if(this.cached){let e=new X;this.performWork=e0(e5.prototype.performWork.bind(this),{makeCacheKey:t=>{let r=this.getCacheKey(t);if(r)return q(Array.isArray(r),20),e.lookupArray(r)},max:$["documentTransform.cache"],cache:es})}}performWork(e){return eh(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;let t=this.performWork(e);return this.resultCache.add(t),t}concat(e){return Object.assign(new e5(t=>e.transformDocument(this.transformDocument(t)),{cache:!1}),{left:this,right:e})}left;right}function e6(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function e7(e){return 9===e||32===e}function te(e){return e>=48&&e<=57}function tt(e){return e>=97&&e<=122||e>=65&&e<=90}function tr(e){return tt(e)||95===e}let ti=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function tn(e){return ts[e.charCodeAt(0)]}let ts=["\\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"],ta={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>to(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=th(e.variableDefinitions)?tc("(\n",to(e.variableDefinitions,"\n"),"\n)"):tc("(",to(e.variableDefinitions,", "),")"),r=tc("",e.description,"\n")+to([e.operation,to([e.name,t]),to(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:i,description:n})=>tc("",n,"\n")+e+": "+t+tc(" = ",r)+tc(" ",to(i," "))},SelectionSet:{leave:({selections:e})=>tl(e)},Field:{leave({alias:e,name:t,arguments:r,directives:i,selectionSet:n}){let s=tc("",e,": ")+t,a=s+tc("(",to(r,", "),")");return a.length>80&&(a=s+tc("(\n",tu(to(r,"\n")),"\n)")),to([a,to(i," "),n]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+tc(" ",to(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>to(["...",tc("on ",e),to(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:i,selectionSet:n,description:s})=>tc("",s,"\n")+`fragment ${e}${tc("(",to(r,", "),")")} `+`on ${t} ${tc("",to(i," ")," ")}`+n},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>{let r,i,n,s,a,o,l,c,u,h,d;return t?(n=1===(i=(r=e.replace(/"""/g,'\\"""')).split(/\r\n|[\n\r]/g)).length,s=i.length>1&&i.slice(1).every(e=>0===e.length||e7(e.charCodeAt(0))),a=r.endsWith('\\"""'),o=e.endsWith('"')&&!a,l=e.endsWith("\\"),c=o||l,u=!n||e.length>70||c||s||a,h="",d=n&&e7(e.charCodeAt(0)),(u&&!d||s)&&(h+="\n"),h+=r,(u||c)&&(h+="\n"),'"""'+h+'"""'):`"${e.replace(ti,tn)}"`}},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+to(e,", ")+"]"}
10,ObjectValue:{leave:({fields:e})=>"{"+to(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+tc("(",to(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>tc("",e,"\n")+to(["schema",to(t," "),tl(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>tc("",e,"\n")+to(["scalar",t,to(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:i,fields:n})=>tc("",e,"\n")+to(["type",t,tc("implements ",to(r," & ")),to(i," "),tl(n)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:i,directives:n})=>tc("",e,"\n")+t+(th(r)?tc("(\n",tu(to(r,"\n")),"\n)"):tc("(",to(r,", "),")"))+": "+i+tc(" ",to(n," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:i,directives:n})=>tc("",e,"\n")+to([t+": "+r,tc("= ",i),to(n," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:i,fields:n})=>tc("",e,"\n")+to(["interface",t,tc("implements ",to(r," & ")),to(i," "),tl(n)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:i})=>tc("",e,"\n")+to(["union",t,to(r," "),tc("= ",to(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:i})=>tc("",e,"\n")+to(["enum",t,to(r," "),tl(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>tc("",e,"\n")+to([t,to(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:i})=>tc("",e,"\n")+to(["input",t,to(r," "),tl(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:i,locations:n})=>tc("",e,"\n")+"directive @"+t+(th(r)?tc("(\n",tu(to(r,"\n")),"\n)"):tc("(",to(r,", "),")"))+(i?" repeatable":"")+" on "+to(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>to(["extend schema",to(e," "),tl(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>to(["extend scalar",e,to(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:i})=>to(["extend type",e,tc("implements ",to(t," & ")),to(r," "),tl(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:i})=>to(["extend interface",e,tc("implements ",to(t," & ")),to(r," "),tl(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>to(["extend union",e,to(t," "),tc("= ",to(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>to(["extend enum",e,to(t," "),tl(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>to(["extend input",e,to(t," "),tl(r)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>to([e,tc(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:r})=>to([e,tc(".",t),tc("(",r,":)")])},DirectiveCoordinate:{leave:({name:e})=>to(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>to(["@",e,tc("(",t,":)")])}};function to(e,t=""){var r;return null!=(r=null==e?void 0:e.filter(e=>e).join(t))?r:""}function tl(e){return tc("{\n",tu(to(e,"\n")),"\n}")}function tc(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function tu(e){return tc(" ",e.replace(/\n/g,"\n "))}function th(e){var t;return null!=(t=null==e?void 0:e.some(e=>e.includes("\n")))&&t}let td=Object.assign(e=>{let t=i.get(e);return t||(t=C(e,ta),i.set(e,t)),t},{reset(){i=new el($.print||2e3)}});td.reset();var tp=e.i(979165),tf=e.i(902965),tm=e.i(627608);function ty(e,t){return e===t}var tg=e.i(94059),tb=e.i(394426),tv=e.i(740144),tE=e.i(277497),tk=e.i(827341),tO=e.i(218692),tS=e.i(817312);function tw(e=[]){let t={};return e.forEach(e=>{t[e.name.value]=e}),t}function tT(e){return e.definitions.filter(e=>"FragmentDefinition"===e.kind)}function tx(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{let r=e.name.value;if("function"==typeof t)return t(r);let i=t&&t[r];return q(i,9,r),i||null}default:return null}}function tN(e){let t;for(let r of(eh(e),e.definitions)){if("OperationDefinition"===r.kind)return r;"FragmentDefinition"!==r.kind||t||(t=r)}if(t)return t;throw Q(12)}function tI(e){return"Field"===e.kind}function tC(e){return e.alias?e.alias.value:e.name.value}function t_({directives:e},t){var r;let i;
10return!e||!e.length||(i=[],(r=e)&&r.length&&r.forEach(e=>{if(!function({name:{value:e}}){return"skip"===e||"include"===e}(e))return;let t=e.arguments,r=e.name.value;q(t&&1===t.length,16,r);let n=t[0];q(n.name&&"if"===n.name.value,17,r);let s=n.value;q(s&&("Variable"===s.kind||"BooleanValue"===s.kind),18,r),i.push({directive:e,ifArgument:n})}),i).every(({directive:e,ifArgument:r})=>{let i=!1;return"Variable"===r.value.kind?q(void 0!==(i=t&&t[r.value.name.value]),15,e.name.value):i=r.value.value,"skip"===e.name.value?!i:i})}function tD(e,{data:t,...r},{data:i,...n},s){return eb(r,n)&&function e(t,r,i,n){if(r===i)return!0;let s=new Set;return t.selections.every(t=>{if(s.has(t)||(s.add(t),!t_(t,n.variables)||tA(t)))return!0;if(tI(t)){let s=tC(t),a=r&&r[s],o=i&&i[s],l=t.selectionSet;if(!l)return eb(a,o);let c=Array.isArray(a),u=Array.isArray(o);if(c!==u)return!1;if(c&&u){let t=a.length;if(o.length!==t)return!1;for(let r=0;r<t;++r)if(!e(l,a[r],o[r],n))return!1;return!0}return e(l,a,o,n)}{let s=tx(t,n.fragmentMap);if(s)return!!tA(s)||e(s.selectionSet,r,i,n)}})}(tN(e).selectionSet,t,i,{fragmentMap:tw(tT(e)),variables:s})}function tA(e){return!!e.directives&&e.directives.some(tR)}function tR(e){return"nonreactive"===e.name.value}function tF(e,t){let r=t,i=[];return e.definitions.forEach(e=>{if("OperationDefinition"===e.kind)throw Q(10,e.operation,e.name?` named '${e.name.value}'`:"");"FragmentDefinition"===e.kind&&i.push(e)}),void 0===r&&(q(1===i.length,11,i.length),r=i[0].name.value),{...e,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}},...e.definitions]}}let tM=eu(function(e,t,r){let i,n;function s(e){return e!==i&&(n=r(i=e)),n}return Object.assign(e.pipe((0,tg.map)(s),(0,tk.shareReplay)({bufferSize:1,refCount:!0})),{getCurrentResult:()=>s(e.getCurrentResult())})},{max:1,makeCacheKey:e=>e.slice(0,2)});class tP{assumeImmutableResults=!1;lookupFragment(e){return null}batch(e){let t,r="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(()=>t=e.update(this),r),t}recordOptimisticTransaction(e,t){this.performTransaction(e,t)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,t=!!e.optimistic){return this.read({...e,rootId:e.id||"ROOT_QUERY",optimistic:t})}fragmentWatches=new X(!0);watchFragment(e){let t,{fragment:r,fragmentName:i,from:n}=e,s=this.getFragmentDoc(r,i),a=(Array.isArray(n)?n:[n]).map(e=>{let t=null==e?e:this.toCacheId(e);return t});if(!Array.isArray(n)){let t=this.watchSingleFragment(a[0],s,e);return null===n?t:tM(t,Symbol.for("apollo.transform.individualResult"),e=>({...e,data:e.data??{}}))}function o(e){let r=e.reduce((e,t,r)=>(e.data.push(t.data),e.complete&&=t.complete,e.dataState=e.complete?"complete":"partial",t.missing&&(e.missing||={},e.missing[r]=t.missing),e),{data:[],dataState:"complete",complete:!0});return eb(t,r)||(t=r),t}if(0===a.length)return tV;let l=!1,c=a.map(t=>this.watchSingleFragment(t,s,e));return Object.assign((0===c.length?E.EMPTY:new tb.Observable(e=>{let t,{length:r}=c,i=Array(r),n=new Map;c.forEach((e,t)=>{n.has(e)||n.set(e,new Set),n.get(e).add(t)});let s=n.size,a=n.size;n.forEach((r,n)=>{let o=!1,l=n.subscribe({next:s=>{r.forEach(e=>i[e]=s),!o&&(o=!0,a--),!a&&((t||=new Set(c.filter(e=>e.dirty))).delete(n),t.size||(e.next(i.slice()),t=void 0))},complete:()=>{--s||e.complete()},error:e.error.bind(e)});e.add(l)})})).pipe((0,tg.map)(o),(0,tO.tap)({subscribe:()=>l=!0,unsubscribe:()=>l=!1}),(0,tk.shareReplay)({bufferSize:1,refCount:!0})),{getCurrentResult:()=>l&&t?t:o(c.map(e=>e.getCurrentResult()))})}onAfterBroadcast=e=>e();watchSingleFragment(e,t,r){if(null===e)return tL;let{optimistic:i=!0,variables:n}=r,s=[t,e3({id:e,optimistic:i,variables:n})],a=this.fragmentWatches.lookupArray(s);if(!a.observable){var o,l;let u,h=!1;function c(e){let i=e.result;return u&&tD(t,{data:u.data},{data:i},r.variables)||(u={data:i,dataState:e.complete?"complete":"partial",complete:e.complete},e.missing&&(u.missing=e.missing.missing)),u}let d=new tb.Observable(r=>{h=!0;let a=this.watch({variables:n,returnPartialData:!0,id:e,query:t,optimistic:i,immediate:!0,callback:e=>{d.dirty=!0,this.onAfterBroadcast(()=>{r.next(c(e)),d.dirty=!1})}});return()=>{h=!1,a(),this.fragmentWatches.removeArray(s)}}).pipe((void 0===l&&(l=tp.identity),o=null!=o?o:ty,(0,tf.operate)(function(e,t){var r,i=!0;e.subscribe((0,tm.createOperatorSubscriber)(t,function(e){var n=l(e);(i||!o(r,n))&&(i=!1,r=n,t.next(e))}))})),(0,tE.share)({connector:()=>new tv.ReplaySubject(1),resetOnRefCountZero:()=>(0,tS.timer)(0)}));a.observable=Object.assign(d,{dirty:!1,getCurrentResult:()=>h&&u?u:c(this.diff({id:e,query:t,returnPartialData:!0,optimistic:i,variables:n}))})}return a.observable}getFragmentDoc=e0(tF,{max:$["cache.fragmentQueryDocuments"]||1e3,cache:es,makeCacheKey:function(...e){return eX.bind(null,...e)}(this)});
10readFragment(e,t=!!e.optimistic){let r=void 0!==e.from?this.toCacheId(e.from):e.id;return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:r,optimistic:t})}writeQuery({id:e,data:t,...r}){return this.write(Object.assign(r,{dataId:e||"ROOT_QUERY",result:t}))}writeFragment({data:e,fragment:t,fragmentName:r,...i}){let n=void 0!==i.from?this.toCacheId(i.from):i.id;return this.write(Object.assign(i,{query:this.getFragmentDoc(t,r),dataId:n,result:e}))}updateQuery(e,t){return this.batch({update(r){let i=r.readQuery(e),n=t(i);return null==n?i:(r.writeQuery({...e,data:n}),n)}})}updateFragment(e,t){return this.batch({update(r){let i=r.readFragment(e),n=t(i);return null==n?i:(r.writeFragment({...e,data:n}),n)}})}toCacheId(e){return"string"==typeof e?e:this.identify(e)}}let tj=Object.freeze({data:null,dataState:"complete",complete:!0}),tL=Object.assign(new tb.Observable(e=>{e.next(tj)}),{dirty:!1,getCurrentResult:()=>tj}),tq=Object.freeze({data:[],dataState:"complete",complete:!0}),tV=Object.assign(new tb.Observable(e=>{e.next(tq)}),{getCurrentResult:()=>tq});function tQ(e){return null!==e&&"object"==typeof e}let{hasOwnProperty:tB}=Object.prototype,tU=function(e,t,r){return this.merge(e[r],t[r])},tz=e=>isNaN(+e)?{}:[];class tW{options;reconciler;constructor(e={}){this.options=e,this.reconciler=e.reconciler||tU}merge(e,t,r={}){let i=r.atPath;if(i?.length){let[n,...s]=i;void 0===e&&(e=tz(n));let a=e[n];void 0===a&&s.length&&(a=tz(s[0]));let o=this.merge(a,t,{...r,atPath:s});return a!==o&&((e=this.shallowCopyForMerge(e))[n]=o),e}return(Array.isArray(e)&&Array.isArray(t)&&"truncate"===this.options.arrayMerge&&e.length>t.length&&(e=e.slice(0,t.length),this.pastCopies.add(e)),tQ(t)&&tQ(e))?(Object.keys(t).forEach(r=>{if(tB.call(e,r)){let i=e[r];if(t[r]!==i){let n=this.reconciler(e,t,r);n!==i&&((e=this.shallowCopyForMerge(e))[r]=n)}}else(e=this.shallowCopyForMerge(e))[r]=t[r]}),e):t}isObject=tQ;pastCopies=new Set;shallowCopyForMerge(e){return tQ(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):{__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e)),e}}function t$(e){return{__ref:String(e)}}function tK(...e){let t={};return e.forEach(e=>{e&&Reflect.ownKeys(e).forEach(r=>{let i=e[r];void 0!==i&&(t[r]=i)})}),t}let tG=Array.isArray,{hasOwnProperty:tY}=Object.prototype;function tJ({__typename:e,id:t,_id:r},i){if("string"==typeof e&&(i&&(i.keyObject=null!=t?{id:t}:null!=r?{_id:r}:void 0),null==t&&null!=r&&(t=r),null!=t))return`${e}:${"number"==typeof t||"string"==typeof t?t:JSON.stringify(t)}`}let tH={dataIdFromObject:tJ,resultCaching:!0},tX=/^[_a-z][_0-9a-z]*/i;function tZ(e){let t=e.match(tX);return t?t[0]:e}function t0(e){return tQ(e)&&!e6(e)&&!tG(e)}function t1(e,t){let r=tw(tT(e));return{fragmentMap:r,lookupFragment(e){let i=r[e];return!i&&t&&(i=t.lookup(e)),i||null}}}let t2={},t3=()=>t2,t4={};class t8{policies;group;data={};constructor(e,t){this.policies=e,this.group=t}toObject(){return{...this.data}}has(e){return void 0!==this.lookup(e,!0)}get(e,t){if(this.group.depend(e,t),tY.call(this.data,e)){let r=this.data[e];if(r&&tY.call(r,t))return r[t]}return"__typename"===t&&tY.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof t7?this.parent.get(e,t):void 0}lookup(e,t){return(t&&this.group.depend(e,"__exists"),tY.call(this.data,e))?this.data[e]:this instanceof t7?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?{}:void 0}merge(e,t){let r;e6(e)&&(e=e.__ref),e6(t)&&(t=t.__ref);let i="string"==typeof e?this.lookup(r=e):e,n="string"==typeof t?this.lookup(r=t):t;if(!n)return;q("string"==typeof r,99);let s=new tW({reconciler:rt}).merge(i,n);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){let e={};i||(e.__exists=1),Object.keys(n).forEach(t=>{if(!i||i[t]!==s[t]){e[t]=1;let r=tZ(t);r===t||this.policies.hasKeyArgs(s.__typename,r)||(e[r]=1),void 0!==s[t]||this instanceof t7||delete s[t]}}),e.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[r]===s.__typename&&delete e.__typename,Object.keys(e).forEach(e=>this.group.dirty(r,e))}}modify(e,t,r){let i=this.lookup(e);if(i){let n={}
10,s=!1,a=!0,o={DELETE:t2,INVALIDATE:t4,isReference:e6,toReference:this.toReference,canRead:this.canRead,readField:(t,r)=>this.policies.readField("string"==typeof t?{fieldName:t,from:r||t$(e)}:t,{store:this})};if(Object.keys(i).forEach(l=>{let c=tZ(l),u=i[l];if(void 0===u)return;let h="function"==typeof t?t:t[l]||(r?void 0:t[c]);if(h){let t=h===t3?t2:h(u,{...o,fieldName:c,storeFieldName:l,storage:this.getStorage(e,l)});if(t===t4)this.group.dirty(e,l);else if(t===t2&&(t=void 0),t!==u&&(n[l]=t,s=!0,u=t,0)){let e=e=>{if(void 0===this.lookup(e.__ref))return!0};if(e6(t))e(t);else if(Array.isArray(t)){let r,i=!1;for(let n of t){if(e6(n)){if(i=!0,e(n))break}else if("object"==typeof n&&n){let[e]=this.policies.identify(n);e&&(r=n)}if(i&&void 0!==r)break}}}}void 0!==u&&(a=!1)}),s)return this.merge(e,n),a&&(this instanceof t7?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,t,r){let i=this.lookup(e);if(i){let n=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:n,fieldName:t,args:r}):t;return this.modify(e,s?{[s]:t3}:t3,!!r)}return!1}evict(e,t){let r=!1;return e.id&&(tY.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof t7&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r}clear(){this.replace(null)}extract(){let e=this.toObject(),t=[];return this.getRootIdSet().forEach(e=>{tY.call(this.policies.rootTypenamesById,e)||t.push(e)}),t.length&&(e.__META={extraRootIds:t.sort()}),e}replace(e){if(Object.keys(this.data).forEach(t=>{e&&tY.call(e,t)||this.delete(t)}),e){let{__META:t,...r}=e;Object.keys(r).forEach(e=>{this.merge(e,r[e])}),t&&t.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){let t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0}getRootIdSet(e=new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof t7?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){let e=this.getRootIdSet(),t=this.toObject();e.forEach(r=>{tY.call(t,r)&&(Object.keys(this.findChildRefIds(r)).forEach(e.add,e),delete t[r])});let r=Object.keys(t);if(r.length){let e=this;for(;e instanceof t7;)e=e.parent;r.forEach(t=>e.delete(t))}return r}refs={};findChildRefIds(e){if(!tY.call(this.refs,e)){let t=this.refs[e]={},r=this.data[e];if(!r)return t;let i=new Set([r]);i.forEach(e=>{e6(e)&&(t[e.__ref]=!0),tQ(e)&&Object.keys(e).forEach(t=>{let r=e[t];tQ(r)&&i.add(r)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,t)=>e6(e)?this.get(e.__ref,t):e&&e[t];canRead=e=>e6(e)?this.has(e.__ref):"object"==typeof e;toReference=(e,t)=>{if("string"==typeof e)return t$(e);if(e6(e))return e;let[r]=this.policies.identify(e);if(r){let i=t$(r);return t&&this.merge(r,e),i}};get supportsResultCaching(){return this.group.caching}}class t9{caching;parent;d=null;keyMaker;constructor(e,t=null){this.caching=e,this.parent=t,this.resetCaching()}resetCaching(){this.d=this.caching?eH():null,this.keyMaker=new X}depend(e,t){if(this.d){this.d(t+"#"+e);let r=tZ(t);r!==t&&this.d(r+"#"+e),this.parent&&this.parent.depend(e,t)}}dirty(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")}}function t5(e,t){rr(e)&&e.group.depend(t,"__exists")}class t6 extends t8{constructor({policies:e,resultCaching:t=!0,seed:r}){super(e,new t9(t)),r&&this.replace(r)}stump=new re(this);addLayer(e,t){return this.stump.addLayer(e,t)}removeLayer(){return this}storageTrie=new X;getStorage(){return this.storageTrie.lookupArray(arguments)}}t8.Root=t6;class t7 extends t8{id;parent;replay;group;
10constructor(e,t,r,i){super(t.policies,i),this.id=e,this.parent=t,this.replay=r,this.group=i,r(this)}addLayer(e,t){return new t7(e,this,t,this.group)}removeLayer(e){let t=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(e=>{let r=this.data[e],i=t.lookup(e);i?r?r!==i&&Object.keys(r).forEach(t=>{eb(r[t],i[t])||this.group.dirty(e,t)}):(this.group.dirty(e,"__exists"),Object.keys(i).forEach(t=>{this.group.dirty(e,t)})):this.delete(e)}),t):t===this.parent?this:t.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){let t=this.parent.findChildRefIds(e);return tY.call(this.data,e)?{...t,...super.findChildRefIds(e)}:t}getStorage(...e){let t=this.parent;for(;t.parent;)t=t.parent;return t.getStorage(...e)}}class re extends t7{constructor(e){super("EntityStore.Stump",e,()=>{},new t9(e.group.caching,e.group))}removeLayer(){return this}merge(e,t){return this.parent.merge(e,t)}}function rt(e,t,r){let i=e[r],n=t[r];return eb(i,n)?i:n}function rr(e){return!!(e&&e.supportsResultCaching)}let ri=new eC,rn=Symbol.for("apollo.result.extensions"),rs=Symbol.for("apollo.result.streamInfo"),ra=Symbol.for("apollo.observableQuery.variablesUnknown");function ro(e,t,r,i){if(r.kind===p.INT||r.kind===p.FLOAT)e[t.value]=Number(r.value);else if(r.kind===p.BOOLEAN||r.kind===p.STRING)e[t.value]=r.value;else if(r.kind===p.OBJECT){let n={};r.fields.map(e=>ro(n,e.name,e.value,i)),e[t.value]=n}else if(r.kind===p.VARIABLE){let n=(i||{})[r.name.value];e[t.value]=n}else if(r.kind===p.LIST)e[t.value]=r.values.map(e=>{let r={};return ro(r,t,e,i),r[t.value]});else if(r.kind===p.ENUM)e[t.value]=r.value;else if(r.kind===p.NULL)e[t.value]=null;else throw Q(19,t.value,r.kind)}function rl(e,t){if(e.arguments&&e.arguments.length){let r={};return e.arguments.forEach(({name:e,value:i})=>ro(r,e,i,t)),r}return null}let rc=["connection","include","skip","client","rest","export","nonreactive","stream"],ru=e3,rh=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){let e=r.connection.filter?r.connection.filter:[];e.sort();let i={};e.forEach(e=>{i[e]=t[e]});let n=ru(i);if("{}"!==n)return`${r.connection.key}(${n})`}return r.connection.key}let i=e;if(t){let e=ru(t);"{}"!==e&&(i+=`(${e})`)}return r&&Object.keys(r).forEach(e=>{-1===rc.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?i+=`@${e}(${ru(r[e])})`:i+=`@${e}`)}),i},{setStringify(e){let t=ru;return ru=e,t}});function rd(e){return Array.isArray(e)&&e.length>0}let rp={};function rf(e){let t=JSON.stringify(e);return rp[t]||(rp[t]={})}function rm(e){let t=rf(e);return t.keyFieldsFn||(t.keyFieldsFn=(t,r)=>{let i=(e,t)=>r.readField(t,e),n=r.keyObject=rg(e,e=>{let n=rv(r.storeObject,e,i);return void 0===n&&t!==r.storeObject&&tY.call(t,e[0])&&(n=rv(t,e,rb)),q(void 0!==n,102,e.join("."),t),n});return`${r.typename}:${JSON.stringify(n)}`})}function ry(e){let t=rf(e);return t.keyArgsFn||(t.keyArgsFn=(t,{field:r,variables:i,fieldName:n})=>{let s=JSON.stringify(rg(e,e=>{let n=e[0],s=n.charAt(0);if("@"===s){if(r&&rd(r.directives)){let t=n.slice(1),s=r.directives.find(e=>e.name.value===t),a=s&&rl(s,i);return a&&rv(a,e.slice(1))}return}if("$"===s){let t=n.slice(1);if(i&&tY.call(i,t)){let r=e.slice(0);return r[0]=t,rv(i,r)}return}if(t)return rv(t,e)}));return(t||"{}"!==s)&&(n+=":"+s),n})}function rg(e,t){let r=new tW;return(function e(t){let r=rf(t);if(!r.paths){let i=r.paths=[],n=[];t.forEach((r,s)=>{tG(r)?(e(r).forEach(e=>i.push(n.concat(e))),n.length=0):(n.push(r),tG(t[s+1])||(i.push(n.slice(0)),n.length=0))})}return r.paths})(e).reduce((e,i)=>{let n=t(i);if(void 0!==n){for(let e=i.length-1;e>=0;--e)n={[i[e]]:n};e=r.merge(e,n)}return e},{})}function rb(e,t){return e[t]}function rv(e,t,r){return r=r||rb,function e(t){return tQ(t)?tG(t)?t.map(e):rg(Object.keys(t).sort(),e=>rv(t,e)):t}(t.reduce(function e(t,i){return tG(t)?t.map(t=>e(t,i)):t&&r(t,i)},e))}let rE=new eC,rk=new WeakMap;function rO(e){let t=rk.get(e);return t||rk.set(e,t={vars:new Set,dep:eH()}),t}
10function rS(e){rO(e).vars.forEach(t=>t.forgetCache(e))}function rw(e){let t=new Set,r=new Set,i=function(s){if(arguments.length>0){if(e!==s){e=s,t.forEach(e=>{var t;rO(e).dep.dirty(i),(t=e).broadcastWatches&&t.broadcastWatches()});let n=Array.from(r);r.clear(),n.forEach(t=>t(e))}}else{let e=rE.getValue();e&&(n(e),rO(e).dep(i))}return e};i.onNextChange=e=>(r.add(e),()=>{r.delete(e)});let n=i.attachCache=e=>(t.add(e),rO(e).vars.add(i),i);return i.forgetCache=e=>t.delete(e),i}function rT(e){return void 0!==e.args?e.args:e.field?rl(e.field,e.variables):null}let rx=()=>void 0,rN=(e,t)=>t.fieldName,rI=(e,t,{mergeObjects:r})=>r(e,t),rC=(e,t)=>t,r_=(e,t,{streamFieldInfo:r,existingData:i})=>{if(!e&&!i)return t;let n=[],s=e??i,a=r?.isLastChunk?t.length:Math.max(s.length,t.length);for(let e=0;e<a;e++)n[e]=void 0===t[e]?s[e]:t[e];return n};class rD{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config={dataIdFromObject:tJ,...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)}identify(e,t){let r,i=this,n=t&&(t.typename||t.storeObject?.__typename)||e.__typename;if(n===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];let s=t&&t.storeObject||e,a={...t,typename:n,storeObject:s,readField:t&&t.readField||((...e)=>{let t=rR(e,s);return i.readField(t,{store:i.cache.data,variables:t.variables})})},o=n&&this.getTypePolicy(n),l=o&&o.keyFn||this.config.dataIdFromObject;return ri.withValue(!0,()=>{for(;l;){let t=l({...e,...s},a);if(tG(t))l=rm(t);else{r=t;break}}}),r=r?String(r):void 0,a.keyObject?[r,a.keyObject]:[r]}addTypePolicies(e){Object.keys(e).forEach(t=>{let{queryType:r,mutationType:i,subscriptionType:n,...s}=e[t];r&&this.setRootTypename("Query",t),i&&this.setRootTypename("Mutation",t),n&&this.setRootTypename("Subscription",t),tY.call(this.toBeAdded,t)?this.toBeAdded[t].push(s):this.toBeAdded[t]=[s]})}updateTypePolicy(e,t,r){let i=this.getTypePolicy(e),{keyFields:n,fields:s}=t;function a(e,t){e.merge="function"==typeof t?t:!0===t?rI:!1===t?rC:e.merge}a(i,t.merge),i.keyFn=!1===n?rx:tG(n)?rm(n):"function"==typeof n?n:i.keyFn,s&&Object.keys(s).forEach(t=>{let i=r[t];i&&i?.typename===e||(i=r[t]={typename:e});let n=s[t];if("function"==typeof n)i.read=n;else{let{keyArgs:e,read:t,merge:r}=n;i.keyFn=!1===e?rN:tG(e)?ry(e):"function"==typeof e?e:i.keyFn,"function"==typeof t&&(i.read=t),a(i,r)}i.read&&i.merge&&(i.keyFn=i.keyFn||rN)})}setRootTypename(e,t=e){let r="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[r];t!==i&&(q(!i||i===e,103,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(t=>{this.getSupertypeSet(t,!0),e[t].forEach(e=>{this.getSupertypeSet(e,!0).add(t);let r=e.match(tX);r&&r[0]===e||this.fuzzySubtypes.set(e,new RegExp(e))})})}getTypePolicy(e){if(!tY.call(this.typePolicies,e)){let t=this.typePolicies[e]={};t.fields={};let r=this.supertypeMap.get(e);!r&&this.fuzzySubtypes.size&&(r=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((t,i)=>{if(t.test(e)){let e=this.supertypeMap.get(i);e&&e.forEach(e=>r.add(e))}})),r&&r.size&&r.forEach(e=>{let{fields:r,...i}=this.getTypePolicy(e);Object.assign(t,i),Object.assign(t.fields,r)})}let t=this.toBeAdded[e];return t&&t.length&&t.splice(0).forEach(t=>{this.updateTypePolicy(e,t,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,t){if(e)return this.getTypePolicy(e).fields[t]}getSupertypeSet(e,t){let r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r}fragmentMatches(e,t,r,i){if(!e.typeCondition)return!0;if(!t)return!1;let n=e.typeCondition.name.value;if(t===n)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(n)){let s=this.getSupertypeSet(t,!0),a=[s],o=e=>{let t=this.getSupertypeSet(e,!1);t&&t.size&&0>a.indexOf(t)&&a.push(t)},l=!!(r&&this.fuzzySubtypes.size),c=!1;for(let u=0;u<a.length;++u){let h=a[u];if(h.has(n))return s.has(n)||s.add(n),!0;h.forEach(o),l&&u===a.length-1&&function e(t,r,i){return!!tQ(r)&&(tG(r)?r.every(r=>e(t,r,i)):t.selections.every(t=>{if(tI(t)&&t_(t,i)){let n=tC(t);
10return tY.call(r,n)&&(!t.selectionSet||e(t.selectionSet,r[n],i))}return!0}))}(e.selectionSet,r,i)&&(l=!1,c=!0,this.fuzzySubtypes.forEach((e,r)=>{let i=t.match(e);i&&i[0]===t&&o(r)}))}}return!1}hasKeyArgs(e,t){let r=this.getFieldPolicy(e,t);return!!(r&&r.keyFn)}getStoreFieldName(e){var t,r;let i,n,s,{typename:a,fieldName:o}=e,l=this.getFieldPolicy(a,o),c=l&&l.keyFn;if(c&&a){let t={typename:a,fieldName:o,field:e.field||null,variables:e.variables},r=rT(e);for(;c;){let e=c(r,t);if(tG(e))c=ry(e);else{i=e||o;break}}}return(void 0===i&&(i=e.field?(t=e.field,r=e.variables,n=null,t.directives&&(n={},t.directives.forEach(e=>{n[e.name.value]={},e.arguments&&e.arguments.forEach(({name:t,value:i})=>ro(n[e.name.value],t,i,r))})),s=null,t.arguments&&t.arguments.length&&(s={},t.arguments.forEach(({name:e,value:t})=>ro(s,e,t,r))),rh(t.name.value,s,n)):rh(o,rT(e))),!1===i)?o:o===tZ(i)?i:o+":"+i}readField(e,t){let r=e.from;if(!r||!(e.field||e.fieldName))return;if(void 0===e.typename){let i=t.store.getFieldValue(r,"__typename");i&&(e.typename=i)}let i=this.getStoreFieldName(e),n=tZ(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,n),o=a&&a.read;if(o){let n=rA(this,r,e,t,t.store.getStorage(e6(r)?r.__ref:r,i));return rE.withValue(this.cache,o,[s,n])}return s}getReadFunction(e,t){let r=this.getFieldPolicy(e,t);return r&&r.read}getMergeFunction(e,t,r){let i=this.getFieldPolicy(e,t),n=i&&i.merge;return!n&&r&&(n=(i=this.getTypePolicy(r))&&i.merge),n}runMergeFunction(e,t,{field:r,typename:i,merge:n,path:s},a,o){let l=e;if(n===rI)return rF(a.store)(e,t);if(n===rC)return t;a.overwrite&&(e=void 0);let c=a.extensions?.[rs]?.deref()?.peekArray(s);if(c){let{current:e,previous:r}=c;if(r&&eb(r.incoming,t)&&eb(r.streamFieldInfo,e))return r.result}let u=n(e,t,function(e,t,r,i,n,s){let a={...rA(e,t,r,i,n),extensions:i.extensions,existingData:s},o=i.extensions;if(o&&rs in o){let{[rs]:e,...t}=o,i=e?.deref()?.peekArray(r.path);i&&(a.streamFieldInfo=i.current),a.extensions=0===Object.keys(t).length?void 0:t}return a}(this,void 0,{typename:i,fieldName:r.name.value,field:r,variables:a.variables,path:s},a,o||{},l));return c&&(c.previous={incoming:t,streamFieldInfo:c.current,result:u}),u}}function rA(e,t,r,i,n){let s=e.getStoreFieldName(r),a=tZ(s),o=r.variables||i.variables,{toReference:l,canRead:c}=i.store;return{args:rT(r),field:r.field||null,fieldName:a,storeFieldName:s,variables:o,isReference:e6,toReference:l,storage:n,cache:e.cache,canRead:c,readField:(...r)=>e.readField(rR(r,t,o),i),mergeObjects:rF(i.store)}}function rR(e,t,r){let i,{0:n,1:s,length:a}=e;return"string"==typeof n?i={fieldName:n,from:a>1?s:t}:(i={...n},tY.call(i,"from")||(i.from=t)),void 0===i.variables&&(i.variables=r),i}function rF(e){return function(t,r){if(tG(t)||tG(r))throw Q(106);if(tQ(t)&&tQ(r)){let i=e.getFieldValue(t,"__typename"),n=e.getFieldValue(r,"__typename");if(i&&n&&i!==n)return r;if(e6(t)&&t0(r))return e.merge(t.__ref,r),t;if(t0(t)&&e6(r))return e.merge(t,r.__ref),r;if(t0(t)&&t0(r))return{...t,...r}}return r}}function rM(e){let t={},r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(e=>{e.defaultValue&&ro(t,e.variable.name,e.defaultValue)}),t}class rP extends Error{message;path;query;variables;
10constructor(e,t,r,i){if(super(e),this.message=e,this.path=t,this.query=r,this.variables=i,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let e=this.path.length-1;e>=0;--e)this.missing={[this.path[e]]:this.missing}}else this.missing=this.path;this.__proto__=rP.prototype}missing}function rj(e){return[e.selectionSet,e.objectOrReference,e.context]}class rL{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(e){this.config=e,this.executeSelectionSet=e0(e=>{let t=rj(e),r=this.executeSelectionSet.peek(...t);return r||(t5(e.context.store,e.enclosingRef.__ref),this.execSelectionSetImpl(e))},{max:$["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:rj,makeCacheKey(e,t,r){if(rr(r.store))return r.store.makeCacheKey(e,e6(t)?t.__ref:t,r.varString)}}),this.executeSubSelectedArray=e0(e=>(t5(e.context.store,e.enclosingRef.__ref),this.execSubSelectedArrayImpl(e)),{max:$["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:e,array:t,context:r}){if(rr(r.store))return r.store.makeCacheKey(e,t,r.varString)}})}diffQueryAgainstStore({store:e,query:t,rootId:r="ROOT_QUERY",variables:i,returnPartialData:n=!0}){let s,a,o=this.config.cache.policies;i={...rM((q((s=ed(t))&&"query"===s.operation,13),s)),...i};let l=t$(r),c=this.executeSelectionSet({selectionSet:tN(t).selectionSet,objectOrReference:l,enclosingRef:l,context:{store:e,query:t,policies:o,variables:i,varString:e3(i),...t1(t,this.config.fragments)}});c.missing&&(a=new rP(function(e){try{JSON.stringify(e,(e,t)=>{if("string"==typeof t)throw t;return t})}catch(e){return e}}(c.missing),c.missing,t,i));let u=!a,{result:h}=c;return{result:u?h:n?0===Object.keys(h).length?null:h:null,complete:u,missing:a}}isFresh(e,t,r,i){if(rr(i.store)&&this.knownResults.get(e)===r){let n=this.executeSelectionSet.peek(r,t,i);if(n&&e===n.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:t,enclosingRef:r,context:i}){let n;if(e6(t)&&!i.policies.rootTypenamesById[t.__ref]&&!i.store.has(t.__ref))return{result:{},missing:`Dangling reference to missing ${t.__ref} object`};let{variables:s,policies:a,store:o}=i,l=o.getFieldValue(t,"__typename"),c=[],u=new tW;function h(e,t){return e.missing&&(n=u.merge(n,{[t]:e.missing})),e.result}"string"!=typeof l||a.rootIdsByTypename[l]||c.push({__typename:l});let d=new Set(e.selections);d.forEach(e=>{if(t_(e,s))if(tI(e)){let s=a.readField({fieldName:e.name.value,field:e,variables:i.variables,from:t},i),o=tC(e);void 0===s?e2.added(e)||(n=u.merge(n,{[o]:`Can't find field '${e.name.value}' on ${e6(t)?t.__ref+" object":"object "+JSON.stringify(t,null,2)}`})):tG(s)?s.length>0&&(s=h(this.executeSubSelectedArray({field:e,array:s,enclosingRef:r,context:i}),o)):e.selectionSet&&null!=s&&(s=h(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:s,enclosingRef:e6(s)?s:r,context:i}),o)),void 0!==s&&c.push({[o]:s})}else{let t=tx(e,i.lookupFragment);if(!t&&e.kind===p.FRAGMENT_SPREAD)throw Q(107,e.name.value);t&&a.fragmentMatches(t,l)&&t.selectionSet.selections.forEach(d.add,d)}});let f={result:function(e){let t=e[0]||{},r=e.length;if(r>1){let i=new tW;for(let n=1;n<r;++n)t=i.merge(t,e[n])}return t}(c),missing:n};return f.result&&this.knownResults.set(f.result,e),f}execSubSelectedArrayImpl({field:e,array:t,enclosingRef:r,context:i}){let n,s=new tW;function a(e,t){return e.missing&&(n=s.merge(n,{[t]:e.missing})),e.result}return e.selectionSet&&(t=t.filter(e=>void 0===e||i.store.canRead(e))),{result:t=t.map((t,n)=>null===t?null:tG(t)?a(this.executeSubSelectedArray({field:e,array:t,enclosingRef:r,context:i}),n):e.selectionSet?a(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:t,enclosingRef:e6(t)?t:r,context:i}),n):t),missing:n}}}let{toString:rq}=Object.prototype;function rV(e,t,r){let i=new Set(e),n=i.size;return C(t,{Directive(e){if(i.delete(e.name.value)&&(!r||!i.size))return I}}),r?!i.size:i.size<n}function rQ(e,t,r){let i=`${t}${r}`,n=e.flavors.get(i);return n||e.flavors.set(i,n=e.clientOnly===t&&e.deferred===r?e:{...e,clientOnly:t,deferred:r}),n}class rB{cache;reader;fragments;constructor(e,t,r){this.cache=e,this.reader=t,this.fragments=r}writeToStore(e,{query:t,result:r,dataId:i,variables:n,overwrite:s,extensions:a}){let o=ed(t),l=new tW,c={store:e,written:{},merge:(e,t)=>
10l.merge(e,t),variables:n={...rM(o),...n},varString:e3(n),...t1(t,this.fragments),overwrite:!!s,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map,extensions:a},u=this.processSelectionSet({result:r||{},dataId:i,selectionSet:o.selectionSet,mergeTree:{map:new Map},context:c,path:[]});if(!e6(u))throw Q(109,r);return c.incomingById.forEach(({storeObject:t,mergeTree:r,fieldNodeSet:i},n)=>{let s=t$(n);if(r&&r.map.size){let e=this.applyMerges(r,s,t,c);if(e6(e))return;t=e}e.merge(n,t)}),e.retain(u.__ref),u}processSelectionSet({dataId:e,result:t,selectionSet:r,context:i,mergeTree:n,path:s}){let{policies:a}=this.cache,o={},l=e&&a.rootTypenamesById[e]||rK(t,r,i.fragmentMap)||e&&i.store.get(e,"__typename");"string"==typeof l&&(o.__typename=l);let c=(...e)=>{let t=rR(e,o,i.variables);if(e6(t.from)){let e=i.incomingById.get(t.from.__ref);if(e){let r=a.readField({...t,from:e.storeObject},i);if(void 0!==r)return r}}return a.readField(t,i)},u=new Set;this.flattenFields(r,t,i,l).forEach((e,r)=>{let i=t[tC(r)],h=[...s,r.name.value];if(u.add(r),void 0!==i){let t,s=a.getStoreFieldName({typename:l,fieldName:r.name.value,field:r,variables:e.variables}),u=rz(n,s),d=this.processFieldValue(i,r,r.selectionSet?rQ(e,!1,!1):e,u,h);r.selectionSet&&(e6(d)||t0(d))&&(t=c("__typename",d));let p=a.getMergeFunction(l,r.name.value,t);p?u.info={field:r,typename:l,merge:p,path:h}:rV(["stream"],r)&&Array.isArray(d)&&e.extensions?.[rs]?u.info={field:r,typename:l,merge:r_,path:h}:r$(n,s),o=e.merge(o,{[s]:d})}});try{let[n,s]=a.identify(t,{typename:l,selectionSet:r,fragmentMap:i.fragmentMap,storeObject:o,readField:c});e=e||n,s&&(o=i.merge(o,s))}catch(t){if(!e)throw t}if("string"==typeof e){let s=t$(e),a=i.written[e]||(i.written[e]=[]);if(a.indexOf(r)>=0||(a.push(r),this.reader&&this.reader.isFresh(t,s,r,i)))return s;let l=i.incomingById.get(e);return l?(l.storeObject=i.merge(l.storeObject,o),l.mergeTree=function e(t,r){if(t===r||!r||rW(r))return t;if(!t||rW(t))return r;let i=t.info&&r.info?{...t.info,...r.info}:t.info||r.info,n=t.map.size&&r.map.size,s={info:i,map:n?new Map:t.map.size?t.map:r.map};if(n){let i=new Set(r.map.keys());t.map.forEach((t,n)=>{s.map.set(n,e(t,r.map.get(n))),i.delete(n)}
10),i.forEach(i=>{s.map.set(i,e(r.map.get(i),t.map.get(i)))})}return s}(l.mergeTree,n),u.forEach(e=>l.fieldNodeSet.add(e))):i.incomingById.set(e,{storeObject:o,mergeTree:rW(n)?void 0:n,fieldNodeSet:u}),s}return o}processFieldValue(e,t,r,i,n){return t.selectionSet&&null!==e?tG(e)?e.map((e,s)=>{let a=this.processFieldValue(e,t,r,rz(i,s),[...n,s]);return r$(i,s),a}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:i,path:n}):e}flattenFields(e,t,r,i=rK(t,e,r.fragmentMap)){let n=new Map,{policies:s}=this.cache,a=new X(!1);return!function e(o,l){let c=a.lookup(o,l.clientOnly,l.deferred);c.visited||(c.visited=!0,o.selections.forEach(a=>{if(!t_(a,r.variables))return;let{clientOnly:o,deferred:c}=l;if(!(o&&c)&&rd(a.directives)&&a.directives.forEach(e=>{let t=e.name.value;if("client"===t&&(o=!0),"defer"===t){let t=rl(e,r.variables);t&&!1===t.if||(c=!0)}}),tI(a)){let e=n.get(a);e&&(o=o&&e.clientOnly,c=c&&e.deferred),n.set(a,rQ(r,o,c))}else{let n=tx(a,r.lookupFragment);if(!n&&a.kind===p.FRAGMENT_SPREAD)throw Q(111,a.name.value);n&&s.fragmentMatches(n,i,t,r.variables)&&e(n.selectionSet,rQ(r,o,c))}}))}(e,r),n}applyMerges(e,t,r,i,n){if(e.map.size&&!e6(r)){let s,a=!tG(r)&&(e6(t)||t0(t))?t:void 0,o=r;a&&!n&&(n=[e6(a)?a.__ref:a]);let l=(e,t)=>tG(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t));e.map.forEach((e,t)=>{let r=l(a,t),c=l(o,t);if(void 0===c)return;n&&n.push(t);let u=this.applyMerges(e,r,c,i,n);u!==c&&(s=s||new Map).set(t,u),n&&q(n.pop()===t)}),s&&(r=tG(o)?o.slice(0):{...o},s.forEach((e,t)=>{r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,n&&i.store.getStorage(...n)):r}}let rU=[];function rz({map:e},t){return e.has(t)||e.set(t,rU.pop()||{map:new Map}),e.get(t)}function rW(e){return!e||!(e.info||e.map.size)}function r$({map:e},t){let r=e.get(t);r&&rW(r)&&(rU.push(r),e.delete(t))}function rK(e,t,r){let i;for(let r of t.selections)if(tI(r)){if("__typename"===r.name.value)return e[tC(r)]}else i?i.push(r):i=[r];if("string"==typeof e.__typename)return e.__typename;if(i)for(let t of i){let i=rK(e,tx(t,r).selectionSet,r);if("string"==typeof i)return i}}class rG extends tP{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new e5(e2);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=rw;constructor(e={}){super(),this.config=function(e){return tK(tH,e)}(e),this.policies=new rD({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){let e=this.data=new t8.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){let{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new rB(this,this.storeReader=new rL({cache:this,fragments:e}),e),this.maybeBroadcastWatch=e0((e,t)=>this.broadcastWatch(e,t),{max:$["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:e=>{let t=e.optimistic?this.optimisticData:this.data;if(rr(t)){let{optimistic:r,id:i,variables:n}=e;return t.makeCacheKey(e.query,e.callback,e3({optimistic:r,id:i,variables:n}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(e=>e.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){let{returnPartialData:t=!1}=e;return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:t}).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}modify(e){if(tY.call(e,"id")&&!e.id)return!1;let t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){var t;
10return this.watches.size||(t=this,rO(t).vars.forEach(e=>e.attachCache(t))),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&rS(this),this.maybeBroadcastWatch.forget(e)}}gc(e){e3.reset(),td.reset();let t=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),t}retain(e,t){return(t?this.optimisticData:this.data).retain(e)}release(e,t){return(t?this.optimisticData:this.data).release(e)}identify(e){if(e6(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){}}evict(e){if(!e.id){if(tY.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}}reset(e){return this.init(),e3.reset(),e&&e.discardWatches?(this.watches.forEach(e=>this.maybeBroadcastWatch.forget(e)),this.watches.clear(),rS(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){let t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())}txCount=0;batch(e){let t,{update:r,optimistic:i=!0,removeOptimistic:n,onWatchUpdated:s}=e,a=e=>{let{data:i,optimisticData:n}=this;++this.txCount,e&&(this.data=this.optimisticData=e);try{return t=r(this)}finally{--this.txCount,this.data=i,this.optimisticData=n}},o=new Set;return s&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated:e=>
10(o.add(e),!1)}),"string"==typeof i?this.optimisticData=this.optimisticData.addLayer(i,a):!1===i?a(this.data):a(),"string"==typeof n&&(this.optimisticData=this.optimisticData.removeLayer(n)),s&&o.size?(this.broadcastWatches({...e,onWatchUpdated(e,t){let r=s.call(this,e,t);return!1!==r&&o.delete(e),r}}),o.size&&o.forEach(e=>this.maybeBroadcastWatch.dirty(e))):this.broadcastWatches(e),t}performTransaction(e,t){return this.batch({update:e,optimistic:t||null!==t})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,t){return this.policies.fragmentMatches(e,t)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}resolvesClientField(e,t){return!!this.policies.getReadFunction(e,t)}broadcastWatches(e){if(!this.txCount){let t=this.onAfterBroadcast,r=new Set;this.onAfterBroadcast=e=>{r.add(e)};try{this.watches.forEach(t=>this.maybeBroadcastWatch(t,e)),r.forEach(e=>e())}finally{this.onAfterBroadcast=t}}}addFragmentsToDocument(e){let{fragments:t}=this.config;return t?t.transform(e):e}broadcastWatch(e,t){let{lastDiff:r}=e,i=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(i.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,i,r)))&&(r&&eb(r.result,i.result)||e.callback(e.lastDiff=i,r))}}var rY=e.i(290571);let rJ=/\r\n|[\n\r]/g;function rH(e,t){let r=0,i=1;for(let n of e.body.matchAll(rJ)){if("number"==typeof n.index||function(e){if(!e)throw Error("Unexpected invariant triggered.")}(!1),n.index>=t)break;r=n.index+n[0].length,i+=1}return{line:i,column:t+1-r}}function rX(e,t){let r=e.locationOffset.column-1,i="".padStart(r)+e.body,n=t.line-1,s=e.locationOffset.line-1,a=t.line+s,o=1===t.line?r:0,l=t.column+o,c=`${e.name}:${a}:${l} 11`,u=i.split(/\r\n|[\n\r]/g),h=u[n];if(h.length>120){let e=Math.floor(l/80),t=[];for(let e=0;e<h.length;e+=80)t.push(h.slice(e,e+80));return c+rZ([[`${a} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(l%80)],["|",t[e+1]]])}return c+rZ([[`${a-1} |`,u[n-1]],[`${a} |`,h],["|","^".padStart(l)],[`${a+1} |`,u[n+1]]])}function rZ(e){let t=e.filter(([e,t])=>void 0!==t),r=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(r)+(t?" "+t:"")).join("\n")}class r0 extends Error{constructor(e,...t){var r,i,n;const{nodes:s,source:a,positions:o,path:l,originalError:c,extensions:u}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=l?l:void 0,this.originalError=null!=c?c:void 0,this.nodes=r1(Array.isArray(s)?s:s?[s]:void 0);const h=r1(null==(r=this.nodes)?void 0:r.map(e=>e.loc).filter(e=>null!=e));this.source=null!=a?a:null==h||null==(i=h[0])?void 0:i.source,this.positions=null!=o?o:null==h?void 0:h.map(e=>e.start),this.locations=o&&a?o.map(e=>rH(a,e)):null==h?void 0:h.map(e=>rH(e.source,e.start));const d=!function(e){return"object"==typeof e&&null!==e}(null==c?void 0:c.extensions)||null==c?void 0:c.extensions;this.extensions=null!=(n=null!=u?u:d)?n:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,r0):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let r of this.nodes){var t;r.loc&&(e+="\n\n"+rX((t=r.loc).source,rH(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+rX(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function r1(e){return void 0===e||0===e.length?void 0:e}function r2(e,t,r){return new r0(`Syntax Error: ${r}`,{source:e,positions:[t]})}(o=m||(m={})).QUERY="QUERY",o.MUTATION="MUTATION",o.SUBSCRIPTION="SUBSCRIPTION",o.FIELD="FIELD",o.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",o.FRAGMENT_SPREAD="FRAGMENT_SPREAD",o.INLINE_FRAGMENT="INLINE_FRAGMENT",o.VARIABLE_DEFINITION="VARIABLE_DEFINITION",o.SCHEMA="SCHEMA",o.SCALAR="SCALAR",o.OBJECT="OBJECT",o.FIELD_DEFINITION="FIELD_DEFINITION",o.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",o.INTERFACE="INTERFACE",o.UNION="UNION",o.ENUM="ENUM",o.ENUM_VALUE="ENUM_VALUE",o.INPUT_OBJECT="INPUT_OBJECT",o.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION",(l=y||(y={})).SOF="<SOF>",l.EOF="<EOF>",l.BANG="!",l.DOLLAR="$",l.AMP="&",l.PAREN_L="(",l.PAREN_R=")",l.DOT=".",l.SPREAD="...",l.COLON=":",l.EQUALS="=",l.AT="@",l.BRACKET_L="[",l.BRACKET_R="]",l.BRACE_L="{",l.PIPE="|",l.BRACE_R="}
11",l.NAME="Name",l.INT="Int",l.FLOAT="Float",l.STRING="String",l.BLOCK_STRING="BlockString",l.COMMENT="Comment";class r3{constructor(e){const t=new w(y.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==y.EOF)do if(e.next)e=e.next;else{let t=function(e,t){let r=e.source.body,i=r.length,n=t;for(;n<i;){let t=r.charCodeAt(n);switch(t){case 65279:case 9:case 32:case 44:++n;continue;case 10:++n,++e.line,e.lineStart=n;continue;case 13:10===r.charCodeAt(n+1)?n+=2:++n,++e.line,e.lineStart=n;continue;case 35:return function(e,t){let r=e.source.body,i=r.length,n=t+1;for(;n<i;){let e=r.charCodeAt(n);if(10===e||13===e)break;if(r4(e))++n;else if(r8(r,n))n+=2;else break}return r7(e,y.COMMENT,t,n,r.slice(t+1,n))}(e,n);case 33:return r7(e,y.BANG,n,n+1);case 36:return r7(e,y.DOLLAR,n,n+1);case 38:return r7(e,y.AMP,n,n+1);case 40:return r7(e,y.PAREN_L,n,n+1);case 41:return r7(e,y.PAREN_R,n,n+1);case 46:if(46===r.charCodeAt(n+1)&&46===r.charCodeAt(n+2))return r7(e,y.SPREAD,n,n+3);break;case 58:return r7(e,y.COLON,n,n+1);case 61:return r7(e,y.EQUALS,n,n+1);case 64:return r7(e,y.AT,n,n+1);case 91:return r7(e,y.BRACKET_L,n,n+1);case 93:return r7(e,y.BRACKET_R,n,n+1);case 123:return r7(e,y.BRACE_L,n,n+1);case 124:return r7(e,y.PIPE,n,n+1);case 125:return r7(e,y.BRACE_R,n,n+1);case 34:if(34===r.charCodeAt(n+1)&&34===r.charCodeAt(n+2))return function(e,t){let r=e.source.body,i=r.length,n=e.lineStart,s=t+3,a=s,o="",l=[];for(;s<i;){let i=r.charCodeAt(s);if(34===i&&34===r.charCodeAt(s+1)&&34===r.charCodeAt(s+2)){o+=r.slice(a,s),l.push(o);let i=r7(e,y.BLOCK_STRING,t,s+3,(function(e){var t,r;let i=Number.MAX_SAFE_INTEGER,n=null,s=-1;for(let t=0;t<e.length;++t){let a=e[t],o=function(e){let t=0;for(;t<e.length&&e7(e.charCodeAt(t));)++t;return t}(a);o!==a.length&&(n=null!=(r=n)?r:t,s=t,0!==t&&o<i&&(i=o))}return e.map((e,t)=>0===t?e:e.slice(i)).slice(null!=(t=n)?t:0,s+1)})(l).join("\n"));return e.line+=l.length-1,e.lineStart=n,i}if(92===i&&34===r.charCodeAt(s+1)&&34===r.charCodeAt(s+2)&&34===r.charCodeAt(s+3)){o+=r.slice(a,s),a=s+1,s+=4;continue}if(10===i||13===i){o+=r.slice(a,s),l.push(o),13===i&&10===r.charCodeAt(s+1)?s+=2:++s,o="",a=s,n=s;continue}if(r4(i))++s;
11else if(r8(r,s))s+=2;else throw r2(e.source,s,`Invalid character within String: ${r6(e,s)}.`)}throw r2(e.source,s,"Unterminated string.")}(e,n);return function(e,t){let r=e.source.body,i=r.length,n=t+1,s=n,a="";for(;n<i;){let i=r.charCodeAt(n);if(34===i)return a+=r.slice(s,n),r7(e,y.STRING,t,n+1,a);if(92===i){a+=r.slice(s,n);let t=117===r.charCodeAt(n+1)?123===r.charCodeAt(n+2)?function(e,t){let r=e.source.body,i=0,n=3;for(;n<12;){let e=r.charCodeAt(t+n++);if(125===e){if(n<5||!r4(i))break;return{value:String.fromCodePoint(i),size:n}}if((i=i<<4|ir(e))<0)break}throw r2(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+n)}".`)}(e,n):function(e,t){let r=e.source.body,i=it(r,t+2);if(r4(i))return{value:String.fromCodePoint(i),size:6};if(r9(i)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){let e=it(r,t+8);if(r5(e))return{value:String.fromCodePoint(i,e),size:12}}throw r2(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}(e,n):function(e,t){let r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw r2(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}(e,n);a+=t.value,n+=t.size,s=n;continue}if(10===i||13===i)break;if(r4(i))++n;else if(r8(r,n))n+=2;else throw r2(e.source,n,`Invalid character within String: ${r6(e,n)}.`)}throw r2(e.source,n,"Unterminated string.")}(e,n)}if(te(t)||45===t)return function(e,t,r){let i=e.source.body,n=t,s=r,a=!1;if(45===s&&(s=i.charCodeAt(++n)),48===s){if(te(s=i.charCodeAt(++n)))throw r2(e.source,n,`Invalid number, unexpected digit after 0: ${r6(e,n)}.`)}else n=ie(e,n,s),s=i.charCodeAt(n);if(46===s&&(a=!0,s=i.charCodeAt(++n),n=ie(e,n,s),s=i.charCodeAt(n)),(69===s||101===s)&&(a=!0,(43===(s=i.charCodeAt(++n))||45===s)&&(s=i.charCodeAt(++n)),n=ie(e,n,s),s=i.charCodeAt(n)),46===s||tr(s))throw r2(e.source,n,`Invalid number, expected digit but got: ${r6(e,n)}.`);return r7(e,a?y.FLOAT:y.INT,t,n,i.slice(t,n))}(e,n,t);if(tr(t))return function(e,t){let r=e.source.body,i=r.length,n=t+1;for(;n<i;){var s;if(tt(s=r.charCodeAt(n))||te(s)||95===s)++n;else break}return r7(e,y.NAME,t,n,r.slice(t,n))}(e,n);throw r2(e.source,n,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":r4(t)||r8(r,n)?`Unexpected character: ${r6(e,n)}.`:`Invalid character: ${r6(e,n)}.`)}return r7(e,y.EOF,i,i)}(this,e.end);e.next=t,t.prev=e,e=t}while(e.kind===y.COMMENT)return e}}function r4(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function r8(e,t){return r9(e.charCodeAt(t))&&r5(e.charCodeAt(t+1))}function r9(e){return e>=55296&&e<=56319}function r5(e){return e>=56320&&e<=57343}function r6(e,t){let r=e.source.body.codePointAt(t);if(void 0===r)return y.EOF;if(r>=32&&r<=126){let e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function r7(e,t,r,i,n){let s=e.line,a=1+r-e.lineStart;return new w(t,r,i,s,a,n)}function ie(e,t,r){if(!te(r))throw r2(e.source,t,`Invalid number, expected digit but got: ${r6(e,t)}.`);let i=e.source.body,n=t+1;for(;te(i.charCodeAt(n));)++n;return n}function it(e,t){return ir(e.charCodeAt(t))<<12|ir(e.charCodeAt(t+1))<<8|ir(e.charCodeAt(t+2))<<4|ir(e.charCodeAt(t+3))}function ir(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}let ii=globalThis.process&&1?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if("object"==typeof e&&null!==e){var r;let i=t.prototype[Symbol.toStringTag];if(i===(Symbol.toStringTag in e?e[Symbol.toStringTag]:null==(r=e.constructor)?void 0:r.name)){let t=O(e,[]);throw Error(`Cannot use ${i} "${t}" from another module or realm. 12 13Ensure that there is only one instance of "graphql" in the node_modules 14directory. If different versions of "graphql" are the dependencies of other 15relied on modules, use "resolutions" to ensure only one version is installed. 16 17https://yarnpkg.com/en/docs/selective-version-resolutions 18 19Duplicate "graphql" modules cannot be used at the same time since different 20versions may have different capabilities and behavior. The data from one 21version used in the function from another could produce confusing and 22spurious results.`)}}return!1};class is{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||k(!1,`Body must be a string. Received: ${function(e){return O(e,[])}(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||k(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||k(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class ia{constructor(e,t={}){const{lexer:r,...i}=t;if(r)this._lexer=r;else{const t=!function(e){return ii(e,is)}
22(e)?new is(e):e;this._lexer=new r3(t)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let e=this.expectToken(y.NAME);return this.node(e,{kind:p.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:p.DOCUMENT,definitions:this.many(y.SOF,this.parseDefinition,y.EOF)})}parseDefinition(){if(this.peek(y.BRACE_L))return this.parseOperationDefinition();let e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(e&&t.kind===y.BRACE_L)throw r2(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(t.kind===y.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw r2(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if("extend"===t.value)return this.parseTypeSystemExtension()}throw this.unexpected(t)}parseOperationDefinition(){let e,t=this._lexer.token;if(this.peek(y.BRACE_L))return this.node(t,{kind:p.OPERATION_DEFINITION,operation:f.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let r=this.parseDescription(),i=this.parseOperationType();return this.peek(y.NAME)&&(e=this.parseName()),this.node(t,{kind:p.OPERATION_DEFINITION,operation:i,description:r,name:e,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let e=this.expectToken(y.NAME);switch(e.value){case"query":return f.QUERY;case"mutation":return f.MUTATION;case"subscription":return f.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(y.PAREN_L,this.parseVariableDefinition,y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:p.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let e=this._lexer.token;return this.expectToken(y.DOLLAR),this.node(e,{kind:p.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:p.SELECTION_SET,selections:this.many(y.BRACE_L,this.parseSelection,y.BRACE_R)})}parseSelection(){return this.peek(y.SPREAD)?this.parseFragment():this.parseField()}parseField(){let e,t,r=this._lexer.token,i=this.parseName();return this.expectOptionalToken(y.COLON)?(e=i,t=this.parseName()):t=i,this.node(r,{kind:p.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){let t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(y.PAREN_L,t,y.PAREN_R)}parseArgument(e=!1){let t=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(t,{kind:p.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let e=this._lexer.token;this.expectToken(y.SPREAD);let t=this.expectOptionalKeyword("on");return!t&&this.peek(y.NAME)?this.node(e,{kind:p.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:p.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let e=this._lexer.token,t=this.parseDescription();return(this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables)?this.node(e,{kind:p.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:p.FRAGMENT_DEFINITION,description:t,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){let t=this._lexer.token;switch(t.kind){case y.BRACKET_L:return this.parseList(e);case y.BRACE_L:return this.parseObject(e);case y.INT:return this.advanceLexer(),this.node(t,{kind:p.INT,value:t.value});case y.FLOAT:return this.advanceLexer(),this.node(t,{kind:p.FLOAT,value:t.value});case y.STRING:case y.BLOCK_STRING:return this.parseStringLiteral();case y.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:p.BOOLEAN,value:!0});case"false":return this.node(t,{kind:p.BOOLEAN,value:!1});case"null":return this.node(t,{kind:p.NULL});default:return this.node(t,{kind:p.ENUM,value:t.value})}case y.DOLLAR:if(e){if(this.expectToken(y.DOLLAR),this._lexer.token.kind===y.NAME){let e=this._lexer.token.value;throw r2(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:p.STRING,value:e.value,block:e.kind===y.BLOCK_STRING})}parseList(e){let t=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:p.LIST,values:this.any(y.BRACKET_L,t,y.BRACKET_R)})}parseObject(e){let t=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:p.OBJECT,fields:this.any(y.BRACE_L,t,y.BRACE_R)})}parseObjectField(e){let t=this._lexer.token,r=this.parseName();return this.expectToken(y.COLON),this.node(t,{kind:p.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){let t=[];for(;this.peek(y.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){let t=this._lexer.token;return this.expectToken(y.AT),this.node(t,{kind:p.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){let e,t=this._lexer.token;if(this.expectOptionalToken(y.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(y.BRACKET_R),e=this.node(t,{kind:p.LIST_TYPE,type:r})}else e=this.parseNamedType();return this.expectOptionalToken(y.BANG)?this.node(t,{kind:p.NON_NULL_TYPE,type:e}):e}parseNamedType(){return this.node(this._lexer.token,{kind:p.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(y.STRING)||this.peek(y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);return this.node(e,{kind:p.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let e=this._lexer.token,t=this.parseOperationType();this.expectToken(y.COLON);let r=this.parseNamedType();return this.node(e,{kind:p.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:p.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:i})}parseObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:p.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:i,directives:n,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseFieldDefinition,y.BRACE_R)}parseFieldDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(y.COLON);let n=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:p.FIELD_DEFINITION,description:t,name:r,arguments:i,type:n,directives:s})}parseArgumentDefs(){return this.optionalMany(y.PAREN_L,this.parseInputValueDef,y.PAREN_R)}parseInputValueDef(){let e,t=this._lexer.token,r=this.parseDescription(),i=this.parseName();this.expectToken(y.COLON);let n=this.parseTypeReference();this.expectOptionalToken(y.EQUALS)&&(e=this.parseConstValueLiteral());let s=this.parseConstDirectives();return this.node(t,{kind:p.INPUT_VALUE_DEFINITION,description:r,name:i,type:n,defaultValue:e,directives:s})}parseInterfaceTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:p.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:i,directives:n,fields:s})}parseUnionTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),n=this.parseUnionMemberTypes();return this.node(e,{kind:p.UNION_TYPE_DEFINITION,description:t,name:r,directives:i,types:n})}parseUnionMemberTypes(){return this.expectOptionalToken(y.EQUALS)?this.delimitedMany(y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();return this.node(e,{kind:p.ENUM_TYPE_DEFINITION,description:t,name:r,directives:i,values:n})}parseEnumValuesDefinition(){return this.optionalMany(y.BRACE_L,this.parseEnumValueDefinition,y.BRACE_R)}parseEnumValueDefinition(){let e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{kind:p.ENUM_VALUE_DEFINITION,description:t,name:r,directives:i})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw r2(this._lexer.source,this._lexer.token.start,`${io(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();return this.node(e,{kind:p.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:i,fields:n})}parseInputFieldsDefinition(){return this.optionalMany(y.BRACE_L,this.parseInputValueDef,y.BRACE_R)}parseTypeSystemExtension(){let e=this._lexer.lookahead();if(e.kind===y.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let t=this.parseConstDirectives(),r=this.optionalMany(y.BRACE_L,this.parseOperationTypeDefinition,y.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:p.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:p.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let t=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(0===r.length&&0===i.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:p.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:i,fields:n})}parseInterfaceTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let t=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),n=this.parseFieldsDefinition();if(0===r.length&&0===i.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:p.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:i,fields:n})}parseUnionTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let t=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:p.UNION_TYPE_EXTENSION,name:t,directives:r,types:i})}parseEnumTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let t=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:p.ENUM_TYPE_EXTENSION,name:t,directives:r,values:i})}parseInputObjectTypeExtension(){let e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let t=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(0===r.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:p.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:i})}parseDirectiveDefinition(){let e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(y.AT);let r=this.parseName(),i=this.parseArgumentDefs(),n=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let s=this.parseDirectiveLocations();return this.node(e,{kind:p.DIRECTIVE_DEFINITION,description:t,name:r,arguments:i,repeatable:n,locations:s})}parseDirectiveLocations(){return this.delimitedMany(y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(m,t.value))return t;throw this.unexpected(e)}parseSchemaCoordinate(){let e,t,r=this._lexer.token,i=this.expectOptionalToken(y.AT),n=this.parseName();return(!i&&this.expectOptionalToken(y.DOT)&&(e=this.parseName()),(i||e)&&this.expectOptionalToken(y.PAREN_L)&&(t=this.parseName(),this.expectToken(y.COLON),this.expectToken(y.PAREN_R)),i)?t?this.node(r,{kind:p.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:t}):this.node(r,{kind:p.DIRECTIVE_COORDINATE,name:n}):e?t?this.node(r,{kind:p.ARGUMENT_COORDINATE,name:n,fieldName:e,argumentName:t}):this.node(r,{kind:p.MEMBER_COORDINATE,name:n,memberName:e}):this.node(r,{kind:p.TYPE_COORDINATE,name:n})}node(e,t){return!0!==this._options.noLocation&&(t.loc=new S(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){let t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw r2(this._lexer.source,t.start,`Expected ${il(e)}, found ${io(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){let t=this._lexer.token;if(t.kind===y.NAME&&t.value===e)this.advanceLexer();else throw r2(this._lexer.source,t.start,`Expected "${e}", found ${io(t)}.`)}expectOptionalKeyword(e){let t=this._lexer.token;return t.kind===y.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){let t=null!=e?e:this._lexer.token;return r2(this._lexer.source,t.start,`Unexpected ${io(t)}.`)}any(e,t,r){this.expectToken(e);let i=[];for(;!this.expectOptionalToken(r);)i.push(t.call(this));return i}optionalMany(e,t,r){if(this.expectOptional
22Token(e)){let e=[];do e.push(t.call(this));while(!this.expectOptionalToken(r))return e}return[]}many(e,t,r){this.expectToken(e);let i=[];do i.push(t.call(this));while(!this.expectOptionalToken(r))return i}delimitedMany(e,t){this.expectOptionalToken(e);let r=[];do r.push(t.call(this));while(this.expectOptionalToken(e))return r}advanceLexer(){let{maxTokens:e}=this._options,t=this._lexer.advance();if(t.kind!==y.EOF&&(++this._tokenCounter,void 0!==e&&this._tokenCounter>e))throw r2(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function io(e){let t=e.value;return il(e.kind)+(null!=t?` "${t}"`:"")}function il(e){return e===y.BANG||e===y.DOLLAR||e===y.AMP||e===y.PAREN_L||e===y.PAREN_R||e===y.DOT||e===y.SPREAD||e===y.COLON||e===y.EQUALS||e===y.AT||e===y.BRACKET_L||e===y.BRACKET_R||e===y.BRACE_L||e===y.PIPE||e===y.BRACE_R?`"${e}"`:e}var ic=new Map,iu=new Map,ih=!0,id=!1;function ip(e){return e.replace(/[\s,]+/g," ").trim()}function im(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var i=e[0];return t.forEach(function(t,r){t&&"Document"===t.kind?i+=t.loc.source.body:i+=t,i+=e[r+1]}),function(e){var t=ip(e);if(!ic.has(t)){let l,c;var r,i,n,s,a,o=(Object.defineProperty(c=(l=new ia(e,{experimentalFragmentVariables:id,allowLegacyFragmentVariables:id,experimentalFragmentArguments:id})).parseDocument(),"tokenCount",{enumerable:!1,value:l.tokenCount}),c);if(!o||"Document"!==o.kind)throw Error("Not a valid GraphQL document.");ic.set(t,((s=new Set((r=new Set,i=[],o.definitions.forEach(function(e){if("FragmentDefinition"===e.kind){var t,n=e.name.value,s=ip((t=e.loc).source.body.substring(t.start,t.end)),a=iu.get(n);a&&!a.has(s)?ih&&console.warn("Warning: fragment with name "+n+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):a||iu.set(n,a=new Set),a.add(s),r.has(s)||(r.add(s),i.push(e))}else i.push(e)}),n=(0,rY.__assign)((0,rY.__assign)({},o),{definitions:i})).definitions)).forEach(function(e){e.loc&&delete e.loc,Object.keys(e).forEach(function(t){var r=e[t];r&&"object"==typeof r&&s.add(r)})}),(a=n.loc)&&(delete a.startToken,delete a.endToken),n))}return ic.get(t)}(i)}var iy=im;(c=im||(im={})).gql=iy,c.resetCaches=function(){ic.clear(),iu.clear()},c.disableFragmentWarnings=function(){ih=!1},c.enableExperimentalFragmentVariables=function(){id=!0},c.disableExperimentalFragmentVariables=function(){id=!1},im.default=im;class ig{isIncrementalResult(e){return!1}prepareRequest(e){return q(!rV(["defer","stream"],e.query),67),e}extractErrors(){}startRequest=void 0}let ib=ep.execute;function iv(e,t){return tK(e,t,t.variables&&{variables:tK({...e&&e.variables,...t.variables})})}function iE(e){return C(e,{FragmentSpread(e){if(!e.directives?.some(({name:e})=>"unmask"===e.value))return null}})}var ik=e.i(254201),iO=e.i(992481),iS=e.i(602400),iw=e.i(722249),iT=e.i(128068),ix=e.i(330823),iN=e.i(305753),iI=e.i(245281),iC=e.i(603752);(u=g||(g={})).NEXT="N",u.ERROR="E",u.COMPLETE="C";var i_=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return function(e,t){var r,i,n,s=e.kind,a=e.value,o=e.error;if("string"!=typeof s)throw TypeError('Invalid notification, missing "kind"');"N"===s?null==(r=t.next)||r.call(t,a):"E"===s?null==(i=t.error)||i.call(t,o):null==(n=t.complete)||n.call(t)}(this,e)},e.prototype.do=function(e,t,r){var i=this.kind,n=this.value,s=this.error;return"N"===i?null==e?void 0:e(n):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){return(0,iC.isFunction)(null==e?void 0:e.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,i="N"===e?(0,iI.of)(t):"E"===e?(0,ik.throwError)(function(){return r}):"C"===e?E.EMPTY:0;if(!i)throw TypeError("Unexpected notification kind "+e);return i},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}(),iD=e.i(484973),iA=e.i(408659);function iR(e,t){return"object"==typeof e&&null!==e&&e[Symbol.for("apollo.error")]===t}function iF(e){Object.defineProperty(e,Symbol.for("apollo.error"),{value:e.name,enumerable:!1,writable:!1,
22configurable:!1})}function iM(e){return e.filter(e=>e).map(e=>e.message||"Error message not found.").join("\n")}class iP extends Error{static is(e){return iR(e,"CombinedGraphQLErrors")}static formatMessage=iM;errors;data;extensions;constructor(e,t=e.errors||[]){super(iP.formatMessage(t,{result:e,defaultFormatMessage:iM})),this.errors=t,this.data=e.data,this.extensions=e.extensions,this.name="CombinedGraphQLErrors",iF(this),Object.setPrototypeOf(this,iP.prototype)}}function ij(e){return e.map(e=>e.message||"Error message not found.").join("\n")}class iL extends Error{static is(e){return iR(e,"CombinedProtocolErrors")}static formatMessage=ij;errors;constructor(e){super(iL.formatMessage(e,{defaultFormatMessage:ij})),this.name="CombinedProtocolErrors",this.errors=e,iF(this),Object.setPrototypeOf(this,iL.prototype)}}class iq extends Error{static is(e){return iR(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}),this.name="UnconventionalError",iF(this),Object.setPrototypeOf(this,iq.prototype)}}let iV=Symbol(),iQ=new WeakSet;function iB(e,t,r){return ri.withValue(!0,()=>{let i=function e(t,r,i,n,s){let{knownChanged:a}=i,o=function(e,t){if(t.has(e))return t.get(e);let r=Array.isArray(e)?[]:{};return t.set(e,r),r}(t,i.mutableTargets);if(Array.isArray(t)){for(let[s,l]of Array.from(t.entries())){if(null===l){o[s]=null;continue}let t=e(l,r,i,n,void 0);a.has(t)&&a.add(o),o[s]=t}return a.has(o)?o:t}for(let l of r.selections){let r;if(n&&a.add(o),l.kind===p.FIELD){let s=tC(l),c=l.selectionSet;if(void 0===(r=o[s]||t[s]))continue;if(c&&null!==r){let o=e(t[s],c,i,n,void 0);a.has(o)&&(r=o)}o[s]=r}if(l.kind===p.INLINE_FRAGMENT&&(!l.typeCondition||i.cache.fragmentMatches(l,t.__typename))&&(r=e(t,l.selectionSet,i,n,s)),l.kind===p.FRAGMENT_SPREAD){let n=l.name.value,a=i.fragmentMap[n]||(i.fragmentMap[n]=i.cache.lookupFragment(n));q(a,39,n);let o=function(e){let t=e.directives?.find(({name:e})=>"unmask"===e.value);if(!t)return"mask";let r=t.arguments?.find(({name:e})=>"mode"===e.value);return r&&"value"in r.value&&"migrate"===r.value.value?"migrate":"unmask"}(l);"mask"!==o&&(r=e(t,a.selectionSet,i,"migrate"===o,s))}a.has(r)&&a.add(o)}return"__typename"in t&&!("__typename"in o)&&(o.__typename=t.__typename),Object.keys(o).length!==Object.keys(t).length&&a.add(o),a.has(o)?o:t}(e,t,r,!1);return Object.isFrozen(e),i})}function iU(e){return 7===e||8===e}function iz(e,t=()=>void 0){return r=>new tb.Observable(i=>{let n=t();return r.subscribe({next(t){let r;try{r=e(t,n)}catch(e){i.error(e)}void 0!==r&&i.next(r)},error(e){i.error(e)},complete(){i.complete()}})})}function iW(e){return!!e.errors?.length}function i$(e){let t=new Map;return function(r=e){let i=t.get(r);return i||t.set(r,i={variables:new Set,fragmentSpreads:new Set}),i}}function iK(e){let t={data:e.data};return e.error&&(t.error=e.error),t}(h=b||(b={}))[h.loading=1]="loading",h[h.setVariables=2]="setVariables",h[h.fetchMore=3]="fetchMore",h[h.refetch=4]="refetch",h[h.poll=6]="poll",h[h.ready=7]="ready",h[h.error=8]="error",h[h.streaming=9]="streaming";var iG=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return(0,rY.__extends)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r.closed||t.next(this._value),r},t.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(iA.Subject);function iY(e){return e.catch(()=>{}),e}let{assign:iJ,hasOwnProperty:iH}=Object,iX={loading:!0,networkStatus:b.loading,data:void 0,dataState:"empty",partial:!0},iZ={loading:!1,networkStatus:b.ready,data:void 0,dataState:"empty",partial:!0};class i0{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}get cache(){return this.queryManager.cache}constructor({queryManager:e,options:t,transformedQuery:r=e.transform(t.query)}){this.queryManager=e,this.waitForNetworkResult="network-only"===t.fetchPolicy,this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);
22const{watchQuery:{fetchPolicy:i="cache-first"}={}}=e.defaultOptions,{fetchPolicy:n=i,initialFetchPolicy:s="standby"===n?i:n}=t;t[ra]&&(q("standby"===n,80),this.variablesUnknown=!0),this.lastQuery=r,this.options={...t,initialFetchPolicy:s,fetchPolicy:n,variables:this.getVariablesWithDefaults(t.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const a=ed(this.query);this.queryName=a&&a.name&&a.name.value}initializeObservablesQueue(){this.subject=new iG({query:this.query,variables:this.variables,result:iX,meta:{}});let e=this.subject.pipe((0,tO.tap)({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),iz(({query:e,variables:t,result:r,meta:i},n)=>{let{shouldEmit:s}=i;if(r===iX&&(n.previous=void 0,n.previousVariables=void 0),"standby"===this.options.fetchPolicy||2===s)return;if(1===s)return l();let{previous:a,previousVariables:o}=n;if(a){let i=this.queryManager.getDocumentInfo(e),n=this.queryManager.dataMasking,s=n?i.nonReactiveQuery:e;if((n||i.hasNonreactiveDirective?tD(s,a,r,t):eb(a,r))&&eb(o,t))return}if(!(3===s&&(!this.options.notifyOnNetworkStatusChange||eb(a,r))))return l();function l(){return n.previous=r,n.previousVariables=t,r}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new iA.Subject,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return this.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){let t=e||this.options.fetchPolicy;this.queryManager.prioritizeCacheValues&&("network-only"===t||"cache-and-network"===t)&&(t="cache-first");let r=()=>{let e=this.getCacheDiff(),t=this.options.returnPartialData||e.complete?e.result??void 0:void 0;return this.maskResult({data:t,dataState:e.complete?"complete":void 0===t?"empty":"partial",loading:!e.complete,networkStatus:e.complete?b.ready:b.loading,partial:!e.complete})};switch(t){case"cache-only":return{...r(),loading:!1,networkStatus:b.ready};case"cache-first":return r();case"cache-and-network":return{...r(),loading:!0,networkStatus:b.loading};case"standby":return iZ;default:return iX}}resubscribeCache(){let{variables:e,fetchPolicy:t}=this.options,r=this.query,i="standby"===t||"no-cache"===t||this.waitForNetworkResult,n=!i1({query:r,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((i||n)&&this.unsubscribeFromCache?.(),i||!n)return;let s={query:r,variables:e,optimistic:!0,watcher:this,callback:e=>{let t=this.queryManager.getDocumentInfo(r);if((t.hasClientExports||t.hasForcedResolvers)&&(s.lastDiff=void 0),s.lastOwnDiff===e)return;let{result:i}=this.subject.getValue();(e.complete||!i.error&&i!==iX&&i!==iZ)&&(eb(i.data,e.result)||this.scheduleNotify())}},a=this.cache.watch(s);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,a()},{query:r,variables:e})}stableLastResult;getCurrentResult(){let{result:e}=this.subject.getValue(),t=e.networkStatus===b.error||this.hasObservers()||"no-cache"===this.options.fetchPolicy?e:this.getInitialResult();return t===iX&&(t=this.getInitialResult()),eb(this.stableLastResult,t)||(this.stableLastResult=t),this.stableLastResult}refetch(e){let{fetchPolicy:t}=this.options,r={pollInterval:0};return"no-cache"===t?r.fetchPolicy="no-cache":r.fetchPolicy="network-only",e&&!eb(this.variables,e)&&(r.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._lastWrite=void 0,this._reobserve(r,{newNetworkStatus:b.refetch})}fetchMore({query:e,variables:t,context:r,errorPolicy:i,updateQuery:n}){q("cache-only"!==this.options.fetchPolicy,82,K(this.query,"(anonymous)"));let s={...tK(this.options,{errorPolicy:"none"},{query:e,context:r,errorPolicy:i}),variables:e?t:{...this.variables,...t},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};s.query=this.transformDocument(s.query),this.lastQuery=e?this.transformDocument(this.options.query):s.query;let a=!1,o="no-cache"!==this.options.fetchPolicy;o||q(n,83);let{finalize:l,pushNotification:c}=this.pushOperation(b.fetchMore);c({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3});let{promise:u,operator:h}=i2(),{observable:d}=this.queryManager.fetchObservableWithInfo(s,{networkStatus:b.fetchMore,exposeExtensions:!0}),p=d.pipe(h,(0,iw.filter)(e=>"N"===e.kind&&"network"===e.source)).subscribe({next:e=>{a=!1;let t=e.value,r=t[rn];if(iU(e.value.networkStatus)&&l(),o){let e=this.getCacheDiff();this.cache.batch({update:e=>{n?e.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1,extensions:r},e=>n(e,{fetchMoreResult:t.data,variables:s.variables})):e.writeQuery({query:s.query,variables:s.variables,data:t.data,extensions:r})},onWatchUpdated:(r,i)=>{if(r.watcher===this&&!eb(i.result,e.result)){a=!0;let e=this.getCurrentResult();iU(t.networkStatus)||c({kind:"N",source:"network",value:{...e,networkStatus:t.networkStatus===b.error?b.ready:t.networkStatus,loading:!1,data:i.result,dataState:"streaming"===t.dataState?"streaming":"complete"}})}}})}else{let e=this.getCurrentResult(),r=n(e.data,{fetchMoreResult:t.data,variables:s.variables});c({kind:"N",value:{...e,networkStatus:b.ready,loading:!1,data:r,dataState:"streaming"===e.dataState?"streaming":"complete"},source:"network"})}}});return iY(u.then(e=>iK(this.maskResult(e))).finally(()=>
22{if(p.unsubscribe(),l(),o&&!a){let e=this.getCurrentResult();"streaming"===e.dataState?c({kind:"N",source:"network",value:{...e,dataState:"complete",networkStatus:b.ready}}):c({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})}}))}subscribeToMore(e){let t=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:t=>{let{updateQuery:r,onError:i}=e,{error:n}=t;n?i?i(n):q.error(84,n):r&&this.updateQuery((e,i)=>r(e,{subscriptionData:t,...i}))}});return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)&&t.unsubscribe()}}applyOptions(e){let t=tK(this.options,e||{});iJ(this.options,t),this.updatePolling()}async setVariables(e){return(e=this.getVariablesWithDefaults(e),eb(this.variables,e))?iK(this.getCurrentResult()):(this.options.variables=e,this.hasObservers())?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:b.setVariables}):iK(this.getCurrentResult())}updateQuery(e){let{queryManager:t}=this,{result:r,complete:i}=this.getCacheDiff({optimistic:!1}),n=e(r,{variables:this.variables,complete:!!i,previousData:r});n&&(this.cache.writeQuery({query:this.options.query,data:n,variables:this.variables}),t.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,t){if(t.nextFetchPolicy){let{fetchPolicy:r="cache-first",initialFetchPolicy:i=r}=t;"standby"===r||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy.call(t,r,{reason:e,options:t,observable:this,initialFetchPolicy:i}):"variables-changed"===e?t.fetchPolicy=i:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy}fetch(e,t,r,i){let n=this.options.fetchPolicy;e.context??={};let s=!1,a=e=>new tb.Observable(r=>{try{return e.subscribe({next(e){s=!0,r.next(e)},error:e=>r.error(e),complete:()=>r.complete()})}finally{s||(h.override=t,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:c,variables:u,meta:{shouldEmit:3,fetchPolicy:n}}))}}),{observable:o,fromLink:l}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:t,query:r,onCacheHit:()=>{s=!0},fetchQueryOperator:a,observableQuery:this}),{query:c,variables:u}=this,h={abort:()=>{p.unsubscribe()},query:c,variables:u};this.activeOperations.add(h);let d=t==b.refetch||t==b.setVariables,p=(o=o.pipe(i,(0,tE.share)())).pipe((0,tO.tap)({next:e=>{"newNetworkStatus"===e.source||"N"===e.kind&&e.value.loading?h.override=t:delete h.override},finalize:()=>this.activeOperations.delete(h)})).subscribe({next:e=>{let t={};d&&"N"===e.kind&&"loading"in e.value&&!e.value.loading&&(d=!1,t.shouldEmit=1),this.input.next({...e,query:c,variables:u,meta:t})}});return{fromLink:l,subscription:p,observable:o}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;let{pollingInfo:e,options:{fetchPolicy:t,pollInterval:r}}=this,i=()=>{let{options:e}=this;return!e.pollInterval||!this.hasObservers()||"cache-only"===e.fetchPolicy||"standby"===e.fetchPolicy};if(i())return void this.cancelPolling();if(e?.interval===r)return;(e||(this.pollingInfo={})).interval=r;let n=()=>{if(i())return this.cancelPolling();this.pollingInfo&&(!iU(this.networkStatus)||this.options.skipPollAttempt?.()?s():this._reobserve({fetchPolicy:"no-cache"===this.options.initialFetchPolicy?"no-cache":"network-only"},{newNetworkStatus:b.poll}).then(s,s))},s=()=>{let e=this.pollingInfo;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(n,e.interval))};s()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,t){this.isTornDown=!1;let{newNetworkStatus:r}=t||{};this.queryManager.obsQueries.add(this);let i=r===b.refetch||r===b.poll,n=this.variables,s=this.options.fetchPolicy,a=tK(this.options,e||{});this.variablesUnknown&&="standby"===a.fetchPolicy;let o=i?a:iJ(this.options,a),l=this.transformDocument(o.query);this.lastQuery=l,e&&"variables"in e&&(o.variables=this.getVariablesWithDefaults(e.variables)),!i&&(this.updatePolling(),e&&e.variables&&!eb(e.variables,n)&&"standby"!==o.fetchPolicy&&(o.fetchPolicy===s||"function"==typeof o.nextFetchPolicy)&&(this.applyNextFetchPolicy("variables-changed",o),void 0===r&&(r=b.setVariables)));let c=this.networkStatus;r||(r=b.loading,c!==b.loading&&e?.variables&&!eb(e.variables,n)&&(r=b.setVariables),"standby"===o.fetchPolicy&&(r=b.ready)),"standby"===o.fetchPolicy&&this.cancelPolling(),this.resubscribeCache();let{promise:u,operator:h}=i2("standby"===o.fetchPolicy?{data:void 0}:void 0),{subscription:d,observable:p,fromLink:f}=this.fetch(o,r,l,h);i||!f&&this.linkSubscription||(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=d);let m=Object.assign(iY(u.then(e=>iK(this.maskResult(e))).finally(()=>{this.hasObservers()||0!==this.activeOperations.size||this.tearDownQuery()})),{retain:()=>{let e=p.subscribe({}),t=()=>e.unsubscribe();return u.then(t,t),m}});return m}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e
22=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){let t=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return t===e.data?e:{...e,data:t}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){!this.dirty&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(e=!1){if(!e){let e=this.queryManager.getDocumentInfo(this.query);if(e.hasClientExports||e.hasForcedResolvers)return}let{dirty:t}=this;if(this.resetNotifications(),t&&("cache-only"===this.options.fetchPolicy||"cache-and-network"===this.options.fetchPolicy||!this.activeOperations.size)){let e=this.getCacheDiff();eb(e.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:e.result,dataState:e.complete?"complete":e.result?"partial":"empty",networkStatus:b.ready,loading:!1,error:void 0,partial:!e.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(e){let t=!1,{query:r,variables:i}=this,n=()=>{this.activeOperations.delete(s)},s={override:e,abort:()=>{t=!0,n()},query:r,variables:i};return this.activeOperations.add(s),{finalize:n,pushNotification:(e,n)=>{t||this.input.next({...e,query:r,variables:i,meta:{...n}})}}}calculateNetworkStatus(e){if(e===b.streaming)return e;let t=Array.from(this.activeOperations.values()).reverse().find(e=>i1(e,this)&&void 0!==e.override);return t?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){let e="cache-only"===this.options.fetchPolicy;this.setResult(e?iZ:iX,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,t){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:{...t}})}operator=iz(e=>{let t,{query:r,variables:i,meta:n}=e;if("setResult"===e.source)return{query:r,variables:i,result:e.value,meta:n};if("C"===e.kind||!i1(e,this))return;let s=this.subject.getValue();if("cache"===e.source){if((t=e.value).networkStatus===b.ready&&t.partial&&(!this.options.returnPartialData||s.result.networkStatus===b.error)&&"cache-only"!==this.options.fetchPolicy)return}else if("network"===e.source)this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),t="E"===e.kind?{...i1(s,e)?s.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:b.error,loading:!1}:e.value,"E"===e.kind&&"streaming"===t.dataState&&(t.dataState="complete"),t.error&&(n.shouldEmit=1);else if("newNetworkStatus"===e.source){let r=i1(s,e)?s.result:this.getInitialResult(n.fetchPolicy),{resetError:i}=e.value,a=i?void 0:r.error,o=a?b.error:b.ready;t={...r,error:a,networkStatus:o}}return q(t),t.error||delete t.error,t.networkStatus=this.calculateNetworkStatus(t.networkStatus),t.loading=!iU(t.networkStatus),{query:r,variables:i,result:t=this.maskResult(t),meta:n}});reobserveCacheFirst(){let{fetchPolicy:e,nextFetchPolicy:t}=this.options;"cache-and-network"===e||"network-only"===e?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(r,i){return(this.nextFetchPolicy=t,"function"==typeof this.nextFetchPolicy)?this.nextFetchPolicy(r,i):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}}function i1(e,t){return!!(e&&t&&e.query===t.query&&eb(e.variables,t.variables))}function i2(e){let t=e,r,i;return{promise:new Promise((e,t)=>{r=e,i=t}),operator:(0,tO.tap)({next(e){if("E"===e.kind)return i(e.error);"N"!==e.kind||"newNetworkStatus"===e.source||e.value.loading||(t=e.value)},finalize:()=>{if(t)r(t);else{let e="The operation was aborted.",t="AbortError";i("u">typeof DOMException?new DOMException(e,t):Object.assign(Error(e),{name:t}))}}})}}let i3={},i4=new WeakMap;function i8(e,t){let r=e[t];"function"==typeof r&&(e[t]=function(){return i4.set(e,(i4.get(e)+1)%1e15),r.apply(this,arguments)})}let i9=new WeakMap;class i5{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(e,t){const r=this.cache=e.cache,i=(i9.get(e)||0)+1;i9.set(e,i),this.id=i+"",this.observableQuery=t,this.queryManager=e,i4.has(r)||(i4.set(r,0),i8(r,"evict"),i8(r,"modify"),i8(r,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,t){let{lastWrite:r}=this;return!(r&&r.dmCount===i4.get(this.cache)&&eb(t,r.variables)&&eb(e.data,r.result.data)&&e.extensions?.[rs]===r.result.extensions?.[rs])}get hasNext(){return!!this.incremental&&this.incremental.hasNext}maybeHandleIncrementalResult(e,t,r){let{incrementalHandler:i}=this.queryManager;return i.isIncrementalResult(t)?(this.incremental||=i.startRequest
22({query:r}),this.incremental.handle(e,t)):t}markQueryResult(e,{document:t,variables:r,errorPolicy:i,cacheWriteBehavior:n}){let s={query:t,variables:r,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();let a=0===n,o=a?void 0:this.cache.diff(s),l=this.maybeHandleIncrementalResult(o?.result,e,t);return a||(i6(l,i)?this.cache.batch({onWatchUpdated:(e,t)=>{e.watcher===this.observableQuery&&(e.lastOwnDiff=t)},update:e=>{if(this.shouldWrite(l,r))e.writeQuery({query:t,data:l.data,variables:r,overwrite:1===n,extensions:l.extensions}),this.lastWrite={result:l,variables:r,dmCount:i4.get(this.cache)};else if(o&&o.complete){l={...l,data:o.result};return}let i=e.diff(s);i.complete&&(l={...l,data:i.result})}}):this.lastWrite=void 0),l}markMutationResult(e,t,r=this.cache){let i=[],n=0===t.cacheWriteBehavior,s=this.maybeHandleIncrementalResult(n?void 0:r.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0}).result,e,t.document);if("ignore"===t.errorPolicy&&(s={...s,errors:[]}),iW(s)&&"none"===t.errorPolicy)return Promise.resolve(s);let a=()=>({...s,dataState:this.hasNext?"streaming":"complete"});if(!n&&i6(s,t.errorPolicy)){i.push({result:s.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables,extensions:s.extensions});let{updateQueries:e}=t;e&&this.queryManager.getObservableQueries("all").forEach(t=>{let r=t&&t.queryName;if(!r||!Object.hasOwnProperty.call(e,r))return;let n=e[r],{query:s,variables:o}=t,{result:l,complete:c}=t.getCacheDiff({optimistic:!1});if(c&&l){let e=n(l,{mutationResult:a(),queryName:s&&K(s)||void 0,queryVariables:o});e&&i.push({result:e,dataId:"ROOT_QUERY",query:s,variables:o})}})}let o=t.refetchQueries;if("function"==typeof o&&(o=o(a())),i.length>0||(o||"").length>0||t.update||t.onQueryUpdated||t.removeOptimistic){let e=[];
22if(this.queryManager.refetchQueries({updateCache:e=>{n||i.forEach(t=>e.write(t));let{update:r}=t;if(r){if(!n){let r=e.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(t.document).asQuery,variables:t.variables,optimistic:!1,returnPartialData:!0});r.complete&&(s={...s,data:r.result})}this.hasNext||r(e,s,{context:t.context,variables:t.variables})}n||t.keepRootFields||this.hasNext||e.modify({id:"ROOT_MUTATION",fields:(e,{fieldName:t,DELETE:r})=>"__typename"===t?e:r})},include:o,optimistic:!1,removeOptimistic:t.removeOptimistic,onQueryUpdated:t.onQueryUpdated||null}).forEach(t=>e.push(t)),t.awaitRefetchQueries||t.onQueryUpdated)return Promise.all(e).then(()=>s)}return Promise.resolve(s)}markMutationOptimistic(e,t){let r="function"==typeof e?e(t.variables,{IGNORE:i3}):e;return r!==i3&&(this.cache.recordOptimisticTransaction(e=>{try{this.markMutationResult({data:r},t,e)}catch(e){q.error(e)}},this.id),!0)}markSubscriptionResult(e,{document:t,variables:r,errorPolicy:i,cacheWriteBehavior:n}){0!==n&&(i6(e,i)&&this.cache.write({query:t,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:r,extensions:e.extensions}),this.queryManager.broadcastQueries())}}function i6(e,t="none"){let r=!iW(e);return!r&&("ignore"===t||"all"===t)&&e.data&&(r=!0),r}class i7{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(e){const t=new e5(e=>this.cache.transformDocument(e),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const r=e.documentTransform;this.documentTransform=r?t.concat(r).concat(t):t,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(Q(87))}cancelPendingFetches(e){this.fetchCancelFns.forEach(t=>t(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:t,optimisticResponse:r,updateQueries:i,refetchQueries:n=[],awaitRefetchQueries:s=!1,update:a,onQueryUpdated:o,fetchPolicy:l,errorPolicy:c,keepRootFields:u,context:h}){let d=new i5(this);e=this.cache.transformForLink(this.transform(e));let{hasClientExports:p}=this.getDocumentInfo(e);t=this.getVariables(e,t),p&&(t=await this.localState.getExportedVariables({client:this.client,document:e,variables:t,context:h}));let f=this.mutationStore&&(this.mutationStore[d.id]={mutation:e,variables:t,loading:!0,error:null}),m=r&&d.markMutationOptimistic(r,{document:e,variables:t,cacheWriteBehavior:2*("no-cache"!==l),errorPolicy:c,context:h,updateQueries:i,update:a,keepRootFields:u});return this.broadcastQueries(),new Promise((p,y)=>{let g={};return this.getObservableFromLink(e,{...h,optimisticResponse:m?r:void 0},t,l,{},!1).observable.pipe(ne(),(0,iD.mergeMap)(r=>{let p={...r};return(0,ix.from)(d.markMutationResult(p,{document:e,variables:t,cacheWriteBehavior:2*("no-cache"!==l),errorPolicy:c,context:h,update:a,updateQueries:i,awaitRefetchQueries:s,refetchQueries:n,removeOptimistic:m?d.id:void 0,onQueryUpdated:o,keepRootFields:u}))})).pipe((0,tg.map)(e=>{if(iW(e)&&"none"===c)throw new iP(nt(e));return f&&(f.loading=!1,f.error=null),e})).subscribe({next:t=>{if(this.broadcastQueries(),!d.hasNext){let r={data:this.maskOperation({document:e,data:t.data,fetchPolicy:l,cause:g})};iW(t)&&(r.error=new iP(t)),Object.keys(t.extensions||{}).length&&(r.extensions=t.extensions),p(r)}},error:e=>(f&&(f.loading=!1,f.error=e),m&&this.cache.removeOptimistic(d.id),this.broadcastQueries(),"ignore"===c)?p({data:void 0}):"all"===c?p({data:void 0,error:e}):void y(e)})})}fetchQuery(e,t){return eh(e.query,f.QUERY),(async()=>(0,iN.lastValueFrom)(this.fetchObservableWithInfo(e,{networkStatus:t}).observable.pipe(iz(e=>{switch(e.kind){case"E":throw e.error;case"N":if("newNetworkStatus"!==e.source)return iK(e.value)}})),{defaultValue:{data:void 0}}))()}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new el($["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){let{transformCache:t}=this;if(!t.has(e)){let r,i=ed(e),n={hasClientExports:rV(["client","export"],e,!0),hasForcedResolvers:(r=!1,C(e,{Directive:{enter(e){if("client"===e.name.value&&e.arguments&&(r=e.arguments.some(e=>"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value)))return I}}}),r),hasNonreactiveDirective:rV(["nonreactive"],e),hasIncrementalDirective:rV(["defer"],e),nonReactiveQuery:C(e,{FragmentSpread:e=>{if(!e.directives?.some(e=>"unmask"===e.name.value))return{...e,directives:[...e.directives||[],{kind:p.DIRECTIVE,name:{kind:p.NAME,value:"nonreactive"}}
22]}}}),clientQuery:rV(["client"],e)?e:null,serverQuery:function(e,t){var r,i,n;let s,a,o;eh(t);let l=i$(""),c=i$(""),u=e=>{for(let t=0,r;t<e.length&&(r=e[t]);++t)if(!tG(r)){if(r.kind===p.OPERATION_DEFINITION)return l(r.name&&r.name.value);if(r.kind===p.FRAGMENT_DEFINITION)return c(r.name.value)}return q.error(14),null},h=0;for(let e=t.definitions.length-1;e>=0;--e)t.definitions[e].kind===p.OPERATION_DEFINITION&&++h;let d=(r=e,s=new Map,a=new Map,r.forEach(e=>{e&&(e.name?s.set(e.name,e):e.test&&a.set(e.test,e))}),e=>{let t=s.get(e.name.value);return!t&&a.size&&a.forEach((r,i)=>{i(e)&&(t=r)}),t}),f=e=>rd(e)&&e.map(d).some(e=>e&&e.remove),m=new Map,y=!1,g={enter(e){if(f(e.directives))return y=!0,null}},b=C(t,{Field:g,InlineFragment:g,VariableDefinition:{enter:()=>!1},Variable:{enter(e,t,r,i,n){let s=u(n);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter(e,t,r,i,n){if(f(e.directives))return y=!0,null;let s=u(n);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter(e,t,r,i){m.set(JSON.stringify(i),e)},leave:(e,t,r,i)=>e===m.get(JSON.stringify(i))?e:h>0&&e.selectionSet.selections.every(e=>e.kind===p.FIELD&&"__typename"===e.name.value)?(c(e.name.value).removed=!0,y=!0,null):void 0},Directive:{leave(e){if(d(e))return y=!0,null}}});if(!y)return t;let v=e=>(!e.transitiveVars&&(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(t=>{v(c(t)).transitiveVars.forEach(t=>{e.transitiveVars.add(t)})})),e),E=new Set;b.definitions.forEach(e=>{e.kind===p.OPERATION_DEFINITION?v(l(e.name&&e.name.value)).fragmentSpreads.forEach(e=>{E.add(e)}):e.kind!==p.FRAGMENT_DEFINITION||0!==h||c(e.name.value).removed||E.add(e.name.value)}
22),E.forEach(e=>{v(c(e)).fragmentSpreads.forEach(e=>{E.add(e)})});let k={enter(e){let t;if(t=e.name.value,!E.has(t)||c(t).removed)return null}};return!function e(t,r){return!t||t.selectionSet.selections.every(t=>t.kind===p.FRAGMENT_SPREAD&&e(r[t.name.value],r))}(ed(i=C(b,{FragmentSpread:k,FragmentDefinition:k,OperationDefinition:{leave(e){if(e.variableDefinitions){let t=v(l(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return{...e,variableDefinitions:e.variableDefinitions.filter(e=>t.has(e.variable.name.value))}}}}}))||(q("Document"===(n=i).kind,6),q(n.definitions.length<=1,7),q("FragmentDefinition"===(o=n.definitions[0]).kind,8),o),tw(tT(i)))?i:null}([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:i?.operation,defaultVars:rM(i),asQuery:{...e,definitions:e.definitions.map(e=>"OperationDefinition"===e.kind&&"query"!==e.operation?{...e,operation:"query"}:e)}};t.set(e,n)}let r=t.get(e);if(r.violation)throw r.violation;return r}getVariables(e,t){let r=this.getDocumentInfo(e).defaultVars,i=Object.entries(t??{}).map(([e,t])=>[e,void 0===t?r[e]:t]);return{...r,...Object.fromEntries(i)}}watchQuery(e){eh(e.query,f.QUERY);let t=this.transform(e.query);return void 0===(e={...e,variables:this.getVariables(t,e.variables)}).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!0),new i0({queryManager:this,options:e,transformedQuery:t})}query(e){let t=this.transform(e.query);return this.fetchQuery({...e,query:t}).then(r=>({...r,data:this.maskOperation({document:t,data:r?.data,fetchPolicy:e.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(Q(89)),this.obsQueries.forEach(e=>{e.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){let t=new Set,r=new Map,i=new Map,n=new Set;return Array.isArray(e)&&e.forEach(e=>{if("string"==typeof e)r.set(e,e),i.set(e,!1);else if(tQ(e)&&"Document"===e.kind&&Array.isArray(e.definitions)){let t=td(this.transform(e));r.set(t,K(e)),i.set(t,!1)}else tQ(e)&&e.query&&n.add(e)}),this.obsQueries.forEach(r=>{let n=td(this.transform(r.options.query));if("all"===e)return void t.add(r);let{queryName:s,options:{fetchPolicy:a}}=r;("active"!==e||"standby"!==a)&&("active"===e||s&&i.has(s)||n&&i.has(n))&&(t.add(r),s&&i.set(s,!0),n&&i.set(n,!0))}),n.size&&n.forEach(e=>{let r=new i0({queryManager:this,options:{...iv(this.defaultOptions.watchQuery,e),fetchPolicy:"network-only"}});t.add(r)}),t}refetchObservableQueries(e=!1){let t=[];return this.getObservableQueries(e?"all":"active").forEach(r=>{let{fetchPolicy:i}=r.options;(e||"standby"!==i)&&"cache-only"!==i&&t.push(r.refetch())}),this.broadcastQueries(),Promise.all(t)}startGraphQLSubscription(e){let t,{query:r,variables:i}=e,{fetchPolicy:n="cache-first",errorPolicy:s="none",context:a={},extensions:o={}}=e;return eh(r,f.SUBSCRIPTION),r=this.transform(r),i=this.getVariables(r,i),Object.assign((this.getDocumentInfo(r).hasClientExports?(0,ix.from)(this.localState.getExportedVariables({client:this.client,document:r,variables:i,context:a})):(0,iI.of)(i)).pipe((0,iD.mergeMap)(e=>{let{observable:i,restart:l}=this.getObservableFromLink(r,a,e,n,o),c=new i5(this);return t=l,i.pipe((0,tg.map)(t=>{c.markSubscriptionResult(t,{document:r,variables:e,errorPolicy:s,cacheWriteBehavior:2*("no-cache"!==n)});let i={data:t.data??void 0};if(iW(t))i.error=new iP(t);else"extensions"in t&&iL.is(t.extensions[iV])&&(i.error=t.extensions[iV],delete t.extensions[iV]);return t.extensions&&Object.keys(t.extensions).length&&(i.extensions=t.extensions),i.error&&"none"===s&&(i.data=void 0),"ignore"===s&&delete i.error,i}),(0,iO.catchError)(e=>"ignore"===s?(0,iI.of)({data:void 0}):(0,iI.of)({data:void 0,error:e})),(0,iw.filter)(e=>!!(e.data||e.error)))})),{restart:()=>t?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new X(!1);getObservableFromLink(e,t,r,i,n,s=t?.queryDeduplication??this.queryDeduplication){let a={},{serverQuery:o,clientQuery:l,operationType:c,hasIncrementalDirective:u}=this.getDocumentInfo(e),h=K(e),d={client:this.client};if(o){let{inFlightLinkObservables:e,link:i}=this;try{let l=this.incrementalHandler.prepareRequest({query:o,variables:r,context:{...this.defaultContext,...t,queryDeduplication:s},extensions:n});function p(e){return new tb.Observable(t=>{function r(){return e.subscribe({next:t.next.bind(t),complete:t.complete.bind(t),error:t.error.bind(t)})}let i=r();return a.restart||=()=>{i.unsubscribe(),i=r()},()=>{i.unsubscribe(),a.restart=void 0}})}if(t=l.context,s){let t=td(o),n=e3(r);
22(a=e.lookup(t,n)).observable||(a.observable=ib(i,l,d).pipe(p,(0,iT.finalize)(()=>{e.peek(t,n)===a&&e.remove(t,n)}),c===f.SUBSCRIPTION?(0,tE.share)():(0,tk.shareReplay)({refCount:!0})))}else a.observable=ib(i,l,d).pipe(p)}catch(e){a.observable=(0,ik.throwError)(()=>e)}}else a.observable=(0,iI.of)({data:{}});if(l){let{operation:n}=ed(e);q(!u,94,n[0].toUpperCase()+n.slice(1),h??"(anonymous)"),a.observable=a.observable.pipe((0,iD.mergeMap)(e=>(0,ix.from)(this.localState.execute({client:this.client,document:l,remoteResult:e,context:t,variables:r,fetchPolicy:i}))))}return{restart:()=>a.restart?.(),observable:a.observable.pipe((0,iO.catchError)(e=>{var t,r,i;throw i=e=null!==(r=t=e)&&"object"==typeof r&&"string"==typeof r.message&&"string"==typeof r.name&&("string"==typeof r.stack||void 0===r.stack)?t:"string"==typeof t?Error(t,{cause:t}):new iq(t),iQ.add(i),e}))}}getResultsFromLink(e,{queryInfo:t,cacheWriteBehavior:r,observableQuery:i,exposeExtensions:n}){let s=t.lastRequestId=this.generateRequestId(),{errorPolicy:a}=e,o=this.cache.transformForLink(e.query);return this.getObservableFromLink(o,e.context,e.variables,e.fetchPolicy).observable.pipe((0,tg.map)(s=>{let l=t.markQueryResult(s,{...e,document:o,cacheWriteBehavior:r}),c=iW(l);if(c&&"none"===a)throw t.resetLastWrite(),i?.resetNotifications(),new iP(nt(l));let u={data:l.data,...t.hasNext?{loading:!0,networkStatus:b.streaming,dataState:"streaming",partial:!0}:{dataState:l.data?"complete":"empty",loading:!1,networkStatus:b.ready,partial:!l.data}};return n&&"extensions"in l&&(u[rn]=l.extensions),c&&("none"===a&&(u.data=void 0,u.dataState="empty"),"ignore"!==a&&(u.error=new iP(nt(l)),"streaming"!==u.dataState&&(u.networkStatus=b.error))),u}),(0,iO.catchError)(e=>{if(s>=t.lastRequestId&&"none"===a)throw t.resetLastWrite(),i?.resetNotifications(),e;let r={data:void 0,dataState:"empty",loading:!1,networkStatus:b.ready,partial:!0};return"ignore"!==a&&(r.error=e,r.networkStatus=b.error),(0,iI.of)(r)}))}fetchObservableWithInfo(e,{networkStatus:t=b.loading,query:r=e.query,fetchQueryOperator:i=e=>e,onCacheHit:n=()=>{},observableQuery:s,exposeExtensions:a}){let o,l,c=this.getVariables(r,e.variables),{fetchPolicy:u="cache-first",errorPolicy:h="none",returnPartialData:d=!1,notifyOnNetworkStatusChange:p=!0,context:f={}}=e;this.prioritizeCacheValues&&("network-only"===u||"cache-and-network"===u)&&(u="cache-first");let m=Object.assign({},e,{query:r,variables:c,fetchPolicy:u,errorPolicy:h,returnPartialData:d,notifyOnNetworkStatusChange:p,context:f}),y=new i5(this,s),g=r=>{m.variables=r;let o="no-cache"===u?0:t===b.refetch&&"merge"!==m.refetchWritePolicy?1:2,l=this.fetchQueryByPolicy(m,{queryInfo:y,cacheWriteBehavior:o,onCacheHit:n,observableQuery:s,exposeExtensions:a});return l.observable=l.observable.pipe(i),"standby"!==m.fetchPolicy&&s?.applyNextFetchPolicy("after-fetch",e),l},v=()=>{this.fetchCancelFns.delete(y.id)};this.fetchCancelFns.set(y.id,e=>{E.next({kind:"E",error:e,source:"network"})});let E=new iA.Subject;if(this.getDocumentInfo(m.query).hasClientExports)o=(0,ix.from)(this.localState.getExportedVariables({client:this.client,document:m.query,variables:m.variables,context:m.context})).pipe((0,iD.mergeMap)(e=>g(e).observable)),l=!0;else{let e=g(m.variables);l=e.fromLink,o=e.observable}return{observable:new tb.Observable(e=>{e.add(v),o.subscribe(e),E.subscribe(e)}).pipe((0,tE.share)()),fromLink:l}}refetchQueries({updateCache:e,include:t,optimistic:r=!1,removeOptimistic:i=r?F("refetchQueries"):void 0,onQueryUpdated:n}){let s=new Map;t&&this.getObservableQueries(t).forEach(e=>{if("cache-only"===e.options.fetchPolicy||e.variablesUnknown)return;let t=e.getCurrentResult();s.set(e,{oq:e,lastDiff:{result:t?.data,complete:!t?.partial}})});let a=new Map;if(e){let t=new Set;this.cache.batch({update:e,optimistic:r&&i||!1,removeOptimistic:i,onWatchUpdated(e,r,i){let o=e.watcher;if(o instanceof i0&&!t.has(o)){if(t.add(o),n){s.delete(o);let e=n(o,r,i);return!0===e&&(e=o.refetch().retain()),!1!==e&&a.set(o,e),e}null!==n&&"cache-only"!==o.options.fetchPolicy&&s.set(o,{oq:o,lastDiff:i,diff:r})}}})}
22return s.size&&s.forEach(({oq:e,lastDiff:t,diff:r})=>{let i;n&&(r||(r=e.getCacheDiff()),i=n(e,r,t)),n&&!0!==i||(i=e.refetch().retain()),!1!==i&&a.set(e,i)}),i&&this.cache.removeOptimistic(i),a}noCacheWarningsByCause=new WeakSet;maskOperation(e){var t;let r,{document:i,data:n}=e;return this.dataMasking?(t=this.cache,(q(r=ed(i),43),null==n)?n:iB(n,r.selectionSet,{operationType:r.operation,operationName:r.name?.value,fragmentMap:tw(tT(i)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})):n}maskFragment(e){var t,r;let i,n,{data:s,fragment:a,fragmentName:o}=e;return this.dataMasking?(t=this.cache,r=o,i=a.definitions.filter(e=>e.kind===p.FRAGMENT_DEFINITION),void 0===r&&(q(1===i.length,41,i.length),r=i[0].name.value),(q(!!(n=i.find(e=>e.name.value===r)),42,r),null==s||eb(s,{}))?s:iB(s,n.selectionSet,{operationType:"fragment",operationName:n.name.value,fragmentMap:tw(tT(a)),cache:t,mutableTargets:new WeakMap,knownChanged:new WeakSet})):s}fetchQueryByPolicy({query:e,variables:t,fetchPolicy:r,errorPolicy:i,returnPartialData:n,context:s},{cacheWriteBehavior:a,onCacheHit:o,queryInfo:l,observableQuery:c,exposeExtensions:u}){let h=()=>this.cache.diff({query:e,variables:t,returnPartialData:!0,optimistic:!0}),d=(a,l)=>{let c=a.result,u=e=>(a.complete||n||(e=void 0),{data:e,dataState:a.complete?"complete":e?"partial":"empty",loading:!iU(l),networkStatus:l,partial:!a.complete}),h=e=>(0,iI.of)({kind:"N",value:u(e),source:"cache"});return(a.complete||n)&&this.getDocumentInfo(e).hasForcedResolvers?(o(),(0,ix.from)(this.localState.execute({client:this.client,document:e,remoteResult:c?{data:c}:void 0,context:s,variables:t,onlyRunForcedResolvers:!0,returnPartialData:!0,fetchPolicy:r}).then(e=>({kind:"N",value:u(e.data||void 0),source:"cache"})))):h("none"===i&&l===b.refetch&&a.missing?void 0:c||void 0)},p=()=>this.getResultsFromLink({query:e,variables:t,context:s,fetchPolicy:r,errorPolicy:i},{cacheWriteBehavior:a,queryInfo:l,observableQuery:c,exposeExtensions:u}).pipe(ne(),(0,tf.operate)(function(e,t){e.subscribe((0,tm.createOperatorSubscriber)(t,function(e){t.next(i_.createNext(e))},function(){t.next(i_.createComplete()),t.complete()},function(e){t.next(i_.createError(e)),t.complete()}))}
22),(0,tg.map)(e=>({...e,source:"network"})));switch(r){default:case"cache-first":{let e=h();if(e.complete)return{fromLink:!1,observable:d(e,b.ready)};if(n)return{fromLink:!0,observable:(0,iS.concat)(d(e,b.loading),p())};return{fromLink:!0,observable:p()}}case"cache-and-network":{let e=h();if(e.complete||n)return{fromLink:!0,observable:(0,iS.concat)(d(e,b.loading),p())};return{fromLink:!0,observable:p()}}case"cache-only":return{fromLink:!1,observable:(0,iS.concat)(d(h(),b.ready))};case"network-only":case"no-cache":return{fromLink:!0,observable:p()};case"standby":return{fromLink:!1,observable:E.EMPTY}}}}function ne(){let e=!1;return(0,tO.tap)({next(){e=!0},complete(){q(e,98)}})}function nt(e){if(e.extensions?.[rs]==null)return e;let{extensions:{[rs]:t,...r},...i}=e;return Object.keys(r).length>0&&(i.extensions=r),i}class nr{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){const{cache:t,documentTransform:r,ssrMode:i=!1,ssrForceFetchDelay:n=0,queryDeduplication:s=!0,defaultOptions:a,defaultContext:o,assumeImmutableResults:l=t.assumeImmutableResults,localState:c,devtools:u,dataMasking:h,link:d,incrementalHandler:p=new ig,experiments:f=[]}=e;this.link=d,this.cache=t,this.queryDeduplication=s,this.defaultOptions=a||{},this.devtoolsConfig={...u,enabled:u?.enabled??!1},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=A,this.queryManager=new i7({client:this,defaultOptions:this.defaultOptions,defaultContext:o,documentTransform:r,queryDeduplication:s,ssrMode:i,dataMasking:!!h,clientOptions:e,incrementalHandler:p,assumeImmutableResults:l,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:c}),this.prioritizeCacheValues=i||n>0,n&&setTimeout(()=>{this.prioritizeCacheValues=!1},n),this.devtoolsConfig.enabled&&this.connectToDevTools(),f.forEach(t=>t.call(this,e))}connectToDevTools(){if("u"<typeof window)return;let e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop()}watchQuery(e){return this.defaultOptions.watchQuery&&(e=iv(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=iv(this.defaultOptions.query,e)),this.queryManager.query(e)}mutate(e){let t=iv(tK({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return eh(t.mutation,f.MUTATION),this.queryManager.mutate(t)}subscribe(e){let t={},r=this.queryManager.startGraphQLSubscription(e);return Object.assign(r.pipe((0,tg.map)(r=>({...r,data:this.queryManager.maskOperation({document:e.query,data:r.data,fetchPolicy:e.fetchPolicy,cause:t})}))),{restart:r.restart})}readQuery(e,t=!1){return this.cache.readQuery({...e,query:this.transform(e.query)},t)}watchFragment(e){let t=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,t)})}readFragment(e,t=!1){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},t)}writeQuery(e){let t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}writeFragment(e){let t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return ib(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(t=>t!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(t=>t!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){let t=this.queryManager.refetchQueries(e),r=[],i=[];t.forEach((e,t)=>{r.push(t),i.push(e)});let n=Promise.all(i);return n.queries=r,n.results=i,n.catch(e=>{}),n}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new e5(iE);transform(e,t=!1){let r=this.queryManager.transform(e);return t?this.maskedFragmentTransform.transformDocument(r):r}}var ni=e.i(271645);function nn(e){let t=Promise.resolve(e);return t.status="fulfilled",t.value=e,t}let ns=Symbol.for("apollo.internal.queryRef"),na=Symbol.for("apollo.internal.refPromise"),no=["context","errorPolicy","fetchPolicy","refetchWritePolicy","returnPartialData"];class nl{result;key={};observable;promise;queue;subscription;listeners=new Set;autoDisposeTimeoutId;resolve;reject;references=0;softReferences=0;constructor(e,t){this.handleNext=this.handleNext.bind(this),this.dispose=this.dispose.bind(this),this.observable=e,t.onDispose&&(this.onDispose=t.onDispose),this.setResult(),this.subscribeToQuery();const r=()=>{this.references||(this.autoDisposeTimeoutId=setTimeout(this.dispose,t.autoDisposeTimeoutMs??3e4))};this.promise.then(r,r)}get disposed(){return this.subscription.closed}get watchQueryOptions(){return this.observable.options}reinitialize(){let{observable:e}=this,t=this.watchQueryOptions.fetchPolicy,r="no-cache"===t||"standby"===t;try{r?e.applyOptions({fetchPolicy:"standby"}):(e.reset(),e.applyOptions({fetchPolicy:"cache-first"})),r||this.setResult(),this.subscribeToQuery()}finally{e.applyOptions({fetchPolicy:t})}}retain(){this.references++,clearTimeout(this.autoDisposeTimeoutId);let e=!1;return()=>{e||(e=!0,this.references--,setTimeout(()=>{this.references||this.dispose()}))}}softRetain(){this.softReferences++;let e=!1;return()=>{e||(e=!0,this.softReferences--,setTimeout(()=>{this.softReferences||this.references||this.dispose()}))}}didChangeOptions(e){return no.some(t=>t in e&&!eb(this.watchQueryOptions[t],e[t]))}applyOptions(e){let{fetchPolicy:t}=this.watchQueryOptions;return"standby"===t&&t!==e.fetchPolicy?this.initiateFetch(this.observable.reobserve(e)):this.observable.applyOptions(e),this.promise}listen(e){return this.listeners.add(e),this.queue&&(this.deliver(this.queue),this.queue=void 0),()=>{this.listeners.delete(e)}}refetch(e){return this.initiateFetch(this.observable.refetch(e))}fetchMore(e){return this.initiateFetch(this.observable.fetchMore(e))}dispose(){this.subscription.unsubscribe()}onDispose(){}handleNext(e){if("pending"===this.promise.status)void 0===e.data&&(e.data=this.result.data,e.data&&(e.dataState="complete")),this.shouldReject(e)?this.reject?.(e.error):(this.result=e,this.resolve?.(e));else{if(e.data===this.result.data&&e.networkStatus===this.result.networkStatus)return;if(void 0===e.data&&(e.data=this.result.data),this.shouldReject(e)){var t;let r;this.promise=((r=Promise.reject(t=e.error)).catch(()=>{}),r.status="rejected",r.reason=t,r),this.deliver(this.promise)}else this.result=e,this.promise=nn(e),this.deliver(this.promise)}}deliver(e){0===this.listeners.size&&(this.queue=e),this.listeners.forEac
22h(t=>t(e))}initiateFetch(e){return this.promise=this.createPendingPromise(),this.promise.catch(()=>{}),e.then(()=>{setTimeout(()=>{"pending"===this.promise.status&&(this.result=this.observable.getCurrentResult(),this.resolve?.(this.result))})}).catch(e=>this.reject?.(e)),e}subscribeToQuery(){this.subscription=this.observable.pipe((0,iw.filter)(e=>!eb(e,this.result))).subscribe(this.handleNext),this.subscription.add(this.onDispose)}setResult(){let e=this.observable.getCurrentResult();eb(e,this.result)||(this.result=e,this.promise=e.data?nn(e):this.createPendingPromise())}shouldReject(e){let{errorPolicy:t="none"}=this.watchQueryOptions;return e.error&&"none"===t}createPendingPromise(){var e=new Promise((e,t)=>{this.resolve=e,this.reject=t});return"status"in e||(e.status="pending",e.then(t=>{"pending"===e.status&&(e.status="fulfilled",e.value=t)},t=>{"pending"===e.status&&(e.status="rejected",e.reason=t)})),e}}let nc=Symbol.for("__APOLLO_CONTEXT__");function nu(){q("createContext"in ni,37);let e=ni.createContext[nc];return e||(Object.defineProperty(ni.createContext,nc,{value:e=ni.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}let nh=({client:e,children:t})=>{let r=nu(),i=ni.useContext(r),n=ni.useMemo(()=>({...i,client:e||i.client}),[i,e]);return q(n.client,38),ni.createElement(r.Provider,{value:n},t)};TransformStream;var nd=class extends TransformStream{constructor(){super({transform(e,t){"string"!=typeof e&&(e=new TextDecoder().decode(e)),t.enqueue(JSON.parse(e))}})}},np={pkg:"@apollo/client-react-streaming"},nf=Symbol.for("apollo.source_package"),nm=class extends rG{static info=np;[nf];constructor(e){super(e);const t=this.constructor.info;this[nf]=`${t.pkg}:InMemoryCache`}},ny=(0,ni.createContext)(null),ng={},nb=Symbol.for("apollo.tee.readableStreamController"),nv=Symbol.for("apollo.read.readableStream");function nE(e,t){return Object.assign(t,{[nv]:e})}var nk=class extends ep{constructor(){super((e,t)=>{let r=e.getContext()[nb];if(r){let i=r(),n=()=>{try{i.close()}catch{}};return new tb.Observable(r=>{let s=!0;return t(e).subscribe({next(e){i.enqueue({type:"next",value:e}),s&&r.next(e)},error(e){i.enqueue({type:"error"}),n(),s&&r.error(e)},complete(){i.enqueue({type:"completed"}),n(),s&&r.complete()}}),()=>{s=!1}})}return t(e)})}},nO=class extends ep{constructor(){super((e,t)=>{let r=e.getContext()[nv];return r?new tb.Observable(i=>{let n=!1,s=(()=>{try{return r.getReader()}catch{}})();if(!s){let r=t(e).subscribe(i);return()=>r.unsubscribe()}let a=!1;l(s).finally(()=>{i.closed||a||i.complete()});let o=()=>{n=!0,s.cancel()};return()=>o();async function l(r){let s;for(;!n&&!s?.done&&(s=await r.read(),!n);)if(s.value)switch(s.value.type){case"next":i.next(s.value.value);break;case"completed":i.complete();break;case"error":{o(),a=!0;let r=t(e).subscribe(i);o=()=>r.unsubscribe()}}}}):t(e)})}};function nS(e){return{...e,query:im(td(im(e.query)))}}function nw(e){let t,r,i=(t=ni.useContext(nu()),q(!!(r=t.client),28),r),n=!!(e&&e.$__apollo_queryRef);n&&function(e,t){var r,i,n,s;let a,o,l;if(e[ns])return;let{$__apollo_queryRef:{options:c,stream:u}}=e,h=nS(c);Object.assign(e,{[ns]:(i=t,n=h,s={...h,fetchPolicy:"network-only",context:nR(nE(u.pipeThrough(new nd),{...h.context,queryDeduplication:!0}))},o={context:{},...(a=i.watchQuery(n)).options},a.applyOptions(s),l=new nl(a,{autoDisposeTimeoutMs:i.defaultOptions.react?.suspense?.autoDisposeTimeoutMs}),a.applyOptions({...o,fetchPolicy:a.options.fetchPolicy===s.fetchPolicy?o.fetchPolicy:a.options.fetchPolicy}),r=l),[na]:r.promise})}(e,i);let s=e[ns];return(0,ni.useEffect)(()=>{if(n)return s.softRetain()},[n,s]),e}var nT={useFragment:e=>nx(e,["data","complete","missing","dataState"]),useQuery:e=>nx(e,["data","loading","networkStatus","dataState"]),useSuspenseQuery:e=>nx(e,["data","networkStatus","dataState"]),useReadQuery:e=>nx(t=>e(nw(t)),["data","networkStatus","dataState"]),useQueryRefHandlers:e=>nx(t=>e(nw(t)),[]),useSuspenseFragment:e=>nx(e,["data"])};function nx(e,t){return(...r)=>{let i=e(...r);if(0==t.length)return i;let n=function(e){let t=(0,ni.useContext)(ny);if(!t)throw Error("useTransportValue must be used within a streaming-specific ApolloProvider");let r=t.useStaticValueRef(e),i=(0,ni.useSyncExternalStore)(()=>()=>{},()=>0,()=>r.current===ng?0:+!eb(e,r.current));return 0===i&&(r.current=ng),1===i?r.current:e}((0,ni.useMemo)(()=>{let e={};for(let r of t)e[r]=i[r];return e},[i]));return(0,ni.useMemo)(()=>({...i,...n}),[i,n])}}function nN(e,t,r){if(e[nf]!==`${t.pkg}:${r}`)throw Error(`When using \`${r}\` in streaming SSR, you must use the \`${r}\` export provided by \`"${t.pkg}"\`.`)}function nI(e){return e.queryManager}var nC=Symbol.for("apollo.hook.wrappers"),n_=class extends nr{static info=np;[nf];constructor(e){const t=[];"ssrMode"in e&&(delete e.ssrMode,t.push("The `ssrMode` option is not supported in %s. Please remove it from your %s constructor options.")),"ssrForceFetchDelay"in e&&(delete e.ssrForceFetchDelay,t.push("The `ssrForceFetchDelay` option is not supported in %s. Please remove it from your %s constructor options.")),super(e);const r=this.constructor.info;for(const e of(this[nf]=`${r.pkg}:ApolloClient`,t))console.warn(e,r.pkg,"ApolloClient");nN(this.cache,r,"InMemoryCache"),this.setLink(this.link)}setLink(e){super.setLink.call(this,ep.from([new nO,new nk,e]))}},nD=class extends n_{constructor(e){super(e),this.onQueryStarted=this.onQueryStarted.bind(this),nI(this)[nC]=nT}simulatedStreamingQueries=new Map;onQueryStarted({options:e,id:t}){let r,i,n=nS(e),[s,a]=(i=new ReadableStream({start(e){r=e}}),[r,i]),o=nI(this);o.fetchQuery({...n,query:o.transform(n.query),fetchPolicy:"network-only",context:nR(nE(a,{...n.context,queryDeduplication:!0}
22))}),this.simulatedStreamingQueries.set(t,{controller:s,options:n})}onQueryProgress=e=>{let t=this.simulatedStreamingQueries.get(e.id);if(!t)return;let r=nI(this).incrementalHandler;"error"===e.type||"next"===e.type&&(r.isIncrementalResult(e.value)?r.extractErrors(e.value):e.value.errors)?(this.simulatedStreamingQueries.delete(e.id),q.debug("Query failed on server, rerunning in browser:",t.options),this.rerunSimulatedQuery(t)):"completed"===e.type?(this.simulatedStreamingQueries.delete(e.id),t.controller.enqueue(e)):"next"===e.type&&t.controller.enqueue(e)};rerunSimulatedQueries=()=>{for(let[e,t]of this.simulatedStreamingQueries)this.simulatedStreamingQueries.delete(e),q.debug("streaming connection closed before server query could be fully transported, rerunning:",t.options),this.rerunSimulatedQuery(t)};rerunSimulatedQuery=e=>{var t;let r=nI(this);r.fetchQuery({...e.options,fetchPolicy:"no-cache",query:r.transform(e.options.query),context:nR((t=()=>e.controller,Object.assign({...e.options.context,queryDeduplication:!1},{[nb]:t})))})}},nA=Symbol.for("apollo.dataTransport.skip");function nR(e){return Object.assign(e,{[nA]:!0})}var nF=class extends nD{},nM=class extends nF{},nP=Symbol.for("ApolloClientSingleton"),nj=Symbol.for("ApolloSSRDataTransport"),nL=Symbol.for("apollo.hookRehydrationCache");function nq(e){return e}var nV={},nQ=e.i(618566),nB={pkg:"@apollo/client-integration-nextjs",client:"ApolloClient",cache:"InMemoryCache"},nU=class extends nM{static info=nB},nz=class extends nm{static info=nB},nW=(d=(({reviveFromStream:e=nq})=>function({children:t,onQueryEvent:r,rerunSimulatedQueries:i}){let n=(0,ni.useRef)(window[nL]??={});!function({onQueryEvent:e,onRehydrate:t,revive:r}){var i;let n;i=i=>{let n=r(i);for(let r of(q.debug("received data from the server:",n),t(n.rehydrate),n.events))e(r)},Array.isArray(n=window[nj]||[])&&(window[nj]={push:(...e)=>{for(let t of e)i(t)}},window[nj].push(...n))}({onQueryEvent:r,onRehydrate(e){Object.assign(n.current,e)},revive:e}),(0,ni.useEffect)(()=>{if("complete"!==document.readyState)return window.addEventListener("load",i,{once:!0}),()=>window.removeEventListener("load",i);i()},[i]);let s=(0,ni.useCallback)(function(e){let t=(0,ni.useId)(),r=n.current,i=(0,ni.useRef)(nV);return i.current===nV&&(r&&t in r?(i.current=r[t],delete r[t]):i.current=e),i},[]);return ni.default.createElement(ny.Provider,{value:(0,ni.useMemo)(()=>({useStaticValueRef:s}),[s])},t)})({useInsertHtml(){let e=(0,ni.useContext)(nQ.ServerInsertedHTMLContext);return e||(()=>{})}}),(n=({makeClient:e,children:t,...r})=>{let i=(0,ni.useRef)(void 0);return i.current||(i.current=window[nP]??=e(),nN(i.current,n.info,"ApolloClient")),ni.default.createElement(nh,{client:i.current},ni.default.createElement(d,{onQueryEvent:e=>"started"===e.type?i.current.onQueryStarted(e):i.current.onQueryProgress(e),rerunSimulatedQueries:i.current.rerunSimulatedQueries,registerDispatchRequestStarted:i.current.watchQueryQueue?.register,...r},t))}).info=np,n);nW.info=nB;class n$ extends ep{constructor(e={}){super((t,r)=>{let i=t.client,n=i.queryManager.clientOptions,s=t.getContext();{let{name:r,version:i,transport:a="headers"}=tK({},n.clientAwareness,e.clientAwareness,s.clientAwareness);"headers"===a&&t.setContext(({headers:e})=>({headers:tK({"apollographql-client-name":r,"apollographql-client-version":i},e)}))}{let{transport:r="extensions"}=tK({},n.enhancedClientAwareness,e.enhancedClientAwareness);"extensions"===r&&(t.extensions=tK({clientLibrary:{name:"@apollo/client",version:i.version}},t.extensions)),"headers"===r&&t.setContext(({headers:e})=>({headers:tK({"apollographql-library-name":"@apollo/client","apollographql-library-version":i.version},e)}))}return r(t)})}}function nK(e,t){return ed(e)?.operation===t}class nG extends Error{static is(e){return iR(e,"ServerError")}response;statusCode;bodyText;constructor(e,t){super(e),this.name="ServerError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,iF(this),Object.setPrototypeOf(this,nG.prototype)}}class nY extends Error{static is(e){return iR(e,"ServerParseError")}response;statusCode;bodyText;constructor(e,t){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),this.name="ServerParseError",this.response=t.response,this.statusCode=t.response.status,this.bodyText=t.bodyText,iF(this),Ob
22ject.setPrototypeOf(this,nY.prototype)}}let{hasOwnProperty:nJ}=Object.prototype;async function*nH(e){let t,r=new TextDecoder("utf-8"),i=e.headers?.get("content-type"),n=i?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),s="\r\n--"+(n?n[1]??n[2]??n[3]??"-":"-"),a="";q(e.body&&"function"==typeof e.body.getReader,62);let o=e.body.getReader(),l=!1,c=!1,u=()=>c&&"-"==a[0]&&"-"==a[1];try{for(;!l;){({value:t,done:l}=await o.read());let e="string"==typeof t?t:r.decode(t),i=a.length-s.length+1,n=(a+=e).indexOf(s,i);for(;n>-1&&!u();){let e;c=!0,[e,a]=[a.slice(0,n),a.slice(n+s.length)];let t=e.indexOf("\r\n\r\n"),r=function(e){let t={};return e.split("\n").forEach(e=>{let r=e.indexOf(":");if(r>-1){let i=e.slice(0,r).trim().toLowerCase(),n=e.slice(r+1).trim();t[i]=n}}),t}(e.slice(0,t))["content-type"];if(r&&-1===r.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");let i=e.slice(t);i&&(yield i),n=a.indexOf(s)}if(u())return}throw Error("premature end of multipart body")}finally{o.cancel()}}async function nX(e,t){for await(let r of nH(e)){let i=nZ(e,r);if(0!=Object.keys(i).length)if(tQ(i)&&"payload"in i){if(1===Object.keys(i).length&&null===i.payload)return;let e={...i.payload};
22"errors"in i&&(e.extensions={...e.extensions,[iV]:new iL(i.errors??[])}),t(e)}else t(i)}}function nZ(e,t){if(e.status>=300)throw new nG(`Response not successful: Received status code ${e.status}`,{response:e,bodyText:t});try{return JSON.parse(t)}catch(r){throw new nY(r,{response:e,bodyText:t})}}let n0={http:{includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},headers:{accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},options:{method:"POST"}},n1=(e,t)=>t(e),n2=_(()=>fetch);function n3(){}class n4 extends ep{constructor(e={}){let{uri:t="/graphql",fetch:r,print:i=n1,includeExtensions:n,preserveHeaderCase:s,useGETForQueries:a,includeUnusedVariables:o=!1,...l}=e;const c={http:tK({includeExtensions:n,preserveHeaderCase:s}),options:l.fetchOptions,credentials:l.credentials,headers:l.headers};super(e=>{var n,s;let l,u,h,d=(l=e.getContext().uri)||("function"==typeof t?t(e):t||"/graphql"),p=e.getContext(),f={...p.http};nK(e.query,"subscription")&&(f.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...f.accept||[]]);let{options:m,body:y}=function(e,t,...r){let i={},n={};r.forEach(e=>{i={...i,...e.options,headers:{...i.headers,...e.headers}},e.credentials&&(i.credentials=e.credentials),i.headers.accept=(e.http?.accept||[]).concat(i.headers.accept).join(","),n={...n,...e.http}}),i.headers=function(e,t){if(!t){let t={};
22return Object.keys(Object(e)).forEach(r=>{t[r.toLowerCase()]=e[r]}),t}let r={};Object.keys(Object(e)).forEach(t=>{r[t.toLowerCase()]={originalName:t,value:e[t]}});let i={};return Object.keys(r).forEach(e=>{i[r[e].originalName]=r[e].value}),i}(i.headers,n.preserveHeaderCase);let{operationName:s,extensions:a,variables:o,query:l}=e,c={operationName:s,variables:o};return n.includeExtensions&&Object.keys(a||{}).length&&(c.extensions=a),n.includeQuery&&(c.query=t(l,td)),{options:i,body:c}}(e,i,n0,c,{http:f,options:p.fetchOptions,credentials:p.credentials,headers:p.headers});y.variables&&!o&&(n=y.variables,s=e.query,u={...n},h=new Set(Object.keys(n)),C(s,{Variable(e,t,r){r&&"VariableDefinition"!==r.kind&&h.delete(e.name.value)}}),h.forEach(e=>{delete u[e]}),y.variables=u);let g=new AbortController,b=()=>{g=void 0};if(m.signal){let e=m.signal,t=()=>{g?.abort(e.reason)};e.addEventListener("abort",t,{once:!0}),b=()=>{g?.signal.removeEventListener("abort",b),g=void 0,e.removeEventListener("abort",t),b=n3},g.signal.addEventListener("abort",b,{once:!0})}return m.signal=g.signal,a&&!nK(e.query,"mutation")&&(m.method="GET"),new tb.Observable(t=>{if("GET"===m.method){let{newURI:e,parseError:t}=function(e,t){let r=[],i=(e,t)=>{r.push(`${e}=${encodeURIComponent(t)}`)};if("query"in t&&i("query",t.query),t.operationName&&i("operationName",t.operationName),t.variables){let e;try{e=JSON.stringify(t.variables)}catch(e){return{parseError:e}}i("variables",e)}if(t.extensions){let e;try{e=JSON.stringify(t.extensions)}catch(e){return{parseError:e}}i("extensions",e)}let n="",s=e,a=e.indexOf("#");-1!==a&&(n=e.substr(a),s=e.substr(0,a));let o=-1===s.indexOf("?")?"?":"&";return{newURI:s+o+r.join("&")+n}}(d,y);if(t)throw t;d=e}else m.body=JSON.stringify(y);let i=r||_(()=>fetch)||n2,n=t.next.bind(t);return i(d,m).then(t=>{e.setContext({response:t});let r=t.headers?.get("content-type");return null!==r&&/^multipart\/mixed/i.test(r)?nX(t,n):(t=>t.text().then(r=>{let i=function(e,t){let r=e.headers.get("content-type");if(r?.includes("application/graphql-response+json"))try{return JSON.parse(t)}catch(r){throw new nY(r,{response:e,bodyText:t})}return nZ(e,t)}(t,r);if(!Array.isArray(i)&&!nJ.call(i,"data")&&!nJ.call(i,"errors"))throw new nG(`Server response was malformed for query '${Array.isArray(e)?e.map(e=>e.operationName):e.operationName}'.`,{response:t,bodyText:r});return i}))(t).then(n)}).then(()=>{b(),t.complete()}).catch(e=>{b(),t.error(e)}),()=>{g&&g.abort()}})})}}class n8 extends ep{constructor(e={}){const{left:t,right:r,request:i}=ep.from([new n$(e),new n4(e)]);super(i),Object.assign(this,{left:t,right:r})}}e.s(["ApolloWrapper",0,function({children:e,url:t}){return(0,v.jsx)(nW,{makeClient:()=>(function({url:e}){let t=new n8({uri:({operationName:t})=>`${e}${t}`});return new nU({cache:new nz,link:t})})({url:t}),children:e})}],711028)},148889,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(618566),n=e.i(997053);e.s(["default",0,function({children:e}){let[s]=(0,r.useState)(()=>new n.ServerStyleSheet);return(0,i.useServerInsertedHTML)(()=>{let e=s.getStyleElement();return s.instance.clearTag(),(0,t.jsx)(t.Fragment,{children:e})}),(0,t.jsx)(t.Fragment,{children:e})}])},794552,e=>{"use strict";var t=e.i(271645);let r="https://at.fjordline.com/jsTag?ap=2045913271";e.s(["AdtractionScript",0,function(){return(0,t.useEffect)(()=>{if(document.querySelector(`script[src="${r}"]`))return;let e=document.createElement("script");e.type="text/plain",e.setAttribute("data-cookieconsent","marketing"),e.defer=!0,e.src=r,document.head.appendChild(e)},[]),null}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.