@betarena/ad-engine 0.0.30 → 0.0.32
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.
- package/dist/index.css +1 -1
- package/dist/index.js +65 -43
- package/package.json +2 -2
- package/src/lib/Advert-Engine-Widget.svelte +16 -4
- package/src/lib/Advert-Slide-Child.svelte +32 -13
- package/src/lib/misc/admin/Dev-Info-Box.svelte +18 -1
- package/dist/roboto-cyrillic-400-normal.woff +0 -0
- package/dist/roboto-cyrillic-400-normal.woff2 +0 -0
- package/dist/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/dist/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/roboto-greek-400-normal.woff +0 -0
- package/dist/roboto-greek-400-normal.woff2 +0 -0
- package/dist/roboto-latin-400-normal.woff +0 -0
- package/dist/roboto-latin-400-normal.woff2 +0 -0
- package/dist/roboto-latin-ext-400-normal.woff +0 -0
- package/dist/roboto-latin-ext-400-normal.woff2 +0 -0
- package/dist/roboto-vietnamese-400-normal.woff +0 -0
- package/dist/roboto-vietnamese-400-normal.woff2 +0 -0
package/dist/index.js
CHANGED
|
@@ -1,53 +1,64 @@
|
|
|
1
|
-
var
|
|
2
|
-
`;for(let
|
|
1
|
+
var Ia=Object.defineProperty;var wa=(e,t,n)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t,n)=>(wa(e,typeof t!="symbol"?t+"":t,n),n);function Ye(){}const ps=e=>e;function hs(e){return e()}function Li(){return Object.create(null)}function Pt(e){e.forEach(hs)}function zn(e){return typeof e=="function"}function Xn(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let In;function He(e,t){return e===t?!0:(In||(In=document.createElement("a")),In.href=t,e===In.href)}function Oa(e){return Object.keys(e).length===0}function Aa(e,...t){if(e==null){for(const r of t)r(void 0);return Ye}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Da(e,t,n){e.$$.on_destroy.push(Aa(t,n))}function ki(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const ms=typeof window<"u";let ys=ms?()=>window.performance.now():()=>Date.now(),Vr=ms?e=>requestAnimationFrame(e):Ye;const Rt=new Set;function vs(e){Rt.forEach(t=>{t.c(e)||(Rt.delete(t),t.f())}),Rt.size!==0&&Vr(vs)}function Es(e){let t;return Rt.size===0&&Vr(vs),{promise:new Promise(n=>{Rt.add(t={c:e,f:n})}),abort(){Rt.delete(t)}}}const Sa=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function ue(e,t){e.appendChild(t)}function gs(e,t,n){const r=Ur(e);if(!r.getElementById(t)){const i=de("style");i.id=t,i.textContent=n,Ts(r,i)}}function Ur(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Ra(e){const t=de("style");return t.textContent="/* empty */",Ts(Ur(e),t),t.sheet}function Ts(e,t){return ue(e.head||e,t),t.sheet}function Ke(e,t,n){e.insertBefore(t,n||null)}function Se(e){e.parentNode&&e.parentNode.removeChild(e)}function de(e){return document.createElement(e)}function sn(e){return document.createTextNode(e)}function ct(){return sn(" ")}function bs(){return sn("")}function _s(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function $(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function La(e){return Array.from(e.childNodes)}function _r(e,t){t=""+t,e.data!==t&&(e.data=t)}function ka(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}const Cn=new Map;let Mn=0;function Fa(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function xa(e,t){const n={stylesheet:Ra(t),rules:{}};return Cn.set(e,n),n}function Ns(e,t,n,r,i,s,o,a=0){const u=16.666/r;let c=`{
|
|
2
|
+
`;for(let U=0;U<=1;U+=u){const q=t+(n-t)*s(U);c+=U*100+`%{${o(q,1-q)}}
|
|
3
3
|
`}const f=c+`100% {${o(n,1-n)}}
|
|
4
|
-
}`,d=`__svelte_${Ra(f)}_${a}`,h=Vr(e),{stylesheet:y,rules:E}=Cn.get(h)||La(h,e);E[d]||(E[d]=!0,y.insertRule(`@keyframes ${d} ${f}`,y.cssRules.length));const $=e.style.animation||"";return e.style.animation=`${$?`${$}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Mn+=1,d}function _r(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),Mn-=i,Mn||ka())}function ka(){Mr(()=>{Mn||(Cn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&He(t)}),Cn.clear())})}let on;function en(e){on=e}function Fa(){if(!on)throw new Error("Function called outside component initialization");return on}function _s(e){Fa().$$.on_mount.push(e)}const Dt=[],ki=[];let Lt=[];const Fi=[],xa=Promise.resolve();let Nr=!1;function $a(){Nr||(Nr=!0,xa.then(Ns))}function bt(e){Lt.push(e)}const hr=new Set;let Ot=0;function Ns(){if(Ot!==0)return;const e=on;do{try{for(;Ot<Dt.length;){const t=Dt[Ot];Ot++,en(t),Ca(t.$$)}}catch(t){throw Dt.length=0,Ot=0,t}for(en(null),Dt.length=0,Ot=0;ki.length;)ki.pop()();for(let t=0;t<Lt.length;t+=1){const n=Lt[t];hr.has(n)||(hr.add(n),n())}Lt.length=0}while(Dt.length);for(;Fi.length;)Fi.pop()();Nr=!1,hr.clear(),en(e)}function Ca(e){if(e.fragment!==null){e.update(),Pt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(bt)}}function Ma(e){const t=[],n=[];Lt.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Lt=t}let zt;function Is(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Vn(e,t,n){e.dispatchEvent(Sa(`${t?"intro":"outro"}${n}`))}const kn=new Set;let ct;function Va(){ct={r:0,c:[],p:ct}}function Ua(){ct.r||Pt(ct.c),ct=ct.p}function tn(e,t){e&&e.i&&(kn.delete(e),e.i(t))}function Ir(e,t,n,r){if(e&&e.o){if(kn.has(e))return;kn.add(e),ct.c.push(()=>{kn.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const ws={duration:0};function Os(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&_r(e,o)}function f(){const{delay:h=0,duration:y=300,easing:E=fs,tick:$=Qe,css:V}=i||ws;V&&(o=bs(e,0,1,y,h,E,V,u++)),$(0,1);const B=hs()+h,X=B+y;a&&a.abort(),s=!0,bt(()=>Vn(e,!0,"start")),a=ys(z=>{if(s){if(z>=X)return $(1,0),Vn(e,!0,"end"),c(),s=!1;if(z>=B){const Q=E((z-B)/y);$(Q,1-Q)}}return s})}let d=!1;return{start(){d||(d=!0,_r(e),zn(i)?(i=i(r),Is().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function As(e,t,n){const r={direction:"out"};let i=t(e,n,r),s=!0,o;const a=ct;a.r+=1;let u;function c(){const{delay:f=0,duration:d=300,easing:h=fs,tick:y=Qe,css:E}=i||ws;E&&(o=bs(e,1,0,d,f,h,E));const $=hs()+f,V=$+d;bt(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),ys(B=>{if(s){if(B>=V)return y(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(B>=$){const X=h((B-$)/d);y(1-X,X)}}return s})}return zn(i)?Is().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&_r(e,o),s=!1)}}}function Pa(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(ds).filter(zn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function ja(e,t){const n=e.$$;n.fragment!==null&&(Ma(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ba(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),$a(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ur(e,t,n,r,i,s,o=null,a=[-1]){const u=on;en(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Qe,not_equal:i,bound:Ri(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Ri(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(c.root);let f=!1;if(c.ctx=n?n(e,t.props||{},(d,h,...y)=>{const E=y.length?y[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Ba(e,d)),h}):[],c.update(),f=!0,Pt(c.before_update),c.fragment=r?r(c.ctx):!1,t.target){if(t.hydrate){const d=Da(t.target);c.fragment&&c.fragment.l(d),d.forEach(He)}else c.fragment&&c.fragment.c();t.intro&&tn(e.$$.fragment),Pa(e,t.target,t.anchor),Ns()}en(u)}class Pr{constructor(){pr(this,"$$");pr(this,"$$set")}$destroy(){ja(this,1),this.$destroy=Qe}$on(t,n){if(!zn(n))return Qe;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Ia(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const qa="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(qa);const Ga="https://betarena-test-e2748dab12f5.herokuapp.com",At=[];function Ds(e,t=Qe){let n;const r=new Set;function i(a){if(Xn(e,a)&&(e=a,n)){const u=!At.length;for(const c of r)c[1](),At.push(c,e);if(u){for(let c=0;c<At.length;c+=2)At[c][0](At[c+1]);At.length=0}}}function s(a){i(a(e))}function o(a,u=Qe){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Qe),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Qa={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function Ya(e){const{subscribe:t,set:n,update:r}=Ds(Qa),i={useLocalStorage:()=>{let s=i.parseLocalStorage();s==null&&(s={isBetarenaAdShownForToday:!1,advertDateLastShown:null}),s.isBetarenaAdShownForToday&&new Date(s.advertDateLastShown).getDate()!=new Date().getDate()&&i.updateData([["toggleAdShownState",void 0]]),i.setLocalStorage(s)},parseLocalStorage:()=>{const s=localStorage.getItem(e);return s?JSON.parse(s):null},setLocalStorage:s=>{localStorage.setItem(e,JSON.stringify(s)),n(s)},updateData:s=>{const o=i.parseLocalStorage();if(o){for(const a of s){const u=a[0];a[1],u=="toggleAdShownState"&&(o.isBetarenaAdShownForToday=!o.isBetarenaAdShownForToday,o.isBetarenaAdShownForToday?o.advertDateLastShown=new Date:o.advertDateLastShown=null)}i.setLocalStorage(o)}}};return{subscribe:t,set:n,update:r,...i}}const wr=Ya("betarena-ad-engine");var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ie=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},De={searchParams:"URLSearchParams"in Ie,iterable:"Symbol"in Ie&&"iterator"in Symbol,blob:"FileReader"in Ie&&"Blob"in Ie&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Ie,arrayBuffer:"ArrayBuffer"in Ie};function Ha(e){return e&&DataView.prototype.isPrototypeOf(e)}if(De.arrayBuffer)var za=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xa=ArrayBuffer.isView||function(e){return e&&za.indexOf(Object.prototype.toString.call(e))>-1};function jt(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function jr(e){return typeof e!="string"&&(e=String(e)),e}function Br(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return De.iterable&&(t[Symbol.iterator]=function(){return t}),t}function _e(e){this.map={},e instanceof _e?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}_e.prototype.append=function(e,t){e=jt(e),t=jr(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};_e.prototype.delete=function(e){delete this.map[jt(e)]};_e.prototype.get=function(e){return e=jt(e),this.has(e)?this.map[e]:null};_e.prototype.has=function(e){return this.map.hasOwnProperty(jt(e))};_e.prototype.set=function(e,t){this.map[jt(e)]=jr(t)};_e.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};_e.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),Br(e)};_e.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Br(e)};_e.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),Br(e)};De.iterable&&(_e.prototype[Symbol.iterator]=_e.prototype.entries);function mr(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function Ss(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Wa(e){var t=new FileReader,n=Ss(t);return t.readAsArrayBuffer(e),n}function Ka(e){var t=new FileReader,n=Ss(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function Za(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function xi(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Rs(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:De.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:De.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():De.arrayBuffer&&De.blob&&Ha(e)?(this._bodyArrayBuffer=xi(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):De.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Xa(e))?this._bodyArrayBuffer=xi(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},De.blob&&(this.blob=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=mr(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(De.blob)return this.blob().then(Wa);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return Ka(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Za(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},De.formData&&(this.formData=function(){return this.text().then(nu)}),this.json=function(){return this.text().then(JSON.parse)},this}var eu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function tu(e){var t=e.toUpperCase();return eu.indexOf(t)>-1?t:e}function _t(e,t){if(!(this instanceof _t))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof _t){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new _e(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new _e(t.headers)),this.method=tu(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ie){var s=new AbortController;return s.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}_t.prototype.clone=function(){return new _t(this,{body:this._bodyInit})};function nu(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),i=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ru(e){var t=new _e,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(`
|
|
5
|
-
`)===0?r.substr(1,r.length):r}).forEach(function(r){var i=r.split(":"),s=i.shift().trim();if(s){var o=i.join(":").trim();try{t.append(s,o)}catch(a){console.warn("Response "+a.message)}}}),t}Rs.call(_t.prototype);function Ke(e,t){if(!(this instanceof Ke))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new _e(t.headers),this.url=t.url||"",this._initBody(e)}Rs.call(Ke.prototype);Ke.prototype.clone=function(){return new Ke(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};Ke.error=function(){var e=new Ke(null,{status:200,statusText:""});return e.status=0,e.type="error",e};var iu=[301,302,303,307,308];Ke.redirect=function(e,t){if(iu.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ke(null,{status:t,headers:{location:e}})};var Et=Ie.DOMException;try{new Et}catch{Et=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},Et.prototype=Object.create(Error.prototype),Et.prototype.constructor=Et}function Ls(e,t){return new Promise(function(n,r){var i=new _t(e,t);if(i.signal&&i.signal.aborted)return r(new Et("Aborted","AbortError"));var s=new XMLHttpRequest;function o(){s.abort()}s.onload=function(){var c={statusText:s.statusText,headers:ru(s.getAllResponseHeaders()||"")};i.url.startsWith("file://")&&(s.status<200||s.status>599)?c.status=200:c.status=s.status,c.url="responseURL"in s?s.responseURL:c.headers.get("X-Request-URL");var f="response"in s?s.response:s.responseText;setTimeout(function(){n(new Ke(f,c))},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.onabort=function(){setTimeout(function(){r(new Et("Aborted","AbortError"))},0)};function a(c){try{return c===""&&Ie.location.href?Ie.location.href:c}catch{return c}}if(s.open(i.method,a(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(De.blob?s.responseType="blob":De.arrayBuffer&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof _e||Ie.Headers&&t.headers instanceof Ie.Headers)){var u=[];Object.getOwnPropertyNames(t.headers).forEach(function(c){u.push(jt(c)),s.setRequestHeader(c,jr(t.headers[c]))}),i.headers.forEach(function(c,f){u.indexOf(f)===-1&&s.setRequestHeader(f,c)})}else i.headers.forEach(function(c,f){s.setRequestHeader(f,c)});i.signal&&(i.signal.addEventListener("abort",o),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",o)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ls.polyfill=!0;Ie.fetch||(Ie.fetch=Ls,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ke);self.fetch.bind(self);const su=async(e,t)=>{try{return await e()}catch(n){return t!=null?t(n):(console.error(`🚏 checkpoint ➤ tryCatchAsync(..) error :: ❌ ${JSON.stringify(n)}`),null)}};async function ou(e,t){return console.log("path",e),console.log("data",t),await su(async()=>{const n=await fetch(e,{method:"POST",credentials:"include",body:JSON.stringify(t),mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),r=await n.json();if(!n.ok)throw new Error(JSON.stringify(r)??"network response was not ok");return r},n=>(console.error(`💀 Unhandled :: ${n}`),{error:!0,errorLogs:n}))}function $i(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function au(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var Bt={},Or={exports:{}};(function(e,t){var n=typeof self<"u"?self:ie,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(m){return m&&DataView.prototype.isPrototypeOf(m)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(m){return m&&c.indexOf(Object.prototype.toString.call(m))>-1};function d(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function h(m){return typeof m!="string"&&(m=String(m)),m}function y(m){var A={next:function(){var q=m.shift();return{done:q===void 0,value:q}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function E(m){this.map={},m instanceof E?m.forEach(function(A,q){this.append(q,A)},this):Array.isArray(m)?m.forEach(function(A){this.append(A[0],A[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(A){this.append(A,m[A])},this)}E.prototype.append=function(m,A){m=d(m),A=h(A);var q=this.map[m];this.map[m]=q?q+", "+A:A},E.prototype.delete=function(m){delete this.map[d(m)]},E.prototype.get=function(m){return m=d(m),this.has(m)?this.map[m]:null},E.prototype.has=function(m){return this.map.hasOwnProperty(d(m))},E.prototype.set=function(m,A){this.map[d(m)]=h(A)},E.prototype.forEach=function(m,A){for(var q in this.map)this.map.hasOwnProperty(q)&&m.call(A,this.map[q],q,this)},E.prototype.keys=function(){var m=[];return this.forEach(function(A,q){m.push(q)}),y(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),y(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,q){m.push([q,A])}),y(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function $(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function V(m){return new Promise(function(A,q){m.onload=function(){A(m.result)},m.onerror=function(){q(m.error)}})}function B(m){var A=new FileReader,q=V(A);return A.readAsArrayBuffer(m),q}function X(m){var A=new FileReader,q=V(A);return A.readAsText(m),q}function z(m){for(var A=new Uint8Array(m),q=new Array(A.length),g=0;g<A.length;g++)q[g]=String.fromCharCode(A[g]);return q.join("")}function Q(m){if(m.slice)return m.slice(0);var A=new Uint8Array(m.byteLength);return A.set(new Uint8Array(m)),A.buffer}function C(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:a.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:a.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():a.arrayBuffer&&a.blob&&u(m)?(this._bodyArrayBuffer=Q(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||f(m))?this._bodyArrayBuffer=Q(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?$(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(B)}),this.text=function(){var m=$(this);if(m)return m;if(this._bodyBlob)return X(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(m){var A=m.toUpperCase();return x.indexOf(A)>-1?A:m}function M(m,A){A=A||{};var q=A.body;if(m instanceof M){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,A.headers||(this.headers=new E(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!q&&m._bodyInit!=null&&(q=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new E(A.headers)),this.method=R(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(q)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function v(m){var A=new FormData;return m.trim().split("&").forEach(function(q){if(q){var g=q.split("="),w=g.shift().replace(/\+/g," "),T=g.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(T))}}),A}function b(m){var A=new E,q=m.replace(/\r?\n[\t ]+/g," ");return q.split(/\r?\n/).forEach(function(g){var w=g.split(":"),T=w.shift().trim();if(T){var D=w.join(":").trim();A.append(T,D)}}),A}C.call(M.prototype);function P(m,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new E(A.headers),this.url=A.url||"",this._initBody(m)}C.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},P.error=function(){var m=new P(null,{status:0,statusText:""});return m.type="error",m};var W=[301,302,303,307,308];P.redirect=function(m,A){if(W.indexOf(A)===-1)throw new RangeError("Invalid status code");return new P(null,{status:A,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(A,q){this.message=A,this.name=q;var g=Error(A);this.stack=g.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(m,A){return new Promise(function(q,g){var w=new M(m,A);if(w.signal&&w.signal.aborted)return g(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function D(){T.abort()}T.onload=function(){var L={status:T.status,statusText:T.statusText,headers:b(T.getAllResponseHeaders()||"")};L.url="responseURL"in T?T.responseURL:L.headers.get("X-Request-URL");var p="response"in T?T.response:T.responseText;q(new P(p,L))},T.onerror=function(){g(new TypeError("Network request failed"))},T.ontimeout=function(){g(new TypeError("Network request failed"))},T.onabort=function(){g(new o.DOMException("Aborted","AbortError"))},T.open(w.method,w.url,!0),w.credentials==="include"?T.withCredentials=!0:w.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&a.blob&&(T.responseType="blob"),w.headers.forEach(function(L,p){T.setRequestHeader(p,L)}),w.signal&&(w.signal.addEventListener("abort",D),T.onreadystatechange=function(){T.readyState===4&&w.signal.removeEventListener("abort",D)}),T.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=E,s.Request=M,s.Response=P),o.Headers=E,o.Request=M,o.Response=P,o.fetch=oe,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(Or,Or.exports);var uu=Or.exports,qr={},Wn={},ks=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},cu=ks,Fs=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof cu},lu=Fs,fu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=lu);var i,s=new Map;function o(f,d){var h=s.get(d);h?h.push.apply(h,f):s.set(d,f)}if(r(t))i=null,o([n],t);else{var a=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(f,d){return o([""+a+d],f),null});else if(Array.isArray(t))i=t.map(function(f,d){var h=e(f,""+a+d,r);return h.files.forEach(o),h.clone});else if(t&&t.constructor===Object){i={};for(var u in t){var c=e(t[u],""+a+u,r);c.files.forEach(o),i[u]=c.clone}}else i=t}return{clone:i,files:s}};Wn.ReactNativeFile=ks;Wn.extractFiles=fu;Wn.isExtractableFile=Fs;var du=typeof self=="object"?self.FormData:window.FormData,pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.defaultJsonSerializer=void 0;pn.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify};var pu=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qr,"__esModule",{value:!0});var xs=Wn,hu=pu(du),mu=pn,yu=function(e){return(0,xs.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function vu(e,t,n,r){r===void 0&&(r=mu.defaultJsonSerializer);var i=(0,xs.extractFiles)({query:e,variables:t,operationName:n},"",yu),s=i.clone,o=i.files;if(o.size===0){if(!Array.isArray(e))return r.stringify(s);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var a=e.reduce(function(h,y,E){return h.push({query:y,variables:t?t[E]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?hu.default:FormData,c=new u;c.append("operations",r.stringify(s));var f={},d=0;return o.forEach(function(h){f[++d]=h}),c.append("map",r.stringify(f)),d=0,o.forEach(function(h,y){c.append("".concat(++d),y)}),c}qr.default=vu;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.parseBatchRequestsExtendedArgs=Re.parseRawRequestExtendedArgs=Re.parseRequestExtendedArgs=Re.parseBatchRequestArgs=Re.parseRawRequestArgs=Re.parseRequestArgs=void 0;function Eu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Re.parseRequestArgs=Eu;function gu(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Re.parseRawRequestArgs=gu;function Tu(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Re.parseBatchRequestArgs=Tu;function bu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.document?e:{url:e,document:t,variables:i,requestHeaders:s,signal:void 0}}Re.parseRequestExtendedArgs=bu;function _u(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.query?e:{url:e,query:t,variables:i,requestHeaders:s,signal:void 0}}Re.parseRawRequestExtendedArgs=_u;function Nu(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Re.parseBatchRequestsExtendedArgs=Nu;var hn={},Iu=ie&&ie.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hn,"__esModule",{value:!0});hn.ClientError=void 0;var wu=function(e){Iu(t,e);function t(n,r){var i=this,s="".concat(t.extractMessage(n),": ").concat(JSON.stringify({response:n,request:r}));return i=e.call(this,s)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: ".concat(n.status,")")}},t}(Error);hn.ClientError=wu;var Ft={};const Ou="16.6.0",Au=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function Z(e,t){if(!!!e)throw new Error(t)}function $e(e){return typeof(e==null?void 0:e.then)=="function"}function Ce(e){return typeof e=="object"&&e!==null}function me(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Du=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Du)){if(typeof i.index=="number"||me(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function $s(e){return Gr(e.source,Un(e.source,e.start))}function Gr(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
|
|
6
|
-
`,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){const h=Math.floor(u/80),y=u%80,E=[];for(let
|
|
7
|
-
`)}function
|
|
4
|
+
}`,d=`__svelte_${Fa(f)}_${a}`,h=Ur(e),{stylesheet:y,rules:E}=Cn.get(h)||xa(h,e);E[d]||(E[d]=!0,y.insertRule(`@keyframes ${d} ${f}`,y.cssRules.length));const C=e.style.animation||"";return e.style.animation=`${C?`${C}, `:""}${d} ${r}ms linear ${i}ms 1 both`,Mn+=1,d}function Nr(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?s=>s.indexOf(t)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(e.style.animation=r.join(", "),Mn-=i,Mn||$a())}function $a(){Vr(()=>{Mn||(Cn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&Se(t)}),Cn.clear())})}let on;function en(e){on=e}function Ca(){if(!on)throw new Error("Function called outside component initialization");return on}function Is(e){Ca().$$.on_mount.push(e)}const Dt=[],Fi=[];let Lt=[];const xi=[],Ma=Promise.resolve();let Ir=!1;function Va(){Ir||(Ir=!0,Ma.then(ws))}function bt(e){Lt.push(e)}const hr=new Set;let Ot=0;function ws(){if(Ot!==0)return;const e=on;do{try{for(;Ot<Dt.length;){const t=Dt[Ot];Ot++,en(t),Ua(t.$$)}}catch(t){throw Dt.length=0,Ot=0,t}for(en(null),Dt.length=0,Ot=0;Fi.length;)Fi.pop()();for(let t=0;t<Lt.length;t+=1){const n=Lt[t];hr.has(n)||(hr.add(n),n())}Lt.length=0}while(Dt.length);for(;xi.length;)xi.pop()();Ir=!1,hr.clear(),en(e)}function Ua(e){if(e.fragment!==null){e.update(),Pt(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(bt)}}function Pa(e){const t=[],n=[];Lt.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Lt=t}let zt;function Os(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Vn(e,t,n){e.dispatchEvent(ka(`${t?"intro":"outro"}${n}`))}const kn=new Set;let lt;function ja(){lt={r:0,c:[],p:lt}}function qa(){lt.r||Pt(lt.c),lt=lt.p}function tn(e,t){e&&e.i&&(kn.delete(e),e.i(t))}function wr(e,t,n,r){if(e&&e.o){if(kn.has(e))return;kn.add(e),lt.c.push(()=>{kn.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}const As={duration:0};function Ds(e,t,n){const r={direction:"in"};let i=t(e,n,r),s=!1,o,a,u=0;function c(){o&&Nr(e,o)}function f(){const{delay:h=0,duration:y=300,easing:E=ps,tick:C=Ye,css:U}=i||As;U&&(o=Ns(e,0,1,y,h,E,U,u++)),C(0,1);const q=ys()+h,X=q+y;a&&a.abort(),s=!0,bt(()=>Vn(e,!0,"start")),a=Es(z=>{if(s){if(z>=X)return C(1,0),Vn(e,!0,"end"),c(),s=!1;if(z>=q){const Q=E((z-q)/y);C(Q,1-Q)}}return s})}let d=!1;return{start(){d||(d=!0,Nr(e),zn(i)?(i=i(r),Os().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function Ss(e,t,n){const r={direction:"out"};let i=t(e,n,r),s=!0,o;const a=lt;a.r+=1;let u;function c(){const{delay:f=0,duration:d=300,easing:h=ps,tick:y=Ye,css:E}=i||As;E&&(o=Ns(e,1,0,d,f,h,E));const C=ys()+f,U=C+d;bt(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),Es(q=>{if(s){if(q>=U)return y(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(q>=C){const X=h((q-C)/d);y(1-X,X)}}return s})}return zn(i)?Os().then(()=>{i=i(r),c()}):c(),{end(f){f&&"inert"in e&&(e.inert=u),f&&i.tick&&i.tick(1,0),s&&(o&&Nr(e,o),s=!1)}}}function Ba(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(hs).filter(zn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function Ga(e,t){const n=e.$$;n.fragment!==null&&(Pa(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Qa(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),Va(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Pr(e,t,n,r,i,s,o=null,a=[-1]){const u=on;en(e);const c=e.$$={fragment:null,ctx:[],props:s,update:Ye,not_equal:i,bound:Li(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Li(),dirty:a,skip_bound:!1,root:t.target||u.$$.root};o&&o(c.root);let f=!1;if(c.ctx=n?n(e,t.props||{},(d,h,...y)=>{const E=y.length?y[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Qa(e,d)),h}):[],c.update(),f=!0,Pt(c.before_update),c.fragment=r?r(c.ctx):!1,t.target){if(t.hydrate){const d=La(t.target);c.fragment&&c.fragment.l(d),d.forEach(Se)}else c.fragment&&c.fragment.c();t.intro&&tn(e.$$.fragment),Ba(e,t.target,t.anchor),ws()}en(u)}class jr{constructor(){pr(this,"$$");pr(this,"$$set")}$destroy(){Ga(this,1),this.$destroy=Ye}$on(t,n){if(!zn(n))return Ye;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Oa(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Ya="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ya);const Ja="http://localhost:58749",At=[];function Rs(e,t=Ye){let n;const r=new Set;function i(a){if(Xn(e,a)&&(e=a,n)){const u=!At.length;for(const c of r)c[1](),At.push(c,e);if(u){for(let c=0;c<At.length;c+=2)At[c][0](At[c+1]);At.length=0}}}function s(a){i(a(e))}function o(a,u=Ye){const c=[a,u];return r.add(c),r.size===1&&(n=t(i,s)||Ye),a(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:o}}const Ha={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function za(e){const{subscribe:t,set:n,update:r}=Rs(Ha),i={useLocalStorage:()=>{let s=i.parseLocalStorage();s==null&&(s={isBetarenaAdShownForToday:!1,advertDateLastShown:null}),s.isBetarenaAdShownForToday&&new Date(s.advertDateLastShown).getDate()!=new Date().getDate()&&i.updateData([["toggleAdShownState",void 0]]),i.setLocalStorage(s)},parseLocalStorage:()=>{const s=localStorage.getItem(e);return s?JSON.parse(s):null},setLocalStorage:s=>{localStorage.setItem(e,JSON.stringify(s)),n(s)},updateData:s=>{const o=i.parseLocalStorage();if(o){for(const a of s){const u=a[0];a[1],u=="toggleAdShownState"&&(o.isBetarenaAdShownForToday=!o.isBetarenaAdShownForToday,o.isBetarenaAdShownForToday?o.advertDateLastShown=new Date:o.advertDateLastShown=null)}i.setLocalStorage(o)}}};return{subscribe:t,set:n,update:r,...i}}const Or=za("betarena-ad-engine");var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ie=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global||{},De={searchParams:"URLSearchParams"in Ie,iterable:"Symbol"in Ie&&"iterator"in Symbol,blob:"FileReader"in Ie&&"Blob"in Ie&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Ie,arrayBuffer:"ArrayBuffer"in Ie};function Wa(e){return e&&DataView.prototype.isPrototypeOf(e)}if(De.arrayBuffer)var Ka=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Za=ArrayBuffer.isView||function(e){return e&&Ka.indexOf(Object.prototype.toString.call(e))>-1};function jt(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function qr(e){return typeof e!="string"&&(e=String(e)),e}function Br(e){var t={next:function(){var n=e.shift();return{done:n===void 0,value:n}}};return De.iterable&&(t[Symbol.iterator]=function(){return t}),t}function _e(e){this.map={},e instanceof _e?e.forEach(function(t,n){this.append(n,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}_e.prototype.append=function(e,t){e=jt(e),t=qr(t);var n=this.map[e];this.map[e]=n?n+", "+t:t};_e.prototype.delete=function(e){delete this.map[jt(e)]};_e.prototype.get=function(e){return e=jt(e),this.has(e)?this.map[e]:null};_e.prototype.has=function(e){return this.map.hasOwnProperty(jt(e))};_e.prototype.set=function(e,t){this.map[jt(e)]=qr(t)};_e.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)};_e.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),Br(e)};_e.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),Br(e)};_e.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),Br(e)};De.iterable&&(_e.prototype[Symbol.iterator]=_e.prototype.entries);function mr(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function Ls(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function eu(e){var t=new FileReader,n=Ls(t);return t.readAsArrayBuffer(e),n}function tu(e){var t=new FileReader,n=Ls(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function nu(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function $i(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function ks(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:De.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:De.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():De.arrayBuffer&&De.blob&&Wa(e)?(this._bodyArrayBuffer=$i(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):De.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Za(e))?this._bodyArrayBuffer=$i(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):De.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},De.blob&&(this.blob=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=mr(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(De.blob)return this.blob().then(eu);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return tu(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(nu(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},De.formData&&(this.formData=function(){return this.text().then(su)}),this.json=function(){return this.text().then(JSON.parse)},this}var ru=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function iu(e){var t=e.toUpperCase();return ru.indexOf(t)>-1?t:e}function _t(e,t){if(!(this instanceof _t))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var n=t.body;if(e instanceof _t){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new _e(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!n&&e._bodyInit!=null&&(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new _e(t.headers)),this.method=iu(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in Ie){var s=new AbortController;return s.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var r=/([?&])_=[^&]*/;if(r.test(this.url))this.url=this.url.replace(r,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}_t.prototype.clone=function(){return new _t(this,{body:this._bodyInit})};function su(e){var t=new FormData;return e.trim().split("&").forEach(function(n){if(n){var r=n.split("="),i=r.shift().replace(/\+/g," "),s=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(s))}}),t}function ou(e){var t=new _e,n=e.replace(/\r?\n[\t ]+/g," ");return n.split("\r").map(function(r){return r.indexOf(`
|
|
5
|
+
`)===0?r.substr(1,r.length):r}).forEach(function(r){var i=r.split(":"),s=i.shift().trim();if(s){var o=i.join(":").trim();try{t.append(s,o)}catch(a){console.warn("Response "+a.message)}}}),t}ks.call(_t.prototype);function Ze(e,t){if(!(this instanceof Ze))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new _e(t.headers),this.url=t.url||"",this._initBody(e)}ks.call(Ze.prototype);Ze.prototype.clone=function(){return new Ze(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _e(this.headers),url:this.url})};Ze.error=function(){var e=new Ze(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var au=[301,302,303,307,308];Ze.redirect=function(e,t){if(au.indexOf(t)===-1)throw new RangeError("Invalid status code");return new Ze(null,{status:t,headers:{location:e}})};var gt=Ie.DOMException;try{new gt}catch{gt=function(t,n){this.message=t,this.name=n;var r=Error(t);this.stack=r.stack},gt.prototype=Object.create(Error.prototype),gt.prototype.constructor=gt}function Fs(e,t){return new Promise(function(n,r){var i=new _t(e,t);if(i.signal&&i.signal.aborted)return r(new gt("Aborted","AbortError"));var s=new XMLHttpRequest;function o(){s.abort()}s.onload=function(){var c={statusText:s.statusText,headers:ou(s.getAllResponseHeaders()||"")};i.url.indexOf("file://")===0&&(s.status<200||s.status>599)?c.status=200:c.status=s.status,c.url="responseURL"in s?s.responseURL:c.headers.get("X-Request-URL");var f="response"in s?s.response:s.responseText;setTimeout(function(){n(new Ze(f,c))},0)},s.onerror=function(){setTimeout(function(){r(new TypeError("Network request failed"))},0)},s.ontimeout=function(){setTimeout(function(){r(new TypeError("Network request timed out"))},0)},s.onabort=function(){setTimeout(function(){r(new gt("Aborted","AbortError"))},0)};function a(c){try{return c===""&&Ie.location.href?Ie.location.href:c}catch{return c}}if(s.open(i.method,a(i.url),!0),i.credentials==="include"?s.withCredentials=!0:i.credentials==="omit"&&(s.withCredentials=!1),"responseType"in s&&(De.blob?s.responseType="blob":De.arrayBuffer&&(s.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof _e||Ie.Headers&&t.headers instanceof Ie.Headers)){var u=[];Object.getOwnPropertyNames(t.headers).forEach(function(c){u.push(jt(c)),s.setRequestHeader(c,qr(t.headers[c]))}),i.headers.forEach(function(c,f){u.indexOf(f)===-1&&s.setRequestHeader(f,c)})}else i.headers.forEach(function(c,f){s.setRequestHeader(f,c)});i.signal&&(i.signal.addEventListener("abort",o),s.onreadystatechange=function(){s.readyState===4&&i.signal.removeEventListener("abort",o)}),s.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Fs.polyfill=!0;Ie.fetch||(Ie.fetch=Fs,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ze);self.fetch.bind(self);const uu=async(e,t)=>{try{return await e()}catch(n){return t!=null?t(n):(console.error(`🚏 checkpoint ➤ tryCatchAsync(..) error :: ❌ ${JSON.stringify(n)}`),null)}};async function cu(e,t){return console.log("path",e),console.log("data",t),await uu(async()=>{const n=await fetch(e,{method:"POST",credentials:"include",body:JSON.stringify(t),mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json"}}),r=await n.json();if(!n.ok)throw new Error(JSON.stringify(r)??"network response was not ok");return r},n=>(console.error(`💀 Unhandled :: ${n}`),{error:!0,errorLogs:n}))}function Ci(){const e=navigator.userAgent.toLowerCase(),t=e.includes("mobile"),n=/tablet|ipad/.test(e);return t?"mobile":n?"tablet":"desktop"}async function lu(){return await(await fetch("https://get.geojs.io/v1/ip/geo.json",{method:"GET"})).json()}var qt={},Ar={exports:{}};(function(e,t){var n=typeof self<"u"?self:ie,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function u(m){return m&&DataView.prototype.isPrototypeOf(m)}if(a.arrayBuffer)var c=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(m){return m&&c.indexOf(Object.prototype.toString.call(m))>-1};function d(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(m))throw new TypeError("Invalid character in header field name");return m.toLowerCase()}function h(m){return typeof m!="string"&&(m=String(m)),m}function y(m){var A={next:function(){var B=m.shift();return{done:B===void 0,value:B}}};return a.iterable&&(A[Symbol.iterator]=function(){return A}),A}function E(m){this.map={},m instanceof E?m.forEach(function(A,B){this.append(B,A)},this):Array.isArray(m)?m.forEach(function(A){this.append(A[0],A[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(A){this.append(A,m[A])},this)}E.prototype.append=function(m,A){m=d(m),A=h(A);var B=this.map[m];this.map[m]=B?B+", "+A:A},E.prototype.delete=function(m){delete this.map[d(m)]},E.prototype.get=function(m){return m=d(m),this.has(m)?this.map[m]:null},E.prototype.has=function(m){return this.map.hasOwnProperty(d(m))},E.prototype.set=function(m,A){this.map[d(m)]=h(A)},E.prototype.forEach=function(m,A){for(var B in this.map)this.map.hasOwnProperty(B)&&m.call(A,this.map[B],B,this)},E.prototype.keys=function(){var m=[];return this.forEach(function(A,B){m.push(B)}),y(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),y(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,B){m.push([B,A])}),y(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function C(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function U(m){return new Promise(function(A,B){m.onload=function(){A(m.result)},m.onerror=function(){B(m.error)}})}function q(m){var A=new FileReader,B=U(A);return A.readAsArrayBuffer(m),B}function X(m){var A=new FileReader,B=U(A);return A.readAsText(m),B}function z(m){for(var A=new Uint8Array(m),B=new Array(A.length),g=0;g<A.length;g++)B[g]=String.fromCharCode(A[g]);return B.join("")}function Q(m){if(m.slice)return m.slice(0);var A=new Uint8Array(m.byteLength);return A.set(new Uint8Array(m)),A.buffer}function M(){return this.bodyUsed=!1,this._initBody=function(m){this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:a.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:a.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():a.arrayBuffer&&a.blob&&u(m)?(this._bodyArrayBuffer=Q(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||f(m))?this._bodyArrayBuffer=Q(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var m=C(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?C(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(q)}),this.text=function(){var m=C(this);if(m)return m;if(this._bodyBlob)return X(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(m){var A=m.toUpperCase();return x.indexOf(A)>-1?A:m}function V(m,A){A=A||{};var B=A.body;if(m instanceof V){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,A.headers||(this.headers=new E(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!B&&m._bodyInit!=null&&(B=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=A.credentials||this.credentials||"same-origin",(A.headers||!this.headers)&&(this.headers=new E(A.headers)),this.method=R(A.method||this.method||"GET"),this.mode=A.mode||this.mode||null,this.signal=A.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&B)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(B)}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function v(m){var A=new FormData;return m.trim().split("&").forEach(function(B){if(B){var g=B.split("="),w=g.shift().replace(/\+/g," "),T=g.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(T))}}),A}function b(m){var A=new E,B=m.replace(/\r?\n[\t ]+/g," ");return B.split(/\r?\n/).forEach(function(g){var w=g.split(":"),T=w.shift().trim();if(T){var D=w.join(":").trim();A.append(T,D)}}),A}M.call(V.prototype);function P(m,A){A||(A={}),this.type="default",this.status=A.status===void 0?200:A.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in A?A.statusText:"OK",this.headers=new E(A.headers),this.url=A.url||"",this._initBody(m)}M.call(P.prototype),P.prototype.clone=function(){return new P(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},P.error=function(){var m=new P(null,{status:0,statusText:""});return m.type="error",m};var W=[301,302,303,307,308];P.redirect=function(m,A){if(W.indexOf(A)===-1)throw new RangeError("Invalid status code");return new P(null,{status:A,headers:{location:m}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(A,B){this.message=A,this.name=B;var g=Error(A);this.stack=g.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(m,A){return new Promise(function(B,g){var w=new V(m,A);if(w.signal&&w.signal.aborted)return g(new o.DOMException("Aborted","AbortError"));var T=new XMLHttpRequest;function D(){T.abort()}T.onload=function(){var L={status:T.status,statusText:T.statusText,headers:b(T.getAllResponseHeaders()||"")};L.url="responseURL"in T?T.responseURL:L.headers.get("X-Request-URL");var p="response"in T?T.response:T.responseText;B(new P(p,L))},T.onerror=function(){g(new TypeError("Network request failed"))},T.ontimeout=function(){g(new TypeError("Network request failed"))},T.onabort=function(){g(new o.DOMException("Aborted","AbortError"))},T.open(w.method,w.url,!0),w.credentials==="include"?T.withCredentials=!0:w.credentials==="omit"&&(T.withCredentials=!1),"responseType"in T&&a.blob&&(T.responseType="blob"),w.headers.forEach(function(L,p){T.setRequestHeader(p,L)}),w.signal&&(w.signal.addEventListener("abort",D),T.onreadystatechange=function(){T.readyState===4&&w.signal.removeEventListener("abort",D)}),T.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=E,s.Request=V,s.Response=P),o.Headers=E,o.Request=V,o.Response=P,o.fetch=oe,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(Ar,Ar.exports);var fu=Ar.exports,Gr={},Wn={},xs=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},du=xs,$s=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof du},pu=$s,hu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=pu);var i,s=new Map;function o(f,d){var h=s.get(d);h?h.push.apply(h,f):s.set(d,f)}if(r(t))i=null,o([n],t);else{var a=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(f,d){return o([""+a+d],f),null});else if(Array.isArray(t))i=t.map(function(f,d){var h=e(f,""+a+d,r);return h.files.forEach(o),h.clone});else if(t&&t.constructor===Object){i={};for(var u in t){var c=e(t[u],""+a+u,r);c.files.forEach(o),i[u]=c.clone}}else i=t}return{clone:i,files:s}};Wn.ReactNativeFile=xs;Wn.extractFiles=hu;Wn.isExtractableFile=$s;var mu=typeof self=="object"?self.FormData:window.FormData,pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.defaultJsonSerializer=void 0;pn.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify};var yu=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});var Cs=Wn,vu=yu(mu),Eu=pn,gu=function(e){return(0,Cs.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function Tu(e,t,n,r){r===void 0&&(r=Eu.defaultJsonSerializer);var i=(0,Cs.extractFiles)({query:e,variables:t,operationName:n},"",gu),s=i.clone,o=i.files;if(o.size===0){if(!Array.isArray(e))return r.stringify(s);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var a=e.reduce(function(h,y,E){return h.push({query:y,variables:t?t[E]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?vu.default:FormData,c=new u;c.append("operations",r.stringify(s));var f={},d=0;return o.forEach(function(h){f[++d]=h}),c.append("map",r.stringify(f)),d=0,o.forEach(function(h,y){c.append("".concat(++d),y)}),c}Gr.default=Tu;var Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.parseBatchRequestsExtendedArgs=Le.parseRawRequestExtendedArgs=Le.parseRequestExtendedArgs=Le.parseBatchRequestArgs=Le.parseRawRequestArgs=Le.parseRequestArgs=void 0;function bu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRequestArgs=bu;function _u(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRawRequestArgs=_u;function Nu(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Le.parseBatchRequestArgs=Nu;function Iu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.document?e:{url:e,document:t,variables:i,requestHeaders:s,signal:void 0}}Le.parseRequestExtendedArgs=Iu;function wu(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1];return e.query?e:{url:e,query:t,variables:i,requestHeaders:s,signal:void 0}}Le.parseRawRequestExtendedArgs=wu;function Ou(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Le.parseBatchRequestsExtendedArgs=Ou;var hn={},Au=ie&&ie.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(hn,"__esModule",{value:!0});hn.ClientError=void 0;var Du=function(e){Au(t,e);function t(n,r){var i=this,s="".concat(t.extractMessage(n),": ").concat(JSON.stringify({response:n,request:r}));return i=e.call(this,s)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: ".concat(n.status,")")}},t}(Error);hn.ClientError=Du;var Ft={};const Su="16.8.1",Ru=Object.freeze({major:16,minor:8,patch:1,preReleaseTag:null});function Z(e,t){if(!!!e)throw new Error(t)}function Ce(e){return typeof(e==null?void 0:e.then)=="function"}function Me(e){return typeof e=="object"&&e!==null}function ye(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Lu=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Lu)){if(typeof i.index=="number"||ye(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ms(e){return Qr(e.source,Un(e.source,e.start))}function Qr(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
|
|
6
|
+
`,f=r.split(/\r\n|[\n\r]/g),d=f[i];if(d.length>120){const h=Math.floor(u/80),y=u%80,E=[];for(let C=0;C<d.length;C+=80)E.push(d.slice(C,C+80));return c+Mi([[`${o} |`,E[0]],...E.slice(1,h+1).map(C=>["|",C]),["|","^".padStart(y)],["|",E[h+1]]])}return c+Mi([[`${o-1} |`,f[i-1]],[`${o} |`,d],["|","^".padStart(u)],[`${o+1} |`,f[i+1]]])}function Mi(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
7
|
+
`)}function ku(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class _ extends Error{constructor(t,...n){var r,i,s;const{nodes:o,source:a,positions:u,path:c,originalError:f,extensions:d}=ku(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=f??void 0,this.nodes=Vi(Array.isArray(o)?o:o?[o]:void 0);const h=Vi((r=this.nodes)===null||r===void 0?void 0:r.map(E=>E.loc).filter(E=>E!=null));this.source=a??(h==null||(i=h[0])===null||i===void 0?void 0:i.source),this.positions=u??(h==null?void 0:h.map(E=>E.start)),this.locations=u&&a?u.map(E=>Un(a,E)):h==null?void 0:h.map(E=>Un(E.source,E.start));const y=Me(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??y)!==null&&s!==void 0?s: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}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,_):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`+Ms(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
|
|
10
10
|
|
|
11
|
-
`+
|
|
11
|
+
`+Qr(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Vi(e){return e===void 0||e.length===0?void 0:e}function Fu(e){return e.toString()}function xu(e){return e.toJSON()}function Te(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Vs{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Yr{constructor(t,n,r,i,s,o){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Us={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},$u=new Set(Object.keys(Us));function Dr(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&$u.has(t)}var be;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(be||(be={}));var G;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(G||(G={}));var l;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(l||(l={}));function Sr(e){return e===9||e===32}function an(e){return e>=48&&e<=57}function Ps(e){return e>=97&&e<=122||e>=65&&e<=90}function Jr(e){return Ps(e)||e===95}function js(e){return Ps(e)||an(e)||e===95}function Cu(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],u=Mu(a);u!==a.length&&(r=(s=r)!==null&&s!==void 0?s:o,i=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Mu(e){let t=0;for(;t<e.length&&Sr(e.charCodeAt(t));)++t;return t}function Vu(e){if(e==="")return!0;let t=!0,n=!1,r=!0,i=!1;for(let s=0;s<e.length;++s)switch(e.codePointAt(s)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!i)return!1;i=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:r&&(r=n),t=!1}return!(t||r&&i)}function qs(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,s=r.length>1&&r.slice(1).every(y=>y.length===0||Sr(y.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,f=!(t!=null&&t.minimize)&&(!i||e.length>70||c||s||o);let d="";const h=i&&Sr(e.charCodeAt(0));return(f&&!h||s)&&(d+=`
|
|
12
12
|
`),d+=n,(f||c)&&(d+=`
|
|
13
|
-
`),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(N||(N={}));class
|
|
14
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Te(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function
|
|
15
|
-
`));return e.line+=u.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),u.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(qt(c))++s;else if(Kn(n,s))s+=2;else throw Te(e.source,s,`Invalid character within String: ${Nt(e,s)}.`)}throw Te(e.source,s,"Unterminated string.")}function Gu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Us(s))++i;else break}return ve(e,N.NAME,t,i,n.slice(t,i))}const Qu=10,Gs=2;function I(e){return Zn(e,[])}function Zn(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Yu(e,t);default:return String(e)}}function Yu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Ju(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Zn(r,n)}else if(Array.isArray(e))return zu(e,n);return Hu(e,n)}function Ju(e){return typeof e.toJSON=="function"}function Hu(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Gs?"["+Xu(e)+"]":"{ "+n.map(([i,s])=>i+": "+Zn(s,t)).join(", ")+" }"}function zu(e,t){if(e.length===0)return"[]";if(t.length>Gs)return"[Array]";const n=Math.min(Qu,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Zn(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Xu(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const ze=function(t,n){return t instanceof n};class er{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${I(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Qs(e){return ze(e,er)}function tr(e,t){return new nr(e,t).parseDocument()}function Ys(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function Wu(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function Ku(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseTypeReference();return n.expectToken(N.EOF),r}class nr{constructor(t,n={}){const r=Qs(t)?t:new er(t);this._lexer=new Jr(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:l.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.NAME){switch(n.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()}if(t)throw Te(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:l.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:l.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:l.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:l.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:l.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:l.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:l.BOOLEAN,value:!0});case"false":return this.node(n,{kind:l.BOOLEAN,value:!1});case"null":return this.node(n,{kind:l.NULL});default:return this.node(n,{kind:l.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw Te(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:l.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:l.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:l.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:l.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:l.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:l.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:l.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(N.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:l.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:l.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:l.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:l.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Te(this._lexer.source,this._lexer.token.start,`${wn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:l.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:l.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:l.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(G,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Cs(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Te(this._lexer.source,n.start,`Expected ${Js(t)}, found ${wn(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw Te(this._lexer.source,n.start,`Expected "${t}", found ${wn(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Te(this._lexer.source,n.start,`Unexpected ${wn(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Te(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function wn(e){const t=e.value;return Js(e.kind)+(t!=null?` "${t}"`:"")}function Js(e){return js(e)?`"${e}"`:e}const Zu=5;function it(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}const o=s.slice(0,Zu),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function Ui(e){return e}function st(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function lt(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function rt(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function mn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(On(i)&&On(s)){let o=0;do++n,o=o*10+i-Sr,i=e.charCodeAt(n);while(On(i)&&o>0);let a=0;do++r,a=a*10+s-Sr,s=t.charCodeAt(r);while(On(s)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(i<s)return-1;if(i>s)return 1;++n,++r}}return e.length-t.length}const Sr=48,ec=57;function On(e){return!isNaN(e)&&Sr<=e&&e<=ec}function ht(e,t){const n=Object.create(null),r=new tc(e),i=Math.floor(e.length*.4)+1;for(const s of t){const o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{const a=n[s]-n[o];return a!==0?a:mn(s,o)})}class tc{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Pi(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=Pi(r),s=this._inputArray;if(i.length<s.length){const f=i;i=s,s=f}const o=i.length,a=s.length;if(o-a>n)return;const u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){const d=u[(f-1)%3],h=u[f%3];let y=h[0]=f;for(let E=1;E<=a;E++){const $=i[f-1]===s[E-1]?0:1;let V=Math.min(d[E]+1,h[E-1]+1,d[E-1]+$);if(f>1&&E>1&&i[f-1]===s[E-2]&&i[f-2]===s[E-1]){const B=u[(f-2)%3][E-2];V=Math.min(V,B+1)}V<y&&(y=V),h[E]=V}if(y>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function Pi(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Be(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function nc(e){return`"${e.replace(rc,ic)}"`}const rc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ic(e){return sc[e.charCodeAt(0)]}const sc=["\\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"],St=Object.freeze({});function Gt(e,t,n=Ms){const r=new Map;for(const B of Object.values(l))r.set(B,xt(t,B));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],y=[];do{a++;const B=a===o.length,X=B&&u.length!==0;if(B){if(f=y.length===0?void 0:h[h.length-1],c=d,d=y.pop(),X)if(s){c=c.slice();let Q=0;for(const[C,x]of u){const R=C-Q;x===null?(c.splice(R,1),Q++):c[R]=x}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Q,C]of u)c[Q]=C}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;h.push(f)}let z;if(!Array.isArray(c)){var E,$;Ar(c)||Z(!1,`Invalid AST Node: ${I(c)}.`);const Q=B?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:($=r.get(c.kind))===null||$===void 0?void 0:$.enter;if(z=Q==null?void 0:Q.call(t,c,f,d,h,y),z===St)break;if(z===!1){if(!B){h.pop();continue}}else if(z!==void 0&&(u.push([f,z]),!B))if(Ar(z))c=z;else{h.pop();continue}}if(z===void 0&&X&&u.push([f,c]),B)h.pop();else{var V;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(V=n[c.kind])!==null&&V!==void 0?V:[],a=-1,u=[],d&&y.push(d),d=c}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function Hr(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(l)){let i=!1;const s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){const{enter:c,leave:f}=xt(e[u],r);i||(i=c!=null||f!=null),s[u]=c,o[u]=f}if(!i)continue;const a={enter(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===!1)t[d]=c;else if(h===St)t[d]=St;else if(h!==void 0)return h}},leave(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===St)t[d]=St;else if(h!==void 0&&h!==!1)return h}else t[d]===c&&(t[d]=null)}};n[r]=a}return n}function xt(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function oc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ue(e){return Gt(e,uc)}const ac=80,uc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>j(e.definitions,`
|
|
13
|
+
`),'"""'+d+'"""'}var N;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(N||(N={}));class Hr{constructor(t){const n=new Yr(N.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==N.EOF)do if(t.next)t=t.next;else{const n=Uu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function Bs(e){return e===N.BANG||e===N.DOLLAR||e===N.AMP||e===N.PAREN_L||e===N.PAREN_R||e===N.SPREAD||e===N.COLON||e===N.EQUALS||e===N.AT||e===N.BRACKET_L||e===N.BRACKET_R||e===N.BRACE_L||e===N.PIPE||e===N.BRACE_R}function Bt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Kn(e,t){return Gs(e.charCodeAt(t))&&Qs(e.charCodeAt(t+1))}function Gs(e){return e>=55296&&e<=56319}function Qs(e){return e>=56320&&e<=57343}function Nt(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return N.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Ee(e,t,n,r,i){const s=e.line,o=1+n-e.lineStart;return new Yr(t,n,r,s,o,i)}function Uu(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return Pu(e,i);case 33:return Ee(e,N.BANG,i,i+1);case 36:return Ee(e,N.DOLLAR,i,i+1);case 38:return Ee(e,N.AMP,i,i+1);case 40:return Ee(e,N.PAREN_L,i,i+1);case 41:return Ee(e,N.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return Ee(e,N.SPREAD,i,i+3);break;case 58:return Ee(e,N.COLON,i,i+1);case 61:return Ee(e,N.EQUALS,i,i+1);case 64:return Ee(e,N.AT,i,i+1);case 91:return Ee(e,N.BRACKET_L,i,i+1);case 93:return Ee(e,N.BRACKET_R,i,i+1);case 123:return Ee(e,N.BRACE_L,i,i+1);case 124:return Ee(e,N.PIPE,i,i+1);case 125:return Ee(e,N.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Yu(e,i):qu(e,i)}if(an(s)||s===45)return ju(e,i,s);if(Jr(s))return Ju(e,i);throw Te(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Bt(s)||Kn(n,i)?`Unexpected character: ${Nt(e,i)}.`:`Invalid character: ${Nt(e,i)}.`)}return Ee(e,N.EOF,r,r)}function Pu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(s===10||s===13)break;if(Bt(s))++i;else if(Kn(n,i))i+=2;else break}return Ee(e,N.COMMENT,t,i,n.slice(t+1,i))}function ju(e,t,n){const r=e.source.body;let i=t,s=n,o=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),an(s))throw Te(e.source,i,`Invalid number, unexpected digit after 0: ${Nt(e,i)}.`)}else i=yr(e,i,s),s=r.charCodeAt(i);if(s===46&&(o=!0,s=r.charCodeAt(++i),i=yr(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(o=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=yr(e,i,s),s=r.charCodeAt(i)),s===46||Jr(s))throw Te(e.source,i,`Invalid number, expected digit but got: ${Nt(e,i)}.`);return Ee(e,o?N.FLOAT:N.INT,t,i,r.slice(t,i))}function yr(e,t,n){if(!an(n))throw Te(e.source,t,`Invalid number, expected digit but got: ${Nt(e,t)}.`);const r=e.source.body;let i=t+1;for(;an(r.charCodeAt(i));)++i;return i}function qu(e,t){const n=e.source.body,r=n.length;let i=t+1,s=i,o="";for(;i<r;){const a=n.charCodeAt(i);if(a===34)return o+=n.slice(s,i),Ee(e,N.STRING,t,i+1,o);if(a===92){o+=n.slice(s,i);const u=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Bu(e,i):Gu(e,i):Qu(e,i);o+=u.value,i+=u.size,s=i;continue}if(a===10||a===13)break;if(Bt(a))++i;else if(Kn(n,i))i+=2;else throw Te(e.source,i,`Invalid character within String: ${Nt(e,i)}.`)}throw Te(e.source,i,"Unterminated string.")}function Bu(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const s=n.charCodeAt(t+i++);if(s===125){if(i<5||!Bt(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Wt(s),r<0)break}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function Gu(e,t){const n=e.source.body,r=Ui(n,t+2);if(Bt(r))return{value:String.fromCodePoint(r),size:6};if(Gs(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Ui(n,t+8);if(Qs(i))return{value:String.fromCodePoint(r,i),size:12}}throw Te(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Ui(e,t){return Wt(e.charCodeAt(t))<<12|Wt(e.charCodeAt(t+1))<<8|Wt(e.charCodeAt(t+2))<<4|Wt(e.charCodeAt(t+3))}function Wt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Qu(e,t){const n=e.source.body;switch(n.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:`
|
|
14
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw Te(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Yu(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,s=t+3,o=s,a="";const u=[];for(;s<r;){const c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),u.push(a);const f=Ee(e,N.BLOCK_STRING,t,s+3,Cu(u).join(`
|
|
15
|
+
`));return e.line+=u.length-1,e.lineStart=i,f}if(c===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){a+=n.slice(o,s),o=s+1,s+=4;continue}if(c===10||c===13){a+=n.slice(o,s),u.push(a),c===13&&n.charCodeAt(s+1)===10?s+=2:++s,a="",o=s,i=s;continue}if(Bt(c))++s;else if(Kn(n,s))s+=2;else throw Te(e.source,s,`Invalid character within String: ${Nt(e,s)}.`)}throw Te(e.source,s,"Unterminated string.")}function Ju(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(js(s))++i;else break}return Ee(e,N.NAME,t,i,n.slice(t,i))}const Hu=10,Ys=2;function I(e){return Zn(e,[])}function Zn(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return zu(e,t);default:return String(e)}}function zu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Xu(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Zn(r,n)}else if(Array.isArray(e))return Ku(e,n);return Wu(e,n)}function Xu(e){return typeof e.toJSON=="function"}function Wu(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Ys?"["+Zu(e)+"]":"{ "+n.map(([i,s])=>i+": "+Zn(s,t)).join(", ")+" }"}function Ku(e,t){if(e.length===0)return"[]";if(t.length>Ys)return"[Array]";const n=Math.min(Hu,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(Zn(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function Zu(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const ze=globalThis.process?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var r;const i=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in t?t[Symbol.toStringTag]:(r=t.constructor)===null||r===void 0?void 0:r.name;if(i===s){const o=I(t);throw new Error(`Cannot use ${i} "${o}" from another module or realm.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
18
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
19
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
20
|
+
|
|
21
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
22
|
+
|
|
23
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
24
|
+
versions may have different capabilities and behavior. The data from one
|
|
25
|
+
version used in the function from another could produce confusing and
|
|
26
|
+
spurious results.`)}}return!1};class er{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||Z(!1,`Body must be a string. Received: ${I(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Z(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Z(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Js(e){return ze(e,er)}function tr(e,t){return new nr(e,t).parseDocument()}function Hs(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function ec(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function tc(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseTypeReference();return n.expectToken(N.EOF),r}class nr{constructor(t,n={}){const r=Js(t)?t:new er(t);this._lexer=new Hr(r),this._options=n,this._tokenCounter=0}parseName(){const t=this.expectToken(N.NAME);return this.node(t,{kind:l.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:l.DOCUMENT,definitions:this.many(N.SOF,this.parseDefinition,N.EOF)})}parseDefinition(){if(this.peek(N.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===N.NAME){switch(n.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()}if(t)throw Te(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(N.BRACE_L))return this.node(t,{kind:l.OPERATION_DEFINITION,operation:be.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(N.NAME)&&(r=this.parseName()),this.node(t,{kind:l.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(N.NAME);switch(t.value){case"query":return be.QUERY;case"mutation":return be.MUTATION;case"subscription":return be.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(N.PAREN_L,this.parseVariableDefinition,N.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:l.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(N.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(N.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(N.DOLLAR),this.node(t,{kind:l.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:l.SELECTION_SET,selections:this.many(N.BRACE_L,this.parseSelection,N.BRACE_R)})}parseSelection(){return this.peek(N.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(N.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:l.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(N.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(N.PAREN_L,n,N.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(N.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(N.NAME)?this.node(t,{kind:l.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:l.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:l.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case N.BRACKET_L:return this.parseList(t);case N.BRACE_L:return this.parseObject(t);case N.INT:return this.advanceLexer(),this.node(n,{kind:l.INT,value:n.value});case N.FLOAT:return this.advanceLexer(),this.node(n,{kind:l.FLOAT,value:n.value});case N.STRING:case N.BLOCK_STRING:return this.parseStringLiteral();case N.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:l.BOOLEAN,value:!0});case"false":return this.node(n,{kind:l.BOOLEAN,value:!1});case"null":return this.node(n,{kind:l.NULL});default:return this.node(n,{kind:l.ENUM,value:n.value})}case N.DOLLAR:if(t)if(this.expectToken(N.DOLLAR),this._lexer.token.kind===N.NAME){const r=this._lexer.token.value;throw Te(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:l.STRING,value:t.value,block:t.kind===N.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:l.LIST,values:this.any(N.BRACKET_L,n,N.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:l.OBJECT,fields:this.any(N.BRACE_L,n,N.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(N.COLON),this.node(n,{kind:l.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(N.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(N.AT),this.node(n,{kind:l.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(N.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(N.BRACKET_R),n=this.node(t,{kind:l.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(N.BANG)?this.node(t,{kind:l.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:l.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(N.STRING)||this.peek(N.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);return this.node(t,{kind:l.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(N.COLON);const r=this.parseNamedType();return this.node(t,{kind:l.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:l.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(N.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseFieldDefinition,N.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(N.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:l.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(N.PAREN_L,this.parseInputValueDef,N.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(N.COLON);const i=this.parseTypeReference();let s;this.expectOptionalToken(N.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:l.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:l.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:l.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(N.EQUALS)?this.delimitedMany(N.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:l.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(N.BRACE_L,this.parseEnumValueDefinition,N.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:l.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw Te(this._lexer.source,this._lexer.token.start,`${wn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(N.BRACE_L,this.parseInputValueDef,N.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===N.NAME)switch(t.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(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(N.BRACE_L,this.parseOperationTypeDefinition,N.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:l.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:l.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:l.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:l.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(N.AT);const r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:l.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(N.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(G,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Vs(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw Te(this._lexer.source,n.start,`Expected ${zs(t)}, found ${wn(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===N.NAME&&n.value===t)this.advanceLexer();else throw Te(this._lexer.source,n.start,`Expected "${t}", found ${wn(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===N.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return Te(this._lexer.source,n.start,`Unexpected ${wn(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==N.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw Te(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function wn(e){const t=e.value;return zs(e.kind)+(t!=null?` "${t}"`:"")}function zs(e){return Bs(e)?`"${e}"`:e}const nc=5;function st(e,t){const[n,r]=t?[e,t]:[void 0,e];let i=" Did you mean ";n&&(i+=n+" ");const s=r.map(u=>`"${u}"`);switch(s.length){case 0:return"";case 1:return i+s[0]+"?";case 2:return i+s[0]+" or "+s[1]+"?"}const o=s.slice(0,nc),a=o.pop();return i+o.join(", ")+", or "+a+"?"}function Pi(e){return e}function ot(e,t){const n=Object.create(null);for(const r of e)n[t(r)]=r;return n}function ft(e,t,n){const r=Object.create(null);for(const i of e)r[t(i)]=n(i);return r}function it(e,t){const n=Object.create(null);for(const r of Object.keys(e))n[r]=t(e[r],r);return n}function mn(e,t){let n=0,r=0;for(;n<e.length&&r<t.length;){let i=e.charCodeAt(n),s=t.charCodeAt(r);if(On(i)&&On(s)){let o=0;do++n,o=o*10+i-Rr,i=e.charCodeAt(n);while(On(i)&&o>0);let a=0;do++r,a=a*10+s-Rr,s=t.charCodeAt(r);while(On(s)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(i<s)return-1;if(i>s)return 1;++n,++r}}return e.length-t.length}const Rr=48,rc=57;function On(e){return!isNaN(e)&&Rr<=e&&e<=rc}function mt(e,t){const n=Object.create(null),r=new ic(e),i=Math.floor(e.length*.4)+1;for(const s of t){const o=r.measure(s,i);o!==void 0&&(n[s]=o)}return Object.keys(n).sort((s,o)=>{const a=n[s]-n[o];return a!==0?a:mn(s,o)})}class ic{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=ji(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const r=t.toLowerCase();if(this._inputLowerCase===r)return 1;let i=ji(r),s=this._inputArray;if(i.length<s.length){const f=i;i=s,s=f}const o=i.length,a=s.length;if(o-a>n)return;const u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){const d=u[(f-1)%3],h=u[f%3];let y=h[0]=f;for(let E=1;E<=a;E++){const C=i[f-1]===s[E-1]?0:1;let U=Math.min(d[E]+1,h[E-1]+1,d[E-1]+C);if(f>1&&E>1&&i[f-1]===s[E-2]&&i[f-2]===s[E-1]){const q=u[(f-2)%3][E-2];U=Math.min(U,q+1)}U<y&&(y=U),h[E]=U}if(y>n)return}const c=u[o%3][a];return c<=n?c:void 0}}function ji(e){const t=e.length,n=new Array(t);for(let r=0;r<t;++r)n[r]=e.charCodeAt(r);return n}function Be(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,r]of Object.entries(e))t[n]=r;return t}function sc(e){return`"${e.replace(oc,ac)}"`}const oc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ac(e){return uc[e.charCodeAt(0)]}const uc=["\\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"],St=Object.freeze({});function Gt(e,t,n=Us){const r=new Map;for(const q of Object.values(l))r.set(q,xt(t,q));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],y=[];do{a++;const q=a===o.length,X=q&&u.length!==0;if(q){if(f=y.length===0?void 0:h[h.length-1],c=d,d=y.pop(),X)if(s){c=c.slice();let Q=0;for(const[M,x]of u){const R=M-Q;x===null?(c.splice(R,1),Q++):c[R]=x}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Q,M]of u)c[Q]=M}a=i.index,o=i.keys,u=i.edits,s=i.inArray,i=i.prev}else if(d){if(f=s?a:o[a],c=d[f],c==null)continue;h.push(f)}let z;if(!Array.isArray(c)){var E,C;Dr(c)||Z(!1,`Invalid AST Node: ${I(c)}.`);const Q=q?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:(C=r.get(c.kind))===null||C===void 0?void 0:C.enter;if(z=Q==null?void 0:Q.call(t,c,f,d,h,y),z===St)break;if(z===!1){if(!q){h.pop();continue}}else if(z!==void 0&&(u.push([f,z]),!q))if(Dr(z))c=z;else{h.pop();continue}}if(z===void 0&&X&&u.push([f,c]),q)h.pop();else{var U;i={inArray:s,index:a,keys:o,edits:u,prev:i},s=Array.isArray(c),o=s?c:(U=n[c.kind])!==null&&U!==void 0?U:[],a=-1,u=[],d&&y.push(d),d=c}}while(i!==void 0);return u.length!==0?u[u.length-1][1]:e}function zr(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const r of Object.values(l)){let i=!1;const s=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){const{enter:c,leave:f}=xt(e[u],r);i||(i=c!=null||f!=null),s[u]=c,o[u]=f}if(!i)continue;const a={enter(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=s[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===!1)t[d]=c;else if(h===St)t[d]=St;else if(h!==void 0)return h}},leave(...u){const c=u[0];for(let d=0;d<e.length;d++)if(t[d]===null){var f;const h=(f=o[d])===null||f===void 0?void 0:f.apply(e[d],u);if(h===St)t[d]=St;else if(h!==void 0&&h!==!1)return h}else t[d]===c&&(t[d]=null)}};n[r]=a}return n}function xt(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function cc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ce(e){return Gt(e,fc)}const lc=80,fc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>j(e.definitions,`
|
|
27
|
+
|
|
28
|
+
`)},OperationDefinition:{leave(e){const t=ee("(",j(e.variableDefinitions,", "),")"),n=j([e.operation,j([e.name,t]),j(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",j(r," "))},SelectionSet:{leave:({selections:e})=>Ge(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const s=ee("",e,": ")+t;let o=s+ee("(",j(n,", "),")");return o.length>lc&&(o=s+ee(`(
|
|
18
29
|
`,Fn(j(n,`
|
|
19
30
|
`)),`
|
|
20
|
-
)`)),j([o,j(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",j(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>j(["...",ee("on ",e),j(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",j(n,", "),")")} on ${t} ${ee("",j(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?
|
|
21
|
-
`)+j(["schema",j(t," "),
|
|
31
|
+
)`)),j([o,j(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",j(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>j(["...",ee("on ",e),j(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",j(n,", "),")")} on ${t} ${ee("",j(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?qs(e):sc(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+j(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+j(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",j(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>ee("",e,`
|
|
32
|
+
`)+j(["schema",j(t," "),Ge(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
|
|
22
33
|
`)+j(["scalar",t,j(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
|
|
23
|
-
`)+j(["type",t,ee("implements ",j(n," & ")),j(r," "),
|
|
24
|
-
`)+t+(
|
|
34
|
+
`)+j(["type",t,ee("implements ",j(n," & ")),j(r," "),Ge(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
|
|
35
|
+
`)+t+(qi(n)?ee(`(
|
|
25
36
|
`,Fn(j(n,`
|
|
26
37
|
`)),`
|
|
27
38
|
)`):ee("(",j(n,", "),")"))+": "+r+ee(" ",j(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ee("",e,`
|
|
28
39
|
`)+j([t+": "+n,ee("= ",r),j(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
|
|
29
|
-
`)+j(["interface",t,ee("implements ",j(n," & ")),j(r," "),
|
|
40
|
+
`)+j(["interface",t,ee("implements ",j(n," & ")),j(r," "),Ge(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
|
|
30
41
|
`)+j(["union",t,j(n," "),ee("= ",j(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ee("",e,`
|
|
31
|
-
`)+j(["enum",t,j(n," "),
|
|
42
|
+
`)+j(["enum",t,j(n," "),Ge(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
|
|
32
43
|
`)+j([t,j(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ee("",e,`
|
|
33
|
-
`)+j(["input",t,j(n," "),
|
|
34
|
-
`)+"directive @"+t+(
|
|
44
|
+
`)+j(["input",t,j(n," "),Ge(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
|
|
45
|
+
`)+"directive @"+t+(qi(n)?ee(`(
|
|
35
46
|
`,Fn(j(n,`
|
|
36
47
|
`)),`
|
|
37
|
-
)`):ee("(",j(n,", "),")"))+(r?" repeatable":"")+" on "+j(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>j(["extend schema",j(e," "),
|
|
48
|
+
)`):ee("(",j(n,", "),")"))+(r?" repeatable":"")+" on "+j(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>j(["extend schema",j(e," "),Ge(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>j(["extend scalar",e,j(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>j(["extend type",e,ee("implements ",j(t," & ")),j(n," "),Ge(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>j(["extend interface",e,ee("implements ",j(t," & ")),j(n," "),Ge(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>j(["extend union",e,j(t," "),ee("= ",j(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>j(["extend enum",e,j(t," "),Ge(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>j(["extend input",e,j(t," "),Ge(n)]," ")}};function j(e,t=""){var n;return(n=e==null?void 0:e.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function Ge(e){return ee(`{
|
|
38
49
|
`,Fn(j(e,`
|
|
39
50
|
`)),`
|
|
40
51
|
}`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Fn(e){return ee(" ",e.replace(/\n/g,`
|
|
41
|
-
`))}function
|
|
42
|
-
`)))!==null&&t!==void 0?t:!1}function Pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(n=>Pn(n,t));case l.OBJECT:return lt(e.fields,n=>n.name.value,n=>Pn(n.value,t));case l.VARIABLE:return t==null?void 0:t[e.name.value]}}function Me(e){if(e!=null||Z(!1,"Must provide name."),typeof e=="string"||Z(!1,"Expected name to be a string."),e.length===0)throw new _("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!Us(e.charCodeAt(t)))throw new _(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Yr(e.charCodeAt(0)))throw new _(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Hs(e){if(e==="true"||e==="false"||e==="null")throw new _(`Enum values cannot be named: ${e}`);return Me(e)}function yn(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||le(e)||ce(e)||H(e)}function cc(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Ve(e){return ze(e,tt)}function lc(e){if(!Ve(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return ze(e,Pe)}function zs(e){if(!te(e))throw new Error(`Expected ${I(e)} to be a GraphQL Object type.`);return e}function re(e){return ze(e,$t)}function Xs(e){if(!re(e))throw new Error(`Expected ${I(e)} to be a GraphQL Interface type.`);return e}function Ne(e){return ze(e,Ct)}function fc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function ge(e){return ze(e,pt)}function dc(e){if(!ge(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function le(e){return ze(e,Mt)}function pc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function ce(e){return ze(e,we)}function hc(e){if(!ce(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function H(e){return ze(e,K)}function mc(e){if(!H(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function Le(e){return Ve(e)||ge(e)||le(e)||vn(e)&&Le(e.ofType)}function yc(e){if(!Le(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function dt(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||vn(e)&&dt(e.ofType)}function vc(e){if(!dt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function Ze(e){return Ve(e)||ge(e)}function Ec(e){if(!Ze(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function et(e){return te(e)||re(e)||Ne(e)}function gc(e){if(!et(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function We(e){return re(e)||Ne(e)}function Tc(e){if(!We(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){yn(t)||Z(!1,`Expected ${I(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class K{constructor(t){zr(t)||Z(!1,`Expected ${I(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function vn(e){return ce(e)||H(e)}function bc(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function zr(e){return yn(e)&&!H(e)}function Ws(e){if(!zr(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function Xr(e){if(e)return H(e)?e.ofType:e}function En(e){return Ve(e)||te(e)||re(e)||Ne(e)||ge(e)||le(e)}function _c(e){if(!En(e))throw new Error(`Expected ${I(e)} to be a GraphQL named type.`);return e}function Se(e){if(e){let t=e;for(;vn(t);)t=t.ofType;return t}}function Wr(e){return typeof e=="function"?e():e}function Kr(e){return typeof e=="function"?e():e}class tt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:Ui;this.name=Me(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Ui,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(Pn(a,u)),this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||Z(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${I(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||Z(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Z(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Pe{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>Zs(t),this._interfaces=()=>Ks(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||Z(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${I(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:to(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Ks(e){var t;const n=Wr((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||Z(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function Zs(e){const t=Kr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),rt(t,(n,r)=>{var i;kt(n)||Z(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||Z(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${I(n.resolve)}.`);const s=(i=n.args)!==null&&i!==void 0?i:{};return kt(s)||Z(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Me(r),description:n.description,type:n.type,args:eo(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}})}function eo(e){return Object.entries(e).map(([t,n])=>({name:Me(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function kt(e){return Ce(e)&&!Array.isArray(e)}function to(e){return rt(e,t=>({description:t.description,type:t.type,args:no(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function no(e){return lt(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function mt(e){return H(e.type)&&e.defaultValue===void 0}class $t{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Zs.bind(void 0,t),this._interfaces=Ks.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:to(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ct{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Nc.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Nc(e){const t=Wr(e.types);return Array.isArray(t)||Z(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class pt{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=Ic(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=st(this._values,r=>r.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const n=this._valueLookup.get(t);if(n===void 0)throw new _(`Enum "${this.name}" cannot represent value: ${I(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=I(t);throw new _(`Enum "${this.name}" cannot represent non-string value: ${r}.`+An(this,r))}const n=this.getValue(t);if(n==null)throw new _(`Value "${t}" does not exist in "${this.name}" enum.`+An(this,t));return n.value}parseLiteral(t,n){if(t.kind!==l.ENUM){const i=ue(t);throw new _(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+An(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=ue(t);throw new _(`Value "${i}" does not exist in "${this.name}" enum.`+An(this,i),{nodes:t})}return r.value}toConfig(){const t=lt(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function An(e,t){const n=e.getValues().map(i=>i.name),r=ht(t,n);return it("the enum value",r)}function Ic(e,t){return kt(t)||Z(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kt(r)||Z(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:Hs(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Be(r.extensions),astNode:r.astNode}))}class Mt{constructor(t){var n;this.name=Me(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=wc.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=rt(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function wc(e){const t=Kr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),rt(t,(n,r)=>(!("resolve"in n)||Z(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Me(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function rr(e){return H(e.type)&&e.defaultValue===void 0}function jn(e,t){return e===t?!0:H(e)&&H(t)||ce(e)&&ce(t)?jn(e.ofType,t.ofType):!1}function Tt(e,t,n){return t===n?!0:H(n)?H(t)?Tt(e,t.ofType,n.ofType):!1:H(t)?Tt(e,t.ofType,n):ce(n)?ce(t)?Tt(e,t.ofType,n.ofType):!1:ce(t)?!1:We(n)&&(re(t)||te(t))&&e.isSubType(n,t)}function Rr(e,t,n){return t===n?!0:We(t)?We(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):We(n)?e.isSubType(n,t):!1}const xn=2147483647,$n=-2147483648,ro=new tt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new _(`Int cannot represent non-integer value: ${I(t)}`);if(n>xn||n<$n)throw new _("Int cannot represent non 32-bit signed integer value: "+I(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new _(`Int cannot represent non-integer value: ${I(e)}`);if(e>xn||e<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==l.INT)throw new _(`Int cannot represent non-integer value: ${ue(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>xn||t<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),io=new tt({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new _(`Float cannot represent non numeric value: ${I(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new _(`Float cannot represent non numeric value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.FLOAT&&e.kind!==l.INT)throw new _(`Float cannot represent non numeric value: ${ue(e)}`,e);return parseFloat(e.value)}}),he=new tt({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new _(`String cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e!="string")throw new _(`String cannot represent a non string value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.STRING)throw new _(`String cannot represent a non string value: ${ue(e)}`,{nodes:e});return e.value}}),xe=new tt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new _(`Boolean cannot represent a non boolean value: ${I(t)}`)},parseValue(e){if(typeof e!="boolean")throw new _(`Boolean cannot represent a non boolean value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.BOOLEAN)throw new _(`Boolean cannot represent a non boolean value: ${ue(e)}`,{nodes:e});return e.value}}),Zr=new tt({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new _(`ID cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new _(`ID cannot represent value: ${I(e)}`)},parseLiteral(e){if(e.kind!==l.STRING&&e.kind!==l.INT)throw new _("ID cannot represent a non-string and non-integer value: "+ue(e),{nodes:e});return e.value}}),gn=Object.freeze([he,ro,io,xe,Zr]);function ir(e){return gn.some(({name:t})=>e.name===t)}function Tn(e){if(Ce(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Ce(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function sr(e){return ze(e,nt)}function Oc(e){if(!sr(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class nt{constructor(t){var n,r;this.name=Me(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Be(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||Z(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Ce(i)&&!Array.isArray(i)||Z(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=eo(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:no(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ei=new nt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K(xe),description:"Included when true."}}}),ti=new nt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K(xe),description:"Skipped when true."}}}),ni="No longer supported",or=new nt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[G.FIELD_DEFINITION,G.ARGUMENT_DEFINITION,G.INPUT_FIELD_DEFINITION,G.ENUM_VALUE],args:{reason:{type:he,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ni}}}),ri=new nt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[G.SCALAR],args:{url:{type:new K(he),description:"The URL that specifies the behavior of this scalar."}}}),yt=Object.freeze([ei,ti,or,ri]);function ii(e){return yt.some(({name:t})=>t===e.name)}function si(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function ft(e,t){if(H(t)){const n=ft(e,t.ofType);return(n==null?void 0:n.kind)===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(ce(t)){const n=t.ofType;if(si(e)){const r=[];for(const i of e){const s=ft(i,n);s!=null&&r.push(s)}return{kind:l.LIST,values:r}}return ft(e,n)}if(le(t)){if(!Ce(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=ft(e[r.name],r.type);i&&n.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:r.name},value:i})}return{kind:l.OBJECT,fields:n}}if(Ze(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:l.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Bi.test(r)?{kind:l.INT,value:r}:{kind:l.FLOAT,value:r}}if(typeof n=="string")return ge(t)?{kind:l.ENUM,value:n}:t===Zr&&Bi.test(n)?{kind:l.INT,value:n}:{kind:l.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${I(n)}.`)}me(!1,"Unexpected input type: "+I(t))}const Bi=/^-?(?:0|[1-9][0-9]*)$/,ar=new Pe({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:he,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new K(new we(new K(Ue))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new K(Ue),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Ue,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Ue,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new K(new we(new K(oi))),resolve:e=>e.getDirectives()}})}),oi=new Pe({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
52
|
+
`))}function qi(e){var t;return(t=e==null?void 0:e.some(n=>n.includes(`
|
|
53
|
+
`)))!==null&&t!==void 0?t:!1}function Pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(n=>Pn(n,t));case l.OBJECT:return ft(e.fields,n=>n.name.value,n=>Pn(n.value,t));case l.VARIABLE:return t==null?void 0:t[e.name.value]}}function Ve(e){if(e!=null||Z(!1,"Must provide name."),typeof e=="string"||Z(!1,"Expected name to be a string."),e.length===0)throw new _("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!js(e.charCodeAt(t)))throw new _(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!Jr(e.charCodeAt(0)))throw new _(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function Xs(e){if(e==="true"||e==="false"||e==="null")throw new _(`Enum values cannot be named: ${e}`);return Ve(e)}function yn(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||fe(e)||le(e)||H(e)}function dc(e){if(!yn(e))throw new Error(`Expected ${I(e)} to be a GraphQL type.`);return e}function Ue(e){return ze(e,nt)}function pc(e){if(!Ue(e))throw new Error(`Expected ${I(e)} to be a GraphQL Scalar type.`);return e}function te(e){return ze(e,je)}function Ws(e){if(!te(e))throw new Error(`Expected ${I(e)} to be a GraphQL Object type.`);return e}function re(e){return ze(e,$t)}function Ks(e){if(!re(e))throw new Error(`Expected ${I(e)} to be a GraphQL Interface type.`);return e}function Ne(e){return ze(e,Ct)}function hc(e){if(!Ne(e))throw new Error(`Expected ${I(e)} to be a GraphQL Union type.`);return e}function ge(e){return ze(e,ht)}function mc(e){if(!ge(e))throw new Error(`Expected ${I(e)} to be a GraphQL Enum type.`);return e}function fe(e){return ze(e,Mt)}function yc(e){if(!fe(e))throw new Error(`Expected ${I(e)} to be a GraphQL Input Object type.`);return e}function le(e){return ze(e,we)}function vc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function H(e){return ze(e,K)}function Ec(e){if(!H(e))throw new Error(`Expected ${I(e)} to be a GraphQL Non-Null type.`);return e}function ke(e){return Ue(e)||ge(e)||fe(e)||vn(e)&&ke(e.ofType)}function gc(e){if(!ke(e))throw new Error(`Expected ${I(e)} to be a GraphQL input type.`);return e}function pt(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||vn(e)&&pt(e.ofType)}function Tc(e){if(!pt(e))throw new Error(`Expected ${I(e)} to be a GraphQL output type.`);return e}function et(e){return Ue(e)||ge(e)}function bc(e){if(!et(e))throw new Error(`Expected ${I(e)} to be a GraphQL leaf type.`);return e}function tt(e){return te(e)||re(e)||Ne(e)}function _c(e){if(!tt(e))throw new Error(`Expected ${I(e)} to be a GraphQL composite type.`);return e}function We(e){return re(e)||Ne(e)}function Nc(e){if(!We(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){yn(t)||Z(!1,`Expected ${I(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class K{constructor(t){Xr(t)||Z(!1,`Expected ${I(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function vn(e){return le(e)||H(e)}function Ic(e){if(!vn(e))throw new Error(`Expected ${I(e)} to be a GraphQL wrapping type.`);return e}function Xr(e){return yn(e)&&!H(e)}function Zs(e){if(!Xr(e))throw new Error(`Expected ${I(e)} to be a GraphQL nullable type.`);return e}function Wr(e){if(e)return H(e)?e.ofType:e}function En(e){return Ue(e)||te(e)||re(e)||Ne(e)||ge(e)||fe(e)}function wc(e){if(!En(e))throw new Error(`Expected ${I(e)} to be a GraphQL named type.`);return e}function Re(e){if(e){let t=e;for(;vn(t);)t=t.ofType;return t}}function Kr(e){return typeof e=="function"?e():e}function Zr(e){return typeof e=="function"?e():e}class nt{constructor(t){var n,r,i,s;const o=(n=t.parseValue)!==null&&n!==void 0?n:Pi;this.name=Ve(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(r=t.serialize)!==null&&r!==void 0?r:Pi,this.parseValue=o,this.parseLiteral=(i=t.parseLiteral)!==null&&i!==void 0?i:(a,u)=>o(Pn(a,u)),this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||Z(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${I(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||Z(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||Z(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class je{constructor(t){var n;this.name=Ve(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>to(t),this._interfaces=()=>eo(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||Z(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${I(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ro(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function eo(e){var t;const n=Kr((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||Z(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function to(e){const t=Zr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),it(t,(n,r)=>{var i;kt(n)||Z(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||Z(!1,`${e.name}.${r} field resolver must be a function if provided, but got: ${I(n.resolve)}.`);const s=(i=n.args)!==null&&i!==void 0?i:{};return kt(s)||Z(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Ve(r),description:n.description,type:n.type,args:no(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}})}function no(e){return Object.entries(e).map(([t,n])=>({name:Ve(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function kt(e){return Me(e)&&!Array.isArray(e)}function ro(e){return it(e,t=>({description:t.description,type:t.type,args:io(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function io(e){return ft(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function yt(e){return H(e.type)&&e.defaultValue===void 0}class $t{constructor(t){var n;this.name=Ve(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=to.bind(void 0,t),this._interfaces=eo.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:ro(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ct{constructor(t){var n;this.name=Ve(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=Oc.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||Z(!1,`${this.name} must provide "resolveType" as a function, but got: ${I(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Oc(e){const t=Kr(e.types);return Array.isArray(t)||Z(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class ht{constructor(t){var n;this.name=Ve(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=Ac(this.name,t.values),this._valueLookup=new Map(this._values.map(r=>[r.value,r])),this._nameLookup=ot(this._values,r=>r.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const n=this._valueLookup.get(t);if(n===void 0)throw new _(`Enum "${this.name}" cannot represent value: ${I(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const r=I(t);throw new _(`Enum "${this.name}" cannot represent non-string value: ${r}.`+An(this,r))}const n=this.getValue(t);if(n==null)throw new _(`Value "${t}" does not exist in "${this.name}" enum.`+An(this,t));return n.value}parseLiteral(t,n){if(t.kind!==l.ENUM){const i=ce(t);throw new _(`Enum "${this.name}" cannot represent non-enum value: ${i}.`+An(this,i),{nodes:t})}const r=this.getValue(t.value);if(r==null){const i=ce(t);throw new _(`Value "${i}" does not exist in "${this.name}" enum.`+An(this,i),{nodes:t})}return r.value}toConfig(){const t=ft(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function An(e,t){const n=e.getValues().map(i=>i.name),r=mt(t,n);return st("the enum value",r)}function Ac(e,t){return kt(t)||Z(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kt(r)||Z(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:Xs(n),description:r.description,value:r.value!==void 0?r.value:n,deprecationReason:r.deprecationReason,extensions:Be(r.extensions),astNode:r.astNode}))}class Mt{constructor(t){var n;this.name=Ve(t.name),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=Dc.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=it(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Dc(e){const t=Zr(e.fields);return kt(t)||Z(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),it(t,(n,r)=>(!("resolve"in n)||Z(!1,`${e.name}.${r} field has a resolve property, but Input Types cannot define resolvers.`),{name:Ve(r),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}))}function rr(e){return H(e.type)&&e.defaultValue===void 0}function jn(e,t){return e===t?!0:H(e)&&H(t)||le(e)&&le(t)?jn(e.ofType,t.ofType):!1}function Tt(e,t,n){return t===n?!0:H(n)?H(t)?Tt(e,t.ofType,n.ofType):!1:H(t)?Tt(e,t.ofType,n):le(n)?le(t)?Tt(e,t.ofType,n.ofType):!1:le(t)?!1:We(n)&&(re(t)||te(t))&&e.isSubType(n,t)}function Lr(e,t,n){return t===n?!0:We(t)?We(n)?e.getPossibleTypes(t).some(r=>e.isSubType(n,r)):e.isSubType(t,n):We(n)?e.isSubType(n,t):!1}const xn=2147483647,$n=-2147483648,so=new nt({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new _(`Int cannot represent non-integer value: ${I(t)}`);if(n>xn||n<$n)throw new _("Int cannot represent non 32-bit signed integer value: "+I(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new _(`Int cannot represent non-integer value: ${I(e)}`);if(e>xn||e<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==l.INT)throw new _(`Int cannot represent non-integer value: ${ce(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>xn||t<$n)throw new _(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),oo=new nt({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new _(`Float cannot represent non numeric value: ${I(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new _(`Float cannot represent non numeric value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.FLOAT&&e.kind!==l.INT)throw new _(`Float cannot represent non numeric value: ${ce(e)}`,e);return parseFloat(e.value)}}),me=new nt({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new _(`String cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e!="string")throw new _(`String cannot represent a non string value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.STRING)throw new _(`String cannot represent a non string value: ${ce(e)}`,{nodes:e});return e.value}}),$e=new nt({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Tn(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new _(`Boolean cannot represent a non boolean value: ${I(t)}`)},parseValue(e){if(typeof e!="boolean")throw new _(`Boolean cannot represent a non boolean value: ${I(e)}`);return e},parseLiteral(e){if(e.kind!==l.BOOLEAN)throw new _(`Boolean cannot represent a non boolean value: ${ce(e)}`,{nodes:e});return e.value}}),ei=new nt({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Tn(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new _(`ID cannot represent value: ${I(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new _(`ID cannot represent value: ${I(e)}`)},parseLiteral(e){if(e.kind!==l.STRING&&e.kind!==l.INT)throw new _("ID cannot represent a non-string and non-integer value: "+ce(e),{nodes:e});return e.value}}),gn=Object.freeze([me,so,oo,$e,ei]);function ir(e){return gn.some(({name:t})=>e.name===t)}function Tn(e){if(Me(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Me(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function sr(e){return ze(e,rt)}function Sc(e){if(!sr(e))throw new Error(`Expected ${I(e)} to be a GraphQL directive.`);return e}class rt{constructor(t){var n,r;this.name=Ve(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=Be(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||Z(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Me(i)&&!Array.isArray(i)||Z(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=no(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:io(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const ti=new rt({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K($e),description:"Included when true."}}}),ni=new rt({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[G.FIELD,G.FRAGMENT_SPREAD,G.INLINE_FRAGMENT],args:{if:{type:new K($e),description:"Skipped when true."}}}),ri="No longer supported",or=new rt({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[G.FIELD_DEFINITION,G.ARGUMENT_DEFINITION,G.INPUT_FIELD_DEFINITION,G.ENUM_VALUE],args:{reason:{type:me,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:ri}}}),ii=new rt({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[G.SCALAR],args:{url:{type:new K(me),description:"The URL that specifies the behavior of this scalar."}}}),vt=Object.freeze([ti,ni,or,ii]);function si(e){return vt.some(({name:t})=>t===e.name)}function oi(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function dt(e,t){if(H(t)){const n=dt(e,t.ofType);return(n==null?void 0:n.kind)===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(le(t)){const n=t.ofType;if(oi(e)){const r=[];for(const i of e){const s=dt(i,n);s!=null&&r.push(s)}return{kind:l.LIST,values:r}}return dt(e,n)}if(fe(t)){if(!Me(e))return null;const n=[];for(const r of Object.values(t.getFields())){const i=dt(e[r.name],r.type);i&&n.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:r.name},value:i})}return{kind:l.OBJECT,fields:n}}if(et(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:l.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const r=String(n);return Bi.test(r)?{kind:l.INT,value:r}:{kind:l.FLOAT,value:r}}if(typeof n=="string")return ge(t)?{kind:l.ENUM,value:n}:t===ei&&Bi.test(n)?{kind:l.INT,value:n}:{kind:l.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${I(n)}.`)}ye(!1,"Unexpected input type: "+I(t))}const Bi=/^-?(?:0|[1-9][0-9]*)$/,ar=new je({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:me,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new K(new we(new K(Pe))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new K(Pe),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Pe,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Pe,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new K(new we(new K(ai))),resolve:e=>e.getDirectives()}})}),ai=new je({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
43
54
|
|
|
44
|
-
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},isRepeatable:{type:new K(xe),resolve:e=>e.isRepeatable},locations:{type:new K(new we(new K(ai))),resolve:e=>e.locations},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),ai=new pt({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:G.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:G.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:G.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:G.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:G.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:G.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:G.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:G.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:G.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:G.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:G.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:G.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:G.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:G.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:G.UNION,description:"Location adjacent to a union definition."},ENUM:{value:G.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:G.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:G.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:G.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Ue=new Pe({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new K(li),resolve(e){if(Ve(e))return se.SCALAR;if(te(e))return se.OBJECT;if(re(e))return se.INTERFACE;if(Ne(e))return se.UNION;if(ge(e))return se.ENUM;if(le(e))return se.INPUT_OBJECT;if(ce(e))return se.LIST;if(H(e))return se.NON_NULL;me(!1,`Unexpected type: "${I(e)}".`)}},name:{type:he,resolve:e=>"name"in e?e.name:void 0},description:{type:he,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:he,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new we(new K(ui)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(te(e)||re(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new we(new K(Ue)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new K(Ue)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new K(ci)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ge(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new we(new K(bn)),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(le(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Ue,resolve:e=>"ofType"in e?e.ofType:void 0}})}),ui=new Pe({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:xe,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new K(Ue),resolve:e=>e.type},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})}),bn=new Pe({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},type:{type:new K(Ue),resolve:e=>e.type},defaultValue:{type:he,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=ft(n,t);return r?ue(r):null}},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})}),ci=new Pe({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new K(he),resolve:e=>e.name},description:{type:he,resolve:e=>e.description},isDeprecated:{type:new K(xe),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:he,resolve:e=>e.deprecationReason}})});var se;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(se||(se={}));const li=new pt({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:se.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:se.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:se.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:se.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:se.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:se.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:se.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:se.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),un={name:"__schema",type:new K(ar),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},cn={name:"__type",type:Ue,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new K(he),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ln={name:"__typename",type:new K(he),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},_n=Object.freeze([ar,oi,ai,Ue,ui,bn,ci,li]);function wt(e){return _n.some(({name:t})=>e.name===t)}function so(e){return ze(e,Qt)}function fi(e){if(!so(e))throw new Error(`Expected ${I(e)} to be a GraphQL schema.`);return e}class Qt{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,Ce(t)||Z(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||Z(!1,`"types" must be Array if provided but got: ${I(t.types)}.`),!t.directives||Array.isArray(t.directives)||Z(!1,`"directives" must be Array if provided but got: ${I(t.directives)}.`),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:yt;const i=new Set(t.types);if(t.types!=null)for(const s of t.types)i.delete(s),Ge(s,i);this._queryType!=null&&Ge(this._queryType,i),this._mutationType!=null&&Ge(this._mutationType,i),this._subscriptionType!=null&&Ge(this._subscriptionType,i);for(const s of this._directives)if(sr(s))for(const o of s.args)Ge(o.type,i);Ge(ar,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of i){if(s==null)continue;const o=s.name;if(o||Z(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=s,re(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s)}}else if(te(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case be.QUERY:return this.getQueryType();case be.MUTATION:return this.getMutationType();case be.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ne(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Ne(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const s of i.objects)r[s.name]=!0;for(const s of i.interfaces)r[s.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Ge(e,t){const n=Se(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())Ge(r,t);else if(te(n)||re(n)){for(const r of n.getInterfaces())Ge(r,t);for(const r of Object.values(n.getFields())){Ge(r.type,t);for(const i of r.args)Ge(i.type,t)}}else if(le(n))for(const r of Object.values(n.getFields()))Ge(r.type,t)}return t}function di(e){if(fi(e),e.__validationErrors)return e.__validationErrors;const t=new Ac(e);Dc(t),Sc(t),Rc(t);const n=t.getErrors();return e.__validationErrors=n,n}function pi(e){const t=di(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
|
|
55
|
+
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new K(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isRepeatable:{type:new K($e),resolve:e=>e.isRepeatable},locations:{type:new K(new we(new K(ui))),resolve:e=>e.locations},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),ui=new ht({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:G.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:G.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:G.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:G.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:G.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:G.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:G.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:G.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:G.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:G.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:G.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:G.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:G.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:G.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:G.UNION,description:"Location adjacent to a union definition."},ENUM:{value:G.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:G.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:G.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:G.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Pe=new je({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new K(fi),resolve(e){if(Ue(e))return se.SCALAR;if(te(e))return se.OBJECT;if(re(e))return se.INTERFACE;if(Ne(e))return se.UNION;if(ge(e))return se.ENUM;if(fe(e))return se.INPUT_OBJECT;if(le(e))return se.LIST;if(H(e))return se.NON_NULL;ye(!1,`Unexpected type: "${I(e)}".`)}},name:{type:me,resolve:e=>"name"in e?e.name:void 0},description:{type:me,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:me,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new we(new K(ci)),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(te(e)||re(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},interfaces:{type:new we(new K(Pe)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new K(Pe)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new K(li)),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ge(e)){const n=e.getValues();return t?n:n.filter(r=>r.deprecationReason==null)}}},inputFields:{type:new we(new K(bn)),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(fe(e)){const n=Object.values(e.getFields());return t?n:n.filter(r=>r.deprecationReason==null)}}},ofType:{type:Pe,resolve:e=>"ofType"in e?e.ofType:void 0}})}),ci=new je({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new K(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},args:{type:new K(new we(new K(bn))),args:{includeDeprecated:{type:$e,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new K(Pe),resolve:e=>e.type},isDeprecated:{type:new K($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),bn=new je({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new K(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},type:{type:new K(Pe),resolve:e=>e.type},defaultValue:{type:me,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,r=dt(n,t);return r?ce(r):null}},isDeprecated:{type:new K($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})}),li=new je({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new K(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isDeprecated:{type:new K($e),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:me,resolve:e=>e.deprecationReason}})});var se;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(se||(se={}));const fi=new ht({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:se.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:se.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:se.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:se.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:se.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:se.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:se.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:se.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),un={name:"__schema",type:new K(ar),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:r})=>r,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},cn={name:"__type",type:Pe,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new K(me),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:r})=>r.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ln={name:"__typename",type:new K(me),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:r})=>r.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},_n=Object.freeze([ar,ai,ui,Pe,ci,bn,li,fi]);function wt(e){return _n.some(({name:t})=>e.name===t)}function ao(e){return ze(e,Qt)}function di(e){if(!ao(e))throw new Error(`Expected ${I(e)} to be a GraphQL schema.`);return e}class Qt{constructor(t){var n,r;this.__validationErrors=t.assumeValid===!0?[]:void 0,Me(t)||Z(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||Z(!1,`"types" must be Array if provided but got: ${I(t.types)}.`),!t.directives||Array.isArray(t.directives)||Z(!1,`"directives" must be Array if provided but got: ${I(t.directives)}.`),this.description=t.description,this.extensions=Be(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(r=t.directives)!==null&&r!==void 0?r:vt;const i=new Set(t.types);if(t.types!=null)for(const s of t.types)i.delete(s),Qe(s,i);this._queryType!=null&&Qe(this._queryType,i),this._mutationType!=null&&Qe(this._mutationType,i),this._subscriptionType!=null&&Qe(this._subscriptionType,i);for(const s of this._directives)if(sr(s))for(const o of s.args)Qe(o.type,i);Qe(ar,i),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of i){if(s==null)continue;const o=s.name;if(o||Z(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=s,re(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(s)}}else if(te(s)){for(const a of s.getInterfaces())if(re(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case be.QUERY:return this.getQueryType();case be.MUTATION:return this.getMutationType();case be.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Ne(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let r=this._subTypeMap[t.name];if(r===void 0){if(r=Object.create(null),Ne(t))for(const i of t.getTypes())r[i.name]=!0;else{const i=this.getImplementations(t);for(const s of i.objects)r[s.name]=!0;for(const s of i.interfaces)r[s.name]=!0}this._subTypeMap[t.name]=r}return r[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function Qe(e,t){const n=Re(e);if(!t.has(n)){if(t.add(n),Ne(n))for(const r of n.getTypes())Qe(r,t);else if(te(n)||re(n)){for(const r of n.getInterfaces())Qe(r,t);for(const r of Object.values(n.getFields())){Qe(r.type,t);for(const i of r.args)Qe(i.type,t)}}else if(fe(n))for(const r of Object.values(n.getFields()))Qe(r.type,t)}return t}function pi(e){if(di(e),e.__validationErrors)return e.__validationErrors;const t=new Rc(e);Lc(t),kc(t),Fc(t);const n=t.getErrors();return e.__validationErrors=n,n}function hi(e){const t=pi(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
|
|
45
56
|
|
|
46
|
-
`))}class Ac{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _(t,{nodes:r}))}getErrors(){return this._errors}}function Dc(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!te(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${I(n)}.`,(r=vr(t,be.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!te(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${I(i)}.`,(s=vr(t,be.MUTATION))!==null&&s!==void 0?s:i.astNode)}const o=t.getSubscriptionType();if(o&&!te(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${I(o)}.`,(a=vr(t,be.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function vr(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function Sc(e){for(const n of e.schema.getDirectives()){if(!sr(n)){e.reportError(`Expected directive but got: ${I(n)}.`,n==null?void 0:n.astNode);continue}It(e,n);for(const r of n.args)if(It(e,r),Le(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${I(r.type)}.`,r.astNode),mt(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[hi(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function It(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Rc(e){const t=Cc(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!En(r)){e.reportError(`Expected GraphQL named type but got: ${I(r)}.`,r.astNode);continue}wt(r)||It(e,r),te(r)||re(r)?(qi(e,r),Gi(e,r)):Ne(r)?Fc(e,r):ge(r)?xc(e,r):le(r)&&($c(e,r),t(r))}}function qi(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(It(e,o),!dt(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${I(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(const a of o.args){const u=a.name;if(It(e,a),!Le(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${I(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type)}if(mt(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[hi(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Gi(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!re(r)){e.reportError(`Type ${I(t)} must only implement Interface types, it cannot implement ${I(r)}.`,nn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,nn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,nn(t,r));continue}n[r.name]=!0,kc(e,t,r),Lc(e,t,r)}}function Lc(e,t,n){const r=t.getFields();for(const u of Object.values(n.getFields())){const c=u.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!Tt(e.schema,f.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${I(u.type)} but ${t.name}.${c} is type ${I(f.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type])}for(const d of u.args){const h=d.name,y=f.args.find(E=>E.name===h);if(!y){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!jn(d.type,y.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expects type ${I(d.type)} but ${t.name}.${c}(${h}:) is type ${I(y.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=y.astNode)===null||a===void 0?void 0:a.type])}}for(const d of f.args){const h=d.name;!u.args.find(E=>E.name===h)&&mt(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${h} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,u.astNode])}}}function kc(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...nn(n,i),...nn(t,n)])}function Fc(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Qi(t,i.name));continue}r[i.name]=!0,te(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${I(i)}.`,Qi(t,String(i)))}}function xc(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)It(e,r)}function $c(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){if(It(e,s),!Le(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${I(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(rr(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[hi(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function Cc(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;const o=Object.values(s.getFields());for(const a of o)if(H(a.type)&&le(a.type.ofType)){const u=a.type.ofType,c=r[u.name];if(n.push(a),c===void 0)i(u);else{const f=n.slice(c),d=f.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,f.map(h=>h.astNode))}n.pop()}r[s.name]=void 0}}function nn(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function Qi(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function hi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===or.name)}function ke(e,t){switch(t.kind){case l.LIST_TYPE:{const n=ke(e,t.type);return n&&new we(n)}case l.NON_NULL_TYPE:{const n=ke(e,t.type);return n&&new K(n)}case l.NAMED_TYPE:return e.getType(t.name.value)}}class mi{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??Mc,n&&(Le(n)&&this._inputTypeStack.push(n),et(n)&&this._parentTypeStack.push(n),dt(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case l.SELECTION_SET:{const i=Se(this.getType());this._parentTypeStack.push(et(i)?i:void 0);break}case l.FIELD:{const i=this.getParentType();let s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(dt(o)?o:void 0);break}case l.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case l.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(te(i)?i:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{const i=t.typeCondition,s=i?ke(n,i):Se(this.getType());this._typeStack.push(dt(s)?s:void 0);break}case l.VARIABLE_DEFINITION:{const i=ke(n,t.type);this._inputTypeStack.push(Le(i)?i:void 0);break}case l.ARGUMENT:{var r;let i,s;const o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.LIST:{const i=Xr(this.getInputType()),s=ce(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.OBJECT_FIELD:{const i=Se(this.getInputType());let s,o;le(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Le(s)?s:void 0);break}case l.ENUM:{const i=Se(this.getInputType());let s;ge(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}}}function Mc(e,t,n){const r=n.name.value;if(r===un.name&&e.getQueryType()===t)return un;if(r===cn.name&&e.getQueryType()===t)return cn;if(r===ln.name&&et(t))return ln;if(te(t)||re(t))return t.getFields()[r]}function yi(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=xt(t,r.kind).enter;if(i){const s=i.apply(t,n);return s!==void 0&&(e.leave(r),Ar(s)&&e.enter(s)),s}},leave(...n){const r=n[0],i=xt(t,r.kind).leave;let s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function Vc(e){return vi(e)||Ei(e)||gi(e)}function vi(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function Uc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function oo(e){return e.kind===l.VARIABLE||e.kind===l.INT||e.kind===l.FLOAT||e.kind===l.STRING||e.kind===l.BOOLEAN||e.kind===l.NULL||e.kind===l.ENUM||e.kind===l.LIST||e.kind===l.OBJECT}function Lr(e){return oo(e)&&(e.kind===l.LIST?e.values.some(Lr):e.kind===l.OBJECT?e.fields.some(t=>Lr(t.value)):e.kind!==l.VARIABLE)}function Pc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function Ei(e){return e.kind===l.SCHEMA_DEFINITION||Yt(e)||e.kind===l.DIRECTIVE_DEFINITION}function Yt(e){return e.kind===l.SCALAR_TYPE_DEFINITION||e.kind===l.OBJECT_TYPE_DEFINITION||e.kind===l.INTERFACE_TYPE_DEFINITION||e.kind===l.UNION_TYPE_DEFINITION||e.kind===l.ENUM_TYPE_DEFINITION||e.kind===l.INPUT_OBJECT_TYPE_DEFINITION}function gi(e){return e.kind===l.SCHEMA_EXTENSION||ur(e)}function ur(e){return e.kind===l.SCALAR_TYPE_EXTENSION||e.kind===l.OBJECT_TYPE_EXTENSION||e.kind===l.INTERFACE_TYPE_EXTENSION||e.kind===l.UNION_TYPE_EXTENSION||e.kind===l.ENUM_TYPE_EXTENSION||e.kind===l.INPUT_OBJECT_TYPE_EXTENSION}function ao(e){return{Document(t){for(const n of t.definitions)if(!vi(n)){const r=n.kind===l.SCHEMA_DEFINITION||n.kind===l.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new _(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function uo(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=it("to use an inline fragment on",jc(i,n,s));o===""&&(o=it(Bc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function jc(e,t,n){if(!We(t))return[];const r=new Set,i=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,a)=>{const u=i[a.name]-i[o.name];return u!==0?u:re(o)&&e.isSubType(o,a)?-1:re(a)&&e.isSubType(a,o)?1:mn(o.name,a.name)}).map(o=>o.name)}function Bc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return ht(t,n)}return[]}function co(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=ke(e.getSchema(),n);if(r&&!et(r)){const i=ue(n);e.reportError(new _(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=ke(e.getSchema(),t.typeCondition);if(n&&!et(n)){const r=ue(t.typeCondition);e.reportError(new _(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function lo(e){return{...fo(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,o=r.args.map(u=>u.name),a=ht(s,o);e.reportError(new _(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+it(a),{nodes:t}))}}}}function fo(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const o of r)t[o.name]=o.args.map(a=>a.name);const i=e.getDocument().definitions;for(const o of i)if(o.kind===l.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){const a=o.name.value,u=t[a];if(o.arguments&&u)for(const c of o.arguments){const f=c.name.value;if(!u.includes(f)){const d=ht(f,u);e.reportError(new _(`Unknown argument "${f}" on directive "@${a}".`+it(d),{nodes:c}))}}return!1}}}function Ti(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===l.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,u,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new _(`Unknown directive "@${f}".`,{nodes:s}));return}const h=qc(c);h&&!d.includes(h)&&e.reportError(new _(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}))}}}function qc(e){const t=e[e.length-1];switch("kind"in t||me(!1),t.kind){case l.OPERATION_DEFINITION:return Gc(t.operation);case l.FIELD:return G.FIELD;case l.FRAGMENT_SPREAD:return G.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return G.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return G.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return G.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return G.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return G.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return G.OBJECT;case l.FIELD_DEFINITION:return G.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return G.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return G.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return G.ENUM;case l.ENUM_VALUE_DEFINITION:return G.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return G.INPUT_OBJECT;case l.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||me(!1),n.kind===l.INPUT_OBJECT_TYPE_DEFINITION?G.INPUT_FIELD_DEFINITION:G.ARGUMENT_DEFINITION}default:me(!1,"Unexpected kind: "+I(t.kind))}}function Gc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function po(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new _(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function bi(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)Yt(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,a,u,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const h=(d=c[2])!==null&&d!==void 0?d:a,y=h!=null&&Qc(h);if(y&&Yi.includes(f))return;const E=ht(f,y?Yi.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+it(E),{nodes:s}))}}}}const Yi=[...gn,..._n].map(e=>e.name);function Qc(e){return"kind"in e&&(Ei(e)||gi(e))}function ho(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===l.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new _("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function mo(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new _("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new _("Must provide only one schema definition.",{nodes:a})),++o}}}function yo(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(const u of a){const c=u.name.value,f=r[c];if(n.push(u),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),h=d.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function vo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new _(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function Eo(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new _(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function go(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;r[o]!==!0&&e.reportError(new _(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function cr(e){switch(e.kind){case l.OBJECT:return{...e,fields:Yc(e.fields)};case l.LIST:return{...e,values:e.values.map(cr)};case l.INT:case l.FLOAT:case l.STRING:case l.BOOLEAN:case l.NULL:case l.ENUM:case l.VARIABLE:return e}}function Yc(e){return e.map(t=>({...t,value:cr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function To(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+To(n)).join(" and "):e}function bo(e){const t=new Wc,n=new Map;return{SelectionSet(r){const i=Jc(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=To(o);e.reportError(new _(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function Jc(e,t,n,r,i){const s=[],[o,a]=Gn(e,t,r,i);if(zc(e,s,t,n,o),a.length!==0)for(let u=0;u<a.length;u++){Bn(e,s,t,n,!1,o,a[u]);for(let c=u+1;c<a.length;c++)qn(e,s,t,n,!1,a[u],a[c])}return s}function Bn(e,t,n,r,i,s,o){const a=e.getFragment(o);if(!a)return;const[u,c]=Fr(e,n,a);if(s!==u){_i(e,t,n,r,i,s,u);for(const f of c)r.has(f,o,i)||(r.add(f,o,i),Bn(e,t,n,r,i,s,f))}}function qn(e,t,n,r,i,s,o){if(s===o||r.has(s,o,i))return;r.add(s,o,i);const a=e.getFragment(s),u=e.getFragment(o);if(!a||!u)return;const[c,f]=Fr(e,n,a),[d,h]=Fr(e,n,u);_i(e,t,n,r,i,c,d);for(const y of h)qn(e,t,n,r,i,s,y);for(const y of f)qn(e,t,n,r,i,y,o)}function Hc(e,t,n,r,i,s,o,a){const u=[],[c,f]=Gn(e,t,i,s),[d,h]=Gn(e,t,o,a);_i(e,u,t,n,r,c,d);for(const y of h)Bn(e,u,t,n,r,c,y);for(const y of f)Bn(e,u,t,n,r,d,y);for(const y of f)for(const E of h)qn(e,u,t,n,r,y,E);return u}function zc(e,t,n,r,i){for(const[s,o]of Object.entries(i))if(o.length>1)for(let a=0;a<o.length;a++)for(let u=a+1;u<o.length;u++){const c=_o(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function _i(e,t,n,r,i,s,o){for(const[a,u]of Object.entries(s)){const c=o[a];if(c)for(const f of u)for(const d of c){const h=_o(e,n,r,i,a,f,d);h&&t.push(h)}}}function _o(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,y=r||a!==f&&te(a)&&te(f);if(!y){const X=u.name.value,z=d.name.value;if(X!==z)return[[i,`"${X}" and "${z}" are different fields`],[u],[d]];if(Ji(u)!==Ji(d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,$=h==null?void 0:h.type;if(E&&$&&kr(E,$))return[[i,`they return conflicting types "${I(E)}" and "${I($)}"`],[u],[d]];const V=u.selectionSet,B=d.selectionSet;if(V&&B){const X=Hc(e,t,n,y,Se(E),V,Se($),B);return Xc(X,i,u,d)}}function Ji(e){var t;const n=(t=e.arguments)!==null&&t!==void 0?t:[],r={kind:l.OBJECT,fields:n.map(i=>({kind:l.OBJECT_FIELD,name:i.name,value:i.value}))};return ue(cr(r))}function kr(e,t){return ce(e)?ce(t)?kr(e.ofType,t.ofType):!0:ce(t)?!0:H(e)?H(t)?kr(e.ofType,t.ofType):!0:H(t)?!0:Ze(e)||Ze(t)?e!==t:!1}function Gn(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),o=Object.create(null);No(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function Fr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=ke(e.getSchema(),n.typeCondition);return Gn(e,t,i,n.selectionSet)}function No(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case l.FIELD:{const o=s.name.value;let a;(te(t)||re(t))&&(a=t.getFields()[o]);const u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case l.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case l.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?ke(e.getSchema(),o):t;No(e,a,s.selectionSet,r,i);break}}}function Xc(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class Wc{constructor(){this._data=new Map}has(t,n,r){var i;const[s,o]=t<n?[t,n]:[n,t],a=(i=this._data.get(s))===null||i===void 0?void 0:i.get(o);return a===void 0?!1:r?!0:r===a}add(t,n,r){const[i,s]=t<n?[t,n]:[n,t],o=this._data.get(i);o===void 0?this._data.set(i,new Map([[s,r]])):o.set(s,r)}}function Io(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(et(n)&&et(r)&&!Rr(e.getSchema(),n,r)){const i=I(r),s=I(n);e.reportError(new _(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=Kc(e,n),i=e.getParentType();if(r&&i&&!Rr(e.getSchema(),r,i)){const s=I(i),o=I(r);e.reportError(new _(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function Kc(e,t){const n=e.getFragment(t);if(n){const r=ke(e.getSchema(),n.typeCondition);if(et(r))return r}}function wo(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Yt(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const s=i.name.value,o=n[s],a=t==null?void 0:t.getType(s);let u;if(o?u=Zc[o.kind]:a&&(u=el(a)),u){if(u!==i.kind){const c=tl(i.kind);e.reportError(new _(`Cannot extend non-${c} type "${s}".`,{nodes:o?[o,i]:i}))}}else{const c=Object.keys({...n,...t==null?void 0:t.getTypeMap()}),f=ht(s,c);e.reportError(new _(`Cannot extend type "${s}" because it is not defined.`+it(f),{nodes:i.name}))}}}const Zc={[l.SCALAR_TYPE_DEFINITION]:l.SCALAR_TYPE_EXTENSION,[l.OBJECT_TYPE_DEFINITION]:l.OBJECT_TYPE_EXTENSION,[l.INTERFACE_TYPE_DEFINITION]:l.INTERFACE_TYPE_EXTENSION,[l.UNION_TYPE_DEFINITION]:l.UNION_TYPE_EXTENSION,[l.ENUM_TYPE_DEFINITION]:l.ENUM_TYPE_EXTENSION,[l.INPUT_OBJECT_TYPE_DEFINITION]:l.INPUT_OBJECT_TYPE_EXTENSION};function el(e){if(Ve(e))return l.SCALAR_TYPE_EXTENSION;if(te(e))return l.OBJECT_TYPE_EXTENSION;if(re(e))return l.INTERFACE_TYPE_EXTENSION;if(Ne(e))return l.UNION_TYPE_EXTENSION;if(ge(e))return l.ENUM_TYPE_EXTENSION;if(le(e))return l.INPUT_OBJECT_TYPE_EXTENSION;me(!1,"Unexpected type: "+I(e))}function tl(e){switch(e){case l.SCALAR_TYPE_EXTENSION:return"scalar";case l.OBJECT_TYPE_EXTENSION:return"object";case l.INTERFACE_TYPE_EXTENSION:return"interface";case l.UNION_TYPE_EXTENSION:return"union";case l.ENUM_TYPE_EXTENSION:return"enum";case l.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:me(!1,"Unexpected kind: "+I(e))}}function Oo(e){return{...Ao(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(const s of r.args)if(!i.has(s.name)&&mt(s)){const o=I(s.type);e.reportError(new _(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function Ao(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:yt;for(const a of i)n[a.name]=st(a.args.filter(mt),u=>u.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===l.DIRECTIVE_DEFINITION){var o;const u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=st(u.filter(nl),c=>c.name.value)}return{Directive:{leave(a){const u=a.name.value,c=n[u];if(c){var f;const d=(f=a.arguments)!==null&&f!==void 0?f:[],h=new Set(d.map(y=>y.name.value));for(const[y,E]of Object.entries(c))if(!h.has(y)){const $=yn(E.type)?I(E.type):ue(E.type);e.reportError(new _(`Directive "@${u}" argument "${y}" of type "${$}" is required, but it was not provided.`,{nodes:a}))}}}}}}function nl(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function Do(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(Ze(Se(n))){if(r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function So(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Vt(e,t,n){return{prev:e,key:t,typename:n}}function Fe(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function Ro(e,t,n=rl){return Kt(e,t,n,void 0)}function rl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${So(e)}"`),n.message=r+": "+n.message,n}function Kt(e,t,n,r){if(H(t)){if(e!=null)return Kt(e,t.ofType,n,r);n(Fe(r),e,new _(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(ce(t)){const i=t.ofType;return si(e)?Array.from(e,(s,o)=>{const a=Vt(r,o,void 0);return Kt(s,i,n,a)}):[Kt(e,i,n,r)]}if(le(t)){if(!Ce(e)){n(Fe(r),e,new _(`Expected type "${t.name}" to be an object.`));return}const i={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(H(o.type)){const u=I(o.type);n(Fe(r),e,new _(`Field "${o.name}" of required type "${u}" was not provided.`))}continue}i[o.name]=Kt(a,o.type,n,Vt(r,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=ht(o,Object.keys(t.getFields()));n(Fe(r),e,new _(`Field "${o}" is not defined by type "${t.name}".`+it(a)))}return i}if(Ze(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof _?n(Fe(r),e,s):n(Fe(r),e,new _(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(Fe(r),e,new _(`Expected type "${t.name}".`)),i}me(!1,"Unexpected input type: "+I(t))}function Xe(e,t,n){if(e){if(e.kind===l.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&H(t)?void 0:i}if(H(t))return e.kind===l.NULL?void 0:Xe(e,t.ofType,n);if(e.kind===l.NULL)return null;if(ce(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(Hi(o,n)){if(H(r))return;s.push(null)}else{const a=Xe(o,r,n);if(a===void 0)return;s.push(a)}return s}const i=Xe(e,r,n);return i===void 0?void 0:[i]}if(le(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=st(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||Hi(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(H(s.type))return;continue}const a=Xe(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}return r}if(Ze(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}me(!1,"Unexpected input type: "+I(t))}}function Hi(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function Lo(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=il(e,t,n,a=>{if(s!=null&&i.length>=s)throw new _("Too many errors processing variables, error limit reached. Execution aborted.");i.push(a)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function il(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=ke(e,s.type);if(!Le(a)){const c=ue(s.type);r(new _(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!ko(n,o)){if(s.defaultValue)i[o]=Xe(s.defaultValue,a);else if(H(a)){const c=I(a);r(new _(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const u=n[o];if(u===null&&H(a)){const c=I(a);r(new _(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}i[o]=Ro(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${So(c)}"`),r(new _(h+"; "+d.message,{nodes:s,originalError:d.originalError}))})}return i}function lr(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=st(s,a=>a.name.value);for(const a of e.args){const u=a.name,c=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let h=d.kind===l.NULL;if(d.kind===l.VARIABLE){const E=d.name.value;if(n==null||!ko(n,E)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was provided the variable "$${E}" which was not provided a runtime value.`,{nodes:d});continue}h=n[E]==null}if(h&&H(c))throw new _(`Argument "${u}" of non-null type "${I(c)}" must not be null.`,{nodes:d});const y=Xe(d,c,n);if(y===void 0)throw new _(`Argument "${u}" has invalid value ${ue(d)}.`,{nodes:d});i[u]=y}return i}function fn(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return lr(e,i,n)}function ko(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ni(e,t,n,r,i){const s=new Map;return Qn(e,t,n,r,i,s,new Set),s}function sl(e,t,n,r,i){const s=new Map,o=new Set;for(const a of i)a.selectionSet&&Qn(e,t,n,r,a.selectionSet,s,o);return s}function Qn(e,t,n,r,i,s,o){for(const a of i.selections)switch(a.kind){case l.FIELD:{if(!Er(n,a))continue;const u=ol(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!Er(n,a)||!zi(e,a,r))continue;Qn(e,t,n,r,a.selectionSet,s,o);break}case l.FRAGMENT_SPREAD:{const u=a.name.value;if(o.has(u)||!Er(n,a))continue;o.add(u);const c=t[u];if(!c||!zi(e,c,r))continue;Qn(e,t,n,r,c.selectionSet,s,o);break}}}function Er(e,t){const n=fn(ti,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=fn(ei,t,e);return(r==null?void 0:r.if)!==!1}function zi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=ke(e,r);return i===n?!0:We(i)?e.isSubType(i,n):!1}function ol(e){return e.alias?e.alias.value:e.name.value}function Fo(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===l.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const u=Ni(n,a,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new _(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of u.values())c[0].name.value.startsWith("__")&&e.reportError(new _(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Ii(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function xo(e){return{DirectiveDefinition(r){var i;const s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;const s=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(const u of o){var a;const c=u.name.value,f=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${s}.${c}`,f)}return!1}function n(r,i){const s=Ii(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function wi(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=Ii(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function $o(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new _(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new _(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Oi(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():yt;for(const a of r)t[a.name]=!a.isRepeatable;const i=e.getDocument().definitions;for(const a of i)a.kind===l.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===l.SCHEMA_DEFINITION||a.kind===l.SCHEMA_EXTENSION)u=s;else if(Yt(a)||ur(a)){const c=a.name.value;u=o[c],u===void 0&&(o[c]=u=Object.create(null))}else u=Object.create(null);for(const c of a.directives){const f=c.name.value;t[f]&&(u[f]?e.reportError(new _(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],c]})):u[f]=c)}}}}function Co(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.values)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value,h=n[a];ge(h)&&h.getValue(d)?e.reportError(new _(`Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Mo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.fields)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value;al(n[a],d)?e.reportError(new _(`Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Field "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function al(e,t){return te(e)||re(e)||le(e)?e.getFields()[t]!=null:!1}function Vo(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new _(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Ai(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||me(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new _(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function Uo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new _(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function Po(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var o;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const u of a){const c=u.operation,f=n[c];r[c]?e.reportError(new _(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new _(`There can be only one ${c} type in schema.`,{nodes:[f,u]})):n[c]=u}return!1}}function jo(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new _(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new _(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Bo(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=Ii(r,s=>s.variable.name.value);for(const[s,o]of i)o.length>1&&e.reportError(new _(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function qo(e){return{ListValue(t){const n=Xr(e.getParentInputType());if(!ce(n))return vt(e,t),!1},ObjectValue(t){const n=Se(e.getInputType());if(!le(n))return vt(e,t),!1;const r=st(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&rr(i)){const o=I(i.type);e.reportError(new _(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Se(e.getParentInputType());if(!e.getInputType()&&le(n)){const i=ht(t.name.value,Object.keys(n.getFields()));e.reportError(new _(`Field "${t.name.value}" is not defined by type "${n.name}".`+it(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();H(n)&&e.reportError(new _(`Expected value of type "${I(n)}", found ${ue(t)}.`,{nodes:t}))},EnumValue:t=>vt(e,t),IntValue:t=>vt(e,t),FloatValue:t=>vt(e,t),StringValue:t=>vt(e,t),BooleanValue:t=>vt(e,t)}}function vt(e,t){const n=e.getInputType();if(!n)return;const r=Se(n);if(!Ze(r)){const i=I(n);e.reportError(new _(`Expected value of type "${i}", found ${ue(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=I(n);e.reportError(new _(`Expected value of type "${s}", found ${ue(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof _?e.reportError(i):e.reportError(new _(`Expected value of type "${s}", found ${ue(t)}; `+i.message,{nodes:t,originalError:i}))}}function Go(e){return{VariableDefinition(t){const n=ke(e.getSchema(),t.type);if(n!==void 0&&!Le(n)){const r=t.variable.name.value,i=ue(t.type);e.reportError(new _(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Qo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:o}of r){const a=i.name.value,u=t[a];if(u&&s){const c=e.getSchema(),f=ke(c,u.type);if(f&&!ul(c,f,u.defaultValue,s,o)){const d=I(f),h=I(s);e.reportError(new _(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function ul(e,t,n,r,i){if(H(r)&&!H(t)){if(!(n!=null&&n.kind!==l.NULL)&&!(i!==void 0))return!1;const a=r.ofType;return Tt(e,t,a)}return Tt(e,t,r)}const Yo=Object.freeze([ao,Uo,ho,Fo,bi,co,Go,Do,uo,Vo,po,Eo,Io,yo,Bo,vo,go,Ti,Oi,lo,wi,qo,Oo,Qo,bo,Ai]),cl=Object.freeze([mo,Po,jo,Co,Mo,xo,$o,bi,Ti,Oi,wo,fo,wi,Ai,Ao]);class Jo{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===l.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===l.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(r[a]!==!0){r[a]=!0;const u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class ll extends Jo{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Ho extends Jo{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new mi(this._schema);Gt(t,yi(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function zo(e,t,n=Yo,r,i=new mi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||Z(!1,"Must provide document."),pi(e);const a=Object.freeze({}),u=[],c=new Ho(e,t,i,d=>{if(u.length>=o)throw u.push(new _("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),f=Hr(n.map(d=>d(c)));try{Gt(t,yi(i,f))}catch(d){if(d!==a)throw d}return u}function Xo(e,t,n=cl){const r=[],i=new ll(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,Hr(s)),r}function fl(e){const t=Xo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
|
|
57
|
+
`))}class Rc{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const r=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new _(t,{nodes:r}))}getErrors(){return this._errors}}function Lc(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!te(n)){var r;e.reportError(`Query root type must be Object type, it cannot be ${I(n)}.`,(r=vr(t,be.QUERY))!==null&&r!==void 0?r:n.astNode)}const i=t.getMutationType();if(i&&!te(i)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${I(i)}.`,(s=vr(t,be.MUTATION))!==null&&s!==void 0?s:i.astNode)}const o=t.getSubscriptionType();if(o&&!te(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${I(o)}.`,(a=vr(t,be.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function vr(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(r=>{var i;return(i=r==null?void 0:r.operationTypes)!==null&&i!==void 0?i:[]}).find(r=>r.operation===t))===null||n===void 0?void 0:n.type}function kc(e){for(const n of e.schema.getDirectives()){if(!sr(n)){e.reportError(`Expected directive but got: ${I(n)}.`,n==null?void 0:n.astNode);continue}It(e,n);for(const r of n.args)if(It(e,r),ke(r.type)||e.reportError(`The type of @${n.name}(${r.name}:) must be Input Type but got: ${I(r.type)}.`,r.astNode),yt(r)&&r.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${r.name}:) cannot be deprecated.`,[mi(r.astNode),(t=r.astNode)===null||t===void 0?void 0:t.type])}}}function It(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Fc(e){const t=Uc(e),n=e.schema.getTypeMap();for(const r of Object.values(n)){if(!En(r)){e.reportError(`Expected GraphQL named type but got: ${I(r)}.`,r.astNode);continue}wt(r)||It(e,r),te(r)||re(r)?(Gi(e,r),Qi(e,r)):Ne(r)?Cc(e,r):ge(r)?Mc(e,r):fe(r)&&(Vc(e,r),t(r))}}function Gi(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(It(e,o),!pt(o.type)){var r;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${I(o.type)}.`,(r=o.astNode)===null||r===void 0?void 0:r.type)}for(const a of o.args){const u=a.name;if(It(e,a),!ke(a.type)){var i;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${I(a.type)}.`,(i=a.astNode)===null||i===void 0?void 0:i.type)}if(yt(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[mi(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function Qi(e,t){const n=Object.create(null);for(const r of t.getInterfaces()){if(!re(r)){e.reportError(`Type ${I(t)} must only implement Interface types, it cannot implement ${I(r)}.`,nn(t,r));continue}if(t===r){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,nn(t,r));continue}if(n[r.name]){e.reportError(`Type ${t.name} can only implement ${r.name} once.`,nn(t,r));continue}n[r.name]=!0,$c(e,t,r),xc(e,t,r)}}function xc(e,t,n){const r=t.getFields();for(const u of Object.values(n.getFields())){const c=u.name,f=r[c];if(!f){e.reportError(`Interface field ${n.name}.${c} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!Tt(e.schema,f.type,u.type)){var i,s;e.reportError(`Interface field ${n.name}.${c} expects type ${I(u.type)} but ${t.name}.${c} is type ${I(f.type)}.`,[(i=u.astNode)===null||i===void 0?void 0:i.type,(s=f.astNode)===null||s===void 0?void 0:s.type])}for(const d of u.args){const h=d.name,y=f.args.find(E=>E.name===h);if(!y){e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expected but ${t.name}.${c} does not provide it.`,[d.astNode,f.astNode]);continue}if(!jn(d.type,y.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${c}(${h}:) expects type ${I(d.type)} but ${t.name}.${c}(${h}:) is type ${I(y.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=y.astNode)===null||a===void 0?void 0:a.type])}}for(const d of f.args){const h=d.name;!u.args.find(E=>E.name===h)&&yt(d)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${h} that is missing from the Interface field ${n.name}.${c}.`,[d.astNode,u.astNode])}}}function $c(e,t,n){const r=t.getInterfaces();for(const i of n.getInterfaces())r.includes(i)||e.reportError(i===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${i.name} because it is implemented by ${n.name}.`,[...nn(n,i),...nn(t,n)])}function Cc(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const r=Object.create(null);for(const i of n){if(r[i.name]){e.reportError(`Union type ${t.name} can only include type ${i.name} once.`,Yi(t,i.name));continue}r[i.name]=!0,te(i)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${I(i)}.`,Yi(t,String(i)))}}function Mc(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const r of n)It(e,r)}function Vc(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of n){if(It(e,s),!ke(s.type)){var r;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${I(s.type)}.`,(r=s.astNode)===null||r===void 0?void 0:r.type)}if(rr(s)&&s.deprecationReason!=null){var i;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[mi(s.astNode),(i=s.astNode)===null||i===void 0?void 0:i.type])}}}function Uc(e){const t=Object.create(null),n=[],r=Object.create(null);return i;function i(s){if(t[s.name])return;t[s.name]=!0,r[s.name]=n.length;const o=Object.values(s.getFields());for(const a of o)if(H(a.type)&&fe(a.type.ofType)){const u=a.type.ofType,c=r[u.name];if(n.push(a),c===void 0)i(u);else{const f=n.slice(c),d=f.map(h=>h.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${d}".`,f.map(h=>h.astNode))}n.pop()}r[s.name]=void 0}}function nn(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function Yi(e,t){const{astNode:n,extensionASTNodes:r}=e;return(n!=null?[n,...r]:r).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function mi(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===or.name)}function Fe(e,t){switch(t.kind){case l.LIST_TYPE:{const n=Fe(e,t.type);return n&&new we(n)}case l.NON_NULL_TYPE:{const n=Fe(e,t.type);return n&&new K(n)}case l.NAMED_TYPE:return e.getType(t.name.value)}}class yi{constructor(t,n,r){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=r??Pc,n&&(ke(n)&&this._inputTypeStack.push(n),tt(n)&&this._parentTypeStack.push(n),pt(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case l.SELECTION_SET:{const i=Re(this.getType());this._parentTypeStack.push(tt(i)?i:void 0);break}case l.FIELD:{const i=this.getParentType();let s,o;i&&(s=this._getFieldDef(n,i,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(pt(o)?o:void 0);break}case l.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case l.OPERATION_DEFINITION:{const i=n.getRootType(t.operation);this._typeStack.push(te(i)?i:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{const i=t.typeCondition,s=i?Fe(n,i):Re(this.getType());this._typeStack.push(pt(s)?s:void 0);break}case l.VARIABLE_DEFINITION:{const i=Fe(n,t.type);this._inputTypeStack.push(ke(i)?i:void 0);break}case l.ARGUMENT:{var r;let i,s;const o=(r=this.getDirective())!==null&&r!==void 0?r:this.getFieldDef();o&&(i=o.args.find(a=>a.name===t.name.value),i&&(s=i.type)),this._argument=i,this._defaultValueStack.push(i?i.defaultValue:void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.LIST:{const i=Wr(this.getInputType()),s=le(i)?i.ofType:i;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.OBJECT_FIELD:{const i=Re(this.getInputType());let s,o;fe(i)&&(o=i.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(ke(s)?s:void 0);break}case l.ENUM:{const i=Re(this.getInputType());let s;ge(i)&&(s=i.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}}}function Pc(e,t,n){const r=n.name.value;if(r===un.name&&e.getQueryType()===t)return un;if(r===cn.name&&e.getQueryType()===t)return cn;if(r===ln.name&&tt(t))return ln;if(te(t)||re(t))return t.getFields()[r]}function vi(e,t){return{enter(...n){const r=n[0];e.enter(r);const i=xt(t,r.kind).enter;if(i){const s=i.apply(t,n);return s!==void 0&&(e.leave(r),Dr(s)&&e.enter(s)),s}},leave(...n){const r=n[0],i=xt(t,r.kind).leave;let s;return i&&(s=i.apply(t,n)),e.leave(r),s}}}function jc(e){return Ei(e)||gi(e)||Ti(e)}function Ei(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function qc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function uo(e){return e.kind===l.VARIABLE||e.kind===l.INT||e.kind===l.FLOAT||e.kind===l.STRING||e.kind===l.BOOLEAN||e.kind===l.NULL||e.kind===l.ENUM||e.kind===l.LIST||e.kind===l.OBJECT}function kr(e){return uo(e)&&(e.kind===l.LIST?e.values.some(kr):e.kind===l.OBJECT?e.fields.some(t=>kr(t.value)):e.kind!==l.VARIABLE)}function Bc(e){return e.kind===l.NAMED_TYPE||e.kind===l.LIST_TYPE||e.kind===l.NON_NULL_TYPE}function gi(e){return e.kind===l.SCHEMA_DEFINITION||Yt(e)||e.kind===l.DIRECTIVE_DEFINITION}function Yt(e){return e.kind===l.SCALAR_TYPE_DEFINITION||e.kind===l.OBJECT_TYPE_DEFINITION||e.kind===l.INTERFACE_TYPE_DEFINITION||e.kind===l.UNION_TYPE_DEFINITION||e.kind===l.ENUM_TYPE_DEFINITION||e.kind===l.INPUT_OBJECT_TYPE_DEFINITION}function Ti(e){return e.kind===l.SCHEMA_EXTENSION||ur(e)}function ur(e){return e.kind===l.SCALAR_TYPE_EXTENSION||e.kind===l.OBJECT_TYPE_EXTENSION||e.kind===l.INTERFACE_TYPE_EXTENSION||e.kind===l.UNION_TYPE_EXTENSION||e.kind===l.ENUM_TYPE_EXTENSION||e.kind===l.INPUT_OBJECT_TYPE_EXTENSION}function co(e){return{Document(t){for(const n of t.definitions)if(!Ei(n)){const r=n.kind===l.SCHEMA_DEFINITION||n.kind===l.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new _(`The ${r} definition is not executable.`,{nodes:n}))}return!1}}}function lo(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const i=e.getSchema(),s=t.name.value;let o=st("to use an inline fragment on",Gc(i,n,s));o===""&&(o=st(Qc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function Gc(e,t,n){if(!We(t))return[];const r=new Set,i=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[n]){r.add(o),i[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[n]&&(r.add(a),i[a.name]=((s=i[a.name])!==null&&s!==void 0?s:0)+1)}}return[...r].sort((o,a)=>{const u=i[a.name]-i[o.name];return u!==0?u:re(o)&&e.isSubType(o,a)?-1:re(a)&&e.isSubType(a,o)?1:mn(o.name,a.name)}).map(o=>o.name)}function Qc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return mt(t,n)}return[]}function fo(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const r=Fe(e.getSchema(),n);if(r&&!tt(r)){const i=ce(n);e.reportError(new _(`Fragment cannot condition on non composite type "${i}".`,{nodes:n}))}}},FragmentDefinition(t){const n=Fe(e.getSchema(),t.typeCondition);if(n&&!tt(n)){const r=ce(t.typeCondition);e.reportError(new _(`Fragment "${t.name.value}" cannot condition on non composite type "${r}".`,{nodes:t.typeCondition}))}}}}function po(e){return{...ho(e),Argument(t){const n=e.getArgument(),r=e.getFieldDef(),i=e.getParentType();if(!n&&r&&i){const s=t.name.value,o=r.args.map(u=>u.name),a=mt(s,o);e.reportError(new _(`Unknown argument "${s}" on field "${i.name}.${r.name}".`+st(a),{nodes:t}))}}}}function ho(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const o of r)t[o.name]=o.args.map(a=>a.name);const i=e.getDocument().definitions;for(const o of i)if(o.kind===l.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){const a=o.name.value,u=t[a];if(o.arguments&&u)for(const c of o.arguments){const f=c.name.value;if(!u.includes(f)){const d=mt(f,u);e.reportError(new _(`Unknown argument "${f}" on directive "@${a}".`+st(d),{nodes:c}))}}return!1}}}function bi(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const s of r)t[s.name]=s.locations;const i=e.getDocument().definitions;for(const s of i)s.kind===l.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,u,c){const f=s.name.value,d=t[f];if(!d){e.reportError(new _(`Unknown directive "@${f}".`,{nodes:s}));return}const h=Yc(c);h&&!d.includes(h)&&e.reportError(new _(`Directive "@${f}" may not be used on ${h}.`,{nodes:s}))}}}function Yc(e){const t=e[e.length-1];switch("kind"in t||ye(!1),t.kind){case l.OPERATION_DEFINITION:return Jc(t.operation);case l.FIELD:return G.FIELD;case l.FRAGMENT_SPREAD:return G.FRAGMENT_SPREAD;case l.INLINE_FRAGMENT:return G.INLINE_FRAGMENT;case l.FRAGMENT_DEFINITION:return G.FRAGMENT_DEFINITION;case l.VARIABLE_DEFINITION:return G.VARIABLE_DEFINITION;case l.SCHEMA_DEFINITION:case l.SCHEMA_EXTENSION:return G.SCHEMA;case l.SCALAR_TYPE_DEFINITION:case l.SCALAR_TYPE_EXTENSION:return G.SCALAR;case l.OBJECT_TYPE_DEFINITION:case l.OBJECT_TYPE_EXTENSION:return G.OBJECT;case l.FIELD_DEFINITION:return G.FIELD_DEFINITION;case l.INTERFACE_TYPE_DEFINITION:case l.INTERFACE_TYPE_EXTENSION:return G.INTERFACE;case l.UNION_TYPE_DEFINITION:case l.UNION_TYPE_EXTENSION:return G.UNION;case l.ENUM_TYPE_DEFINITION:case l.ENUM_TYPE_EXTENSION:return G.ENUM;case l.ENUM_VALUE_DEFINITION:return G.ENUM_VALUE;case l.INPUT_OBJECT_TYPE_DEFINITION:case l.INPUT_OBJECT_TYPE_EXTENSION:return G.INPUT_OBJECT;case l.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||ye(!1),n.kind===l.INPUT_OBJECT_TYPE_DEFINITION?G.INPUT_FIELD_DEFINITION:G.ARGUMENT_DEFINITION}default:ye(!1,"Unexpected kind: "+I(t.kind))}}function Jc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function mo(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new _(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function _i(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);for(const s of e.getDocument().definitions)Yt(s)&&(r[s.name.value]=!0);const i=[...Object.keys(n),...Object.keys(r)];return{NamedType(s,o,a,u,c){const f=s.name.value;if(!n[f]&&!r[f]){var d;const h=(d=c[2])!==null&&d!==void 0?d:a,y=h!=null&&Hc(h);if(y&&Ji.includes(f))return;const E=mt(f,y?Ji.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+st(E),{nodes:s}))}}}}const Ji=[...gn,..._n].map(e=>e.name);function Hc(e){return"kind"in e&&(gi(e)||Ti(e))}function yo(e){let t=0;return{Document(n){t=n.definitions.filter(r=>r.kind===l.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new _("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function vo(e){var t,n,r;const i=e.getSchema(),s=(t=(n=(r=i==null?void 0:i.astNode)!==null&&r!==void 0?r:i==null?void 0:i.getQueryType())!==null&&n!==void 0?n:i==null?void 0:i.getMutationType())!==null&&t!==void 0?t:i==null?void 0:i.getSubscriptionType();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new _("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new _("Must provide only one schema definition.",{nodes:a})),++o}}}function Eo(e){const t=Object.create(null),n=[],r=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return i(s),!1}};function i(s){if(t[s.name.value])return;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){r[o]=n.length;for(const u of a){const c=u.name.value,f=r[c];if(n.push(u),f===void 0){const d=e.getFragment(c);d&&i(d)}else{const d=n.slice(f),h=d.slice(0,-1).map(y=>'"'+y.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function go(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i}of r){const s=i.name.value;t[s]!==!0&&e.reportError(new _(n.name?`Variable "$${s}" is not defined by operation "${n.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[i,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function To(e){const t=[],n=[];return{OperationDefinition(r){return t.push(r),!1},FragmentDefinition(r){return n.push(r),!1},Document:{leave(){const r=Object.create(null);for(const i of t)for(const s of e.getRecursivelyReferencedFragments(i))r[s.name.value]=!0;for(const i of n){const s=i.name.value;r[s]!==!0&&e.reportError(new _(`Fragment "${s}" is never used.`,{nodes:i}))}}}}}function bo(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const r=Object.create(null),i=e.getRecursiveVariableUsages(n);for(const{node:s}of i)r[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;r[o]!==!0&&e.reportError(new _(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(n){t.push(n)}}}function cr(e){switch(e.kind){case l.OBJECT:return{...e,fields:zc(e.fields)};case l.LIST:return{...e,values:e.values.map(cr)};case l.INT:case l.FLOAT:case l.STRING:case l.BOOLEAN:case l.NULL:case l.ENUM:case l.VARIABLE:return e}}function zc(e){return e.map(t=>({...t,value:cr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function _o(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+_o(n)).join(" and "):e}function No(e){const t=new tl,n=new Map;return{SelectionSet(r){const i=Xc(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=_o(o);e.reportError(new _(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(u)}))}}}}function Xc(e,t,n,r,i){const s=[],[o,a]=Gn(e,t,r,i);if(Kc(e,s,t,n,o),a.length!==0)for(let u=0;u<a.length;u++){qn(e,s,t,n,!1,o,a[u]);for(let c=u+1;c<a.length;c++)Bn(e,s,t,n,!1,a[u],a[c])}return s}function qn(e,t,n,r,i,s,o){const a=e.getFragment(o);if(!a)return;const[u,c]=xr(e,n,a);if(s!==u){Ni(e,t,n,r,i,s,u);for(const f of c)r.has(f,o,i)||(r.add(f,o,i),qn(e,t,n,r,i,s,f))}}function Bn(e,t,n,r,i,s,o){if(s===o||r.has(s,o,i))return;r.add(s,o,i);const a=e.getFragment(s),u=e.getFragment(o);if(!a||!u)return;const[c,f]=xr(e,n,a),[d,h]=xr(e,n,u);Ni(e,t,n,r,i,c,d);for(const y of h)Bn(e,t,n,r,i,s,y);for(const y of f)Bn(e,t,n,r,i,y,o)}function Wc(e,t,n,r,i,s,o,a){const u=[],[c,f]=Gn(e,t,i,s),[d,h]=Gn(e,t,o,a);Ni(e,u,t,n,r,c,d);for(const y of h)qn(e,u,t,n,r,c,y);for(const y of f)qn(e,u,t,n,r,d,y);for(const y of f)for(const E of h)Bn(e,u,t,n,r,y,E);return u}function Kc(e,t,n,r,i){for(const[s,o]of Object.entries(i))if(o.length>1)for(let a=0;a<o.length;a++)for(let u=a+1;u<o.length;u++){const c=Io(e,n,r,!1,s,o[a],o[u]);c&&t.push(c)}}function Ni(e,t,n,r,i,s,o){for(const[a,u]of Object.entries(s)){const c=o[a];if(c)for(const f of u)for(const d of c){const h=Io(e,n,r,i,a,f,d);h&&t.push(h)}}}function Io(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,y=r||a!==f&&te(a)&&te(f);if(!y){const X=u.name.value,z=d.name.value;if(X!==z)return[[i,`"${X}" and "${z}" are different fields`],[u],[d]];if(!Zc(u,d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,C=h==null?void 0:h.type;if(E&&C&&Fr(E,C))return[[i,`they return conflicting types "${I(E)}" and "${I(C)}"`],[u],[d]];const U=u.selectionSet,q=d.selectionSet;if(U&&q){const X=Wc(e,t,n,y,Re(E),U,Re(C),q);return el(X,i,u,d)}}function Zc(e,t){const n=e.arguments,r=t.arguments;if(n===void 0||n.length===0)return r===void 0||r.length===0;if(r===void 0||r.length===0||n.length!==r.length)return!1;const i=new Map(r.map(({name:s,value:o})=>[s.value,o]));return n.every(s=>{const o=s.value,a=i.get(s.name.value);return a===void 0?!1:Hi(o)===Hi(a)})}function Hi(e){return ce(cr(e))}function Fr(e,t){return le(e)?le(t)?Fr(e.ofType,t.ofType):!0:le(t)?!0:H(e)?H(t)?Fr(e.ofType,t.ofType):!0:H(t)?!0:et(e)||et(t)?e!==t:!1}function Gn(e,t,n,r){const i=t.get(r);if(i)return i;const s=Object.create(null),o=Object.create(null);wo(e,n,r,s,o);const a=[s,Object.keys(o)];return t.set(r,a),a}function xr(e,t,n){const r=t.get(n.selectionSet);if(r)return r;const i=Fe(e.getSchema(),n.typeCondition);return Gn(e,t,i,n.selectionSet)}function wo(e,t,n,r,i){for(const s of n.selections)switch(s.kind){case l.FIELD:{const o=s.name.value;let a;(te(t)||re(t))&&(a=t.getFields()[o]);const u=s.alias?s.alias.value:o;r[u]||(r[u]=[]),r[u].push([t,s,a]);break}case l.FRAGMENT_SPREAD:i[s.name.value]=!0;break;case l.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?Fe(e.getSchema(),o):t;wo(e,a,s.selectionSet,r,i);break}}}function el(e,t,n,r){if(e.length>0)return[[t,e.map(([i])=>i)],[n,...e.map(([,i])=>i).flat()],[r,...e.map(([,,i])=>i).flat()]]}class tl{constructor(){this._data=new Map}has(t,n,r){var i;const[s,o]=t<n?[t,n]:[n,t],a=(i=this._data.get(s))===null||i===void 0?void 0:i.get(o);return a===void 0?!1:r?!0:r===a}add(t,n,r){const[i,s]=t<n?[t,n]:[n,t],o=this._data.get(i);o===void 0?this._data.set(i,new Map([[s,r]])):o.set(s,r)}}function Oo(e){return{InlineFragment(t){const n=e.getType(),r=e.getParentType();if(tt(n)&&tt(r)&&!Lr(e.getSchema(),n,r)){const i=I(r),s=I(n);e.reportError(new _(`Fragment cannot be spread here as objects of type "${i}" can never be of type "${s}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,r=nl(e,n),i=e.getParentType();if(r&&i&&!Lr(e.getSchema(),r,i)){const s=I(i),o=I(r);e.reportError(new _(`Fragment "${n}" cannot be spread here as objects of type "${s}" can never be of type "${o}".`,{nodes:t}))}}}}function nl(e,t){const n=e.getFragment(t);if(n){const r=Fe(e.getSchema(),n.typeCondition);if(tt(r))return r}}function Ao(e){const t=e.getSchema(),n=Object.create(null);for(const i of e.getDocument().definitions)Yt(i)&&(n[i.name.value]=i);return{ScalarTypeExtension:r,ObjectTypeExtension:r,InterfaceTypeExtension:r,UnionTypeExtension:r,EnumTypeExtension:r,InputObjectTypeExtension:r};function r(i){const s=i.name.value,o=n[s],a=t==null?void 0:t.getType(s);let u;if(o?u=rl[o.kind]:a&&(u=il(a)),u){if(u!==i.kind){const c=sl(i.kind);e.reportError(new _(`Cannot extend non-${c} type "${s}".`,{nodes:o?[o,i]:i}))}}else{const c=Object.keys({...n,...t==null?void 0:t.getTypeMap()}),f=mt(s,c);e.reportError(new _(`Cannot extend type "${s}" because it is not defined.`+st(f),{nodes:i.name}))}}}const rl={[l.SCALAR_TYPE_DEFINITION]:l.SCALAR_TYPE_EXTENSION,[l.OBJECT_TYPE_DEFINITION]:l.OBJECT_TYPE_EXTENSION,[l.INTERFACE_TYPE_DEFINITION]:l.INTERFACE_TYPE_EXTENSION,[l.UNION_TYPE_DEFINITION]:l.UNION_TYPE_EXTENSION,[l.ENUM_TYPE_DEFINITION]:l.ENUM_TYPE_EXTENSION,[l.INPUT_OBJECT_TYPE_DEFINITION]:l.INPUT_OBJECT_TYPE_EXTENSION};function il(e){if(Ue(e))return l.SCALAR_TYPE_EXTENSION;if(te(e))return l.OBJECT_TYPE_EXTENSION;if(re(e))return l.INTERFACE_TYPE_EXTENSION;if(Ne(e))return l.UNION_TYPE_EXTENSION;if(ge(e))return l.ENUM_TYPE_EXTENSION;if(fe(e))return l.INPUT_OBJECT_TYPE_EXTENSION;ye(!1,"Unexpected type: "+I(e))}function sl(e){switch(e){case l.SCALAR_TYPE_EXTENSION:return"scalar";case l.OBJECT_TYPE_EXTENSION:return"object";case l.INTERFACE_TYPE_EXTENSION:return"interface";case l.UNION_TYPE_EXTENSION:return"union";case l.ENUM_TYPE_EXTENSION:return"enum";case l.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:ye(!1,"Unexpected kind: "+I(e))}}function Do(e){return{...So(e),Field:{leave(t){var n;const r=e.getFieldDef();if(!r)return!1;const i=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(s=>s.name.value));for(const s of r.args)if(!i.has(s.name)&&yt(s)){const o=I(s.type);e.reportError(new _(`Field "${r.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function So(e){var t;const n=Object.create(null),r=e.getSchema(),i=(t=r==null?void 0:r.getDirectives())!==null&&t!==void 0?t:vt;for(const a of i)n[a.name]=ot(a.args.filter(yt),u=>u.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===l.DIRECTIVE_DEFINITION){var o;const u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=ot(u.filter(ol),c=>c.name.value)}return{Directive:{leave(a){const u=a.name.value,c=n[u];if(c){var f;const d=(f=a.arguments)!==null&&f!==void 0?f:[],h=new Set(d.map(y=>y.name.value));for(const[y,E]of Object.entries(c))if(!h.has(y)){const C=yn(E.type)?I(E.type):ce(E.type);e.reportError(new _(`Directive "@${u}" argument "${y}" of type "${C}" is required, but it was not provided.`,{nodes:a}))}}}}}}function ol(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function Ro(e){return{Field(t){const n=e.getType(),r=t.selectionSet;if(n){if(et(Re(n))){if(r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" must not have a selection since type "${s}" has no subfields.`,{nodes:r}))}}else if(!r){const i=t.name.value,s=I(n);e.reportError(new _(`Field "${i}" of type "${s}" must have a selection of subfields. Did you mean "${i} { ... }"?`,{nodes:t}))}}}}}function Lo(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Vt(e,t,n){return{prev:e,key:t,typename:n}}function xe(e){const t=[];let n=e;for(;n;)t.push(n.key),n=n.prev;return t.reverse()}function ko(e,t,n=al){return Kt(e,t,n,void 0)}function al(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${Lo(e)}"`),n.message=r+": "+n.message,n}function Kt(e,t,n,r){if(H(t)){if(e!=null)return Kt(e,t.ofType,n,r);n(xe(r),e,new _(`Expected non-nullable type "${I(t)}" not to be null.`));return}if(e==null)return null;if(le(t)){const i=t.ofType;return oi(e)?Array.from(e,(s,o)=>{const a=Vt(r,o,void 0);return Kt(s,i,n,a)}):[Kt(e,i,n,r)]}if(fe(t)){if(!Me(e)){n(xe(r),e,new _(`Expected type "${t.name}" to be an object.`));return}const i={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)i[o.name]=o.defaultValue;else if(H(o.type)){const u=I(o.type);n(xe(r),e,new _(`Field "${o.name}" of required type "${u}" was not provided.`))}continue}i[o.name]=Kt(a,o.type,n,Vt(r,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=mt(o,Object.keys(t.getFields()));n(xe(r),e,new _(`Field "${o}" is not defined by type "${t.name}".`+st(a)))}return i}if(et(t)){let i;try{i=t.parseValue(e)}catch(s){s instanceof _?n(xe(r),e,s):n(xe(r),e,new _(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return i===void 0&&n(xe(r),e,new _(`Expected type "${t.name}".`)),i}ye(!1,"Unexpected input type: "+I(t))}function Xe(e,t,n){if(e){if(e.kind===l.VARIABLE){const r=e.name.value;if(n==null||n[r]===void 0)return;const i=n[r];return i===null&&H(t)?void 0:i}if(H(t))return e.kind===l.NULL?void 0:Xe(e,t.ofType,n);if(e.kind===l.NULL)return null;if(le(t)){const r=t.ofType;if(e.kind===l.LIST){const s=[];for(const o of e.values)if(zi(o,n)){if(H(r))return;s.push(null)}else{const a=Xe(o,r,n);if(a===void 0)return;s.push(a)}return s}const i=Xe(e,r,n);return i===void 0?void 0:[i]}if(fe(t)){if(e.kind!==l.OBJECT)return;const r=Object.create(null),i=ot(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=i[s.name];if(!o||zi(o.value,n)){if(s.defaultValue!==void 0)r[s.name]=s.defaultValue;else if(H(s.type))return;continue}const a=Xe(o.value,s.type,n);if(a===void 0)return;r[s.name]=a}return r}if(et(t)){let r;try{r=t.parseLiteral(e,n)}catch{return}return r===void 0?void 0:r}ye(!1,"Unexpected input type: "+I(t))}}function zi(e,t){return e.kind===l.VARIABLE&&(t==null||t[e.name.value]===void 0)}function Fo(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=ul(e,t,n,a=>{if(s!=null&&i.length>=s)throw new _("Too many errors processing variables, error limit reached. Execution aborted.");i.push(a)});if(i.length===0)return{coerced:o}}catch(o){i.push(o)}return{errors:i}}function ul(e,t,n,r){const i={};for(const s of t){const o=s.variable.name.value,a=Fe(e,s.type);if(!ke(a)){const c=ce(s.type);r(new _(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!xo(n,o)){if(s.defaultValue)i[o]=Xe(s.defaultValue,a);else if(H(a)){const c=I(a);r(new _(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const u=n[o];if(u===null&&H(a)){const c=I(a);r(new _(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}i[o]=ko(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${Lo(c)}"`),r(new _(h+"; "+d.message,{nodes:s,originalError:d}))})}return i}function lr(e,t,n){var r;const i={},s=(r=t.arguments)!==null&&r!==void 0?r:[],o=ot(s,a=>a.name.value);for(const a of e.args){const u=a.name,c=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was not provided.`,{nodes:t});continue}const d=f.value;let h=d.kind===l.NULL;if(d.kind===l.VARIABLE){const E=d.name.value;if(n==null||!xo(n,E)){if(a.defaultValue!==void 0)i[u]=a.defaultValue;else if(H(c))throw new _(`Argument "${u}" of required type "${I(c)}" was provided the variable "$${E}" which was not provided a runtime value.`,{nodes:d});continue}h=n[E]==null}if(h&&H(c))throw new _(`Argument "${u}" of non-null type "${I(c)}" must not be null.`,{nodes:d});const y=Xe(d,c,n);if(y===void 0)throw new _(`Argument "${u}" has invalid value ${ce(d)}.`,{nodes:d});i[u]=y}return i}function fn(e,t,n){var r;const i=(r=t.directives)===null||r===void 0?void 0:r.find(s=>s.name.value===e.name);if(i)return lr(e,i,n)}function xo(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ii(e,t,n,r,i){const s=new Map;return Qn(e,t,n,r,i,s,new Set),s}function cl(e,t,n,r,i){const s=new Map,o=new Set;for(const a of i)a.selectionSet&&Qn(e,t,n,r,a.selectionSet,s,o);return s}function Qn(e,t,n,r,i,s,o){for(const a of i.selections)switch(a.kind){case l.FIELD:{if(!Er(n,a))continue;const u=ll(a),c=s.get(u);c!==void 0?c.push(a):s.set(u,[a]);break}case l.INLINE_FRAGMENT:{if(!Er(n,a)||!Xi(e,a,r))continue;Qn(e,t,n,r,a.selectionSet,s,o);break}case l.FRAGMENT_SPREAD:{const u=a.name.value;if(o.has(u)||!Er(n,a))continue;o.add(u);const c=t[u];if(!c||!Xi(e,c,r))continue;Qn(e,t,n,r,c.selectionSet,s,o);break}}}function Er(e,t){const n=fn(ni,t,e);if((n==null?void 0:n.if)===!0)return!1;const r=fn(ti,t,e);return(r==null?void 0:r.if)!==!1}function Xi(e,t,n){const r=t.typeCondition;if(!r)return!0;const i=Fe(e,r);return i===n?!0:We(i)?e.isSubType(i,n):!1}function ll(e){return e.alias?e.alias.value:e.name.value}function $o(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),r=n.getSubscriptionType();if(r){const i=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===l.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const u=Ii(n,a,s,r,t.selectionSet);if(u.size>1){const d=[...u.values()].slice(1).flat();e.reportError(new _(i!=null?`Subscription "${i}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:d}))}for(const c of u.values())c[0].name.value.startsWith("__")&&e.reportError(new _(i!=null?`Subscription "${i}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function wi(e,t){const n=new Map;for(const r of e){const i=t(r),s=n.get(i);s===void 0?n.set(i,[r]):s.push(r)}return n}function Co(e){return{DirectiveDefinition(r){var i;const s=(i=r.arguments)!==null&&i!==void 0?i:[];return n(`@${r.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(r){var i;const s=r.name.value,o=(i=r.fields)!==null&&i!==void 0?i:[];for(const u of o){var a;const c=u.name.value,f=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${s}.${c}`,f)}return!1}function n(r,i){const s=wi(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`Argument "${r}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function Oi(e){return{Field:t,Directive:t};function t(n){var r;const i=(r=n.arguments)!==null&&r!==void 0?r:[],s=wi(i,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new _(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function Mo(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(r){const i=r.name.value;if(n!=null&&n.getDirective(i)){e.reportError(new _(`Directive "@${i}" already exists in the schema. It cannot be redefined.`,{nodes:r.name}));return}return t[i]?e.reportError(new _(`There can be only one directive named "@${i}".`,{nodes:[t[i],r.name]})):t[i]=r.name,!1}}}function Ai(e){const t=Object.create(null),n=e.getSchema(),r=n?n.getDirectives():vt;for(const a of r)t[a.name]=!a.isRepeatable;const i=e.getDocument().definitions;for(const a of i)a.kind===l.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===l.SCHEMA_DEFINITION||a.kind===l.SCHEMA_EXTENSION)u=s;else if(Yt(a)||ur(a)){const c=a.name.value;u=o[c],u===void 0&&(o[c]=u=Object.create(null))}else u=Object.create(null);for(const c of a.directives){const f=c.name.value;t[f]&&(u[f]?e.reportError(new _(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],c]})):u[f]=c)}}}}function Vo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{EnumTypeDefinition:i,EnumTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.values)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value,h=n[a];ge(h)&&h.getValue(d)?e.reportError(new _(`Enum value "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Enum value "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function Uo(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),r=Object.create(null);return{InputObjectTypeDefinition:i,InputObjectTypeExtension:i,InterfaceTypeDefinition:i,InterfaceTypeExtension:i,ObjectTypeDefinition:i,ObjectTypeExtension:i};function i(s){var o;const a=s.name.value;r[a]||(r[a]=Object.create(null));const u=(o=s.fields)!==null&&o!==void 0?o:[],c=r[a];for(const f of u){const d=f.name.value;fl(n[a],d)?e.reportError(new _(`Field "${a}.${d}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):c[d]?e.reportError(new _(`Field "${a}.${d}" can only be defined once.`,{nodes:[c[d],f.name]})):c[d]=f.name}return!1}}function fl(e,t){return te(e)||re(e)||fe(e)?e.getFields()[t]!=null:!1}function Po(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const r=n.name.value;return t[r]?e.reportError(new _(`There can be only one fragment named "${r}".`,{nodes:[t[r],n.name]})):t[r]=n.name,!1}}}function Di(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const r=t.pop();r||ye(!1),n=r}},ObjectField(r){const i=r.name.value;n[i]?e.reportError(new _(`There can be only one input field named "${i}".`,{nodes:[n[i],r.name]})):n[i]=r.name}}}function jo(e){const t=Object.create(null);return{OperationDefinition(n){const r=n.name;return r&&(t[r.value]?e.reportError(new _(`There can be only one operation named "${r.value}".`,{nodes:[t[r.value],r]})):t[r.value]=r),!1},FragmentDefinition:()=>!1}}function qo(e){const t=e.getSchema(),n=Object.create(null),r=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:i,SchemaExtension:i};function i(s){var o;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const u of a){const c=u.operation,f=n[c];r[c]?e.reportError(new _(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new _(`There can be only one ${c} type in schema.`,{nodes:[f,u]})):n[c]=u}return!1}}function Bo(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:r,ObjectTypeDefinition:r,InterfaceTypeDefinition:r,UnionTypeDefinition:r,EnumTypeDefinition:r,InputObjectTypeDefinition:r};function r(i){const s=i.name.value;if(n!=null&&n.getType(s)){e.reportError(new _(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:i.name}));return}return t[s]?e.reportError(new _(`There can be only one type named "${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}function Go(e){return{OperationDefinition(t){var n;const r=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],i=wi(r,s=>s.variable.name.value);for(const[s,o]of i)o.length>1&&e.reportError(new _(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function Qo(e){return{ListValue(t){const n=Wr(e.getParentInputType());if(!le(n))return Et(e,t),!1},ObjectValue(t){const n=Re(e.getInputType());if(!fe(n))return Et(e,t),!1;const r=ot(t.fields,i=>i.name.value);for(const i of Object.values(n.getFields()))if(!r[i.name]&&rr(i)){const o=I(i.type);e.reportError(new _(`Field "${n.name}.${i.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const n=Re(e.getParentInputType());if(!e.getInputType()&&fe(n)){const i=mt(t.name.value,Object.keys(n.getFields()));e.reportError(new _(`Field "${t.name.value}" is not defined by type "${n.name}".`+st(i),{nodes:t}))}},NullValue(t){const n=e.getInputType();H(n)&&e.reportError(new _(`Expected value of type "${I(n)}", found ${ce(t)}.`,{nodes:t}))},EnumValue:t=>Et(e,t),IntValue:t=>Et(e,t),FloatValue:t=>Et(e,t),StringValue:t=>Et(e,t),BooleanValue:t=>Et(e,t)}}function Et(e,t){const n=e.getInputType();if(!n)return;const r=Re(n);if(!et(r)){const i=I(n);e.reportError(new _(`Expected value of type "${i}", found ${ce(t)}.`,{nodes:t}));return}try{if(r.parseLiteral(t,void 0)===void 0){const s=I(n);e.reportError(new _(`Expected value of type "${s}", found ${ce(t)}.`,{nodes:t}))}}catch(i){const s=I(n);i instanceof _?e.reportError(i):e.reportError(new _(`Expected value of type "${s}", found ${ce(t)}; `+i.message,{nodes:t,originalError:i}))}}function Yo(e){return{VariableDefinition(t){const n=Fe(e.getSchema(),t.type);if(n!==void 0&&!ke(n)){const r=t.variable.name.value,i=ce(t.type);e.reportError(new _(`Variable "$${r}" cannot be non-input type "${i}".`,{nodes:t.type}))}}}}function Jo(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const r=e.getRecursiveVariableUsages(n);for(const{node:i,type:s,defaultValue:o}of r){const a=i.name.value,u=t[a];if(u&&s){const c=e.getSchema(),f=Fe(c,u.type);if(f&&!dl(c,f,u.defaultValue,s,o)){const d=I(f),h=I(s);e.reportError(new _(`Variable "$${a}" of type "${d}" used in position expecting type "${h}".`,{nodes:[u,i]}))}}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function dl(e,t,n,r,i){if(H(r)&&!H(t)){if(!(n!=null&&n.kind!==l.NULL)&&!(i!==void 0))return!1;const a=r.ofType;return Tt(e,t,a)}return Tt(e,t,r)}const Ho=Object.freeze([co,jo,yo,$o,_i,fo,Yo,Ro,lo,Po,mo,To,Oo,Eo,Go,go,bo,bi,Ai,po,Oi,Qo,Do,Jo,No,Di]),pl=Object.freeze([vo,qo,Bo,Vo,Uo,Co,Mo,_i,bi,Ai,Ao,ho,Oi,Di,So]);class zo{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const r of this.getDocument().definitions)r.kind===l.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const r=[t];let i;for(;i=r.pop();)for(const s of i.selections)s.kind===l.FRAGMENT_SPREAD?n.push(s):s.selectionSet&&r.push(s.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const r=Object.create(null),i=[t.selectionSet];let s;for(;s=i.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(r[a]!==!0){r[a]=!0;const u=this.getFragment(a);u&&(n.push(u),i.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class hl extends zo{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Xo extends zo{constructor(t,n,r,i){super(n,i),this._schema=t,this._typeInfo=r,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const r=[],i=new yi(this._schema);Gt(t,vi(i,{VariableDefinition:()=>!1,Variable(s){r.push({node:s,type:i.getInputType(),defaultValue:i.getDefaultValue()})}})),n=r,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const r of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(r));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function Wo(e,t,n=Ho,r,i=new yi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||Z(!1,"Must provide document."),hi(e);const a=Object.freeze({}),u=[],c=new Xo(e,t,i,d=>{if(u.length>=o)throw u.push(new _("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(d)}),f=zr(n.map(d=>d(c)));try{Gt(t,vi(i,f))}catch(d){if(d!==a)throw d}return u}function Ko(e,t,n=pl){const r=[],i=new hl(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,zr(s)),r}function ml(e){const t=Ko(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
|
|
47
58
|
|
|
48
|
-
`))}function
|
|
59
|
+
`))}function yl(e,t){const n=Ko(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
|
|
49
60
|
|
|
50
|
-
`))}function pl(e){let t;return function(r,i,s){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let a=o.get(i);a===void 0&&(a=new WeakMap,o.set(i,a));let u=a.get(s);return u===void 0&&(u=e(r,i,s),a.set(s,u)),u}}function hl(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function ml(e,t,n){let r=n;for(const i of e)r=$e(r)?r.then(s=>t(s,i)):t(r,i);return r}function yl(e){return e instanceof Error?e:new vl(e)}class vl extends Error{constructor(t){super("Unexpected error value: "+I(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ut(e,t,n){var r;const i=yl(e);return El(i)?i:new _(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function El(e){return Array.isArray(e.path)}const gl=pl((e,t,n)=>sl(e.schema,e.fragments,e.variableValues,t,n));function fr(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;Ko(t,n,r);const s=Zo(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=Tl(s,o,i);return $e(a)?a.then(u=>Dn(u,s.errors),u=>(s.errors.push(u),Dn(null,s.errors))):Dn(a,s.errors)}catch(o){return s.errors.push(o),Dn(null,s.errors)}}function Wo(e){const t=fr(e);if($e(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Dn(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function Ko(e,t,n){t||Z(!1,"Must provide document."),pi(e),n==null||Ce(n)||Z(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function Zo(e){var t,n;const{schema:r,document:i,rootValue:s,contextValue:o,variableValues:a,operationName:u,fieldResolver:c,typeResolver:f,subscribeFieldResolver:d}=e;let h;const y=Object.create(null);for(const V of i.definitions)switch(V.kind){case l.OPERATION_DEFINITION:if(u==null){if(h!==void 0)return[new _("Must provide operation name if query contains multiple operations.")];h=V}else((t=V.name)===null||t===void 0?void 0:t.value)===u&&(h=V);break;case l.FRAGMENT_DEFINITION:y[V.name.value]=V;break}if(!h)return u!=null?[new _(`Unknown operation named "${u}".`)]:[new _("Must provide an operation.")];const E=(n=h.variableDefinitions)!==null&&n!==void 0?n:[],$=Lo(r,E,a??{},{maxErrors:50});return $.errors?$.errors:{schema:r,fragments:y,rootValue:s,contextValue:o,operation:h,variableValues:$.coerced,fieldResolver:c??$r,typeResolver:f??na,subscribeFieldResolver:d??$r,errors:[]}}function Tl(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new _(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=Ni(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case be.QUERY:return Yn(e,r,n,s,i);case be.MUTATION:return bl(e,r,n,s,i);case be.SUBSCRIPTION:return Yn(e,r,n,s,i)}}function bl(e,t,n,r,i){return ml(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=ea(e,t,n,a,u);return c===void 0?s:$e(c)?c.then(f=>(s[o]=f,s)):(s[o]=c,s)},Object.create(null))}function Yn(e,t,n,r,i){const s=Object.create(null);let o=!1;for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=ea(e,t,n,u,c);f!==void 0&&(s[a]=f,$e(f)&&(o=!0))}return o?hl(s):s}function ea(e,t,n,r,i){var s;const o=ra(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=ta(e,o,r,t,i);try{const f=lr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let y;return $e(h)?y=h.then(E=>dn(e,a,r,c,i,E)):y=dn(e,a,r,c,i,h),$e(y)?y.then(void 0,E=>{const $=Ut(E,r,Fe(i));return Jn($,a,e)}):y}catch(f){const d=Ut(f,r,Fe(i));return Jn(d,a,e)}}function ta(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Jn(e,t,n){if(H(t))throw e;return n.errors.push(e),null}function dn(e,t,n,r,i,s){if(s instanceof Error)throw s;if(H(t)){const o=dn(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if(ce(t))return _l(e,t,n,r,i,s);if(Ze(t))return Nl(t,s);if(We(t))return Il(e,t,n,r,i,s);if(te(t))return xr(e,t,n,r,i,s);me(!1,"Cannot complete value of unexpected output type: "+I(t))}function _l(e,t,n,r,i,s){if(!si(s))throw new _(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const o=t.ofType;let a=!1;const u=Array.from(s,(c,f)=>{const d=Vt(i,f,void 0);try{let h;return $e(c)?h=c.then(y=>dn(e,o,n,r,d,y)):h=dn(e,o,n,r,d,c),$e(h)?(a=!0,h.then(void 0,y=>{const E=Ut(y,n,Fe(d));return Jn(E,o,e)})):h}catch(h){const y=Ut(h,n,Fe(d));return Jn(y,o,e)}});return a?Promise.all(u):u}function Nl(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${I(e)}.serialize(${I(t)})\` to return non-nullable value, returned: ${I(n)}`);return n}function Il(e,t,n,r,i,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,u=e.contextValue,c=a(s,u,r,t);return $e(c)?c.then(f=>xr(e,Xi(f,e,t,n,r,s),n,r,i,s)):xr(e,Xi(c,e,t,n,r,s),n,r,i,s)}function Xi(e,t,n,r,i,s){if(e==null)throw new _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(te(e))throw new _("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${I(s)}, received "${I(e)}".`);const o=t.schema.getType(e);if(o==null)throw new _(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!te(o))throw new _(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new _(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function xr(e,t,n,r,i,s){const o=gl(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if($e(a))return a.then(u=>{if(!u)throw Wi(t,s,n);return Yn(e,t,s,i,o)});if(!a)throw Wi(t,s,n)}return Yn(e,t,s,i,o)}function Wi(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const na=function(e,t,n,r){if(Ce(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o<i.length;o++){const a=i[o];if(a.isTypeOf){const u=a.isTypeOf(e,t,n);if($e(u))s[o]=u;else if(u)return a.name}}if(s.length)return Promise.all(s).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return i[a].name})},$r=function(e,t,n,r){if(Ce(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function ra(e,t,n){const r=n.name.value;return r===un.name&&e.getQueryType()===t?un:r===cn.name&&e.getQueryType()===t?cn:r===ln.name?ln:t.getFields()[r]}function wl(e){return new Promise(t=>t(ia(e)))}function Ol(e){const t=ia(e);if($e(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function ia(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u}=e,c=di(t);if(c.length>0)return{errors:c};let f;try{f=tr(n)}catch(h){return{errors:[h]}}const d=zo(t,f);return d.length>0?{errors:d}:fr({schema:t,document:f,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u})}function sa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Al(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(s){if(typeof n.return=="function")try{await n.return()}catch{}throw s}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function Dl(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await oa(e);return sa(t)?Al(t,r=>fr({...e,rootValue:r})):t}function Sl(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function oa(...e){const t=Sl(e),{schema:n,document:r,variableValues:i}=t;Ko(n,r,i);const s=Zo(t);if(!("schema"in s))return{errors:s};try{const o=await Rl(s);if(!sa(o))throw new Error(`Subscription field must return Async Iterable. Received: ${I(o)}.`);return o}catch(o){if(o instanceof _)return{errors:[o]};throw o}}async function Rl(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new _("Schema is not configured to execute subscription operation.",{nodes:r});const a=Ni(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=ra(t,o,c[0]);if(!f){const E=c[0].name.value;throw new _(`The subscription field "${E}" is not defined.`,{nodes:c})}const d=Vt(void 0,u,o.name),h=ta(e,f,c,o,d);try{var y;const E=lr(f,c[0],i),$=e.contextValue,B=await((y=f.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(s,E,$,h);if(B instanceof Error)throw B;return B}catch(E){throw Ut(E,c,Fe(d))}}function Ll(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||me(!1),e.reportError(new _(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new _(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||me(!1),e.reportError(new _(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Se(e.getParentInputType());if(le(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new _(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=Se(e.getInputType());i!=null||me(!1),e.reportError(new _(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function kl(e){return{Field(t){const n=Se(e.getType());n&&wt(n)&&e.reportError(new _(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function aa(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",s=t.schemaDescription?n:"";function o(a){return t.inputValueDeprecation?a:""}return`
|
|
61
|
+
`))}function vl(e){let t;return function(r,i,s){t===void 0&&(t=new WeakMap);let o=t.get(r);o===void 0&&(o=new WeakMap,t.set(r,o));let a=o.get(i);a===void 0&&(a=new WeakMap,o.set(i,a));let u=a.get(s);return u===void 0&&(u=e(r,i,s),a.set(s,u)),u}}function Wi(e){return Promise.all(Object.values(e)).then(t=>{const n=Object.create(null);for(const[r,i]of Object.keys(e).entries())n[i]=t[r];return n})}function El(e,t,n){let r=n;for(const i of e)r=Ce(r)?r.then(s=>t(s,i)):t(r,i);return r}function gl(e){return e instanceof Error?e:new Tl(e)}class Tl extends Error{constructor(t){super("Unexpected error value: "+I(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ut(e,t,n){var r;const i=gl(e);return bl(i)?i:new _(i.message,{nodes:(r=i.nodes)!==null&&r!==void 0?r:t,source:i.source,positions:i.positions,path:n,originalError:i})}function bl(e){return Array.isArray(e.path)}const _l=vl((e,t,n)=>cl(e.schema,e.fragments,e.variableValues,t,n));function fr(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:n,variableValues:r,rootValue:i}=e;ea(t,n,r);const s=ta(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=Nl(s,o,i);return Ce(a)?a.then(u=>Dn(u,s.errors),u=>(s.errors.push(u),Dn(null,s.errors))):Dn(a,s.errors)}catch(o){return s.errors.push(o),Dn(null,s.errors)}}function Zo(e){const t=fr(e);if(Ce(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function Dn(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function ea(e,t,n){t||Z(!1,"Must provide document."),hi(e),n==null||Me(n)||Z(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function ta(e){var t,n;const{schema:r,document:i,rootValue:s,contextValue:o,variableValues:a,operationName:u,fieldResolver:c,typeResolver:f,subscribeFieldResolver:d}=e;let h;const y=Object.create(null);for(const U of i.definitions)switch(U.kind){case l.OPERATION_DEFINITION:if(u==null){if(h!==void 0)return[new _("Must provide operation name if query contains multiple operations.")];h=U}else((t=U.name)===null||t===void 0?void 0:t.value)===u&&(h=U);break;case l.FRAGMENT_DEFINITION:y[U.name.value]=U;break}if(!h)return u!=null?[new _(`Unknown operation named "${u}".`)]:[new _("Must provide an operation.")];const E=(n=h.variableDefinitions)!==null&&n!==void 0?n:[],C=Fo(r,E,a??{},{maxErrors:50});return C.errors?C.errors:{schema:r,fragments:y,rootValue:s,contextValue:o,operation:h,variableValues:C.coerced,fieldResolver:c??Cr,typeResolver:f??ia,subscribeFieldResolver:d??Cr,errors:[]}}function Nl(e,t,n){const r=e.schema.getRootType(t.operation);if(r==null)throw new _(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const i=Ii(e.schema,e.fragments,e.variableValues,r,t.selectionSet),s=void 0;switch(t.operation){case be.QUERY:return Yn(e,r,n,s,i);case be.MUTATION:return Il(e,r,n,s,i);case be.SUBSCRIPTION:return Yn(e,r,n,s,i)}}function Il(e,t,n,r,i){return El(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=na(e,t,n,a,u);return c===void 0?s:Ce(c)?c.then(f=>(s[o]=f,s)):(s[o]=c,s)},Object.create(null))}function Yn(e,t,n,r,i){const s=Object.create(null);let o=!1;try{for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=na(e,t,n,u,c);f!==void 0&&(s[a]=f,Ce(f)&&(o=!0))}}catch(a){if(o)return Wi(s).finally(()=>{throw a});throw a}return o?Wi(s):s}function na(e,t,n,r,i){var s;const o=sa(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=ra(e,o,r,t,i);try{const f=lr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let y;return Ce(h)?y=h.then(E=>dn(e,a,r,c,i,E)):y=dn(e,a,r,c,i,h),Ce(y)?y.then(void 0,E=>{const C=Ut(E,r,xe(i));return Jn(C,a,e)}):y}catch(f){const d=Ut(f,r,xe(i));return Jn(d,a,e)}}function ra(e,t,n,r,i){return{fieldName:t.name,fieldNodes:n,returnType:t.type,parentType:r,path:i,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function Jn(e,t,n){if(H(t))throw e;return n.errors.push(e),null}function dn(e,t,n,r,i,s){if(s instanceof Error)throw s;if(H(t)){const o=dn(e,t.ofType,n,r,i,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${r.parentType.name}.${r.fieldName}.`);return o}if(s==null)return null;if(le(t))return wl(e,t,n,r,i,s);if(et(t))return Ol(t,s);if(We(t))return Al(e,t,n,r,i,s);if(te(t))return $r(e,t,n,r,i,s);ye(!1,"Cannot complete value of unexpected output type: "+I(t))}function wl(e,t,n,r,i,s){if(!oi(s))throw new _(`Expected Iterable, but did not find one for field "${r.parentType.name}.${r.fieldName}".`);const o=t.ofType;let a=!1;const u=Array.from(s,(c,f)=>{const d=Vt(i,f,void 0);try{let h;return Ce(c)?h=c.then(y=>dn(e,o,n,r,d,y)):h=dn(e,o,n,r,d,c),Ce(h)?(a=!0,h.then(void 0,y=>{const E=Ut(y,n,xe(d));return Jn(E,o,e)})):h}catch(h){const y=Ut(h,n,xe(d));return Jn(y,o,e)}});return a?Promise.all(u):u}function Ol(e,t){const n=e.serialize(t);if(n==null)throw new Error(`Expected \`${I(e)}.serialize(${I(t)})\` to return non-nullable value, returned: ${I(n)}`);return n}function Al(e,t,n,r,i,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,u=e.contextValue,c=a(s,u,r,t);return Ce(c)?c.then(f=>$r(e,Ki(f,e,t,n,r,s),n,r,i,s)):$r(e,Ki(c,e,t,n,r,s),n,r,i,s)}function Ki(e,t,n,r,i,s){if(e==null)throw new _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}". Either the "${n.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,r);if(te(e))throw new _("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new _(`Abstract type "${n.name}" must resolve to an Object type at runtime for field "${i.parentType.name}.${i.fieldName}" with value ${I(s)}, received "${I(e)}".`);const o=t.schema.getType(e);if(o==null)throw new _(`Abstract type "${n.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:r});if(!te(o))throw new _(`Abstract type "${n.name}" was resolved to a non-object type "${e}".`,{nodes:r});if(!t.schema.isSubType(n,o))throw new _(`Runtime Object type "${o.name}" is not a possible type for "${n.name}".`,{nodes:r});return o}function $r(e,t,n,r,i,s){const o=_l(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if(Ce(a))return a.then(u=>{if(!u)throw Zi(t,s,n);return Yn(e,t,s,i,o)});if(!a)throw Zi(t,s,n)}return Yn(e,t,s,i,o)}function Zi(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const ia=function(e,t,n,r){if(Me(e)&&typeof e.__typename=="string")return e.__typename;const i=n.schema.getPossibleTypes(r),s=[];for(let o=0;o<i.length;o++){const a=i[o];if(a.isTypeOf){const u=a.isTypeOf(e,t,n);if(Ce(u))s[o]=u;else if(u)return a.name}}if(s.length)return Promise.all(s).then(o=>{for(let a=0;a<o.length;a++)if(o[a])return i[a].name})},Cr=function(e,t,n,r){if(Me(e)||typeof e=="function"){const i=e[r.fieldName];return typeof i=="function"?e[r.fieldName](t,n,r):i}};function sa(e,t,n){const r=n.name.value;return r===un.name&&e.getQueryType()===t?un:r===cn.name&&e.getQueryType()===t?cn:r===ln.name?ln:t.getFields()[r]}function Dl(e){return new Promise(t=>t(oa(e)))}function Sl(e){const t=oa(e);if(Ce(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function oa(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:n,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u}=e,c=pi(t);if(c.length>0)return{errors:c};let f;try{f=tr(n)}catch(h){return{errors:[h]}}const d=Wo(t,f);return d.length>0?{errors:d}:fr({schema:t,document:f,rootValue:r,contextValue:i,variableValues:s,operationName:o,fieldResolver:a,typeResolver:u})}function aa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Rl(e,t){const n=e[Symbol.asyncIterator]();async function r(i){if(i.done)return i;try{return{value:await t(i.value),done:!1}}catch(s){if(typeof n.return=="function")try{await n.return()}catch{}throw s}}return{async next(){return r(await n.next())},async return(){return typeof n.return=="function"?r(await n.return()):{value:void 0,done:!0}},async throw(i){if(typeof n.throw=="function")return r(await n.throw(i));throw i},[Symbol.asyncIterator](){return this}}}async function Ll(e){arguments.length<2||Z(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await ua(e);return aa(t)?Rl(t,r=>fr({...e,rootValue:r})):t}function kl(e){const t=e[0];return t&&"document"in t?t:{schema:t,document:e[1],rootValue:e[2],contextValue:e[3],variableValues:e[4],operationName:e[5],subscribeFieldResolver:e[6]}}async function ua(...e){const t=kl(e),{schema:n,document:r,variableValues:i}=t;ea(n,r,i);const s=ta(t);if(!("schema"in s))return{errors:s};try{const o=await Fl(s);if(!aa(o))throw new Error(`Subscription field must return Async Iterable. Received: ${I(o)}.`);return o}catch(o){if(o instanceof _)return{errors:[o]};throw o}}async function Fl(e){const{schema:t,fragments:n,operation:r,variableValues:i,rootValue:s}=e,o=t.getSubscriptionType();if(o==null)throw new _("Schema is not configured to execute subscription operation.",{nodes:r});const a=Ii(t,n,i,o,r.selectionSet),[u,c]=[...a.entries()][0],f=sa(t,o,c[0]);if(!f){const E=c[0].name.value;throw new _(`The subscription field "${E}" is not defined.`,{nodes:c})}const d=Vt(void 0,u,o.name),h=ra(e,f,c,o,d);try{var y;const E=lr(f,c[0],i),C=e.contextValue,q=await((y=f.subscribe)!==null&&y!==void 0?y:e.subscribeFieldResolver)(s,E,C,h);if(q instanceof Error)throw q;return q}catch(E){throw Ut(E,c,xe(d))}}function xl(e){return{Field(t){const n=e.getFieldDef(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getParentType();i!=null||ye(!1),e.reportError(new _(`The field ${i.name}.${n.name} is deprecated. ${r}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=e.getDirective();if(i!=null)e.reportError(new _(`Directive "@${i.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}));else{const s=e.getParentType(),o=e.getFieldDef();s!=null&&o!=null||ye(!1),e.reportError(new _(`Field "${s.name}.${o.name}" argument "${n.name}" is deprecated. ${r}`,{nodes:t}))}}},ObjectField(t){const n=Re(e.getParentInputType());if(fe(n)){const r=n.getFields()[t.name.value],i=r==null?void 0:r.deprecationReason;i!=null&&e.reportError(new _(`The input field ${n.name}.${r.name} is deprecated. ${i}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),r=n==null?void 0:n.deprecationReason;if(n&&r!=null){const i=Re(e.getInputType());i!=null||ye(!1),e.reportError(new _(`The enum value "${i.name}.${n.name}" is deprecated. ${r}`,{nodes:t}))}}}}function $l(e){return{Field(t){const n=Re(e.getType());n&&wt(n)&&e.reportError(new _(`GraphQL introspection has been disabled, but the requested query contained the field "${t.name.value}".`,{nodes:t}))}}}function ca(e){const t={descriptions:!0,specifiedByUrl:!1,directiveIsRepeatable:!1,schemaDescription:!1,inputValueDeprecation:!1,...e},n=t.descriptions?"description":"",r=t.specifiedByUrl?"specifiedByURL":"",i=t.directiveIsRepeatable?"isRepeatable":"",s=t.schemaDescription?n:"";function o(a){return t.inputValueDeprecation?a:""}return`
|
|
51
62
|
query IntrospectionQuery {
|
|
52
63
|
__schema {
|
|
53
64
|
${s}
|
|
@@ -136,6 +147,14 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
136
147
|
ofType {
|
|
137
148
|
kind
|
|
138
149
|
name
|
|
150
|
+
ofType {
|
|
151
|
+
kind
|
|
152
|
+
name
|
|
153
|
+
ofType {
|
|
154
|
+
kind
|
|
155
|
+
name
|
|
156
|
+
}
|
|
157
|
+
}
|
|
139
158
|
}
|
|
140
159
|
}
|
|
141
160
|
}
|
|
@@ -144,21 +163,21 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
144
163
|
}
|
|
145
164
|
}
|
|
146
165
|
}
|
|
147
|
-
`}function Fl(e,t){let n=null;for(const i of e.definitions)if(i.kind===l.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}function xl(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new _("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new _("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new _("Schema is not configured for subscriptions.",{nodes:t});return n}throw new _("Can only have query, mutation and subscription operations.",{nodes:t})}function $l(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=tr(aa(n)),i=Wo({schema:e,document:r});return!i.errors&&i.data||me(!1),i.data}function Cl(e,t){Ce(e)&&Ce(e.__schema)||Z(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${I(e)}.`);const n=e.__schema,r=lt(n.types,v=>v.name,v=>h(v));for(const v of[...gn,..._n])r[v.name]&&(r[v.name]=v);const i=n.queryType?f(n.queryType):null,s=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,a=n.directives?n.directives.map(M):[];return new Qt({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:a,assumeValid:t==null?void 0:t.assumeValid});function u(v){if(v.kind===se.LIST){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");return new we(u(b))}if(v.kind===se.NON_NULL){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");const P=u(b);return new K(Ws(P))}return c(v)}function c(v){const b=v.name;if(!b)throw new Error(`Unknown type reference: ${I(v)}.`);const P=r[b];if(!P)throw new Error(`Invalid or incomplete schema, unknown type: ${b}. Ensure that a full introspection query is used in order to build a client schema.`);return P}function f(v){return zs(c(v))}function d(v){return Xs(c(v))}function h(v){if(v!=null&&v.name!=null&&v.kind!=null)switch(v.kind){case se.SCALAR:return y(v);case se.OBJECT:return $(v);case se.INTERFACE:return V(v);case se.UNION:return B(v);case se.ENUM:return X(v);case se.INPUT_OBJECT:return z(v)}const b=I(v);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${b}.`)}function y(v){return new tt({name:v.name,description:v.description,specifiedByURL:v.specifiedByURL})}function E(v){if(v.interfaces===null&&v.kind===se.INTERFACE)return[];if(!v.interfaces){const b=I(v);throw new Error(`Introspection result missing interfaces: ${b}.`)}return v.interfaces.map(d)}function $(v){return new Pe({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function V(v){return new $t({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function B(v){if(!v.possibleTypes){const b=I(v);throw new Error(`Introspection result missing possibleTypes: ${b}.`)}return new Ct({name:v.name,description:v.description,types:()=>v.possibleTypes.map(f)})}function X(v){if(!v.enumValues){const b=I(v);throw new Error(`Introspection result missing enumValues: ${b}.`)}return new pt({name:v.name,description:v.description,values:lt(v.enumValues,b=>b.name,b=>({description:b.description,deprecationReason:b.deprecationReason}))})}function z(v){if(!v.inputFields){const b=I(v);throw new Error(`Introspection result missing inputFields: ${b}.`)}return new Mt({name:v.name,description:v.description,fields:()=>x(v.inputFields)})}function Q(v){if(!v.fields)throw new Error(`Introspection result missing fields: ${I(v)}.`);return lt(v.fields,b=>b.name,C)}function C(v){const b=u(v.type);if(!dt(b)){const P=I(b);throw new Error(`Introspection must provide output type for fields, but received: ${P}.`)}if(!v.args){const P=I(v);throw new Error(`Introspection result missing field args: ${P}.`)}return{description:v.description,deprecationReason:v.deprecationReason,type:b,args:x(v.args)}}function x(v){return lt(v,b=>b.name,R)}function R(v){const b=u(v.type);if(!Le(b)){const W=I(b);throw new Error(`Introspection must provide input type for arguments, but received: ${W}.`)}const P=v.defaultValue!=null?Xe(Ys(v.defaultValue),b):void 0;return{description:v.description,type:b,defaultValue:P,deprecationReason:v.deprecationReason}}function M(v){if(!v.args){const b=I(v);throw new Error(`Introspection result missing directive args: ${b}.`)}if(!v.locations){const b=I(v);throw new Error(`Introspection result missing directive locations: ${b}.`)}return new nt({name:v.name,description:v.description,isRepeatable:v.isRepeatable,locations:v.locations.slice(),args:x(v.args)})}}function Ml(e,t,n){fi(e),t!=null&&t.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&dl(t,e);const r=e.toConfig(),i=ua(r,t,n);return r===i?e:new Qt(i)}function ua(e,t,n){var r,i,s,o;const a=[],u=Object.create(null),c=[];let f;const d=[];for(const p of t.definitions)if(p.kind===l.SCHEMA_DEFINITION)f=p;else if(p.kind===l.SCHEMA_EXTENSION)d.push(p);else if(Yt(p))a.push(p);else if(ur(p)){const S=p.name.value,O=u[S];u[S]=O?O.concat([p]):[p]}else p.kind===l.DIRECTIVE_DEFINITION&&c.push(p);if(Object.keys(u).length===0&&a.length===0&&c.length===0&&d.length===0&&f==null)return e;const h=Object.create(null);for(const p of e.types)h[p.name]=X(p);for(const p of a){var y;const S=p.name.value;h[S]=(y=Ki[S])!==null&&y!==void 0?y:L(p)}const E={query:e.query&&V(e.query),mutation:e.mutation&&V(e.mutation),subscription:e.subscription&&V(e.subscription),...f&&P([f]),...P(d)};return{description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...E,types:Object.values(h),directives:[...e.directives.map(B),...c.map(m)],extensions:Object.create(null),astNode:(s=f)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1};function $(p){return ce(p)?new we($(p.ofType)):H(p)?new K($(p.ofType)):V(p)}function V(p){return h[p.name]}function B(p){const S=p.toConfig();return new nt({...S,args:rt(S.args,b)})}function X(p){if(wt(p)||ir(p))return p;if(Ve(p))return C(p);if(te(p))return x(p);if(re(p))return R(p);if(Ne(p))return M(p);if(ge(p))return Q(p);if(le(p))return z(p);me(!1,"Unexpected type: "+I(p))}function z(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Mt({...O,fields:()=>({...rt(O.fields,F=>({...F,type:$(F.type)})),...g(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function Q(p){var S;const O=p.toConfig(),k=(S=u[p.name])!==null&&S!==void 0?S:[];return new pt({...O,values:{...O.values,...w(k)},extensionASTNodes:O.extensionASTNodes.concat(k)})}function C(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];let F=O.specifiedByURL;for(const J of k){var Y;F=(Y=Zi(J))!==null&&Y!==void 0?Y:F}return new tt({...O,specifiedByURL:F,extensionASTNodes:O.extensionASTNodes.concat(k)})}function x(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Pe({...O,interfaces:()=>[...p.getInterfaces().map(V),...T(k)],fields:()=>({...rt(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function R(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new $t({...O,interfaces:()=>[...p.getInterfaces().map(V),...T(k)],fields:()=>({...rt(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function M(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Ct({...O,types:()=>[...p.getTypes().map(V),...D(k)],extensionASTNodes:O.extensionASTNodes.concat(k)})}function v(p){return{...p,type:$(p.type),args:p.args&&rt(p.args,b)}}function b(p){return{...p,type:$(p.type)}}function P(p){const S={};for(const k of p){var O;const F=(O=k.operationTypes)!==null&&O!==void 0?O:[];for(const Y of F)S[Y.operation]=W(Y.type)}return S}function W(p){var S;const O=p.name.value,k=(S=Ki[O])!==null&&S!==void 0?S:h[O];if(k===void 0)throw new Error(`Unknown type: "${O}".`);return k}function oe(p){return p.kind===l.LIST_TYPE?new we(oe(p.type)):p.kind===l.NON_NULL_TYPE?new K(oe(p.type)):W(p)}function m(p){var S;return new nt({name:p.name.value,description:(S=p.description)===null||S===void 0?void 0:S.value,locations:p.locations.map(({value:O})=>O),isRepeatable:p.repeatable,args:q(p.arguments),astNode:p})}function A(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={type:oe(J.type),description:(k=J.description)===null||k===void 0?void 0:k.value,args:q(J.arguments),deprecationReason:Sn(J),astNode:J}}}return S}function q(p){const S=p??[],O=Object.create(null);for(const F of S){var k;const Y=oe(F.type);O[F.name.value]={type:Y,description:(k=F.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(F.defaultValue,Y),deprecationReason:Sn(F),astNode:F}}return O}function g(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;const ne=oe(J.type);S[J.name.value]={type:ne,description:(k=J.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(J.defaultValue,ne),deprecationReason:Sn(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.values)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={description:(k=J.description)===null||k===void 0?void 0:k.value,deprecationReason:Sn(J),astNode:J}}}return S}function T(p){return p.flatMap(S=>{var O,k;return(O=(k=S.interfaces)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function D(p){return p.flatMap(S=>{var O,k;return(O=(k=S.types)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function L(p){var S;const O=p.name.value,k=(S=u[O])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var F;const fe=[p,...k];return new Pe({name:O,description:(F=p.description)===null||F===void 0?void 0:F.value,interfaces:()=>T(fe),fields:()=>A(fe),astNode:p,extensionASTNodes:k})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const fe=[p,...k];return new $t({name:O,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>T(fe),fields:()=>A(fe),astNode:p,extensionASTNodes:k})}case l.ENUM_TYPE_DEFINITION:{var J;const fe=[p,...k];return new pt({name:O,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(fe),astNode:p,extensionASTNodes:k})}case l.UNION_TYPE_DEFINITION:{var ne;const fe=[p,...k];return new Ct({name:O,description:(ne=p.description)===null||ne===void 0?void 0:ne.value,types:()=>D(fe),astNode:p,extensionASTNodes:k})}case l.SCALAR_TYPE_DEFINITION:{var ye;return new tt({name:O,description:(ye=p.description)===null||ye===void 0?void 0:ye.value,specifiedByURL:Zi(p),astNode:p,extensionASTNodes:k})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const fe=[p,...k];return new Mt({name:O,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>g(fe),astNode:p,extensionASTNodes:k})}}}}const Ki=st([...gn,..._n],e=>e.name);function Sn(e){const t=fn(or,e);return t==null?void 0:t.reason}function Zi(e){const t=fn(ri,e);return t==null?void 0:t.url}function ca(e,t){e!=null&&e.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&fl(e);const r=ua({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}const i=[...r.directives,...yt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Qt({...r,directives:i})}function Vl(e,t){const n=tr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return ca(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function Ul(e){const t=e.toConfig(),n=lt(gr(t.types),h=>h.name,d);return new Qt({...t,types:Object.values(n),directives:gr(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)});function r(h){return ce(h)?new we(r(h.ofType)):H(h)?new K(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const y=h.toConfig();return new nt({...y,locations:la(y.locations,E=>E),args:a(y.args)})}function a(h){return Rn(h,y=>({...y,type:r(y.type)}))}function u(h){return Rn(h,y=>({...y,type:r(y.type),args:y.args&&a(y.args)}))}function c(h){return Rn(h,y=>({...y,type:r(y.type)}))}function f(h){return gr(h).map(i)}function d(h){if(Ve(h)||wt(h))return h;if(te(h)){const y=h.toConfig();return new Pe({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(re(h)){const y=h.toConfig();return new $t({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(Ne(h)){const y=h.toConfig();return new Ct({...y,types:()=>f(y.types)})}if(ge(h)){const y=h.toConfig();return new pt({...y,values:Rn(y.values,E=>E)})}if(le(h)){const y=h.toConfig();return new Mt({...y,fields:()=>c(y.fields)})}me(!1,"Unexpected type: "+I(h))}}function Rn(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(mn))n[r]=t(e[r]);return n}function gr(e){return la(e,t=>t.name)}function la(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function Pl(e){return fa(e,t=>!ii(t),Bl)}function jl(e){return fa(e,ii,wt)}function Bl(e){return!ir(e)&&!wt(e)}function fa(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[ql(e),...r.map(s=>Wl(s)),...i.map(s=>da(s))].filter(Boolean).join(`
|
|
166
|
+
`}function Cl(e,t){let n=null;for(const i of e.definitions)if(i.kind===l.OPERATION_DEFINITION){var r;if(t==null){if(n)return null;n=i}else if(((r=i.name)===null||r===void 0?void 0:r.value)===t)return i}return n}function Ml(e,t){if(t.operation==="query"){const n=e.getQueryType();if(!n)throw new _("Schema does not define the required query root type.",{nodes:t});return n}if(t.operation==="mutation"){const n=e.getMutationType();if(!n)throw new _("Schema is not configured for mutations.",{nodes:t});return n}if(t.operation==="subscription"){const n=e.getSubscriptionType();if(!n)throw new _("Schema is not configured for subscriptions.",{nodes:t});return n}throw new _("Can only have query, mutation and subscription operations.",{nodes:t})}function Vl(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=tr(ca(n)),i=Zo({schema:e,document:r});return!i.errors&&i.data||ye(!1),i.data}function Ul(e,t){Me(e)&&Me(e.__schema)||Z(!1,`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${I(e)}.`);const n=e.__schema,r=ft(n.types,v=>v.name,v=>h(v));for(const v of[...gn,..._n])r[v.name]&&(r[v.name]=v);const i=n.queryType?f(n.queryType):null,s=n.mutationType?f(n.mutationType):null,o=n.subscriptionType?f(n.subscriptionType):null,a=n.directives?n.directives.map(V):[];return new Qt({description:n.description,query:i,mutation:s,subscription:o,types:Object.values(r),directives:a,assumeValid:t==null?void 0:t.assumeValid});function u(v){if(v.kind===se.LIST){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");return new we(u(b))}if(v.kind===se.NON_NULL){const b=v.ofType;if(!b)throw new Error("Decorated type deeper than introspection query.");const P=u(b);return new K(Zs(P))}return c(v)}function c(v){const b=v.name;if(!b)throw new Error(`Unknown type reference: ${I(v)}.`);const P=r[b];if(!P)throw new Error(`Invalid or incomplete schema, unknown type: ${b}. Ensure that a full introspection query is used in order to build a client schema.`);return P}function f(v){return Ws(c(v))}function d(v){return Ks(c(v))}function h(v){if(v!=null&&v.name!=null&&v.kind!=null)switch(v.kind){case se.SCALAR:return y(v);case se.OBJECT:return C(v);case se.INTERFACE:return U(v);case se.UNION:return q(v);case se.ENUM:return X(v);case se.INPUT_OBJECT:return z(v)}const b=I(v);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${b}.`)}function y(v){return new nt({name:v.name,description:v.description,specifiedByURL:v.specifiedByURL})}function E(v){if(v.interfaces===null&&v.kind===se.INTERFACE)return[];if(!v.interfaces){const b=I(v);throw new Error(`Introspection result missing interfaces: ${b}.`)}return v.interfaces.map(d)}function C(v){return new je({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function U(v){return new $t({name:v.name,description:v.description,interfaces:()=>E(v),fields:()=>Q(v)})}function q(v){if(!v.possibleTypes){const b=I(v);throw new Error(`Introspection result missing possibleTypes: ${b}.`)}return new Ct({name:v.name,description:v.description,types:()=>v.possibleTypes.map(f)})}function X(v){if(!v.enumValues){const b=I(v);throw new Error(`Introspection result missing enumValues: ${b}.`)}return new ht({name:v.name,description:v.description,values:ft(v.enumValues,b=>b.name,b=>({description:b.description,deprecationReason:b.deprecationReason}))})}function z(v){if(!v.inputFields){const b=I(v);throw new Error(`Introspection result missing inputFields: ${b}.`)}return new Mt({name:v.name,description:v.description,fields:()=>x(v.inputFields)})}function Q(v){if(!v.fields)throw new Error(`Introspection result missing fields: ${I(v)}.`);return ft(v.fields,b=>b.name,M)}function M(v){const b=u(v.type);if(!pt(b)){const P=I(b);throw new Error(`Introspection must provide output type for fields, but received: ${P}.`)}if(!v.args){const P=I(v);throw new Error(`Introspection result missing field args: ${P}.`)}return{description:v.description,deprecationReason:v.deprecationReason,type:b,args:x(v.args)}}function x(v){return ft(v,b=>b.name,R)}function R(v){const b=u(v.type);if(!ke(b)){const W=I(b);throw new Error(`Introspection must provide input type for arguments, but received: ${W}.`)}const P=v.defaultValue!=null?Xe(Hs(v.defaultValue),b):void 0;return{description:v.description,type:b,defaultValue:P,deprecationReason:v.deprecationReason}}function V(v){if(!v.args){const b=I(v);throw new Error(`Introspection result missing directive args: ${b}.`)}if(!v.locations){const b=I(v);throw new Error(`Introspection result missing directive locations: ${b}.`)}return new rt({name:v.name,description:v.description,isRepeatable:v.isRepeatable,locations:v.locations.slice(),args:x(v.args)})}}function Pl(e,t,n){di(e),t!=null&&t.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&yl(t,e);const r=e.toConfig(),i=la(r,t,n);return r===i?e:new Qt(i)}function la(e,t,n){var r,i,s,o;const a=[],u=Object.create(null),c=[];let f;const d=[];for(const p of t.definitions)if(p.kind===l.SCHEMA_DEFINITION)f=p;else if(p.kind===l.SCHEMA_EXTENSION)d.push(p);else if(Yt(p))a.push(p);else if(ur(p)){const S=p.name.value,O=u[S];u[S]=O?O.concat([p]):[p]}else p.kind===l.DIRECTIVE_DEFINITION&&c.push(p);if(Object.keys(u).length===0&&a.length===0&&c.length===0&&d.length===0&&f==null)return e;const h=Object.create(null);for(const p of e.types)h[p.name]=X(p);for(const p of a){var y;const S=p.name.value;h[S]=(y=es[S])!==null&&y!==void 0?y:L(p)}const E={query:e.query&&U(e.query),mutation:e.mutation&&U(e.mutation),subscription:e.subscription&&U(e.subscription),...f&&P([f]),...P(d)};return{description:(r=f)===null||r===void 0||(i=r.description)===null||i===void 0?void 0:i.value,...E,types:Object.values(h),directives:[...e.directives.map(q),...c.map(m)],extensions:Object.create(null),astNode:(s=f)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(d),assumeValid:(o=n==null?void 0:n.assumeValid)!==null&&o!==void 0?o:!1};function C(p){return le(p)?new we(C(p.ofType)):H(p)?new K(C(p.ofType)):U(p)}function U(p){return h[p.name]}function q(p){const S=p.toConfig();return new rt({...S,args:it(S.args,b)})}function X(p){if(wt(p)||ir(p))return p;if(Ue(p))return M(p);if(te(p))return x(p);if(re(p))return R(p);if(Ne(p))return V(p);if(ge(p))return Q(p);if(fe(p))return z(p);ye(!1,"Unexpected type: "+I(p))}function z(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Mt({...O,fields:()=>({...it(O.fields,F=>({...F,type:C(F.type)})),...g(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function Q(p){var S;const O=p.toConfig(),k=(S=u[p.name])!==null&&S!==void 0?S:[];return new ht({...O,values:{...O.values,...w(k)},extensionASTNodes:O.extensionASTNodes.concat(k)})}function M(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];let F=O.specifiedByURL;for(const J of k){var Y;F=(Y=ts(J))!==null&&Y!==void 0?Y:F}return new nt({...O,specifiedByURL:F,extensionASTNodes:O.extensionASTNodes.concat(k)})}function x(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new je({...O,interfaces:()=>[...p.getInterfaces().map(U),...T(k)],fields:()=>({...it(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function R(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new $t({...O,interfaces:()=>[...p.getInterfaces().map(U),...T(k)],fields:()=>({...it(O.fields,v),...A(k)}),extensionASTNodes:O.extensionASTNodes.concat(k)})}function V(p){var S;const O=p.toConfig(),k=(S=u[O.name])!==null&&S!==void 0?S:[];return new Ct({...O,types:()=>[...p.getTypes().map(U),...D(k)],extensionASTNodes:O.extensionASTNodes.concat(k)})}function v(p){return{...p,type:C(p.type),args:p.args&&it(p.args,b)}}function b(p){return{...p,type:C(p.type)}}function P(p){const S={};for(const k of p){var O;const F=(O=k.operationTypes)!==null&&O!==void 0?O:[];for(const Y of F)S[Y.operation]=W(Y.type)}return S}function W(p){var S;const O=p.name.value,k=(S=es[O])!==null&&S!==void 0?S:h[O];if(k===void 0)throw new Error(`Unknown type: "${O}".`);return k}function oe(p){return p.kind===l.LIST_TYPE?new we(oe(p.type)):p.kind===l.NON_NULL_TYPE?new K(oe(p.type)):W(p)}function m(p){var S;return new rt({name:p.name.value,description:(S=p.description)===null||S===void 0?void 0:S.value,locations:p.locations.map(({value:O})=>O),isRepeatable:p.repeatable,args:B(p.arguments),astNode:p})}function A(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={type:oe(J.type),description:(k=J.description)===null||k===void 0?void 0:k.value,args:B(J.arguments),deprecationReason:Sn(J),astNode:J}}}return S}function B(p){const S=p??[],O=Object.create(null);for(const F of S){var k;const Y=oe(F.type);O[F.name.value]={type:Y,description:(k=F.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(F.defaultValue,Y),deprecationReason:Sn(F),astNode:F}}return O}function g(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.fields)!==null&&O!==void 0?O:[];for(const J of Y){var k;const ne=oe(J.type);S[J.name.value]={type:ne,description:(k=J.description)===null||k===void 0?void 0:k.value,defaultValue:Xe(J.defaultValue,ne),deprecationReason:Sn(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const F of p){var O;const Y=(O=F.values)!==null&&O!==void 0?O:[];for(const J of Y){var k;S[J.name.value]={description:(k=J.description)===null||k===void 0?void 0:k.value,deprecationReason:Sn(J),astNode:J}}}return S}function T(p){return p.flatMap(S=>{var O,k;return(O=(k=S.interfaces)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function D(p){return p.flatMap(S=>{var O,k;return(O=(k=S.types)===null||k===void 0?void 0:k.map(W))!==null&&O!==void 0?O:[]})}function L(p){var S;const O=p.name.value,k=(S=u[O])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var F;const pe=[p,...k];return new je({name:O,description:(F=p.description)===null||F===void 0?void 0:F.value,interfaces:()=>T(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:k})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const pe=[p,...k];return new $t({name:O,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>T(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:k})}case l.ENUM_TYPE_DEFINITION:{var J;const pe=[p,...k];return new ht({name:O,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(pe),astNode:p,extensionASTNodes:k})}case l.UNION_TYPE_DEFINITION:{var ne;const pe=[p,...k];return new Ct({name:O,description:(ne=p.description)===null||ne===void 0?void 0:ne.value,types:()=>D(pe),astNode:p,extensionASTNodes:k})}case l.SCALAR_TYPE_DEFINITION:{var ve;return new nt({name:O,description:(ve=p.description)===null||ve===void 0?void 0:ve.value,specifiedByURL:ts(p),astNode:p,extensionASTNodes:k})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const pe=[p,...k];return new Mt({name:O,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>g(pe),astNode:p,extensionASTNodes:k})}}}}const es=ot([...gn,..._n],e=>e.name);function Sn(e){const t=fn(or,e);return t==null?void 0:t.reason}function ts(e){const t=fn(ii,e);return t==null?void 0:t.url}function fa(e,t){e!=null&&e.kind===l.DOCUMENT||Z(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&ml(e);const r=la({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(r.astNode==null)for(const s of r.types)switch(s.name){case"Query":r.query=s;break;case"Mutation":r.mutation=s;break;case"Subscription":r.subscription=s;break}const i=[...r.directives,...vt.filter(s=>r.directives.every(o=>o.name!==s.name))];return new Qt({...r,directives:i})}function jl(e,t){const n=tr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return fa(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function ql(e){const t=e.toConfig(),n=ft(gr(t.types),h=>h.name,d);return new Qt({...t,types:Object.values(n),directives:gr(t.directives).map(o),query:s(t.query),mutation:s(t.mutation),subscription:s(t.subscription)});function r(h){return le(h)?new we(r(h.ofType)):H(h)?new K(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const y=h.toConfig();return new rt({...y,locations:da(y.locations,E=>E),args:a(y.args)})}function a(h){return Rn(h,y=>({...y,type:r(y.type)}))}function u(h){return Rn(h,y=>({...y,type:r(y.type),args:y.args&&a(y.args)}))}function c(h){return Rn(h,y=>({...y,type:r(y.type)}))}function f(h){return gr(h).map(i)}function d(h){if(Ue(h)||wt(h))return h;if(te(h)){const y=h.toConfig();return new je({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(re(h)){const y=h.toConfig();return new $t({...y,interfaces:()=>f(y.interfaces),fields:()=>u(y.fields)})}if(Ne(h)){const y=h.toConfig();return new Ct({...y,types:()=>f(y.types)})}if(ge(h)){const y=h.toConfig();return new ht({...y,values:Rn(y.values,E=>E)})}if(fe(h)){const y=h.toConfig();return new Mt({...y,fields:()=>c(y.fields)})}ye(!1,"Unexpected type: "+I(h))}}function Rn(e,t){const n=Object.create(null);for(const r of Object.keys(e).sort(mn))n[r]=t(e[r]);return n}function gr(e){return da(e,t=>t.name)}function da(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function Bl(e){return pa(e,t=>!si(t),Ql)}function Gl(e){return pa(e,si,wt)}function Ql(e){return!ir(e)&&!wt(e)}function pa(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Yl(e),...r.map(s=>ef(s)),...i.map(s=>ha(s))].filter(Boolean).join(`
|
|
148
167
|
|
|
149
|
-
`)}function
|
|
168
|
+
`)}function Yl(e){if(e.description==null&&Jl(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const r=e.getMutationType();r&&t.push(` mutation: ${r.name}`);const i=e.getSubscriptionType();return i&&t.push(` subscription: ${i.name}`),qe(e)+`schema {
|
|
150
169
|
${t.join(`
|
|
151
170
|
`)}
|
|
152
|
-
}`}function
|
|
171
|
+
}`}function Jl(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const r=e.getSubscriptionType();return!(r&&r.name!=="Subscription")}function ha(e){if(Ue(e))return Hl(e);if(te(e))return zl(e);if(re(e))return Xl(e);if(Ne(e))return Wl(e);if(ge(e))return Kl(e);if(fe(e))return Zl(e);ye(!1,"Unexpected type: "+I(e))}function Hl(e){return qe(e)+`scalar ${e.name}`+tf(e)}function ma(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function zl(e){return qe(e)+`type ${e.name}`+ma(e)+ya(e)}function Xl(e){return qe(e)+`interface ${e.name}`+ma(e)+ya(e)}function Wl(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return qe(e)+"union "+e.name+n}function Kl(e){const t=e.getValues().map((n,r)=>qe(n," ",!r)+" "+n.name+Ri(n.deprecationReason));return qe(e)+`enum ${e.name}`+Si(t)}function Zl(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+Mr(n));return qe(e)+`input ${e.name}`+Si(t)}function ya(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+n.name+va(n.args," ")+": "+String(n.type)+Ri(n.deprecationReason));return Si(t)}function Si(e){return e.length!==0?` {
|
|
153
172
|
`+e.join(`
|
|
154
173
|
`)+`
|
|
155
|
-
}`:""}function
|
|
156
|
-
`+e.map((n,r)=>
|
|
174
|
+
}`:""}function va(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Mr).join(", ")+")":`(
|
|
175
|
+
`+e.map((n,r)=>qe(n," "+t,!r)+" "+t+Mr(n)).join(`
|
|
157
176
|
`)+`
|
|
158
|
-
`+t+")"}function
|
|
177
|
+
`+t+")"}function Mr(e){const t=dt(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${ce(t)}`),n+Ri(e.deprecationReason)}function ef(e){return qe(e)+"directive @"+e.name+va(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Ri(e){return e==null?"":e!==ri?` @deprecated(reason: ${ce({kind:l.STRING,value:e})})`:" @deprecated"}function tf(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${ce({kind:l.STRING,value:e.specifiedByURL})})`}function qe(e,t="",n=!0){const{description:r}=e;if(r==null)return"";const i=ce({kind:l.STRING,value:r,block:Vu(r)});return(t&&!n?`
|
|
159
178
|
`+t:t)+i.replace(/\n/g,`
|
|
160
179
|
`+t)+`
|
|
161
|
-
`}function Zl(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function ef(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case l.OPERATION_DEFINITION:t.push(i);break;case l.FRAGMENT_DEFINITION:n[i.name.value]=es(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of es(i.selectionSet))ya(s,n,a);const o=i.name?i.name.value:"";r[o]={kind:l.DOCUMENT,definitions:e.definitions.filter(a=>a===i||a.kind===l.FRAGMENT_DEFINITION&&s.has(a.name.value))}}return r}function ya(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)ya(e,t,i)}}function es(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function tf(e){const t=Qs(e)?e:new er(e),n=t.body,r=new Jr(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!js(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=Ps(o.value,{minimize:!0}):i+=c,s=u}return i}function nf(e){const t=va(e);if(t)throw t;return e}function va(e){if(typeof e=="string"||Z(!1,"Expected name to be a string."),e.startsWith("__"))return new _(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Me(e)}catch(t){return t}}var pe;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(pe||(pe={}));var Ye;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(Ye||(Ye={}));function rf(e,t){return Ea(e,t).filter(n=>n.type in pe)}function sf(e,t){return Ea(e,t).filter(n=>n.type in Ye)}function Ea(e,t){return[...af(e,t),...of(e,t)]}function of(e,t){const n=[],r=ot(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:pe.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,s]of r.persisted){const o=ot(i.args,s.args);for(const a of o.added)mt(a)&&n.push({type:pe.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${i.name} was added.`});for(const a of o.removed)n.push({type:pe.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${i.name}.`});i.isRepeatable&&!s.isRepeatable&&n.push({type:pe.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const a of i.locations)s.locations.includes(a)||n.push({type:pe.DIRECTIVE_LOCATION_REMOVED,description:`${a} was removed from ${i.name}.`})}return n}function af(e,t){const n=[],r=ot(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:pe.TYPE_REMOVED,description:ir(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,s]of r.persisted)ge(i)&&ge(s)?n.push(...lf(i,s)):Ne(i)&&Ne(s)?n.push(...cf(i,s)):le(i)&&le(s)?n.push(...uf(i,s)):te(i)&&te(s)?n.push(...ns(i,s),...ts(i,s)):re(i)&&re(s)?n.push(...ns(i,s),...ts(i,s)):i.constructor!==s.constructor&&n.push({type:pe.TYPE_CHANGED_KIND,description:`${i.name} changed from ${rs(i)} to ${rs(s)}.`});return n}function uf(e,t){const n=[],r=ot(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)rr(i)?n.push({type:pe.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Ye.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:pe.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)rn(i.type,s.type)||n.push({type:pe.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function cf(e,t){const n=[],r=ot(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Ye.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:pe.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function lf(e,t){const n=[],r=ot(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Ye.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:pe.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function ts(e,t){const n=[],r=ot(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Ye.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:pe.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function ns(e,t){const n=[],r=ot(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:pe.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)n.push(...ff(e,i,s)),Zt(i.type,s.type)||n.push({type:pe.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function ff(e,t,n){const r=[],i=ot(t.args,n.args);for(const s of i.removed)r.push({type:pe.ARG_REMOVED,description:`${e.name}.${t.name} arg ${s.name} was removed.`});for(const[s,o]of i.persisted)if(!rn(s.type,o.type))r.push({type:pe.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${s.name} has changed type from ${String(s.type)} to ${String(o.type)}.`});else if(s.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:Ye.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=is(s.defaultValue,s.type),c=is(o.defaultValue,o.type);u!==c&&r.push({type:Ye.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} has changed defaultValue from ${u} to ${c}.`})}for(const s of i.added)mt(s)?r.push({type:pe.REQUIRED_ARG_ADDED,description:`A required arg ${s.name} on ${e.name}.${t.name} was added.`}):r.push({type:Ye.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function Zt(e,t){return ce(e)?ce(t)&&Zt(e.ofType,t.ofType)||H(t)&&Zt(e,t.ofType):H(e)?H(t)&&Zt(e.ofType,t.ofType):En(t)&&e.name===t.name||H(t)&&Zt(e,t.ofType)}function rn(e,t){return ce(e)?ce(t)&&rn(e.ofType,t.ofType):H(e)?H(t)&&rn(e.ofType,t.ofType)||!H(t)&&rn(e.ofType,t):En(t)&&e.name===t.name}function rs(e){if(Ve(e))return"a Scalar type";if(te(e))return"an Object type";if(re(e))return"an Interface type";if(Ne(e))return"a Union type";if(ge(e))return"an Enum type";if(le(e))return"an Input type";me(!1,"Unexpected type: "+I(e))}function is(e,t){const n=ft(e,t);return n!=null||me(!1),ue(cr(n))}function ot(e,t){const n=[],r=[],i=[],s=st(e,({name:a})=>a),o=st(t,({name:a})=>a);for(const a of e){const u=o[a.name];u===void 0?r.push(a):i.push([a,u])}for(const a of t)s[a.name]===void 0&&n.push(a);return{added:n,persisted:i,removed:r}}const df=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return pe},DEFAULT_DEPRECATION_REASON:ni,get DangerousChangeType(){return Ye},get DirectiveLocation(){return G},ExecutableDefinitionsRule:ao,FieldsOnCorrectTypeRule:uo,FragmentsOnCompositeTypesRule:co,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:xe,GraphQLDeprecatedDirective:or,GraphQLDirective:nt,GraphQLEnumType:pt,GraphQLError:_,GraphQLFloat:io,GraphQLID:Zr,GraphQLIncludeDirective:ei,GraphQLInputObjectType:Mt,GraphQLInt:ro,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:K,GraphQLObjectType:Pe,GraphQLScalarType:tt,GraphQLSchema:Qt,GraphQLSkipDirective:ti,GraphQLSpecifiedByDirective:ri,GraphQLString:he,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:lo,KnownDirectivesRule:Ti,KnownFragmentNamesRule:po,KnownTypeNamesRule:bi,Lexer:Jr,Location:Cs,LoneAnonymousOperationRule:ho,LoneSchemaDefinitionRule:mo,NoDeprecatedCustomRule:Ll,NoFragmentCyclesRule:yo,NoSchemaIntrospectionCustomRule:kl,NoUndefinedVariablesRule:vo,NoUnusedFragmentsRule:Eo,NoUnusedVariablesRule:go,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:bo,PossibleFragmentSpreadsRule:Io,PossibleTypeExtensionsRule:wo,ProvidedRequiredArgumentsRule:Oo,ScalarLeafsRule:Do,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:Fo,Source:er,Token:Qr,get TokenKind(){return N},TypeInfo:mi,get TypeKind(){return se},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:xo,UniqueArgumentNamesRule:wi,UniqueDirectiveNamesRule:$o,UniqueDirectivesPerLocationRule:Oi,UniqueEnumValueNamesRule:Co,UniqueFieldDefinitionNamesRule:Mo,UniqueFragmentNamesRule:Vo,UniqueInputFieldNamesRule:Ai,UniqueOperationNamesRule:Uo,UniqueOperationTypesRule:Po,UniqueTypeNamesRule:jo,UniqueVariableNamesRule:Bo,ValidationContext:Ho,ValuesOfCorrectTypeRule:qo,VariablesAreInputTypesRule:Go,VariablesInAllowedPositionRule:Qo,__Directive:oi,__DirectiveLocation:ai,__EnumValue:ci,__Field:ui,__InputValue:bn,__Schema:ar,__Type:Ue,__TypeKind:li,assertAbstractType:Tc,assertCompositeType:gc,assertDirective:Oc,assertEnumType:dc,assertEnumValueName:Hs,assertInputObjectType:pc,assertInputType:yc,assertInterfaceType:Xs,assertLeafType:Ec,assertListType:hc,assertName:Me,assertNamedType:_c,assertNonNullType:mc,assertNullableType:Ws,assertObjectType:zs,assertOutputType:vc,assertScalarType:lc,assertSchema:fi,assertType:cc,assertUnionType:fc,assertValidName:nf,assertValidSchema:pi,assertWrappingType:bc,astFromValue:ft,buildASTSchema:ca,buildClientSchema:Cl,buildSchema:Vl,coerceInputValue:Ro,concatAST:Zl,createSourceEventStream:oa,defaultFieldResolver:$r,defaultTypeResolver:na,doTypesOverlap:Rr,execute:fr,executeSync:Wo,extendSchema:Ml,findBreakingChanges:rf,findDangerousChanges:sf,formatError:Lu,getArgumentValues:lr,getDirectiveValues:fn,getEnterLeaveForKind:xt,getIntrospectionQuery:aa,getLocation:Un,getNamedType:Se,getNullableType:Xr,getOperationAST:Fl,getOperationRootType:xl,getVariableValues:Lo,getVisitFn:oc,graphql:wl,graphqlSync:Ol,introspectionFromSchema:$l,introspectionTypes:_n,isAbstractType:We,isCompositeType:et,isConstValueNode:Lr,isDefinitionNode:Vc,isDirective:sr,isEnumType:ge,isEqualType:jn,isExecutableDefinitionNode:vi,isInputObjectType:le,isInputType:Le,isInterfaceType:re,isIntrospectionType:wt,isLeafType:Ze,isListType:ce,isNamedType:En,isNonNullType:H,isNullableType:zr,isObjectType:te,isOutputType:dt,isRequiredArgument:mt,isRequiredInputField:rr,isScalarType:Ve,isSchema:so,isSelectionNode:Uc,isSpecifiedDirective:ii,isSpecifiedScalarType:ir,isType:yn,isTypeDefinitionNode:Yt,isTypeExtensionNode:ur,isTypeNode:Pc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:Ei,isTypeSystemExtensionNode:gi,isUnionType:Ne,isValidNameError:va,isValueNode:oo,isWrappingType:vn,lexicographicSortSchema:Ul,locatedError:Ut,parse:tr,parseConstValue:Wu,parseType:Ku,parseValue:Ys,print:ue,printError:Ru,printIntrospectionSchema:jl,printLocation:$s,printSchema:Pl,printSourceLocation:Gr,printType:da,resolveObjMapThunk:Kr,resolveReadonlyArrayThunk:Wr,responsePathAsArray:Fe,separateOperations:ef,specifiedDirectives:yt,specifiedRules:Yo,specifiedScalarTypes:gn,stripIgnoredCharacters:tf,subscribe:Dl,syntaxError:Te,typeFromAST:ke,validate:zo,validateSchema:di,valueFromAST:Xe,valueFromASTUntyped:Pn,version:Ou,versionInfo:Au,visit:Gt,visitInParallel:Hr,visitWithTypeInfo:yi},Symbol.toStringTag,{value:"Module"})),pf=Ja(df);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var ss=pf;function os(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function hf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,ss.parse)(e);t=os(n)}catch{}return{query:e,operationName:t}}var r=os(e);return{query:(0,ss.print)(e),operationName:r}}Ft.resolveRequestDocument=hf;var Xt={},as;function mf(){if(as)return Xt;as=1;var e=ie&&ie.__assign||function(){return e=Object.assign||function(C){for(var x,R=1,M=arguments.length;R<M;R++){x=arguments[R];for(var v in x)Object.prototype.hasOwnProperty.call(x,v)&&(C[v]=x[v])}return C},e.apply(this,arguments)},t=ie&&ie.__awaiter||function(C,x,R,M){function v(b){return b instanceof R?b:new R(function(P){P(b)})}return new(R||(R=Promise))(function(b,P){function W(A){try{m(M.next(A))}catch(q){P(q)}}function oe(A){try{m(M.throw(A))}catch(q){P(q)}}function m(A){A.done?b(A.value):v(A.value).then(W,oe)}m((M=M.apply(C,x||[])).next())})},n=ie&&ie.__generator||function(C,x){var R={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},M,v,b,P;return P={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&(P[Symbol.iterator]=function(){return this}),P;function W(m){return function(A){return oe([m,A])}}function oe(m){if(M)throw new TypeError("Generator is already executing.");for(;R;)try{if(M=1,v&&(b=m[0]&2?v.return:m[0]?v.throw||((b=v.return)&&b.call(v),0):v.next)&&!(b=b.call(v,m[1])).done)return b;switch(v=0,b&&(m=[m[0]&2,b.value]),m[0]){case 0:case 1:b=m;break;case 4:return R.label++,{value:m[1],done:!1};case 5:R.label++,v=m[1],m=[0];continue;case 7:m=R.ops.pop(),R.trys.pop();continue;default:if(b=R.trys,!(b=b.length>0&&b[b.length-1])&&(m[0]===6||m[0]===2)){R=0;continue}if(m[0]===3&&(!b||m[1]>b[0]&&m[1]<b[3])){R.label=m[1];break}if(m[0]===6&&R.label<b[1]){R.label=b[1],b=m;break}if(b&&R.label<b[2]){R.label=b[2],R.ops.push(m);break}b[2]&&R.ops.pop(),R.trys.pop();continue}m=x.call(C,R)}catch(A){m=[6,A],v=0}finally{M=b=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.GraphQLWebSocketClient=void 0;var r=hn,i=Ft,s="connection_init",o="connection_ack",a="ping",u="pong",c="subscribe",f="next",d="error",h="complete",y=function(){function C(x,R,M){this._type=x,this._payload=R,this._id=M}return Object.defineProperty(C.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"text",{get:function(){var x={type:this.type};return this.id!=null&&this.id!=null&&(x.id=this.id),this.payload!=null&&this.payload!=null&&(x.payload=this.payload),JSON.stringify(x)},enumerable:!1,configurable:!0}),C.parse=function(x,R){var M=JSON.parse(x),v=M.type,b=M.payload,P=M.id;return new C(v,R(b),P)},C}(),E=function(){function C(x,R){var M=R.onInit,v=R.onAcknowledged,b=R.onPing,P=R.onPong,W=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=x,x.onopen=function(oe){return t(W,void 0,void 0,function(){var m,A,q,g;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=x).send,q=V,M?[4,M()]:[3,2];case 1:return g=w.sent(),[3,3];case 2:g=null,w.label=3;case 3:return A.apply(m,[q.apply(void 0,[g]).text]),[2]}})})},x.onclose=function(oe){W.socketState.acknowledged=!1,W.socketState.subscriptions={}},x.onerror=function(oe){console.error(oe)},x.onmessage=function(oe){try{var m=$(oe.data);switch(m.type){case o:{W.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(W.socketState.acknowledged=!0,v&&v(m.payload));return}case a:{b?b(m.payload).then(function(T){return x.send(X(T).text)}):x.send(X(null).text);return}case u:{P&&P(m.payload);return}}if(!W.socketState.acknowledged||m.id===void 0||m.id===null||!W.socketState.subscriptions[m.id])return;var A=W.socketState.subscriptions[m.id],q=A.query,g=A.variables,w=A.subscriber;switch(m.type){case f:{!m.payload.errors&&m.payload.data&&w.next&&w.next(m.payload.data),m.payload.errors&&w.error&&w.error(new r.ClientError(e(e({},m.payload),{status:200}),{query:q,variables:g}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:q,variables:g}));return}case h:{w.complete&&w.complete(),delete W.socketState.subscriptions[m.id];return}}}catch(T){console.error(T),x.close(1006)}x.close(4400,"Unknown graphql-ws message.")}}return C.prototype.makeSubscribe=function(x,R,M,v){var b=this,P=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[P]={query:x,variables:v,subscriber:M},this.socket.send(z(P,{query:x,operationName:R,variables:v}).text),function(){b.socket.send(Q(P).text),delete b.socketState.subscriptions[P]}},C.prototype.rawRequest=function(x,R){var M=this;return new Promise(function(v,b){var P;M.rawSubscribe(x,{next:function(W,oe){return P={data:W,extensions:oe}},error:b,complete:function(){return v(P)}},R)})},C.prototype.request=function(x,R){var M=this;return new Promise(function(v,b){var P;M.subscribe(x,{next:function(W){return P=W},error:b,complete:function(){return v(P)}},R)})},C.prototype.subscribe=function(x,R,M){var v=(0,i.resolveRequestDocument)(x),b=v.query,P=v.operationName;return this.makeSubscribe(b,P,R,M)},C.prototype.rawSubscribe=function(x,R,M){return this.makeSubscribe(x,void 0,R,M)},C.prototype.ping=function(x){this.socket.send(B(x).text)},C.prototype.close=function(){this.socket.close(1e3)},C.PROTOCOL="graphql-transport-ws",C}();Xt.GraphQLWebSocketClient=E;function $(C,x){x===void 0&&(x=function(M){return M});var R=y.parse(C,x);return R}function V(C){return new y(s,C)}function B(C){return new y(a,C,void 0)}function X(C){return new y(u,C,void 0)}function z(C,x){return new y(c,x,C)}function Q(C){return new y(h,void 0,C)}return Xt}(function(e){var t=ie&&ie.__assign||function(){return t=Object.assign||function(g){for(var w,T=1,D=arguments.length;T<D;T++){w=arguments[T];for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(g[L]=w[L])}return g},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?function(g,w,T,D){D===void 0&&(D=T);var L=Object.getOwnPropertyDescriptor(w,T);(!L||("get"in L?!w.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(g,D,L)}:function(g,w,T,D){D===void 0&&(D=T),g[D]=w[T]}),r=ie&&ie.__setModuleDefault||(Object.create?function(g,w){Object.defineProperty(g,"default",{enumerable:!0,value:w})}:function(g,w){g.default=w}),i=ie&&ie.__importStar||function(g){if(g&&g.__esModule)return g;var w={};if(g!=null)for(var T in g)T!=="default"&&Object.prototype.hasOwnProperty.call(g,T)&&n(w,g,T);return r(w,g),w},s=ie&&ie.__awaiter||function(g,w,T,D){function L(p){return p instanceof T?p:new T(function(S){S(p)})}return new(T||(T=Promise))(function(p,S){function O(Y){try{F(D.next(Y))}catch(J){S(J)}}function k(Y){try{F(D.throw(Y))}catch(J){S(J)}}function F(Y){Y.done?p(Y.value):L(Y.value).then(O,k)}F((D=D.apply(g,w||[])).next())})},o=ie&&ie.__generator||function(g,w){var T={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,L,p,S;return S={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function O(F){return function(Y){return k([F,Y])}}function k(F){if(D)throw new TypeError("Generator is already executing.");for(;T;)try{if(D=1,L&&(p=F[0]&2?L.return:F[0]?L.throw||((p=L.return)&&p.call(L),0):L.next)&&!(p=p.call(L,F[1])).done)return p;switch(L=0,p&&(F=[F[0]&2,p.value]),F[0]){case 0:case 1:p=F;break;case 4:return T.label++,{value:F[1],done:!1};case 5:T.label++,L=F[1],F=[0];continue;case 7:F=T.ops.pop(),T.trys.pop();continue;default:if(p=T.trys,!(p=p.length>0&&p[p.length-1])&&(F[0]===6||F[0]===2)){T=0;continue}if(F[0]===3&&(!p||F[1]>p[0]&&F[1]<p[3])){T.label=F[1];break}if(F[0]===6&&T.label<p[1]){T.label=p[1],p=F;break}if(p&&T.label<p[2]){T.label=p[2],T.ops.push(F);break}p[2]&&T.ops.pop(),T.trys.pop();continue}F=w.call(g,T)}catch(Y){F=[6,Y],L=0}finally{D=p=0}if(F[0]&5)throw F[1];return{value:F[0]?F[1]:void 0,done:!0}}},a=ie&&ie.__rest||function(g,w){var T={};for(var D in g)Object.prototype.hasOwnProperty.call(g,D)&&w.indexOf(D)<0&&(T[D]=g[D]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,D=Object.getOwnPropertySymbols(g);L<D.length;L++)w.indexOf(D[L])<0&&Object.prototype.propertyIsEnumerable.call(g,D[L])&&(T[D[L]]=g[D[L]]);return T},u=ie&&ie.__spreadArray||function(g,w,T){if(T||arguments.length===2)for(var D=0,L=w.length,p;D<L;D++)(p||!(D in w))&&(p||(p=Array.prototype.slice.call(w,0,D)),p[D]=w[D]);return g.concat(p||Array.prototype.slice.call(w))},c=ie&&ie.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveRequestDocument=e.GraphQLWebSocketClient=e.gql=e.batchRequests=e.request=e.rawRequest=e.GraphQLClient=e.ClientError=void 0;var f=i(uu),d=f,h=c(qr),y=pn,E=Re,$=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return $.ClientError}});var V=Ft,B=function(g){var w={};return g&&(typeof Headers<"u"&&g instanceof Headers||d&&d.Headers&&g instanceof d.Headers?w=m(g):Array.isArray(g)?g.forEach(function(T){var D=T[0],L=T[1];w[D]=L}):w=g),w},X=function(g){return g.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},z=function(g){var w=g.query,T=g.variables,D=g.operationName,L=g.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(X(w)))];return T&&p.push("variables=".concat(encodeURIComponent(L.stringify(T)))),D&&p.push("operationName=".concat(encodeURIComponent(D))),p.join("&")}if(typeof T<"u"&&!Array.isArray(T))throw new Error("Cannot create query with given variable type, array expected");var S=w.reduce(function(O,k,F){return O.push({query:X(k),variables:T?L.stringify(T[F]):void 0}),O},[]);return"query=".concat(encodeURIComponent(L.stringify(S)))},Q=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=(0,h.default)(T,D,L,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof F=="string"?{"Content-Type":"application/json"}:{}),p),body:F},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S(w,Y)];case 3:return[2,ne.sent()]}})})},C=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=z({query:T,variables:D,operationName:L,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:p},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S("".concat(w,"?").concat(F),Y)];case 3:return[2,ne.sent()]}})})},x=function(){function g(w,T){T===void 0&&(T={}),this.url=w,this.options=T}return g.prototype.rawRequest=function(w,T,D){return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ye,ae,fe;return o(this,function(Oe){return L=(0,E.parseRawRequestArgs)(w,T,D),p=this.options,S=p.headers,O=p.fetch,k=O===void 0?f.default:O,F=p.method,Y=F===void 0?"POST":F,J=p.requestMiddleware,ne=p.responseMiddleware,ye=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,L.signal!==void 0&&(ye.signal=L.signal),fe=(0,V.resolveRequestDocument)(L.query).operationName,[2,R({url:ae,query:L.query,variables:L.variables,headers:t(t({},B(W(S))),B(L.requestHeaders)),operationName:fe,fetch:k,method:Y,fetchOptions:ye,middleware:J}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},g.prototype.request=function(w){for(var T=[],D=1;D<arguments.length;D++)T[D-1]=arguments[D];return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ye,ae,fe,Oe,Ae,Jt,Ht;return o(this,function(Nn){return L=T[0],p=T[1],S=(0,E.parseRequestArgs)(w,L,p),O=this.options,k=O.headers,F=O.fetch,Y=F===void 0?f.default:F,J=O.method,ne=J===void 0?"POST":J,ye=O.requestMiddleware,ae=O.responseMiddleware,fe=a(O,["headers","fetch","method","requestMiddleware","responseMiddleware"]),Oe=this.url,S.signal!==void 0&&(fe.signal=S.signal),Ae=(0,V.resolveRequestDocument)(S.document),Jt=Ae.query,Ht=Ae.operationName,[2,R({url:Oe,query:Jt,variables:S.variables,headers:t(t({},B(W(k))),B(S.requestHeaders)),operationName:Ht,fetch:Y,method:ne,fetchOptions:fe,middleware:ye}).then(function(ut){return ae&&ae(ut),ut.data}).catch(function(ut){throw ae&&ae(ut),ut})]})})},g.prototype.batchRequests=function(w,T){var D=(0,E.parseBatchRequestArgs)(w,T),L=this.options,p=L.headers,S=L.fetch,O=S===void 0?f.default:S,k=L.method,F=k===void 0?"POST":k,Y=L.requestMiddleware,J=L.responseMiddleware,ne=a(L,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ye=this.url;D.signal!==void 0&&(ne.signal=D.signal);var ae=D.documents.map(function(Oe){var Ae=Oe.document;return(0,V.resolveRequestDocument)(Ae).query}),fe=D.documents.map(function(Oe){var Ae=Oe.variables;return Ae});return R({url:ye,query:ae,variables:fe,headers:t(t({},B(W(p))),B(D.requestHeaders)),operationName:void 0,fetch:O,method:F,fetchOptions:ne,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},g.prototype.setHeaders=function(w){return this.options.headers=w,this},g.prototype.setHeader=function(w,T){var D,L=this.options.headers;return L?L[w]=T:this.options.headers=(D={},D[w]=T,D),this},g.prototype.setEndpoint=function(w){return this.url=w,this},g}();e.GraphQLClient=x;function R(g){var w=g.url,T=g.query,D=g.variables,L=g.headers,p=g.operationName,S=g.fetch,O=g.method,k=O===void 0?"POST":O,F=g.fetchOptions,Y=g.middleware;return s(this,void 0,void 0,function(){var J,ne,ye,ae,fe,Oe,Ae,Jt,Ht,Nn,ut;return o(this,function(dr){switch(dr.label){case 0:return J=k.toUpperCase()==="POST"?Q:C,ne=Array.isArray(T),[4,J({url:w,query:T,variables:D,operationName:p,headers:L,fetch:S,fetchOptions:F,middleware:Y})];case 1:return ye=dr.sent(),[4,P(ye,F.jsonSerializer)];case 2:if(ae=dr.sent(),fe=ne&&Array.isArray(ae)?!ae.some(function(Ta){var ba=Ta.data;return!ba}):!!ae.data,Oe=!ae.errors||F.errorPolicy==="all"||F.errorPolicy==="ignore",ye.ok&&Oe&&fe)return Ae=ye.headers,Jt=ye.status,ae.errors,Ht=a(ae,["errors"]),Nn=F.errorPolicy==="ignore"?Ht:ae,[2,t(t({},ne?{data:Nn}:Nn),{headers:Ae,status:Jt})];throw ut=typeof ae=="string"?{error:ae}:ae,new $.ClientError(t(t({},ut),{status:ye.status,headers:ye.headers}),{query:T,variables:D})}})})}function M(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRawRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.rawRequest(t({},L))]})})}e.rawRequest=M;function v(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.request(t({},L))]})})}e.request=v;function b(g,w,T){return s(this,void 0,void 0,function(){var D,L;return o(this,function(p){return D=(0,E.parseBatchRequestsExtendedArgs)(g,w,T),L=new x(D.url),[2,L.batchRequests(t({},D))]})})}e.batchRequests=b,e.default=v;function P(g,w){return w===void 0&&(w=y.defaultJsonSerializer),s(this,void 0,void 0,function(){var T,D,L;return o(this,function(p){switch(p.label){case 0:return g.headers.forEach(function(S,O){O.toLowerCase()==="content-type"&&(T=S)}),T&&(T.toLowerCase().startsWith("application/json")||T.toLowerCase().startsWith("application/graphql+json")||T.toLowerCase().startsWith("application/graphql-response+json"))?(L=(D=w).parse,[4,g.text()]):[3,2];case 1:return[2,L.apply(D,[p.sent()])];case 2:return[2,g.text()]}})})}function W(g){return typeof g=="function"?g():g}function oe(g){for(var w=[],T=1;T<arguments.length;T++)w[T-1]=arguments[T];return g.reduce(function(D,L,p){return"".concat(D).concat(L).concat(p in w?w[p]:"")},"")}e.gql=oe;function m(g){var w={};return g.forEach(function(T,D){w[D]=T}),w}var A=mf();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return A.GraphQLWebSocketClient}});var q=Ft;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return q.resolveRequestDocument}})})(Bt);Bt.gql`
|
|
180
|
+
`}function nf(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function rf(e){const t=[],n=Object.create(null);for(const i of e.definitions)switch(i.kind){case l.OPERATION_DEFINITION:t.push(i);break;case l.FRAGMENT_DEFINITION:n[i.name.value]=ns(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of ns(i.selectionSet))Ea(s,n,a);const o=i.name?i.name.value:"";r[o]={kind:l.DOCUMENT,definitions:e.definitions.filter(a=>a===i||a.kind===l.FRAGMENT_DEFINITION&&s.has(a.name.value))}}return r}function Ea(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)Ea(e,t,i)}}function ns(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function sf(e){const t=Js(e)?e:new er(e),n=t.body,r=new Hr(t);let i="",s=!1;for(;r.advance().kind!==N.EOF;){const o=r.token,a=o.kind,u=!Bs(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=qs(o.value,{minimize:!0}):i+=c,s=u}return i}function of(e){const t=ga(e);if(t)throw t;return e}function ga(e){if(typeof e=="string"||Z(!1,"Expected name to be a string."),e.startsWith("__"))return new _(`Name "${e}" must not begin with "__", which is reserved by GraphQL introspection.`);try{Ve(e)}catch(t){return t}}var he;(function(e){e.TYPE_REMOVED="TYPE_REMOVED",e.TYPE_CHANGED_KIND="TYPE_CHANGED_KIND",e.TYPE_REMOVED_FROM_UNION="TYPE_REMOVED_FROM_UNION",e.VALUE_REMOVED_FROM_ENUM="VALUE_REMOVED_FROM_ENUM",e.REQUIRED_INPUT_FIELD_ADDED="REQUIRED_INPUT_FIELD_ADDED",e.IMPLEMENTED_INTERFACE_REMOVED="IMPLEMENTED_INTERFACE_REMOVED",e.FIELD_REMOVED="FIELD_REMOVED",e.FIELD_CHANGED_KIND="FIELD_CHANGED_KIND",e.REQUIRED_ARG_ADDED="REQUIRED_ARG_ADDED",e.ARG_REMOVED="ARG_REMOVED",e.ARG_CHANGED_KIND="ARG_CHANGED_KIND",e.DIRECTIVE_REMOVED="DIRECTIVE_REMOVED",e.DIRECTIVE_ARG_REMOVED="DIRECTIVE_ARG_REMOVED",e.REQUIRED_DIRECTIVE_ARG_ADDED="REQUIRED_DIRECTIVE_ARG_ADDED",e.DIRECTIVE_REPEATABLE_REMOVED="DIRECTIVE_REPEATABLE_REMOVED",e.DIRECTIVE_LOCATION_REMOVED="DIRECTIVE_LOCATION_REMOVED"})(he||(he={}));var Je;(function(e){e.VALUE_ADDED_TO_ENUM="VALUE_ADDED_TO_ENUM",e.TYPE_ADDED_TO_UNION="TYPE_ADDED_TO_UNION",e.OPTIONAL_INPUT_FIELD_ADDED="OPTIONAL_INPUT_FIELD_ADDED",e.OPTIONAL_ARG_ADDED="OPTIONAL_ARG_ADDED",e.IMPLEMENTED_INTERFACE_ADDED="IMPLEMENTED_INTERFACE_ADDED",e.ARG_DEFAULT_VALUE_CHANGE="ARG_DEFAULT_VALUE_CHANGE"})(Je||(Je={}));function af(e,t){return Ta(e,t).filter(n=>n.type in he)}function uf(e,t){return Ta(e,t).filter(n=>n.type in Je)}function Ta(e,t){return[...lf(e,t),...cf(e,t)]}function cf(e,t){const n=[],r=at(e.getDirectives(),t.getDirectives());for(const i of r.removed)n.push({type:he.DIRECTIVE_REMOVED,description:`${i.name} was removed.`});for(const[i,s]of r.persisted){const o=at(i.args,s.args);for(const a of o.added)yt(a)&&n.push({type:he.REQUIRED_DIRECTIVE_ARG_ADDED,description:`A required arg ${a.name} on directive ${i.name} was added.`});for(const a of o.removed)n.push({type:he.DIRECTIVE_ARG_REMOVED,description:`${a.name} was removed from ${i.name}.`});i.isRepeatable&&!s.isRepeatable&&n.push({type:he.DIRECTIVE_REPEATABLE_REMOVED,description:`Repeatable flag was removed from ${i.name}.`});for(const a of i.locations)s.locations.includes(a)||n.push({type:he.DIRECTIVE_LOCATION_REMOVED,description:`${a} was removed from ${i.name}.`})}return n}function lf(e,t){const n=[],r=at(Object.values(e.getTypeMap()),Object.values(t.getTypeMap()));for(const i of r.removed)n.push({type:he.TYPE_REMOVED,description:ir(i)?`Standard scalar ${i.name} was removed because it is not referenced anymore.`:`${i.name} was removed.`});for(const[i,s]of r.persisted)ge(i)&&ge(s)?n.push(...pf(i,s)):Ne(i)&&Ne(s)?n.push(...df(i,s)):fe(i)&&fe(s)?n.push(...ff(i,s)):te(i)&&te(s)?n.push(...is(i,s),...rs(i,s)):re(i)&&re(s)?n.push(...is(i,s),...rs(i,s)):i.constructor!==s.constructor&&n.push({type:he.TYPE_CHANGED_KIND,description:`${i.name} changed from ${ss(i)} to ${ss(s)}.`});return n}function ff(e,t){const n=[],r=at(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.added)rr(i)?n.push({type:he.REQUIRED_INPUT_FIELD_ADDED,description:`A required field ${i.name} on input type ${e.name} was added.`}):n.push({type:Je.OPTIONAL_INPUT_FIELD_ADDED,description:`An optional field ${i.name} on input type ${e.name} was added.`});for(const i of r.removed)n.push({type:he.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)rn(i.type,s.type)||n.push({type:he.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function df(e,t){const n=[],r=at(e.getTypes(),t.getTypes());for(const i of r.added)n.push({type:Je.TYPE_ADDED_TO_UNION,description:`${i.name} was added to union type ${e.name}.`});for(const i of r.removed)n.push({type:he.TYPE_REMOVED_FROM_UNION,description:`${i.name} was removed from union type ${e.name}.`});return n}function pf(e,t){const n=[],r=at(e.getValues(),t.getValues());for(const i of r.added)n.push({type:Je.VALUE_ADDED_TO_ENUM,description:`${i.name} was added to enum type ${e.name}.`});for(const i of r.removed)n.push({type:he.VALUE_REMOVED_FROM_ENUM,description:`${i.name} was removed from enum type ${e.name}.`});return n}function rs(e,t){const n=[],r=at(e.getInterfaces(),t.getInterfaces());for(const i of r.added)n.push({type:Je.IMPLEMENTED_INTERFACE_ADDED,description:`${i.name} added to interfaces implemented by ${e.name}.`});for(const i of r.removed)n.push({type:he.IMPLEMENTED_INTERFACE_REMOVED,description:`${e.name} no longer implements interface ${i.name}.`});return n}function is(e,t){const n=[],r=at(Object.values(e.getFields()),Object.values(t.getFields()));for(const i of r.removed)n.push({type:he.FIELD_REMOVED,description:`${e.name}.${i.name} was removed.`});for(const[i,s]of r.persisted)n.push(...hf(e,i,s)),Zt(i.type,s.type)||n.push({type:he.FIELD_CHANGED_KIND,description:`${e.name}.${i.name} changed type from ${String(i.type)} to ${String(s.type)}.`});return n}function hf(e,t,n){const r=[],i=at(t.args,n.args);for(const s of i.removed)r.push({type:he.ARG_REMOVED,description:`${e.name}.${t.name} arg ${s.name} was removed.`});for(const[s,o]of i.persisted)if(!rn(s.type,o.type))r.push({type:he.ARG_CHANGED_KIND,description:`${e.name}.${t.name} arg ${s.name} has changed type from ${String(s.type)} to ${String(o.type)}.`});else if(s.defaultValue!==void 0)if(o.defaultValue===void 0)r.push({type:Je.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} defaultValue was removed.`});else{const u=os(s.defaultValue,s.type),c=os(o.defaultValue,o.type);u!==c&&r.push({type:Je.ARG_DEFAULT_VALUE_CHANGE,description:`${e.name}.${t.name} arg ${s.name} has changed defaultValue from ${u} to ${c}.`})}for(const s of i.added)yt(s)?r.push({type:he.REQUIRED_ARG_ADDED,description:`A required arg ${s.name} on ${e.name}.${t.name} was added.`}):r.push({type:Je.OPTIONAL_ARG_ADDED,description:`An optional arg ${s.name} on ${e.name}.${t.name} was added.`});return r}function Zt(e,t){return le(e)?le(t)&&Zt(e.ofType,t.ofType)||H(t)&&Zt(e,t.ofType):H(e)?H(t)&&Zt(e.ofType,t.ofType):En(t)&&e.name===t.name||H(t)&&Zt(e,t.ofType)}function rn(e,t){return le(e)?le(t)&&rn(e.ofType,t.ofType):H(e)?H(t)&&rn(e.ofType,t.ofType)||!H(t)&&rn(e.ofType,t):En(t)&&e.name===t.name}function ss(e){if(Ue(e))return"a Scalar type";if(te(e))return"an Object type";if(re(e))return"an Interface type";if(Ne(e))return"a Union type";if(ge(e))return"an Enum type";if(fe(e))return"an Input type";ye(!1,"Unexpected type: "+I(e))}function os(e,t){const n=dt(e,t);return n!=null||ye(!1),ce(cr(n))}function at(e,t){const n=[],r=[],i=[],s=ot(e,({name:a})=>a),o=ot(t,({name:a})=>a);for(const a of e){const u=o[a.name];u===void 0?r.push(a):i.push([a,u])}for(const a of t)s[a.name]===void 0&&n.push(a);return{added:n,persisted:i,removed:r}}const mf=Object.freeze(Object.defineProperty({__proto__:null,BREAK:St,get BreakingChangeType(){return he},DEFAULT_DEPRECATION_REASON:ri,get DangerousChangeType(){return Je},get DirectiveLocation(){return G},ExecutableDefinitionsRule:co,FieldsOnCorrectTypeRule:lo,FragmentsOnCompositeTypesRule:fo,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:$e,GraphQLDeprecatedDirective:or,GraphQLDirective:rt,GraphQLEnumType:ht,GraphQLError:_,GraphQLFloat:oo,GraphQLID:ei,GraphQLIncludeDirective:ti,GraphQLInputObjectType:Mt,GraphQLInt:so,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:K,GraphQLObjectType:je,GraphQLScalarType:nt,GraphQLSchema:Qt,GraphQLSkipDirective:ni,GraphQLSpecifiedByDirective:ii,GraphQLString:me,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:po,KnownDirectivesRule:bi,KnownFragmentNamesRule:mo,KnownTypeNamesRule:_i,Lexer:Hr,Location:Vs,LoneAnonymousOperationRule:yo,LoneSchemaDefinitionRule:vo,NoDeprecatedCustomRule:xl,NoFragmentCyclesRule:Eo,NoSchemaIntrospectionCustomRule:$l,NoUndefinedVariablesRule:go,NoUnusedFragmentsRule:To,NoUnusedVariablesRule:bo,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:No,PossibleFragmentSpreadsRule:Oo,PossibleTypeExtensionsRule:Ao,ProvidedRequiredArgumentsRule:Do,ScalarLeafsRule:Ro,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:$o,Source:er,Token:Yr,get TokenKind(){return N},TypeInfo:yi,get TypeKind(){return se},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:Co,UniqueArgumentNamesRule:Oi,UniqueDirectiveNamesRule:Mo,UniqueDirectivesPerLocationRule:Ai,UniqueEnumValueNamesRule:Vo,UniqueFieldDefinitionNamesRule:Uo,UniqueFragmentNamesRule:Po,UniqueInputFieldNamesRule:Di,UniqueOperationNamesRule:jo,UniqueOperationTypesRule:qo,UniqueTypeNamesRule:Bo,UniqueVariableNamesRule:Go,ValidationContext:Xo,ValuesOfCorrectTypeRule:Qo,VariablesAreInputTypesRule:Yo,VariablesInAllowedPositionRule:Jo,__Directive:ai,__DirectiveLocation:ui,__EnumValue:li,__Field:ci,__InputValue:bn,__Schema:ar,__Type:Pe,__TypeKind:fi,assertAbstractType:Nc,assertCompositeType:_c,assertDirective:Sc,assertEnumType:mc,assertEnumValueName:Xs,assertInputObjectType:yc,assertInputType:gc,assertInterfaceType:Ks,assertLeafType:bc,assertListType:vc,assertName:Ve,assertNamedType:wc,assertNonNullType:Ec,assertNullableType:Zs,assertObjectType:Ws,assertOutputType:Tc,assertScalarType:pc,assertSchema:di,assertType:dc,assertUnionType:hc,assertValidName:of,assertValidSchema:hi,assertWrappingType:Ic,astFromValue:dt,buildASTSchema:fa,buildClientSchema:Ul,buildSchema:jl,coerceInputValue:ko,concatAST:nf,createSourceEventStream:ua,defaultFieldResolver:Cr,defaultTypeResolver:ia,doTypesOverlap:Lr,execute:fr,executeSync:Zo,extendSchema:Pl,findBreakingChanges:af,findDangerousChanges:uf,formatError:xu,getArgumentValues:lr,getDirectiveValues:fn,getEnterLeaveForKind:xt,getIntrospectionQuery:ca,getLocation:Un,getNamedType:Re,getNullableType:Wr,getOperationAST:Cl,getOperationRootType:Ml,getVariableValues:Fo,getVisitFn:cc,graphql:Dl,graphqlSync:Sl,introspectionFromSchema:Vl,introspectionTypes:_n,isAbstractType:We,isCompositeType:tt,isConstValueNode:kr,isDefinitionNode:jc,isDirective:sr,isEnumType:ge,isEqualType:jn,isExecutableDefinitionNode:Ei,isInputObjectType:fe,isInputType:ke,isInterfaceType:re,isIntrospectionType:wt,isLeafType:et,isListType:le,isNamedType:En,isNonNullType:H,isNullableType:Xr,isObjectType:te,isOutputType:pt,isRequiredArgument:yt,isRequiredInputField:rr,isScalarType:Ue,isSchema:ao,isSelectionNode:qc,isSpecifiedDirective:si,isSpecifiedScalarType:ir,isType:yn,isTypeDefinitionNode:Yt,isTypeExtensionNode:ur,isTypeNode:Bc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:gi,isTypeSystemExtensionNode:Ti,isUnionType:Ne,isValidNameError:ga,isValueNode:uo,isWrappingType:vn,lexicographicSortSchema:ql,locatedError:Ut,parse:tr,parseConstValue:ec,parseType:tc,parseValue:Hs,print:ce,printError:Fu,printIntrospectionSchema:Gl,printLocation:Ms,printSchema:Bl,printSourceLocation:Qr,printType:ha,resolveObjMapThunk:Zr,resolveReadonlyArrayThunk:Kr,responsePathAsArray:xe,separateOperations:rf,specifiedDirectives:vt,specifiedRules:Ho,specifiedScalarTypes:gn,stripIgnoredCharacters:sf,subscribe:Ll,syntaxError:Te,typeFromAST:Fe,validate:Wo,validateSchema:pi,valueFromAST:Xe,valueFromASTUntyped:Pn,version:Su,versionInfo:Ru,visit:Gt,visitInParallel:zr,visitWithTypeInfo:vi},Symbol.toStringTag,{value:"Module"})),yf=Xa(mf);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var as=yf;function us(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function vf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,as.parse)(e);t=us(n)}catch{}return{query:e,operationName:t}}var r=us(e);return{query:(0,as.print)(e),operationName:r}}Ft.resolveRequestDocument=vf;var Xt={},cs;function Ef(){if(cs)return Xt;cs=1;var e=ie&&ie.__assign||function(){return e=Object.assign||function(M){for(var x,R=1,V=arguments.length;R<V;R++){x=arguments[R];for(var v in x)Object.prototype.hasOwnProperty.call(x,v)&&(M[v]=x[v])}return M},e.apply(this,arguments)},t=ie&&ie.__awaiter||function(M,x,R,V){function v(b){return b instanceof R?b:new R(function(P){P(b)})}return new(R||(R=Promise))(function(b,P){function W(A){try{m(V.next(A))}catch(B){P(B)}}function oe(A){try{m(V.throw(A))}catch(B){P(B)}}function m(A){A.done?b(A.value):v(A.value).then(W,oe)}m((V=V.apply(M,x||[])).next())})},n=ie&&ie.__generator||function(M,x){var R={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},V,v,b,P;return P={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&(P[Symbol.iterator]=function(){return this}),P;function W(m){return function(A){return oe([m,A])}}function oe(m){if(V)throw new TypeError("Generator is already executing.");for(;R;)try{if(V=1,v&&(b=m[0]&2?v.return:m[0]?v.throw||((b=v.return)&&b.call(v),0):v.next)&&!(b=b.call(v,m[1])).done)return b;switch(v=0,b&&(m=[m[0]&2,b.value]),m[0]){case 0:case 1:b=m;break;case 4:return R.label++,{value:m[1],done:!1};case 5:R.label++,v=m[1],m=[0];continue;case 7:m=R.ops.pop(),R.trys.pop();continue;default:if(b=R.trys,!(b=b.length>0&&b[b.length-1])&&(m[0]===6||m[0]===2)){R=0;continue}if(m[0]===3&&(!b||m[1]>b[0]&&m[1]<b[3])){R.label=m[1];break}if(m[0]===6&&R.label<b[1]){R.label=b[1],b=m;break}if(b&&R.label<b[2]){R.label=b[2],R.ops.push(m);break}b[2]&&R.ops.pop(),R.trys.pop();continue}m=x.call(M,R)}catch(A){m=[6,A],v=0}finally{V=b=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.GraphQLWebSocketClient=void 0;var r=hn,i=Ft,s="connection_init",o="connection_ack",a="ping",u="pong",c="subscribe",f="next",d="error",h="complete",y=function(){function M(x,R,V){this._type=x,this._payload=R,this._id=V}return Object.defineProperty(M.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"text",{get:function(){var x={type:this.type};return this.id!=null&&this.id!=null&&(x.id=this.id),this.payload!=null&&this.payload!=null&&(x.payload=this.payload),JSON.stringify(x)},enumerable:!1,configurable:!0}),M.parse=function(x,R){var V=JSON.parse(x),v=V.type,b=V.payload,P=V.id;return new M(v,R(b),P)},M}(),E=function(){function M(x,R){var V=R.onInit,v=R.onAcknowledged,b=R.onPing,P=R.onPong,W=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=x,x.onopen=function(oe){return t(W,void 0,void 0,function(){var m,A,B,g;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=x).send,B=U,V?[4,V()]:[3,2];case 1:return g=w.sent(),[3,3];case 2:g=null,w.label=3;case 3:return A.apply(m,[B.apply(void 0,[g]).text]),[2]}})})},x.onclose=function(oe){W.socketState.acknowledged=!1,W.socketState.subscriptions={}},x.onerror=function(oe){console.error(oe)},x.onmessage=function(oe){try{var m=C(oe.data);switch(m.type){case o:{W.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(W.socketState.acknowledged=!0,v&&v(m.payload));return}case a:{b?b(m.payload).then(function(T){return x.send(X(T).text)}):x.send(X(null).text);return}case u:{P&&P(m.payload);return}}if(!W.socketState.acknowledged||m.id===void 0||m.id===null||!W.socketState.subscriptions[m.id])return;var A=W.socketState.subscriptions[m.id],B=A.query,g=A.variables,w=A.subscriber;switch(m.type){case f:{!m.payload.errors&&m.payload.data&&w.next&&w.next(m.payload.data),m.payload.errors&&w.error&&w.error(new r.ClientError(e(e({},m.payload),{status:200}),{query:B,variables:g}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:B,variables:g}));return}case h:{w.complete&&w.complete(),delete W.socketState.subscriptions[m.id];return}}}catch(T){console.error(T),x.close(1006)}x.close(4400,"Unknown graphql-ws message.")}}return M.prototype.makeSubscribe=function(x,R,V,v){var b=this,P=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[P]={query:x,variables:v,subscriber:V},this.socket.send(z(P,{query:x,operationName:R,variables:v}).text),function(){b.socket.send(Q(P).text),delete b.socketState.subscriptions[P]}},M.prototype.rawRequest=function(x,R){var V=this;return new Promise(function(v,b){var P;V.rawSubscribe(x,{next:function(W,oe){return P={data:W,extensions:oe}},error:b,complete:function(){return v(P)}},R)})},M.prototype.request=function(x,R){var V=this;return new Promise(function(v,b){var P;V.subscribe(x,{next:function(W){return P=W},error:b,complete:function(){return v(P)}},R)})},M.prototype.subscribe=function(x,R,V){var v=(0,i.resolveRequestDocument)(x),b=v.query,P=v.operationName;return this.makeSubscribe(b,P,R,V)},M.prototype.rawSubscribe=function(x,R,V){return this.makeSubscribe(x,void 0,R,V)},M.prototype.ping=function(x){this.socket.send(q(x).text)},M.prototype.close=function(){this.socket.close(1e3)},M.PROTOCOL="graphql-transport-ws",M}();Xt.GraphQLWebSocketClient=E;function C(M,x){x===void 0&&(x=function(V){return V});var R=y.parse(M,x);return R}function U(M){return new y(s,M)}function q(M){return new y(a,M,void 0)}function X(M){return new y(u,M,void 0)}function z(M,x){return new y(c,x,M)}function Q(M){return new y(h,void 0,M)}return Xt}(function(e){var t=ie&&ie.__assign||function(){return t=Object.assign||function(g){for(var w,T=1,D=arguments.length;T<D;T++){w=arguments[T];for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(g[L]=w[L])}return g},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?function(g,w,T,D){D===void 0&&(D=T);var L=Object.getOwnPropertyDescriptor(w,T);(!L||("get"in L?!w.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(g,D,L)}:function(g,w,T,D){D===void 0&&(D=T),g[D]=w[T]}),r=ie&&ie.__setModuleDefault||(Object.create?function(g,w){Object.defineProperty(g,"default",{enumerable:!0,value:w})}:function(g,w){g.default=w}),i=ie&&ie.__importStar||function(g){if(g&&g.__esModule)return g;var w={};if(g!=null)for(var T in g)T!=="default"&&Object.prototype.hasOwnProperty.call(g,T)&&n(w,g,T);return r(w,g),w},s=ie&&ie.__awaiter||function(g,w,T,D){function L(p){return p instanceof T?p:new T(function(S){S(p)})}return new(T||(T=Promise))(function(p,S){function O(Y){try{F(D.next(Y))}catch(J){S(J)}}function k(Y){try{F(D.throw(Y))}catch(J){S(J)}}function F(Y){Y.done?p(Y.value):L(Y.value).then(O,k)}F((D=D.apply(g,w||[])).next())})},o=ie&&ie.__generator||function(g,w){var T={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,L,p,S;return S={next:O(0),throw:O(1),return:O(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function O(F){return function(Y){return k([F,Y])}}function k(F){if(D)throw new TypeError("Generator is already executing.");for(;T;)try{if(D=1,L&&(p=F[0]&2?L.return:F[0]?L.throw||((p=L.return)&&p.call(L),0):L.next)&&!(p=p.call(L,F[1])).done)return p;switch(L=0,p&&(F=[F[0]&2,p.value]),F[0]){case 0:case 1:p=F;break;case 4:return T.label++,{value:F[1],done:!1};case 5:T.label++,L=F[1],F=[0];continue;case 7:F=T.ops.pop(),T.trys.pop();continue;default:if(p=T.trys,!(p=p.length>0&&p[p.length-1])&&(F[0]===6||F[0]===2)){T=0;continue}if(F[0]===3&&(!p||F[1]>p[0]&&F[1]<p[3])){T.label=F[1];break}if(F[0]===6&&T.label<p[1]){T.label=p[1],p=F;break}if(p&&T.label<p[2]){T.label=p[2],T.ops.push(F);break}p[2]&&T.ops.pop(),T.trys.pop();continue}F=w.call(g,T)}catch(Y){F=[6,Y],L=0}finally{D=p=0}if(F[0]&5)throw F[1];return{value:F[0]?F[1]:void 0,done:!0}}},a=ie&&ie.__rest||function(g,w){var T={};for(var D in g)Object.prototype.hasOwnProperty.call(g,D)&&w.indexOf(D)<0&&(T[D]=g[D]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var L=0,D=Object.getOwnPropertySymbols(g);L<D.length;L++)w.indexOf(D[L])<0&&Object.prototype.propertyIsEnumerable.call(g,D[L])&&(T[D[L]]=g[D[L]]);return T},u=ie&&ie.__spreadArray||function(g,w,T){if(T||arguments.length===2)for(var D=0,L=w.length,p;D<L;D++)(p||!(D in w))&&(p||(p=Array.prototype.slice.call(w,0,D)),p[D]=w[D]);return g.concat(p||Array.prototype.slice.call(w))},c=ie&&ie.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.resolveRequestDocument=e.GraphQLWebSocketClient=e.gql=e.batchRequests=e.request=e.rawRequest=e.GraphQLClient=e.ClientError=void 0;var f=i(fu),d=f,h=c(Gr),y=pn,E=Le,C=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return C.ClientError}});var U=Ft,q=function(g){var w={};return g&&(typeof Headers<"u"&&g instanceof Headers||d&&d.Headers&&g instanceof d.Headers?w=m(g):Array.isArray(g)?g.forEach(function(T){var D=T[0],L=T[1];w[D]=L}):w=g),w},X=function(g){return g.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},z=function(g){var w=g.query,T=g.variables,D=g.operationName,L=g.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(X(w)))];return T&&p.push("variables=".concat(encodeURIComponent(L.stringify(T)))),D&&p.push("operationName=".concat(encodeURIComponent(D))),p.join("&")}if(typeof T<"u"&&!Array.isArray(T))throw new Error("Cannot create query with given variable type, array expected");var S=w.reduce(function(O,k,F){return O.push({query:X(k),variables:T?L.stringify(T[F]):void 0}),O},[]);return"query=".concat(encodeURIComponent(L.stringify(S)))},Q=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=(0,h.default)(T,D,L,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof F=="string"?{"Content-Type":"application/json"}:{}),p),body:F},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S(w,Y)];case 3:return[2,ne.sent()]}})})},M=function(g){var w=g.url,T=g.query,D=g.variables,L=g.operationName,p=g.headers,S=g.fetch,O=g.fetchOptions,k=g.middleware;return s(void 0,void 0,void 0,function(){var F,Y,J;return o(this,function(ne){switch(ne.label){case 0:return F=z({query:T,variables:D,operationName:L,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:p},O),k?[4,Promise.resolve(k(t(t({},Y),{url:w,operationName:L,variables:D})))]:[3,2];case 1:J=ne.sent(),w=J.url,Y=a(J,["url"]),ne.label=2;case 2:return[4,S("".concat(w,"?").concat(F),Y)];case 3:return[2,ne.sent()]}})})},x=function(){function g(w,T){T===void 0&&(T={}),this.url=w,this.options=T}return g.prototype.rawRequest=function(w,T,D){return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ve,ae,pe;return o(this,function(Oe){return L=(0,E.parseRawRequestArgs)(w,T,D),p=this.options,S=p.headers,O=p.fetch,k=O===void 0?f.default:O,F=p.method,Y=F===void 0?"POST":F,J=p.requestMiddleware,ne=p.responseMiddleware,ve=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,L.signal!==void 0&&(ve.signal=L.signal),pe=(0,U.resolveRequestDocument)(L.query).operationName,[2,R({url:ae,query:L.query,variables:L.variables,headers:t(t({},q(W(S))),q(L.requestHeaders)),operationName:pe,fetch:k,method:Y,fetchOptions:ve,middleware:J}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},g.prototype.request=function(w){for(var T=[],D=1;D<arguments.length;D++)T[D-1]=arguments[D];return s(this,void 0,void 0,function(){var L,p,S,O,k,F,Y,J,ne,ve,ae,pe,Oe,Ae,Jt,Ht;return o(this,function(Nn){return L=T[0],p=T[1],S=(0,E.parseRequestArgs)(w,L,p),O=this.options,k=O.headers,F=O.fetch,Y=F===void 0?f.default:F,J=O.method,ne=J===void 0?"POST":J,ve=O.requestMiddleware,ae=O.responseMiddleware,pe=a(O,["headers","fetch","method","requestMiddleware","responseMiddleware"]),Oe=this.url,S.signal!==void 0&&(pe.signal=S.signal),Ae=(0,U.resolveRequestDocument)(S.document),Jt=Ae.query,Ht=Ae.operationName,[2,R({url:Oe,query:Jt,variables:S.variables,headers:t(t({},q(W(k))),q(S.requestHeaders)),operationName:Ht,fetch:Y,method:ne,fetchOptions:pe,middleware:ve}).then(function(ut){return ae&&ae(ut),ut.data}).catch(function(ut){throw ae&&ae(ut),ut})]})})},g.prototype.batchRequests=function(w,T){var D=(0,E.parseBatchRequestArgs)(w,T),L=this.options,p=L.headers,S=L.fetch,O=S===void 0?f.default:S,k=L.method,F=k===void 0?"POST":k,Y=L.requestMiddleware,J=L.responseMiddleware,ne=a(L,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ve=this.url;D.signal!==void 0&&(ne.signal=D.signal);var ae=D.documents.map(function(Oe){var Ae=Oe.document;return(0,U.resolveRequestDocument)(Ae).query}),pe=D.documents.map(function(Oe){var Ae=Oe.variables;return Ae});return R({url:ve,query:ae,variables:pe,headers:t(t({},q(W(p))),q(D.requestHeaders)),operationName:void 0,fetch:O,method:F,fetchOptions:ne,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},g.prototype.setHeaders=function(w){return this.options.headers=w,this},g.prototype.setHeader=function(w,T){var D,L=this.options.headers;return L?L[w]=T:this.options.headers=(D={},D[w]=T,D),this},g.prototype.setEndpoint=function(w){return this.url=w,this},g}();e.GraphQLClient=x;function R(g){var w=g.url,T=g.query,D=g.variables,L=g.headers,p=g.operationName,S=g.fetch,O=g.method,k=O===void 0?"POST":O,F=g.fetchOptions,Y=g.middleware;return s(this,void 0,void 0,function(){var J,ne,ve,ae,pe,Oe,Ae,Jt,Ht,Nn,ut;return o(this,function(dr){switch(dr.label){case 0:return J=k.toUpperCase()==="POST"?Q:M,ne=Array.isArray(T),[4,J({url:w,query:T,variables:D,operationName:p,headers:L,fetch:S,fetchOptions:F,middleware:Y})];case 1:return ve=dr.sent(),[4,P(ve,F.jsonSerializer)];case 2:if(ae=dr.sent(),pe=ne&&Array.isArray(ae)?!ae.some(function(_a){var Na=_a.data;return!Na}):!!ae.data,Oe=!ae.errors||F.errorPolicy==="all"||F.errorPolicy==="ignore",ve.ok&&Oe&&pe)return Ae=ve.headers,Jt=ve.status,ae.errors,Ht=a(ae,["errors"]),Nn=F.errorPolicy==="ignore"?Ht:ae,[2,t(t({},ne?{data:Nn}:Nn),{headers:Ae,status:Jt})];throw ut=typeof ae=="string"?{error:ae}:ae,new C.ClientError(t(t({},ut),{status:ve.status,headers:ve.headers}),{query:T,variables:D})}})})}function V(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRawRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.rawRequest(t({},L))]})})}e.rawRequest=V;function v(g,w){for(var T=[],D=2;D<arguments.length;D++)T[D-2]=arguments[D];return s(this,void 0,void 0,function(){var L,p;return o(this,function(S){return L=E.parseRequestExtendedArgs.apply(void 0,u([g,w],T,!1)),p=new x(L.url),[2,p.request(t({},L))]})})}e.request=v;function b(g,w,T){return s(this,void 0,void 0,function(){var D,L;return o(this,function(p){return D=(0,E.parseBatchRequestsExtendedArgs)(g,w,T),L=new x(D.url),[2,L.batchRequests(t({},D))]})})}e.batchRequests=b,e.default=v;function P(g,w){return w===void 0&&(w=y.defaultJsonSerializer),s(this,void 0,void 0,function(){var T,D,L;return o(this,function(p){switch(p.label){case 0:return g.headers.forEach(function(S,O){O.toLowerCase()==="content-type"&&(T=S)}),T&&(T.toLowerCase().startsWith("application/json")||T.toLowerCase().startsWith("application/graphql+json")||T.toLowerCase().startsWith("application/graphql-response+json"))?(L=(D=w).parse,[4,g.text()]):[3,2];case 1:return[2,L.apply(D,[p.sent()])];case 2:return[2,g.text()]}})})}function W(g){return typeof g=="function"?g():g}function oe(g){for(var w=[],T=1;T<arguments.length;T++)w[T-1]=arguments[T];return g.reduce(function(D,L,p){return"".concat(D).concat(L).concat(p in w?w[p]:"")},"")}e.gql=oe;function m(g){var w={};return g.forEach(function(T,D){w[D]=T}),w}var A=Ef();Object.defineProperty(e,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return A.GraphQLWebSocketClient}});var B=Ft;Object.defineProperty(e,"resolveRequestDocument",{enumerable:!0,get:function(){return B.resolveRequestDocument}})})(qt);qt.gql`
|
|
162
181
|
query GET_HREFLANG_DATA
|
|
163
182
|
@cached
|
|
164
183
|
(ttl: 300)
|
|
@@ -169,7 +188,7 @@ ${t.join(`
|
|
|
169
188
|
link
|
|
170
189
|
}
|
|
171
190
|
}
|
|
172
|
-
`;
|
|
191
|
+
`;qt.gql`
|
|
173
192
|
query B_CC_Q_D_0
|
|
174
193
|
(
|
|
175
194
|
$leagueIds: [numeric!]
|
|
@@ -197,7 +216,7 @@ ${t.join(`
|
|
|
197
216
|
}
|
|
198
217
|
|
|
199
218
|
}
|
|
200
|
-
`;
|
|
219
|
+
`;qt.gql`
|
|
201
220
|
query CURRENT_SEASON_IDS
|
|
202
221
|
@cached
|
|
203
222
|
(ttl: 300)
|
|
@@ -216,7 +235,7 @@ ${t.join(`
|
|
|
216
235
|
id
|
|
217
236
|
}
|
|
218
237
|
}
|
|
219
|
-
`;
|
|
238
|
+
`;qt.gql`
|
|
220
239
|
query ALL_LEAGUE_IDS
|
|
221
240
|
@cached
|
|
222
241
|
(ttl: 300)
|
|
@@ -226,7 +245,7 @@ ${t.join(`
|
|
|
226
245
|
id
|
|
227
246
|
}
|
|
228
247
|
}
|
|
229
|
-
`;
|
|
248
|
+
`;qt.gql`
|
|
230
249
|
query ALL_TARGET_SEASON_FIXTURE_IDS
|
|
231
250
|
(
|
|
232
251
|
$limit: Int,
|
|
@@ -275,12 +294,15 @@ ${t.join(`
|
|
|
275
294
|
season_id
|
|
276
295
|
}
|
|
277
296
|
}
|
|
278
|
-
`;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function
|
|
279
|
-
transform: ${c} translate(${(1
|
|
280
|
-
opacity: ${u-f*
|
|
297
|
+
`;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function gf(e){const t=e-1;return t*t*t+1}function Hn(e,{delay:t=0,duration:n=400,easing:r=gf,x:i=0,y:s=0,opacity:o=0}={}){const a=getComputedStyle(e),u=+a.opacity,c=a.transform==="none"?"":a.transform,f=u*(1-o),[d,h]=ki(i),[y,E]=ki(s);return{delay:t,duration:n,easing:r,css:(C,U)=>`
|
|
298
|
+
transform: ${c} translate(${(1-C)*d}${h}, ${(1-C)*y}${E});
|
|
299
|
+
opacity: ${u-f*U}`}}const Ln={admin:!1,numberOfAdvertsActive:0};function Tf(){const{subscribe:e,set:t,update:n}=Rs(Ln);return{subscribe:e,set:t,update:n,...{updateData:i=>{for(const s of i){const o=s[0],a=s[1];o=="admin"?Ln.admin=a:o=="numberOfAdvertsActive"&&(Ln.numberOfAdvertsActive+=1)}t(Ln)}}}}const bf=Tf(),_f="/icon-close.svg",ba="data:image/svg+xml,%3csvg%20width='15'%20height='14'%20viewBox='0%200%2015%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13.1215%201.08392L1.64569%2012.5597'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M5.06506%201.02606L13.1213%201.08286L13.1793%209.14027'%20stroke='white'%20stroke-width='1.73876'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Nf(e){gs(e,"svelte-1pquetq",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq.svelte-1pquetq{position:fixed;z-index:10000;bottom:0;right:0;left:0;overflow:hidden;border-radius:40px 40px 0px 0px;background-color:var(--dark-theme-1-4-shade)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq img#close.svelte-1pquetq{position:absolute;top:10px;right:10px;z-index:1}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq img#banner.svelte-1pquetq{max-height:355px;min-height:355px;width:100%;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq video.svelte-1pquetq{max-height:355px;min-height:355px;width:100%;object-fit:cover}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box.svelte-1pquetq{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box p#title.svelte-1pquetq{color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq div#main-box button.svelte-1pquetq{border-radius:7.57px;max-height:50px;min-height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:var(--white)}div#global⮕widget⮕betarenaAdEngine⮕main.svelte-1pquetq span.custom-betarena-advert-x1{color:var(--primary) !important}')}function ls(e){var V,v;let t,n,r,i,s,o=((V=e[0].data)==null?void 0:V.title)+"",a,u,c,f,d=(((v=e[0].data)==null?void 0:v.cta_title)??"Recieve Bonus")+"",h,y,E,C,U,q,X,z,Q=e[2]&&fs(e);function M(b,P){var W;if((b[0].type==1||b[0].type==4)&&((W=b[0].data)!=null&&W.media))return wf;if(b[0].type==2)return If}let x=M(e),R=x&&x(e);return{c(){var b;t=de("div"),Q&&Q.c(),n=ct(),R&&R.c(),r=ct(),i=de("div"),s=de("p"),a=ct(),u=de("a"),c=de("button"),f=de("span"),h=sn(d),y=ct(),E=de("img"),$(s,"id","title"),$(s,"class","s-20 w-600 m-0 m-b-20 text-center svelte-1pquetq"),$(f,"class","s-18 w-500 "),$(E,"id",""),He(E.src,C=ba)||$(E,"src",C),$(E,"alt","icon-arrow"),$(E,"title","icon-arrow"),$(E,"loading","lazy"),$(E,"class","m-l-10 "),$(E,"width","12"),$(E,"height","12"),$(c,"class","svelte-1pquetq"),$(u,"href",U=(b=e[0].data)==null?void 0:b.cta_link),$(u,"target","_blank"),$(u,"rel",`
|
|
300
|
+
noopener
|
|
301
|
+
noreferrer
|
|
302
|
+
`),$(i,"id","main-box"),$(i,"class","svelte-1pquetq"),$(t,"id",Af),$(t,"class","svelte-1pquetq")},m(b,P){Ke(b,t,P),Q&&Q.m(t,null),ue(t,n),R&&R.m(t,null),ue(t,r),ue(t,i),ue(i,s),s.innerHTML=o,ue(i,a),ue(i,u),ue(u,c),ue(c,f),ue(f,h),ue(c,y),ue(c,E),z=!0},p(b,P){var W,oe,m;b[2]?Q?Q.p(b,P):(Q=fs(b),Q.c(),Q.m(t,n)):Q&&(Q.d(1),Q=null),x===(x=M(b))&&R?R.p(b,P):(R&&R.d(1),R=x&&x(b),R&&(R.c(),R.m(t,r))),(!z||P&1)&&o!==(o=((W=b[0].data)==null?void 0:W.title)+"")&&(s.innerHTML=o),(!z||P&1)&&d!==(d=(((oe=b[0].data)==null?void 0:oe.cta_title)??"Recieve Bonus")+"")&&_r(h,d),(!z||P&1&&U!==(U=(m=b[0].data)==null?void 0:m.cta_link))&&$(u,"href",U)},i(b){z||(b&&bt(()=>{z&&(X&&X.end(1),q=Ds(t,Hn,{y:500,duration:500}),q.start())}),z=!0)},o(b){q&&q.invalidate(),b&&(X=Ss(t,Hn,{y:500,duration:500})),z=!1},d(b){b&&Se(t),Q&&Q.d(),R&&R.d(),b&&X&&X.end()}}}function fs(e){let t,n,r,i;return{c(){t=de("img"),$(t,"id","close"),He(t.src,n=_f)||$(t,"src",n),$(t,"alt","icon-close"),$(t,"title","icon-close"),$(t,"loading","lazy"),$(t,"class","cursor-pointer svelte-1pquetq")},m(s,o){Ke(s,t,o),r||(i=_s(t,"click",e[5]),r=!0)},p:Ye,d(s){s&&Se(t),r=!1,i()}}}function If(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-1pquetq")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function wf(e){let t,n,r,i;return{c(){var s,o;t=de("a"),n=de("video"),$(n,"id","banner"),$(n,"width","250"),$(n,"height","250"),He(n.src,r=(s=e[0].data)==null?void 0:s.media)||$(n,"src",r),n.autoplay=!0,n.muted=!0,n.playsInline=!0,n.loop=!0,$(n,"class","svelte-1pquetq"),$(t,"href",i=(o=e[0].data)==null?void 0:o.video_link),$(t,"target","_blank"),$(t,"rel",`
|
|
281
303
|
noopener
|
|
282
304
|
noreferrer
|
|
283
|
-
`)
|
|
305
|
+
`)},m(s,o){Ke(s,t,o),ue(t,n)},p(s,o){var a,u;o&1&&!He(n.src,r=(a=s[0].data)==null?void 0:a.media)&&$(n,"src",r),o&1&&i!==(i=(u=s[0].data)==null?void 0:u.video_link)&&$(t,"href",i)},d(s){s&&Se(t)}}}function Of(e){let t,n=e[1]&&!e[3]&&ls(e);return{c(){n&&n.c(),t=bs()},m(r,i){n&&n.m(r,i),Ke(r,t,i)},p(r,[i]){r[1]&&!r[3]?n?(n.p(r,i),i&10&&tn(n,1)):(n=ls(r),n.c(),tn(n,1),n.m(t.parentNode,t)):n&&(ja(),wr(n,1,1,()=>{n=null}),qa())},i(r){tn(n)},o(r){wr(n)},d(r){r&&Se(t),n&&n.d(r)}}}const Af="global⮕widget⮕betarenaAdEngine⮕main",Df=1e4,Sf=5e3;function Rf(e,t,n){let r,i;Da(e,Or,c=>n(4,i=c));let{adData:s}=t,o=!1,a=!1;Is(()=>{r||(setTimeout(()=>{n(1,o=!0),setTimeout(()=>{n(2,a=!0)},Sf)},Df),bf.updateData([["numberOfAdvertsActive",null]]))});const u=()=>{Or.updateData([["toggleAdShownState",void 0]])};return e.$$set=c=>{"adData"in c&&n(0,s=c.adData)},e.$$.update=()=>{e.$$.dirty&16&&n(3,{isBetarenaAdShownForToday:r}={...i},r)},[s,o,a,r,i,u]}class ds extends jr{constructor(t){super(),Pr(this,t,Rf,Of,Xn,{adData:0},Nf)}}function Lf(e){gs(e,"svelte-58lxu1",'@charset "UTF-8";div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1.svelte-58lxu1{overflow:hidden;border-radius:10px 10px 10px 10px;background-color:#383838}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 p.svelte-58lxu1{font-family:"Roboto"}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 img#banner.svelte-58lxu1{height:355px;width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 iframe.svelte-58lxu1{width:100%}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box.svelte-58lxu1{padding:20px 20px 35px 20px}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box p#title.svelte-58lxu1{color:var(--white)}div#global⮕widget⮕betarenaAdEngineX1⮕main.svelte-58lxu1 div#main-box button.svelte-58lxu1{border-radius:7.57px;max-height:50px;width:100%;padding:10px;background:radial-gradient(97.9% 290.93% at 11.52% 99.71%, #2E6514 0%, #66BE3C 100%);color:var(--white)}')}function kf(e){let t,n;return{c(){var r;t=de("img"),$(t,"id","banner"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"alt",""),$(t,"title",""),$(t,"loading","lazy"),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function Ff(e){let t,n;return{c(){var r;t=de("iframe"),$(t,"width","250"),$(t,"height","250"),He(t.src,n=(r=e[0].data)==null?void 0:r.media)||$(t,"src",n),$(t,"class","svelte-58lxu1")},m(r,i){Ke(r,t,i)},p(r,i){var s;i&1&&!He(t.src,n=(s=r[0].data)==null?void 0:s.media)&&$(t,"src",n)},d(r){r&&Se(t)}}}function xf(e){var x,R;let t,n,r,i,s=((x=e[0].data)==null?void 0:x.title)+"",o,a,u,c,f=(((R=e[0].data)==null?void 0:R.cta_title)??"Recieve Bonus")+"",d,h,y,E,C,U,q,X;function z(V,v){var b;if((V[0].type==1||V[0].type==4)&&((b=V[0].data)!=null&&b.media))return Ff;if(V[0].type==2)return kf}let Q=z(e),M=Q&&Q(e);return{c(){var V;t=de("div"),M&&M.c(),n=ct(),r=de("div"),i=de("p"),o=sn(s),a=ct(),u=de("a"),c=de("button"),d=sn(f),h=ct(),y=de("img"),$(i,"id","title"),$(i,"class","svelte-58lxu1"),$(y,"id",""),He(y.src,E=ba)||$(y,"src",E),$(y,"alt","icon-arrow"),$(y,"title","icon-arrow"),$(y,"loading","lazy"),$(y,"class","m-l-10 "),$(c,"class","svelte-58lxu1"),$(u,"href",C=(V=e[0].data)==null?void 0:V.cta_link),$(u,"target","_blank"),$(u,"rel",`
|
|
284
306
|
noopener
|
|
285
307
|
noreferrer
|
|
286
|
-
`)
|
|
308
|
+
`),$(r,"id","main-box"),$(r,"class","svelte-58lxu1"),$(t,"id",$f),$(t,"class","svelte-58lxu1")},m(V,v){Ke(V,t,v),M&&M.m(t,null),ue(t,n),ue(t,r),ue(r,i),ue(i,o),ue(r,a),ue(r,u),ue(u,c),ue(c,d),ue(c,h),ue(c,y),X=!0},p(V,[v]){var b,P,W;Q===(Q=z(V))&&M?M.p(V,v):(M&&M.d(1),M=Q&&Q(V),M&&(M.c(),M.m(t,n))),(!X||v&1)&&s!==(s=((b=V[0].data)==null?void 0:b.title)+"")&&_r(o,s),(!X||v&1)&&f!==(f=(((P=V[0].data)==null?void 0:P.cta_title)??"Recieve Bonus")+"")&&_r(d,f),(!X||v&1&&C!==(C=(W=V[0].data)==null?void 0:W.cta_link))&&$(u,"href",C)},i(V){X||(V&&bt(()=>{X&&(q&&q.end(1),U=Ds(t,Hn,{y:500,duration:500}),U.start())}),X=!0)},o(V){U&&U.invalidate(),V&&(q=Ss(t,Hn,{y:500,duration:500})),X=!1},d(V){V&&Se(t),M&&M.d(),V&&q&&q.end()}}}const $f="global⮕widget⮕betarenaAdEngineX1⮕main";function Cf(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class Mf extends jr{constructor(t){super(),Pr(this,t,Cf,xf,Xn,{adData:0},Lf)}}const{document:br}=Sa;function Vf(e){let t,n,r,i,s,o,a,u,c=!1;return{c(){t=de("link"),n=de("link"),r=de("link"),i=ct(),s=bs(),$(t,"rel","preconnect"),$(t,"href","https://fonts.googleapis.com"),$(n,"rel","preconnect"),$(n,"href","https://fonts.gstatic.com"),$(n,"crossorigin",""),$(r,"href","https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"),$(r,"rel","stylesheet")},m(f,d){ue(br.head,t),ue(br.head,n),ue(br.head,r),Ke(f,i,d),Ke(f,s,d),o=!0,a||(u=_s(window,"resize",e[6]),a=!0)},p(f,[d]){},i(f){o||(tn(c),o=!0)},o(f){wr(c),o=!1},d(f){f&&(Se(i),Se(s)),Se(t),Se(n),Se(r),a=!1,u()}}}function Uf(e,t,n){let{deviceWidthList:r=[768,1024],authorId:i=null,authorArticleTagIds:s=[]}=t,o="desktop",a=null,u=new Map;function c(){var E;const y=document.querySelectorAll("[data-betarena-zone-id]");for(const C of y){const U=(E=C.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:E.value;U&&u.set(parseInt(U),C)}}async function f(y){if(!document)return;const E=await cu(`${Ja}/ads`,y);console.log("response",E);const C=new Map(E.ads??[]),U=new Map(E.mapZoneIdToCampaignId);new Map(E.mapCampaignIdToCreativeId);const q=new Map(E.mapZoneIdToAuthorIds),X=new Map(E.mapZoneIdToTagIds);for(const[z,Q]of u){if(!a)continue;const M=U.get(z)??[],x=Tr(M.map(R=>{if(C.has(R))return C.get(R)}));for(const R of x??[])new Mf({target:Q,props:{adData:R}})}if(i||s.length>0){for(const[z,Q]of q){if(i&&!Q.includes(i))continue;const M=U.get(z)??[],x=Tr(M.map(R=>{if(C.has(R))return C.get(R)}));console.log("creativeAdData",x);for(const R of x)new ds({target:document.body,props:{adData:R}})}for(const[z,Q]of X){if(i&&!Q.includes(i))continue;const M=U.get(z)??[],x=Tr(M.map(R=>{if(C.has(R))return C.get(R)}));for(const R of x)new ds({target:document.body,props:{adData:R}})}}}async function d(){n(2,o=Ci()),n(3,a=await lu()),c(),f({deviceType:o,isoCountryCode:(a==null?void 0:a.country_code)??"EB",authorId:i,tagIds:s,zoneIds:[...u.keys()]})}Is(async()=>{Or.useLocalStorage(),await d()});const h=()=>{Ci()};return e.$$set=y=>{"deviceWidthList"in y&&n(5,r=y.deviceWidthList),"authorId"in y&&n(0,i=y.authorId),"authorArticleTagIds"in y&&n(1,s=y.authorArticleTagIds)},[i,s,o,a,u,r,h]}class Pf extends jr{constructor(t){super(),Pr(this,t,Uf,Vf,Xn,{deviceWidthList:5,authorId:0,authorArticleTagIds:1})}}typeof document<"u"&&new Pf({target:document.body,props:{authorArticleTagIds:[1]}});
|