@noxickon/onyx 0.0.4-dev.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +0,0 @@
1
- "use strict";const _t=require("./_commonjsHelpers-DwGv2jUC.js"),wt=require("react");function Ot(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var X=function(e,t){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},X(e,t)};function ce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");X(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}exports.__assign=function(){return exports.__assign=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},exports.__assign.apply(this,arguments)};function V(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function I(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var $="Invariant Violation",_e=Object.setPrototypeOf,St=_e===void 0?function(e,t){return e.__proto__=t,e}:_e,$e=function(e){ce(t,e);function t(r){r===void 0&&(r=$);var n=e.call(this,typeof r=="number"?$+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=$,St(n,t.prototype),n}return t}(Error);function P(e,t){if(!e)throw new $e(t)}var He=["debug","log","warn","error","silent"],Et=He.indexOf("log");function Q(e){return function(){if(He.indexOf(e)>=Et){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=Q("debug"),e.log=Q("log"),e.warn=Q("warn"),e.error=Q("error")})(P||(P={}));var Be="3.13.8";function E(e){try{return e()}catch{}}const Z=E(function(){return globalThis})||E(function(){return window})||E(function(){return self})||E(function(){return global})||E(function(){return E.constructor("return this")()});var we=new Map;function Pt(e){var t=we.get(e)||1;return we.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function kt(e,t){var r=Pt("stringifyForDisplay");return JSON.stringify(e,function(n,i){return i===void 0?r:i},t).split(JSON.stringify(r)).join("<undefined>")}function C(e){return function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(typeof t=="number"){var i=t;t=fe(i),t||(t=le(i,r),r=[])}e.apply(void 0,[t].concat(r))}}var g=Object.assign(function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t||P(t,fe(r,n)||le(r,n))},{debug:C(P.debug),log:C(P.log),warn:C(P.warn),error:C(P.error)});function Ge(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new $e(fe(e,t)||le(e,t))}var Oe=Symbol.for("ApolloErrorMessageHandler_"+Be);function Je(e){if(typeof e=="string")return e;try{return kt(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function fe(e,t){if(t===void 0&&(t=[]),!!e)return Z[Oe]&&Z[Oe](e,t.map(Je))}function le(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:Be,message:e,args:t.map(Je)})))}function qt(e,t){var r=e.directives;return!r||!r.length?!0:Tt(r).every(function(n){var i=n.directive,o=n.ifArgument,a=!1;return o.value.kind==="Variable"?(a=t&&t[o.value.name.value],g(a!==void 0,78,i.name.value)):a=o.value.value,i.name.value==="skip"?!a:a})}function Dt(e){var t=e.name.value;return t==="skip"||t==="include"}function Tt(e){var t=[];return e&&e.length&&e.forEach(function(r){if(Dt(r)){var n=r.arguments,i=r.name.value;g(n&&n.length===1,79,i);var o=n[0];g(o.name&&o.name.value==="if",80,i);var a=o.value;g(a&&(a.kind==="Variable"||a.kind==="BooleanValue"),81,i),t.push({directive:r,ifArgument:o})}}),t}var It=E(function(){return navigator.product})=="ReactNative",Ke=typeof Symbol=="function"&&typeof Symbol.for=="function",Ye=typeof E(function(){return window.document.createElement})=="function",Ft=E(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,jt=(Ye||It)&&!Ft;function ee(e){return e!==null&&typeof e=="object"}function Mt(e){e===void 0&&(e=[]);var t={};return e.forEach(function(r){t[r.name.value]=r}),t}function xt(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":{var r=e.name.value;if(typeof t=="function")return t(r);var n=t&&t[r];return g(n,87,r),n||null}default:return null}}function Rt(){}class Se{constructor(t=1/0,r=Rt){this.max=t,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}get size(){return this.map.size}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(t,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(t){const r=this.map.get(t);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(t),this.dispose(r.value,t),!0):!1}}function te(){}const Qt=te,Ct=typeof WeakRef<"u"?WeakRef:function(e){return{deref:()=>e}},At=typeof WeakMap<"u"?WeakMap:Map,Nt=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:te,unregister:te}},zt=10024;class Ee{constructor(t=1/0,r=Qt){this.max=t,this.dispose=r,this.map=new At,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<zt;i++){const o=n.next().value;if(!o)break;this.unfinalizedNodes.delete(o);const a=o.key;delete o.key,o.keyRef=new Ct(a),this.registry.register(a,o,o)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Nt(this.deleteNode.bind(this))}has(t){return this.map.has(t)}get(t){const r=this.getNode(t);return r&&r.value}getNode(t){const r=this.map.get(t);if(r&&r!==this.newest){const{older:n,newer:i}=r;i&&(i.older=n),n&&(n.newer=i),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=i)}return r}set(t,r){let n=this.getNode(t);return n?n.value=r:(n={key:t,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(t,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(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.size--;const r=t.key||t.keyRef&&t.keyRef.deref();this.dispose(t.value,r),t.keyRef?this.registry.unregister(t):this.unfinalizedNodes.delete(t),r&&this.map.delete(r)}delete(t){const r=this.map.get(t);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(t){this.unfinalizedNodes.add(t),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var H=new WeakSet;function Xe(e){e.size<=(e.max||-1)||H.has(e)||(H.add(e),setTimeout(function(){e.clean(),H.delete(e)},100))}var Lt=function(e,t){var r=new Ee(e,t);return r.set=function(n,i){var o=Ee.prototype.set.call(this,n,i);return Xe(this),o},r},Vt=function(e,t){var r=new Se(e,t);return r.set=function(n,i){var o=Se.prototype.set.call(this,n,i);return Xe(this),o},r},Ut=Symbol.for("apollo.cacheSize"),Ze=exports.__assign({},Z[Ut]),Wt={};function et(e,t){Wt[e]=t}var tt=Object.assign(function(t){return JSON.stringify(t,$t)},{reset:function(){T=new Vt(Ze.canonicalStringify||1e3)}});globalThis.__DEV__!==!1&&et("canonicalStringify",function(){return T.size});var T;tt.reset();function $t(e,t){if(t&&typeof t=="object"){var r=Object.getPrototypeOf(t);if(r===Object.prototype||r===null){var n=Object.keys(t);if(n.every(Ht))return t;var i=JSON.stringify(n),o=T.get(i);if(!o){n.sort();var a=JSON.stringify(n);o=T.get(a)||n,T.set(i,o),T.set(a,o)}var s=Object.create(r);return o.forEach(function(u){s[u]=t[u]}),s}}return t}function Ht(e,t,r){return t===0||r[t-1]<=e}var Bt=["connection","include","skip","client","rest","export","nonreactive"],M=tt;Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key)if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(s){i[s]=t[s]}),"".concat(r.connection.key,"(").concat(M(i),")")}else return r.connection.key;var o=e;if(t){var a=M(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach(function(s){Bt.indexOf(s)===-1&&(r[s]&&Object.keys(r[s]).length?o+="@".concat(s,"(").concat(M(r[s]),")"):o+="@".concat(s))}),o},{setStringify:function(e){var t=M;return M=e,t}});function Gt(e){return e.alias?e.alias.value:e.name.value}function Jt(e){return e.kind==="Field"}function rt(e){g(e&&e.kind==="Document",88);var t=e.definitions.filter(function(r){return r.kind!=="FragmentDefinition"}).map(function(r){if(r.kind!=="OperationDefinition")throw Ge(89,r.kind);return r});return g(t.length<=1,90,t.length),e}function nt(e){return rt(e),e.definitions.filter(function(t){return t.kind==="OperationDefinition"})[0]}function Kt(e){return e.definitions.filter(function(t){return t.kind==="FragmentDefinition"})}function Yt(e){var t=nt(e);return g(t&&t.operation==="query",91),t}function Xt(e){rt(e);for(var t,r=0,n=e.definitions;r<n.length;r++){var i=n[r];if(i.kind==="OperationDefinition"){var o=i.operation;if(o==="query"||o==="mutation"||o==="subscription")return i}i.kind==="FragmentDefinition"&&!t&&(t=i)}if(t)return t;throw Ge(95)}let m=null;const Pe={};let Zt=1;const er=()=>class{constructor(){this.id=["slot",Zt++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=m;t;t=t.parent)if(this.id in t.slots){const r=t.slots[this.id];if(r===Pe)break;return t!==m&&(m.slots[this.id]=r),!0}return m&&(m.slots[this.id]=Pe),!1}getValue(){if(this.hasValue())return m.slots[this.id]}withValue(t,r,n,i){const o={__proto__:null,[this.id]:t},a=m;m={parent:a,slots:o};try{return r.apply(i,n)}finally{m=a}}static bind(t){const r=m;return function(){const n=m;try{return m=r,t.apply(this,arguments)}finally{m=n}}}static noContext(t,r,n){if(m){const i=m;try{return m=null,t.apply(n,r)}finally{m=i}}else return t.apply(n,r)}};function ke(e){try{return e()}catch{}}const B="@wry/context:Slot",tr=ke(()=>globalThis)||ke(()=>global)||Object.create(null),qe=tr,he=qe[B]||Array[B]||function(e){try{Object.defineProperty(qe,B,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(er()),{bind:Br,noContext:Gr}=he;new he;function it(e){return Array.isArray(e)&&e.length>0}function rr(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=nr(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nr(e,t){if(e){if(typeof e=="string")return De(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return De(e,t)}}function De(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Te(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pe(e,t,r){return t&&Te(e.prototype,t),r&&Te(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var ye=function(){return typeof Symbol=="function"},ve=function(e){return ye()&&!!Symbol[e]},de=function(e){return ve(e)?Symbol[e]:"@@"+e};ye()&&!ve("observable")&&(Symbol.observable=Symbol("observable"));var ir=de("iterator"),re=de("observable"),ot=de("species");function U(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function x(e){var t=e.constructor;return t!==void 0&&(t=t[ot],t===null&&(t=void 0)),t!==void 0?t:j}function or(e){return e instanceof j}function F(e){F.log?F.log(e):setTimeout(function(){throw e})}function N(e){Promise.resolve().then(function(){try{e()}catch(t){F(t)}})}function at(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=U(t,"unsubscribe");r&&r.call(t)}}catch(n){F(n)}}function ne(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function ar(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(st(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function st(e,t,r){e._state="running";var n=e._observer;try{var i=U(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(ne(e),i)i.call(n,r);else throw r;break;case"complete":ne(e),i&&i.call(n);break}}catch(o){F(o)}e._state==="closed"?at(e):e._state==="running"&&(e._state="ready")}function G(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],N(function(){return ar(e)});return}st(e,t,r)}}var sr=function(){function e(r,n){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var i=new ur(this);try{this._cleanup=n.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(ne(this),at(this))},pe(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e}(),ur=function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(n){G(this._subscription,"next",n)},t.error=function(n){G(this._subscription,"error",n)},t.complete=function(){G(this._subscription,"complete")},pe(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e}(),j=function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new sr(n,this._subscriber)},t.forEach=function(n){var i=this;return new Promise(function(o,a){if(typeof n!="function"){a(new TypeError(n+" is not a function"));return}function s(){u.unsubscribe(),o()}var u=i.subscribe({next:function(c){try{n(c,s)}catch(f){a(f),u.unsubscribe()}},error:a,complete:o})})},t.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=x(this);return new o(function(a){return i.subscribe({next:function(s){try{s=n(s)}catch(u){return a.error(u)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=x(this);return new o(function(a){return i.subscribe({next:function(s){try{if(!n(s))return}catch(u){return a.error(u)}a.next(s)},error:function(s){a.error(s)},complete:function(){a.complete()}})})},t.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=x(this),a=arguments.length>1,s=!1,u=arguments[1],c=u;return new o(function(f){return i.subscribe({next:function(l){var h=!s;if(s=!0,!h||a)try{c=n(c,l)}catch(p){return f.error(p)}else c=l},error:function(l){f.error(l)},complete:function(){if(!s&&!a)return f.error(new TypeError("Cannot reduce an empty sequence"));f.next(c),f.complete()}})})},t.concat=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=x(this);return new s(function(u){var c,f=0;function l(h){c=h.subscribe({next:function(p){u.next(p)},error:function(p){u.error(p)},complete:function(){f===o.length?(c=void 0,u.complete()):l(s.from(o[f++]))}})}return l(n),function(){c&&(c.unsubscribe(),c=void 0)}})},t.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var o=x(this);return new o(function(a){var s=[],u=i.subscribe({next:function(f){if(n)try{f=n(f)}catch(h){return a.error(h)}var l=o.from(f).subscribe({next:function(h){a.next(h)},error:function(h){a.error(h)},complete:function(){var h=s.indexOf(l);h>=0&&s.splice(h,1),c()}});s.push(l)},error:function(f){a.error(f)},complete:function(){c()}});function c(){u.closed&&s.length===0&&a.complete()}return function(){s.forEach(function(f){return f.unsubscribe()}),u.unsubscribe()}})},t[re]=function(){return this},e.from=function(n){var i=typeof this=="function"?this:e;if(n==null)throw new TypeError(n+" is not an object");var o=U(n,re);if(o){var a=o.call(n);if(Object(a)!==a)throw new TypeError(a+" is not an object");return or(a)&&a.constructor===i?a:new i(function(s){return a.subscribe(s)})}if(ve("iterator")&&(o=U(n,ir),o))return new i(function(s){N(function(){if(!s.closed){for(var u=rr(o.call(n)),c;!(c=u()).done;){var f=c.value;if(s.next(f),s.closed)return}s.complete()}})});if(Array.isArray(n))return new i(function(s){N(function(){if(!s.closed){for(var u=0;u<n.length;++u)if(s.next(n[u]),s.closed)return;s.complete()}})});throw new TypeError(n+" is not observable")},e.of=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=typeof this=="function"?this:e;return new a(function(s){N(function(){if(!s.closed){for(var u=0;u<i.length;++u)if(s.next(i[u]),s.closed)return;s.complete()}})})},pe(e,null,[{key:ot,get:function(){return this}}]),e}();ye()&&Object.defineProperty(j,Symbol("extensions"),{value:{symbol:re,hostReportError:F},configurable:!0});function cr(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var D;typeof self<"u"?D=self:typeof window<"u"?D=window:typeof global<"u"?D=global:typeof module<"u"?D=module:D=Function("return this")();cr(D);var Ie=j.prototype,Fe="@@observable";Ie[Fe]||(Ie[Fe]=function(){return this});function fr(e){return e.catch(function(){}),e}var lr=Object.prototype.toString;function hr(e){return ie(e)}function ie(e,t){switch(lr.call(e)){case"[object Array]":{if(t=t||new Map,t.has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach(function(i,o){r[o]=ie(i,t)}),r}case"[object Object]":{if(t=t||new Map,t.has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach(function(i){n[i]=ie(e[i],t)}),n}default:return e}}function pr(e){var t=new Set([e]);return t.forEach(function(r){ee(r)&&yr(r)===r&&Object.getOwnPropertyNames(r).forEach(function(n){ee(r[n])&&t.add(r[n])})}),e}function yr(e){if(globalThis.__DEV__!==!1&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}function ut(e){return globalThis.__DEV__!==!1&&pr(e),e}function je(e,t,r){var n=[];e.forEach(function(i){return i[t]&&n.push(i)}),n.forEach(function(i){return i[t](r)})}function vr(e){function t(r){Object.defineProperty(e,r,{value:j})}return Ke&&Symbol.species&&t(Symbol.species),t("@@species"),e}function R(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(n){n&&Object.keys(n).forEach(function(i){var o=n[i];o!==void 0&&(r[i]=o)})}),r}function ct(e,t){return R(e,t,t.variables&&{variables:R(exports.__assign(exports.__assign({},e&&e.variables),t.variables))})}function dr(e){return e.hasOwnProperty("graphQLErrors")}var gr=function(e){var t=I(I(I([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(r){return ee(r)&&r.message||"Error message not found."}).join(`
3
- `)},W=function(e){ce(t,e);function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,a=r.networkError,s=r.errorMessage,u=r.extraInfo,c=e.call(this,s)||this;return c.name="ApolloError",c.graphQLErrors=n||[],c.protocolErrors=i||[],c.clientErrors=o||[],c.networkError=a||null,c.message=s||gr(c),c.extraInfo=u,c.cause=I(I(I([a],n||[],!0),i||[],!0),o||[],!0).find(function(f){return!!f})||null,c.__proto__=t.prototype,c}return t}(Error);const{toString:Me,hasOwnProperty:br}=Object.prototype,xe=Function.prototype.toString,oe=new Map;function _(e,t){try{return ae(e,t)}finally{oe.clear()}}function ae(e,t){if(e===t)return!0;const r=Me.call(e),n=Me.call(t);if(r!==n)return!1;switch(r){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":{if(Qe(e,t))return!0;const i=Re(e),o=Re(t),a=i.length;if(a!==o.length)return!1;for(let s=0;s<a;++s)if(!br.call(t,i[s]))return!1;for(let s=0;s<a;++s){const u=i[s];if(!ae(e[u],t[u]))return!1}return!0}case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!==e)return t!==t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e==`${t}`;case"[object Map]":case"[object Set]":{if(e.size!==t.size)return!1;if(Qe(e,t))return!0;const i=e.entries(),o=r==="[object Map]";for(;;){const a=i.next();if(a.done)break;const[s,u]=a.value;if(!t.has(s)||o&&!ae(u,t.get(s)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":{let i=e.byteLength;if(i===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=xe.call(e);return i!==xe.call(t)?!1:!wr(i,_r)}}return!1}function Re(e){return Object.keys(e).filter(mr,e)}function mr(e){return this[e]!==void 0}const _r="{ [native code] }";function wr(e,t){const r=e.length-t.length;return r>=0&&e.indexOf(t,r)===r}function Qe(e,t){let r=oe.get(e);if(r){if(r.has(t))return!0}else oe.set(e,r=new Set);return r.add(t),!1}function Or(e,t,r,n){var i=t.data,o=V(t,["data"]),a=r.data,s=V(r,["data"]);return _(o,s)&&z(Xt(e).selectionSet,i,a,{fragmentMap:Mt(Kt(e)),variables:n})}function z(e,t,r,n){if(t===r)return!0;var i=new Set;return e.selections.every(function(o){if(i.has(o)||(i.add(o),!qt(o,n.variables))||Ce(o))return!0;if(Jt(o)){var a=Gt(o),s=t&&t[a],u=r&&r[a],c=o.selectionSet;if(!c)return _(s,u);var f=Array.isArray(s),l=Array.isArray(u);if(f!==l)return!1;if(f&&l){var h=s.length;if(u.length!==h)return!1;for(var p=0;p<h;++p)if(!z(c,s[p],u[p],n))return!1;return!0}return z(c,s,u,n)}else{var y=xt(o,n.fragmentMap);if(y)return Ce(y)?!0:z(y.selectionSet,t,r,n)}})}function Ce(e){return!!e.directives&&e.directives.some(Sr)}function Sr(e){return e.name.value==="nonreactive"}var d;(function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"})(d||(d={}));function A(e){return e?e<7:!1}var Ae=Object.assign,Er=Object.hasOwnProperty,ft=function(e){ce(t,e);function t(r){var n=r.queryManager,i=r.queryInfo,o=r.options,a=this,s=t.inactiveOnCreation.getValue();a=e.call(this,function(v){s&&(n.queries.set(a.queryId,i),s=!1);try{var w=v._subscription._observer;w&&!w.error&&(w.error=Pr)}catch{}var mt=!a.observers.size;a.observers.add(v);var q=a.last;return q&&q.error?v.error&&v.error(q.error):q&&q.result&&v.next&&v.next(a.maskResult(q.result)),mt&&a.reobserve().catch(function(){}),function(){a.observers.delete(v)&&!a.observers.size&&a.tearDownQuery()}})||this,a.observers=new Set,a.subscriptions=new Set,a.dirty=!1,a.queryInfo=i,a.queryManager=n,a.waitForOwnResult=J(o.fetchPolicy),a.isTornDown=!1,a.subscribeToMore=a.subscribeToMore.bind(a),a.maskResult=a.maskResult.bind(a);var u=n.defaultOptions.watchQuery,c=u===void 0?{}:u,f=c.fetchPolicy,l=f===void 0?"cache-first":f,h=o.fetchPolicy,p=h===void 0?l:h,y=o.initialFetchPolicy,S=y===void 0?p==="standby"?l:p:y;a.options=exports.__assign(exports.__assign({},o),{initialFetchPolicy:S,fetchPolicy:p}),a.queryId=i.queryId||n.generateQueryId();var O=nt(a.query);return a.queryName=O&&O.name&&O.name.value,a}return Object.defineProperty(t.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var r=this;return new Promise(function(n,i){var o={next:function(s){n(s),r.observers.delete(o),r.observers.size||r.queryManager.removeQuery(r.queryId),setTimeout(function(){a.unsubscribe()},0)},error:i},a=r.subscribe(o)})},t.prototype.resetDiff=function(){this.queryInfo.resetDiff()},t.prototype.getCurrentFullResult=function(r){r===void 0&&(r=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||d.ready,o=exports.__assign(exports.__assign({},n),{loading:A(i),networkStatus:i}),a=this.options.fetchPolicy,s=a===void 0?"cache-first":a;if(!(J(s)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var u=this.queryInfo.getDiff();(u.complete||this.options.returnPartialData)&&(o.data=u.result),_(o.data,{})&&(o.data=void 0),u.complete?(delete o.partial,u.complete&&o.networkStatus===d.loading&&(s==="cache-first"||s==="cache-only")&&(o.networkStatus=d.ready,o.loading=!1)):o.partial=!0,o.networkStatus===d.ready&&(o.error||o.errors)&&(o.networkStatus=d.error),globalThis.__DEV__!==!1&&!u.complete&&!this.options.partialRefetch&&!o.loading&&!o.data&&!o.error&&kr(u.missing)}return r&&this.updateLastResult(o),o},t.prototype.getCurrentResult=function(r){return r===void 0&&(r=!0),this.maskResult(this.getCurrentFullResult(r))},t.prototype.isDifferentFromLastResult=function(r,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query),o=this.queryManager.dataMasking,a=o?i.nonReactiveQuery:this.query,s=o||i.hasNonreactiveDirective?!Or(a,this.last.result,r,this.variables):!_(this.last.result,r);return s||n&&!_(this.last.variables,n)},t.prototype.getLast=function(r,n){var i=this.last;if(i&&i[r]&&(!n||_(i.variables,this.variables)))return i[r]},t.prototype.getLastResult=function(r){return this.getLast("result",r)},t.prototype.getLastError=function(r){return this.getLast("error",r)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(r){var n,i={pollInterval:0},o=this.options.fetchPolicy;if(o==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&r&&Er.call(r,"variables")){var a=Yt(this.query),s=a.variableDefinitions;(!s||!s.some(function(u){return u.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&g.warn(21,r,((n=a.name)===null||n===void 0?void 0:n.value)||a)}return r&&!_(this.options.variables,r)&&(i.variables=this.options.variables=exports.__assign(exports.__assign({},this.options.variables),r)),this.queryInfo.resetLastWrite(),this.reobserve(i,d.refetch)},t.prototype.fetchMore=function(r){var n=this,i=exports.__assign(exports.__assign({},r.query?r:exports.__assign(exports.__assign(exports.__assign(exports.__assign({},this.options),{query:this.options.query}),r),{variables:exports.__assign(exports.__assign({},this.options.variables),r.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var o=this.queryManager.generateQueryId();this.lastQuery=r.query?this.transformDocument(this.options.query):i.query;var a=this.queryInfo,s=a.networkStatus;a.networkStatus=d.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var u=new Set,c=r?.updateQuery,f=this.options.fetchPolicy!=="no-cache";return f||g(c,22),this.queryManager.fetchQuery(o,i,d.fetchMore).then(function(l){if(n.queryManager.removeQuery(o),a.networkStatus===d.fetchMore&&(a.networkStatus=s),f)n.queryManager.cache.batch({update:function(y){var S=r.updateQuery;S?y.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(O){return S(O,{fetchMoreResult:l.data,variables:i.variables})}):y.writeQuery({query:i.query,variables:i.variables,data:l.data})},onWatchUpdated:function(y){u.add(y.query)}});else{var h=n.getLast("result"),p=c(h.data,{fetchMoreResult:l.data,variables:i.variables});n.reportResult(exports.__assign(exports.__assign({},h),{networkStatus:s,loading:A(s),data:p}),n.variables)}return n.maskResult(l)}).finally(function(){f&&!u.has(n.query)&&n.reobserveCacheFirst()})},t.prototype.subscribeToMore=function(r){var n=this,i=this.queryManager.startGraphQLSubscription({query:r.document,variables:r.variables,context:r.context}).subscribe({next:function(o){var a=r.updateQuery;a&&n.updateQuery(function(s,u){return a(s,exports.__assign({subscriptionData:o},u))})},error:function(o){if(r.onError){r.onError(o);return}globalThis.__DEV__!==!1&&g.error(23,o)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},t.prototype.setOptions=function(r){return this.reobserve(r)},t.prototype.silentSetOptions=function(r){var n=R(this.options,r||{});Ae(this.options,n)},t.prototype.setVariables=function(r){return _(this.variables,r)?this.observers.size?this.result():Promise.resolve():(this.options.variables=r,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:r},d.setVariables):Promise.resolve())},t.prototype.updateQuery=function(r){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),o=i.result,a=i.complete,s=r(o,{variables:this.variables,complete:!!a,previousData:o});s&&(n.cache.writeQuery({query:this.options.query,data:s,variables:this.variables}),n.broadcastQueries())},t.prototype.startPolling=function(r){this.options.pollInterval=r,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(r,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,o=i===void 0?"cache-first":i,a=n.initialFetchPolicy,s=a===void 0?o:a;o==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(o,{reason:r,options:n,observable:this,initialFetchPolicy:s}):r==="variables-changed"?n.fetchPolicy=s:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},t.prototype.fetch=function(r,n,i){var o=this.queryManager.getOrCreateQuery(this.queryId);return o.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(o,r,n,i)},t.prototype.updatePolling=function(){var r=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,o=n.options.pollInterval;if(!o||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===o)){g(o,24);var a=i||(this.pollingInfo={});a.interval=o;var s=function(){var c,f;r.pollingInfo&&(!A(r.queryInfo.networkStatus)&&!(!((f=(c=r.options).skipPollAttempt)===null||f===void 0)&&f.call(c))?r.reobserve({fetchPolicy:r.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},d.poll).then(u,u):u())},u=function(){var c=r.pollingInfo;c&&(clearTimeout(c.timeout),c.timeout=setTimeout(s,c.interval))};u()}}},t.prototype.updateLastResult=function(r,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!_(n,this.last.variables)&&(i=void 0),this.last=exports.__assign({result:this.queryManager.assumeImmutableResults?r:hr(r),variables:n},i?{error:i}:null)},t.prototype.reobserveAsConcast=function(r,n){var i=this;this.isTornDown=!1;var o=n===d.refetch||n===d.fetchMore||n===d.poll,a=this.options.variables,s=this.options.fetchPolicy,u=R(this.options,r||{}),c=o?u:Ae(this.options,u),f=this.transformDocument(c.query);this.lastQuery=f,o||(this.updatePolling(),r&&r.variables&&!_(r.variables,a)&&c.fetchPolicy!=="standby"&&(c.fetchPolicy===s||typeof c.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",c),n===void 0&&(n=d.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=J(c.fetchPolicy));var l=function(){i.concast===y&&(i.waitForOwnResult=!1)},h=c.variables&&exports.__assign({},c.variables),p=this.fetch(c,n,f),y=p.concast,S=p.fromLink,O={next:function(v){_(i.variables,h)&&(l(),i.reportResult(v,h))},error:function(v){_(i.variables,h)&&(dr(v)||(v=new W({networkError:v})),l(),i.reportError(v,h))}};return!o&&(S||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=y,this.observer=O),y.addObserver(O),y},t.prototype.reobserve=function(r,n){return fr(this.reobserveAsConcast(r,n).promise.then(this.maskResult))},t.prototype.resubscribeAfterError=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=this.last;this.resetLastResults();var o=this.subscribe.apply(this,r);return this.last=i,o},t.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},t.prototype.reportResult=function(r,n){var i=this.getLastError(),o=this.isDifferentFromLastResult(r,n);(i||!r.partial||this.options.returnPartialData)&&this.updateLastResult(r,n),(i||o)&&je(this.observers,"next",this.maskResult(r))},t.prototype.reportError=function(r,n){var i=exports.__assign(exports.__assign({},this.getLastResult()),{error:r,errors:r.graphQLErrors,networkStatus:d.error,loading:!1});this.updateLastResult(i,n),je(this.observers,"error",this.last.error=r)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(r){return r.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t.prototype.transformDocument=function(r){return this.queryManager.transform(r)},t.prototype.maskResult=function(r){return r&&"data"in r?exports.__assign(exports.__assign({},r),{data:this.queryManager.maskOperation({document:this.query,data:r.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):r},t.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},t.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},t.prototype.scheduleNotify=function(){var r=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return r.notify()},0)))},t.prototype.notify=function(){if(this.cancelNotifyTimeout(),this.dirty&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!A(this.queryInfo.networkStatus))){var r=this.queryInfo.getDiff();r.fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()}this.dirty=!1},t.prototype.reobserveCacheFirst=function(){var r=this.options,n=r.fetchPolicy,i=r.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(o,a){return this.nextFetchPolicy=i,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(o,a):n}}):this.reobserve()},t.inactiveOnCreation=new he,t}(j);vr(ft);function Pr(e){globalThis.__DEV__!==!1&&g.error(25,e.message,e.stack)}function kr(e){globalThis.__DEV__!==!1&&e&&globalThis.__DEV__!==!1&&g.debug(26,e)}function J(e){return e==="network-only"||e==="no-cache"||e==="standby"}var K={exports:{}},Ne;function qr(){return Ne||(Ne=1,function(e){e.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,e.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,e.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(e.exports,wt)}(K)),K.exports}var b=qr();const Dr=_t.getDefaultExportFromCjs(b),lt=Ot({__proto__:null,default:Dr},[b]);var ze=Ke?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function ht(){g("createContext"in lt,54);var e=b.createContext[ze];return e||(Object.defineProperty(b.createContext,ze,{value:e=b.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}function ge(e){var t=b.useContext(ht()),r=e||t.client;return g(!!r,58),r}var Le=!1,Tr="useSyncExternalStore",Ir=lt[Tr],Fr=Ir||function(e,t,r){var n=t();globalThis.__DEV__!==!1&&!Le&&n!==t()&&(Le=!0,globalThis.__DEV__!==!1&&g.error(68));var i=b.useState({inst:{value:n,getSnapshot:t}}),o=i[0].inst,a=i[1];return jt?b.useLayoutEffect(function(){Object.assign(o,{value:n,getSnapshot:t}),Y(o)&&a({inst:o})},[e,n,t]):Object.assign(o,{value:n,getSnapshot:t}),b.useEffect(function(){return Y(o)&&a({inst:o}),e(function(){Y(o)&&a({inst:o})})},[e]),n};function Y(e){var t=e.value,r=e.getSnapshot;try{return t!==r()}catch{return!0}}exports.DocumentType=void 0;(function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"})(exports.DocumentType||(exports.DocumentType={}));var k;function Ve(e){var t;switch(e){case exports.DocumentType.Query:t="Query";break;case exports.DocumentType.Mutation:t="Mutation";break;case exports.DocumentType.Subscription:t="Subscription";break}return t}function pt(e){k||(k=new Lt(Ze.parser||1e3));var t=k.get(e);if(t)return t;var r,n,i;g(!!e&&!!e.kind,70,e);for(var o=[],a=[],s=[],u=[],c=0,f=e.definitions;c<f.length;c++){var l=f[c];if(l.kind==="FragmentDefinition"){o.push(l);continue}if(l.kind==="OperationDefinition")switch(l.operation){case"query":a.push(l);break;case"mutation":s.push(l);break;case"subscription":u.push(l);break}}g(!o.length||a.length||s.length||u.length,71),g(a.length+s.length+u.length<=1,72,e,a.length,u.length,s.length),n=a.length?exports.DocumentType.Query:exports.DocumentType.Mutation,!a.length&&!s.length&&(n=exports.DocumentType.Subscription);var h=a.length?a:s.length?s:u;g(h.length===1,73,e,h.length);var p=h[0];r=p.variableDefinitions||[],p.name&&p.name.kind==="Name"?i=p.name.value:i="data";var y={name:i,type:n,variables:r};return k.set(e,y),y}pt.resetCache=function(){k=void 0};globalThis.__DEV__!==!1&&et("parser",function(){return k?k.size:0});function yt(e,t){var r=pt(e),n=Ve(t),i=Ve(r.type);g(r.type===t,74,n,n,i)}var jr=Symbol.for("apollo.hook.wrappers");function Mr(e,t,r){var n=r.queryManager,i=n&&n[jr],o=i&&i[e];return o?o(t):t}var xr=Object.prototype.hasOwnProperty;function Ue(){}var L=Symbol();function Rr(e,t){return t===void 0&&(t=Object.create(null)),Mr("useQuery",Qr,ge(t&&t.client))(e,t)}function Qr(e,t){var r=vt(e,t),n=r.result,i=r.obsQueryFields;return b.useMemo(function(){return exports.__assign(exports.__assign({},n),i)},[n,i])}function Cr(e,t,r,n,i){function o(l){var h;yt(t,exports.DocumentType.Query);var p={client:e,query:t,observable:n&&n.getSSRObservable(i())||ft.inactiveOnCreation.withValue(!n,function(){return e.watchQuery(be(void 0,e,r,i()))}),resultData:{previousData:(h=l?.resultData.current)===null||h===void 0?void 0:h.data}};return p}var a=b.useState(o),s=a[0],u=a[1];function c(l){var h,p;Object.assign(s.observable,(h={},h[L]=l,h));var y=s.resultData;u(exports.__assign(exports.__assign({},s),{query:l.query,resultData:Object.assign(y,{previousData:((p=y.current)===null||p===void 0?void 0:p.data)||y.previousData,current:void 0})}))}if(e!==s.client||t!==s.query){var f=o(s);return u(f),[f,c]}return[s,c]}function vt(e,t){var r=ge(t.client),n=b.useContext(ht()).renderPromises,i=!!n,o=r.disableNetworkFetches,a=t.ssr!==!1&&!t.skip,s=t.partialRefetch,u=dt(r,e,t,i),c=Cr(r,e,t,n,u),f=c[0],l=f.observable,h=f.resultData,p=c[1],y=u(l);zr(h,l,r,t,y);var S=b.useMemo(function(){return Wr(l)},[l]);Nr(l,n,a);var O=Ar(h,l,r,t,y,o,s,i,{onCompleted:t.onCompleted||Ue,onError:t.onError||Ue});return{result:O,obsQueryFields:S,observable:l,resultData:h,client:r,onQueryExecuted:p}}function Ar(e,t,r,n,i,o,a,s,u){var c=b.useRef(u);b.useEffect(function(){c.current=u});var f=(s||o)&&n.ssr===!1&&!n.skip?gt:n.skip||i.fetchPolicy==="standby"?bt:void 0,l=e.previousData,h=b.useMemo(function(){return f&&me(f,l,t,r)},[r,t,f,l]);return Fr(b.useCallback(function(p){if(s)return function(){};var y=function(){var v=e.current,w=t.getCurrentResult();v&&v.loading===w.loading&&v.networkStatus===w.networkStatus&&_(v.data,w.data)||se(w,e,t,r,a,p,c.current)},S=function(v){if(O.current.unsubscribe(),O.current=t.resubscribeAfterError(y,S),!xr.call(v,"graphQLErrors"))throw v;var w=e.current;(!w||w&&w.loading||!_(v,w.error))&&se({data:w&&w.data,error:v,loading:!1,networkStatus:d.error},e,t,r,a,p,c.current)},O={current:t.subscribe(y,S)};return function(){setTimeout(function(){return O.current.unsubscribe()})}},[o,s,t,e,a,r]),function(){return h||We(e,t,c.current,a,r)},function(){return h||We(e,t,c.current,a,r)})}function Nr(e,t,r){t&&r&&(t.registerSSRObservable(e),e.getCurrentResult().loading&&t.addObservableQueryPromise(e))}function zr(e,t,r,n,i){var o;t[L]&&!_(t[L],i)&&(t.reobserve(be(t,r,n,i)),e.previousData=((o=e.current)===null||o===void 0?void 0:o.data)||e.previousData,e.current=void 0),t[L]=i}function dt(e,t,r,n){r===void 0&&(r={});var i=r.skip;r.ssr,r.onCompleted,r.onError;var o=r.defaultOptions,a=V(r,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(s){var u=Object.assign(a,{query:t});return n&&(u.fetchPolicy==="network-only"||u.fetchPolicy==="cache-and-network")&&(u.fetchPolicy="cache-first"),u.variables||(u.variables={}),i?(u.initialFetchPolicy=u.initialFetchPolicy||u.fetchPolicy||ue(o,e.defaultOptions),u.fetchPolicy="standby"):u.fetchPolicy||(u.fetchPolicy=s?.options.initialFetchPolicy||ue(o,e.defaultOptions)),u}}function be(e,t,r,n){var i=[],o=t.defaultOptions.watchQuery;return o&&i.push(o),r.defaultOptions&&i.push(r.defaultOptions),i.push(R(e&&e.options,n)),i.reduce(ct)}function se(e,t,r,n,i,o,a){var s=t.current;s&&s.data&&(t.previousData=s.data),!e.error&&it(e.errors)&&(e.error=new W({graphQLErrors:e.errors})),t.current=me(Ur(e,r,i),t.previousData,r,n),o(),Lr(e,s?.networkStatus,a)}function Lr(e,t,r){if(!e.loading){var n=Vr(e);Promise.resolve().then(function(){n?r.onError(n):e.data&&t!==e.networkStatus&&e.networkStatus===d.ready&&r.onCompleted(e.data)}).catch(function(i){globalThis.__DEV__!==!1&&g.warn(i)})}}function We(e,t,r,n,i){return e.current||se(t.getCurrentResult(),e,t,i,n,function(){},r),e.current}function ue(e,t){var r;return e?.fetchPolicy||((r=t?.watchQuery)===null||r===void 0?void 0:r.fetchPolicy)||"cache-first"}function Vr(e){return it(e.errors)?new W({graphQLErrors:e.errors}):e.error}function me(e,t,r,n){var i=e.data;e.partial;var o=V(e,["data","partial"]),a=exports.__assign(exports.__assign({data:i},o),{client:n,observable:r,variables:r.variables,called:e!==gt&&e!==bt,previousData:t});return a}function Ur(e,t,r){return e.partial&&r&&!e.loading&&(!e.data||Object.keys(e.data).length===0)&&t.options.fetchPolicy!=="cache-only"?(t.refetch(),exports.__assign(exports.__assign({},e),{loading:!0,networkStatus:d.refetch})):e}var gt=ut({loading:!0,data:void 0,error:void 0,networkStatus:d.loading}),bt=ut({loading:!1,data:void 0,error:void 0,networkStatus:d.ready});function Wr(e){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}exports.ApolloError=W;exports.canUseDOM=Ye;exports.createMakeWatchQueryOptions=dt;exports.equal=_;exports.getDefaultFetchPolicy=ue;exports.getObsQueryOptions=be;exports.mergeOptions=ct;exports.rehacktExports=b;exports.toQueryResult=me;exports.useApolloClient=ge;exports.useQuery=Rr;exports.useQueryInternals=vt;exports.verifyDocumentType=yt;