@betarena/ad-engine 0.0.35 → 0.0.37
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.js +45 -64
- package/package.json +1 -1
- package/src/lib/Advert-Engine-Widget.svelte +68 -22
package/dist/index.js
CHANGED
|
@@ -1,64 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
`;for(let U=0;U<=1;U+=u){const
|
|
1
|
+
var Na=Object.defineProperty;var Ia=(e,t,n)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t,n)=>(Ia(e,typeof t!="symbol"?t+"":t,n),n);function Ye(){}const ds=e=>e;function ps(e){return e()}function Li(){return Object.create(null)}function Pt(e){e.forEach(ps)}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 wa(e){return Object.keys(e).length===0}function Oa(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 Aa(e,t,n){e.$$.on_destroy.push(Oa(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 hs=typeof window<"u";let ms=hs?()=>window.performance.now():()=>Date.now(),Vr=hs?e=>requestAnimationFrame(e):Ye;const Rt=new Set;function ys(e){Rt.forEach(t=>{t.c(e)||(Rt.delete(t),t.f())}),Rt.size!==0&&Vr(ys)}function vs(e){let t;return Rt.size===0&&Vr(ys),{promise:new Promise(n=>{Rt.add(t={c:e,f:n})}),abort(){Rt.delete(t)}}}const Da=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function ue(e,t){e.appendChild(t)}function Es(e,t,n){const r=Ur(e);if(!r.getElementById(t)){const i=de("style");i.id=t,i.textContent=n,gs(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 Sa(e){const t=de("style");return t.textContent="/* empty */",gs(Ur(e),t),t.sheet}function gs(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 Ts(){return sn("")}function bs(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 Ra(e){return Array.from(e.childNodes)}function _r(e,t){t=""+t,e.data!==t&&(e.data=t)}function La(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 ka(e){let t=5381,n=e.length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return t>>>0}function Fa(e,t){const n={stylesheet:Sa(t),rules:{}};return Cn.set(e,n),n}function _s(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 P=t+(n-t)*s(U);c+=U*100+`%{${o(P,1-P)}}
|
|
3
3
|
`}const f=c+`100% {${o(n,1-n)}}
|
|
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),
|
|
7
|
-
`)}function
|
|
4
|
+
}`,d=`__svelte_${ka(f)}_${a}`,h=Ur(e),{stylesheet:v,rules:E}=Cn.get(h)||Fa(h,e);E[d]||(E[d]=!0,v.insertRule(`@keyframes ${d} ${f}`,v.cssRules.length));const M=e.style.animation||"";return e.style.animation=`${M?`${M}, `:""}${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||xa())}function xa(){Vr(()=>{Mn||(Cn.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&Se(t)}),Cn.clear())})}let on;function en(e){on=e}function $a(){if(!on)throw new Error("Function called outside component initialization");return on}function Ns(e){$a().$$.on_mount.push(e)}const Dt=[],Fi=[];let Lt=[];const xi=[],Ca=Promise.resolve();let Ir=!1;function Ma(){Ir||(Ir=!0,Ca.then(Is))}function bt(e){Lt.push(e)}const hr=new Set;let Ot=0;function Is(){if(Ot!==0)return;const e=on;do{try{for(;Ot<Dt.length;){const t=Dt[Ot];Ot++,en(t),Va(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 Va(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 Ua(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 ws(){return zt||(zt=Promise.resolve(),zt.then(()=>{zt=null})),zt}function Vn(e,t,n){e.dispatchEvent(La(`${t?"intro":"outro"}${n}`))}const kn=new Set;let lt;function Pa(){lt={r:0,c:[],p:lt}}function ja(){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 Os={duration:0};function As(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:v=300,easing:E=ds,tick:M=Ye,css:U}=i||Os;U&&(o=_s(e,0,1,v,h,E,U,u++)),M(0,1);const P=ms()+h,z=P+v;a&&a.abort(),s=!0,bt(()=>Vn(e,!0,"start")),a=vs(Z=>{if(s){if(Z>=z)return M(1,0),Vn(e,!0,"end"),c(),s=!1;if(Z>=P){const Q=E((Z-P)/v);M(Q,1-Q)}}return s})}let d=!1;return{start(){d||(d=!0,Nr(e),zn(i)?(i=i(r),ws().then(f)):f())},invalidate(){d=!1},end(){s&&(c(),s=!1)}}}function Ds(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=ds,tick:v=Ye,css:E}=i||Os;E&&(o=_s(e,1,0,d,f,h,E));const M=ms()+f,U=M+d;bt(()=>Vn(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),vs(P=>{if(s){if(P>=U)return v(0,1),Vn(e,!1,"end"),--a.r||Pt(a.c),!1;if(P>=M){const z=h((P-M)/d);v(1-z,z)}}return s})}return zn(i)?ws().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 qa(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),bt(()=>{const s=e.$$.on_mount.map(ps).filter(zn);e.$$.on_destroy?e.$$.on_destroy.push(...s):Pt(s),e.$$.on_mount=[]}),i.forEach(bt)}function Ba(e,t){const n=e.$$;n.fragment!==null&&(Ua(n.after_update),Pt(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ga(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),Ma(),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,...v)=>{const E=v.length?v[0]:h;return c.ctx&&i(c.ctx[d],c.ctx[d]=E)&&(!c.skip_bound&&c.bound[d]&&c.bound[d](E),f&&Ga(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=Ra(t.target);c.fragment&&c.fragment.l(d),d.forEach(Se)}else c.fragment&&c.fragment.c();t.intro&&tn(e.$$.fragment),qa(e,t.target,t.anchor),Is()}en(u)}class jr{constructor(){pr(this,"$$");pr(this,"$$set")}$destroy(){Ba(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&&!wa(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 Ya="https://betarena-test-e2748dab12f5.herokuapp.com",At=[];function Ss(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 Ja={isBetarenaAdShownForToday:!1,advertDateLastShown:null};function Ha(e){const{subscribe:t,set:n,update:r}=Ss(Ja),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=Ha("betarena-ad-engine");var ie=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(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 Xa(e){return e&&DataView.prototype.isPrototypeOf(e)}if(De.arrayBuffer)var Wa=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Ka=ArrayBuffer.isView||function(e){return e&&Wa.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 Rs(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function Za(e){var t=new FileReader,n=Rs(t);return t.readAsArrayBuffer(e),n}function eu(e){var t=new FileReader,n=Rs(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}function tu(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 Ls(){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&&Xa(e)?(this._bodyArrayBuffer=$i(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):De.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||Ka(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(Za);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=mr(this);if(e)return e;if(this._bodyBlob)return eu(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(tu(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(iu)}),this.json=function(){return this.text().then(JSON.parse)},this}var nu=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function ru(e){var t=e.toUpperCase();return nu.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=ru(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 iu(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 su(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}Ls.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)}Ls.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.status=0,e.type="error",e};var ou=[301,302,303,307,308];Ze.redirect=function(e,t){if(ou.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 ks(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:su(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 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 failed"))},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)})}ks.polyfill=!0;Ie.fetch||(Ie.fetch=ks,Ie.Headers=_e,Ie.Request=_t,Ie.Response=Ze);self.fetch.bind(self);const au=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 uu(e,t){return console.log("path",e),console.log("data",t),await au(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 cu(){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 v(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)}),v(m)},E.prototype.values=function(){var m=[];return this.forEach(function(A){m.push(A)}),v(m)},E.prototype.entries=function(){var m=[];return this.forEach(function(A,B){m.push([B,A])}),v(m)},a.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function M(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 P(m){var A=new FileReader,B=U(A);return A.readAsArrayBuffer(m),B}function z(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),T=0;T<A.length;T++)B[T]=String.fromCharCode(A[T]);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 V(){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=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?M(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(P)}),this.text=function(){var m=M(this);if(m)return m;if(this._bodyBlob)return z(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(y)}),this.json=function(){return this.text().then(JSON.parse)},this}var C=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function k(m){var A=m.toUpperCase();return C.indexOf(A)>-1?A:m}function L(m,A){A=A||{};var B=A.body;if(m instanceof L){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=k(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)}L.prototype.clone=function(){return new L(this,{body:this._bodyInit})};function y(m){var A=new FormData;return m.trim().split("&").forEach(function(B){if(B){var T=B.split("="),w=T.shift().replace(/\+/g," "),b=T.join("=").replace(/\+/g," ");A.append(decodeURIComponent(w),decodeURIComponent(b))}}),A}function g(m){var A=new E,B=m.replace(/\r?\n[\t ]+/g," ");return B.split(/\r?\n/).forEach(function(T){var w=T.split(":"),b=w.shift().trim();if(b){var D=w.join(":").trim();A.append(b,D)}}),A}V.call(L.prototype);function j(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)}V.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},j.error=function(){var m=new j(null,{status:0,statusText:""});return m.type="error",m};var X=[301,302,303,307,308];j.redirect=function(m,A){if(X.indexOf(A)===-1)throw new RangeError("Invalid status code");return new j(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 T=Error(A);this.stack=T.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(m,A){return new Promise(function(B,T){var w=new L(m,A);if(w.signal&&w.signal.aborted)return T(new o.DOMException("Aborted","AbortError"));var b=new XMLHttpRequest;function D(){b.abort()}b.onload=function(){var R={status:b.status,statusText:b.statusText,headers:g(b.getAllResponseHeaders()||"")};R.url="responseURL"in b?b.responseURL:R.headers.get("X-Request-URL");var p="response"in b?b.response:b.responseText;B(new j(p,R))},b.onerror=function(){T(new TypeError("Network request failed"))},b.ontimeout=function(){T(new TypeError("Network request failed"))},b.onabort=function(){T(new o.DOMException("Aborted","AbortError"))},b.open(w.method,w.url,!0),w.credentials==="include"?b.withCredentials=!0:w.credentials==="omit"&&(b.withCredentials=!1),"responseType"in b&&a.blob&&(b.responseType="blob"),w.headers.forEach(function(R,p){b.setRequestHeader(p,R)}),w.signal&&(w.signal.addEventListener("abort",D),b.onreadystatechange=function(){b.readyState===4&&w.signal.removeEventListener("abort",D)}),b.send(typeof w._bodyInit>"u"?null:w._bodyInit)})}return oe.polyfill=!0,s.fetch||(s.fetch=oe,s.Headers=E,s.Request=L,s.Response=j),o.Headers=E,o.Request=L,o.Response=j,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 lu=Ar.exports,Gr={},Wn={},Fs=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i},fu=Fs,xs=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof fu},du=xs,pu=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=du);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=Fs;Wn.extractFiles=pu;Wn.isExtractableFile=xs;var hu=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 mu=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});var $s=Wn,yu=mu(hu),vu=pn,Eu=function(e){return(0,$s.isExtractableFile)(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function gu(e,t,n,r){r===void 0&&(r=vu.defaultJsonSerializer);var i=(0,$s.extractFiles)({query:e,variables:t,operationName:n},"",Eu),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,v,E){return h.push({query:v,variables:t?t[E]:void 0}),h},[]);return r.stringify(a)}var u=typeof FormData>"u"?yu.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,v){c.append("".concat(++d),v)}),c}Gr.default=gu;var Le={};Object.defineProperty(Le,"__esModule",{value:!0});Le.parseBatchRequestsExtendedArgs=Le.parseRawRequestExtendedArgs=Le.parseRequestExtendedArgs=Le.parseBatchRequestArgs=Le.parseRawRequestArgs=Le.parseRequestArgs=void 0;function Tu(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRequestArgs=Tu;function bu(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}Le.parseRawRequestArgs=bu;function _u(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}Le.parseBatchRequestArgs=_u;function Nu(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=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.query?e:{url:e,query:t,variables:i,requestHeaders:s,signal:void 0}}Le.parseRawRequestExtendedArgs=Iu;function wu(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}Le.parseBatchRequestsExtendedArgs=wu;var hn={},Ou=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 Au=function(e){Ou(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=Au;var Ft={};const Du="16.6.0",Su=Object.freeze({major:16,minor:6,patch:0,preReleaseTag:null});function K(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 Ru=/\r\n|[\n\r]/g;function Un(e,t){let n=0,r=1;for(const i of e.body.matchAll(Ru)){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 Cs(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),v=u%80,E=[];for(let M=0;M<d.length;M+=80)E.push(d.slice(M,M+80));return c+Mi([[`${o} |`,E[0]],...E.slice(1,h+1).map(M=>["|",M]),["|","^".padStart(v)],["|",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 Lu(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}=Lu(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 v=Me(f==null?void 0:f.extensions)?f==null?void 0:f.extensions:void 0;this.extensions=(s=d??v)!==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
|
+
`+Cs(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
|
|
10
10
|
|
|
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
|
|
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 ku(e){return e.toString()}function Fu(e){return e.toJSON()}function Te(e,t,n){return new _(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Ms{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 Vs={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"]},xu=new Set(Object.keys(Vs));function Dr(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&xu.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 Us(e){return e>=97&&e<=122||e>=65&&e<=90}function Jr(e){return Us(e)||e===95}function Ps(e){return Us(e)||an(e)||e===95}function $u(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=Cu(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 Cu(e){let t=0;for(;t<e.length&&Sr(e.charCodeAt(t));)++t;return t}function Mu(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 js(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(v=>v.length===0||Sr(v.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 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=
|
|
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(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.
|
|
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=Vu(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===N.COMMENT);return t}}function qs(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 Bs(e.charCodeAt(t))&&Gs(e.charCodeAt(t+1))}function Bs(e){return e>=55296&&e<=56319}function Gs(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 Vu(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 Uu(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?Qu(e,i):ju(e,i)}if(an(s)||s===45)return Pu(e,i,s);if(Jr(s))return Yu(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 Uu(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 Pu(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 ju(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?qu(e,i):Bu(e,i):Gu(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 qu(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 Bu(e,t){const n=e.source.body,r=Ui(n,t+2);if(Bt(r))return{value:String.fromCodePoint(r),size:6};if(Bs(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=Ui(n,t+8);if(Gs(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 Gu(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 Qu(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,$u(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 Yu(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const s=n.charCodeAt(i);if(Ps(s))++i;else break}return Ee(e,N.NAME,t,i,n.slice(t,i))}const Ju=10,Qs=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 Hu(e,t);default:return String(e)}}function Hu(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(zu(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:Zn(r,n)}else if(Array.isArray(e))return Wu(e,n);return Xu(e,n)}function zu(e){return typeof e.toJSON=="function"}function Xu(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Qs?"["+Ku(e)+"]":"{ "+n.map(([i,s])=>i+": "+Zn(s,t)).join(", ")+" }"}function Wu(e,t){if(e.length===0)return"[]";if(t.length>Qs)return"[Array]";const n=Math.min(Ju,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 Ku(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"||K(!1,`Body must be a string. Received: ${I(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||K(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||K(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Ys(e){return ze(e,er)}function tr(e,t){return new nr(e,t).parseDocument()}function Js(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseValueLiteral(!1);return n.expectToken(N.EOF),r}function Zu(e,t){const n=new nr(e,t);n.expectToken(N.SOF);const r=n.parseConstValueLiteral();return n.expectToken(N.EOF),r}function ec(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=Ys(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 Ms(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 ${Hs(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 Hs(e.kind)+(t!=null?` "${t}"`:"")}function Hs(e){return qs(e)?`"${e}"`:e}const tc=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,tc),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,nc=57;function On(e){return!isNaN(e)&&Rr<=e&&e<=nc}function mt(e,t){const n=Object.create(null),r=new rc(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 rc{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 v=h[0]=f;for(let E=1;E<=a;E++){const M=i[f-1]===s[E-1]?0:1;let U=Math.min(d[E]+1,h[E-1]+1,d[E-1]+M);if(f>1&&E>1&&i[f-1]===s[E-2]&&i[f-2]===s[E-1]){const P=u[(f-2)%3][E-2];U=Math.min(U,P+1)}U<v&&(v=U),h[E]=U}if(v>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 ic(e){return`"${e.replace(sc,oc)}"`}const sc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function oc(e){return ac[e.charCodeAt(0)]}const ac=["\\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=Vs){const r=new Map;for(const P of Object.values(l))r.set(P,xt(t,P));let i,s=Array.isArray(e),o=[e],a=-1,u=[],c=e,f,d;const h=[],v=[];do{a++;const P=a===o.length,z=P&&u.length!==0;if(P){if(f=v.length===0?void 0:h[h.length-1],c=d,d=v.pop(),z)if(s){c=c.slice();let Q=0;for(const[V,C]of u){const k=V-Q;C===null?(c.splice(k,1),Q++):c[k]=C}}else{c=Object.defineProperties({},Object.getOwnPropertyDescriptors(c));for(const[Q,V]of u)c[Q]=V}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,M;Dr(c)||K(!1,`Invalid AST Node: ${I(c)}.`);const Q=P?(E=r.get(c.kind))===null||E===void 0?void 0:E.leave:(M=r.get(c.kind))===null||M===void 0?void 0:M.enter;if(Z=Q==null?void 0:Q.call(t,c,f,d,h,v),Z===St)break;if(Z===!1){if(!P){h.pop();continue}}else if(Z!==void 0&&(u.push([f,Z]),!P))if(Dr(Z))c=Z;else{h.pop();continue}}if(Z===void 0&&z&&u.push([f,c]),P)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&&v.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 uc(e,t,n){const{enter:r,leave:i}=xt(e,t);return n?i:r}function ce(e){return Gt(e,lc)}const cc=80,lc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>q(e.definitions,`
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
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(`(
|
|
29
|
-
`,Fn(j(n,`
|
|
17
|
+
`)},OperationDefinition:{leave(e){const t=ee("(",q(e.variableDefinitions,", "),")"),n=q([e.operation,q([e.name,t]),q(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+ee(" = ",n)+ee(" ",q(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("(",q(n,", "),")");return o.length>cc&&(o=s+ee(`(
|
|
18
|
+
`,Fn(q(n,`
|
|
30
19
|
`)),`
|
|
31
|
-
)`)),
|
|
32
|
-
`)+
|
|
33
|
-
`)+
|
|
34
|
-
`)+
|
|
20
|
+
)`)),q([o,q(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ee(" ",q(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>q(["...",ee("on ",e),q(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${ee("(",q(n,", "),")")} on ${t} ${ee("",q(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?js(e):ic(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+q(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+q(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ee("(",q(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,`
|
|
21
|
+
`)+q(["schema",q(t," "),Ge(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
|
|
22
|
+
`)+q(["scalar",t,q(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
|
|
23
|
+
`)+q(["type",t,ee("implements ",q(n," & ")),q(r," "),Ge(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>ee("",e,`
|
|
35
24
|
`)+t+(qi(n)?ee(`(
|
|
36
|
-
`,Fn(
|
|
25
|
+
`,Fn(q(n,`
|
|
37
26
|
`)),`
|
|
38
|
-
)`):ee("(",
|
|
39
|
-
`)+
|
|
40
|
-
`)+
|
|
41
|
-
`)+
|
|
42
|
-
`)+
|
|
43
|
-
`)+
|
|
44
|
-
`)+
|
|
27
|
+
)`):ee("(",q(n,", "),")"))+": "+r+ee(" ",q(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>ee("",e,`
|
|
28
|
+
`)+q([t+": "+n,ee("= ",r),q(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>ee("",e,`
|
|
29
|
+
`)+q(["interface",t,ee("implements ",q(n," & ")),q(r," "),Ge(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>ee("",e,`
|
|
30
|
+
`)+q(["union",t,q(n," "),ee("= ",q(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>ee("",e,`
|
|
31
|
+
`)+q(["enum",t,q(n," "),Ge(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>ee("",e,`
|
|
32
|
+
`)+q([t,q(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>ee("",e,`
|
|
33
|
+
`)+q(["input",t,q(n," "),Ge(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>ee("",e,`
|
|
45
34
|
`)+"directive @"+t+(qi(n)?ee(`(
|
|
46
|
-
`,Fn(
|
|
35
|
+
`,Fn(q(n,`
|
|
47
36
|
`)),`
|
|
48
|
-
)`):ee("(",
|
|
49
|
-
`,Fn(
|
|
37
|
+
)`):ee("(",q(n,", "),")"))+(r?" repeatable":"")+" on "+q(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>q(["extend schema",q(e," "),Ge(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>q(["extend scalar",e,q(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend type",e,ee("implements ",q(t," & ")),q(n," "),Ge(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>q(["extend interface",e,ee("implements ",q(t," & ")),q(n," "),Ge(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>q(["extend union",e,q(t," "),ee("= ",q(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>q(["extend enum",e,q(t," "),Ge(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>q(["extend input",e,q(t," "),Ge(n)]," ")}};function q(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
|
+
`,Fn(q(e,`
|
|
50
39
|
`)),`
|
|
51
40
|
}`)}function ee(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Fn(e){return ee(" ",e.replace(/\n/g,`
|
|
52
41
|
`))}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.
|
|
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 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||K(!1,"Must provide name."),typeof e=="string"||K(!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(!Ps(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 zs(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 fc(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 dc(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 Xs(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 Ws(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 pc(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 hc(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 mc(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 yc(e){if(!le(e))throw new Error(`Expected ${I(e)} to be a GraphQL List type.`);return e}function H(e){return ze(e,W)}function vc(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 Ec(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 gc(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 Tc(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 bc(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 _c(e){if(!We(e))throw new Error(`Expected ${I(e)} to be a GraphQL abstract type.`);return e}class we{constructor(t){yn(t)||K(!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 W{constructor(t){Xr(t)||K(!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 Nc(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 Ks(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 Ic(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"||K(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${I(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||K(!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"||K(!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=()=>eo(t),this._interfaces=()=>Zs(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||K(!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:no(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Zs(e){var t;const n=Kr((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||K(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function eo(e){const t=Zr(e.fields);return kt(t)||K(!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)||K(!1,`${e.name}.${r} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||K(!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)||K(!1,`${e.name}.${r} args must be an object with argument names as keys.`),{name:Ve(r),description:n.description,type:n.type,args:to(s),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:Be(n.extensions),astNode:n.astNode}})}function to(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 no(e){return it(e,t=>({description:t.description,type:t.type,args:ro(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function ro(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=eo.bind(void 0,t),this._interfaces=Zs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||K(!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:no(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=wc.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||K(!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 wc(e){const t=Kr(e.types);return Array.isArray(t)||K(!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=Oc(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 Oc(e,t){return kt(t)||K(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,r])=>(kt(r)||K(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${I(r)}.`),{name:zs(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=Ac.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 Ac(e){const t=Zr(e.fields);return kt(t)||K(!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)||K(!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,io=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}}),so=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,io,so,$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 Dc(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)||K(!1,`@${t.name} locations must be an Array.`);const i=(r=t.args)!==null&&r!==void 0?r:{};Me(i)&&!Array.isArray(i)||K(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=to(i)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:ro(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 W($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 W($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 W(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 W(new we(new W(Pe))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new W(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 W(new we(new W(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.
|
|
54
43
|
|
|
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(`
|
|
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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isRepeatable:{type:new W($e),resolve:e=>e.isRepeatable},locations:{type:new W(new we(new W(ui))),resolve:e=>e.locations},args:{type:new W(new we(new W(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 W(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 W(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 W(Pe)),resolve(e){if(te(e)||re(e))return e.getInterfaces()}},possibleTypes:{type:new we(new W(Pe)),resolve(e,t,n,{schema:r}){if(We(e))return r.getPossibleTypes(e)}},enumValues:{type:new we(new W(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 W(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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},args:{type:new W(new we(new W(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 W(Pe),resolve:e=>e.type},isDeprecated:{type:new W($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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},type:{type:new W(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 W($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 W(me),resolve:e=>e.name},description:{type:me,resolve:e=>e.description},isDeprecated:{type:new W($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 W(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 W(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 W(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 oo(e){return ze(e,Qt)}function di(e){if(!oo(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)||K(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||K(!1,`"types" must be Array if provided but got: ${I(t.types)}.`),!t.directives||Array.isArray(t.directives)||K(!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||K(!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 Sc(e);Rc(t),Lc(t),kc(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(`
|
|
56
45
|
|
|
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(`
|
|
46
|
+
`))}class Sc{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 Rc(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 Lc(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 kc(e){const t=Vc(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)?$c(e,r):ge(r)?Cc(e,r):fe(r)&&(Mc(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,xc(e,t,r),Fc(e,t,r)}}function Fc(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,v=f.args.find(E=>E.name===h);if(!v){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,v.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(v.type)}.`,[(o=d.astNode)===null||o===void 0?void 0:o.type,(a=v.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 xc(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 $c(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 Cc(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 Mc(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 Vc(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 W(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??Uc,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 Uc(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 Pc(e){return Ei(e)||gi(e)||Ti(e)}function Ei(e){return e.kind===l.OPERATION_DEFINITION||e.kind===l.FRAGMENT_DEFINITION}function jc(e){return e.kind===l.FIELD||e.kind===l.FRAGMENT_SPREAD||e.kind===l.INLINE_FRAGMENT}function ao(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 ao(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 qc(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 uo(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 co(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",Bc(i,n,s));o===""&&(o=st(Gc(n,s))),e.reportError(new _(`Cannot query field "${s}" on type "${n.name}".`+o,{nodes:t}))}}}}function Bc(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 Gc(e,t){if(te(e)||re(e)){const n=Object.keys(e.getFields());return mt(t,n)}return[]}function lo(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 fo(e){return{...po(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 po(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=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||ye(!1),t.kind){case l.OPERATION_DEFINITION:return Yc(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 Yc(e){switch(e){case be.QUERY:return G.QUERY;case be.MUTATION:return G.MUTATION;case be.SUBSCRIPTION:return G.SUBSCRIPTION}}function ho(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,v=h!=null&&Jc(h);if(v&&Ji.includes(f))return;const E=mt(f,v?Ji.concat(i):i);e.reportError(new _(`Unknown type "${f}".`+st(E),{nodes:s}))}}}}const Ji=[...gn,..._n].map(e=>e.name);function Jc(e){return"kind"in e&&(gi(e)||Ti(e))}function mo(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 yo(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 vo(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(v=>'"'+v.name.value+'"').join(", ");e.reportError(new _(`Cannot spread fragment "${c}" within itself`+(h!==""?` via ${h}.`:"."),{nodes:d}))}n.pop()}r[o]=void 0}}}function Eo(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 go(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 To(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:Hc(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 Hc(e){return e.map(t=>({...t,value:cr(t.value)})).sort((t,n)=>mn(t.name.value,n.name.value))}function bo(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+bo(n)).join(" and "):e}function _o(e){const t=new Zc,n=new Map;return{SelectionSet(r){const i=zc(e,n,t,e.getParentType(),r);for(const[[s,o],a,u]of i){const c=bo(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 zc(e,t,n,r,i){const s=[],[o,a]=Gn(e,t,r,i);if(Wc(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 v of h)Bn(e,t,n,r,i,s,v);for(const v of f)Bn(e,t,n,r,i,v,o)}function Xc(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 v of h)qn(e,u,t,n,r,c,v);for(const v of f)qn(e,u,t,n,r,d,v);for(const v of f)for(const E of h)Bn(e,u,t,n,r,v,E);return u}function Wc(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=No(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=No(e,n,r,i,a,f,d);h&&t.push(h)}}}function No(e,t,n,r,i,s,o){const[a,u,c]=s,[f,d,h]=o,v=r||a!==f&&te(a)&&te(f);if(!v){const z=u.name.value,Z=d.name.value;if(z!==Z)return[[i,`"${z}" and "${Z}" are different fields`],[u],[d]];if(Hi(u)!==Hi(d))return[[i,"they have differing arguments"],[u],[d]]}const E=c==null?void 0:c.type,M=h==null?void 0:h.type;if(E&&M&&Fr(E,M))return[[i,`they return conflicting types "${I(E)}" and "${I(M)}"`],[u],[d]];const U=u.selectionSet,P=d.selectionSet;if(U&&P){const z=Xc(e,t,n,v,Re(E),U,Re(M),P);return Kc(z,i,u,d)}}function Hi(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 ce(cr(r))}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);Io(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 Io(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;Io(e,a,s.selectionSet,r,i);break}}}function Kc(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 Zc{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 wo(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=el(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 el(e,t){const n=e.getFragment(t);if(n){const r=Fe(e.getSchema(),n.typeCondition);if(tt(r))return r}}function Oo(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=tl[o.kind]:a&&(u=nl(a)),u){if(u!==i.kind){const c=rl(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 tl={[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 nl(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 rl(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 Ao(e){return{...Do(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 Do(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(il),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(v=>v.name.value));for(const[v,E]of Object.entries(c))if(!h.has(v)){const M=yn(E.type)?I(E.type):ce(E.type);e.reportError(new _(`Directive "@${u}" argument "${v}" of type "${M}" is required, but it was not provided.`,{nodes:a}))}}}}}}function il(e){return e.type.kind===l.NON_NULL_TYPE&&e.defaultValue==null}function So(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 Ro(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 Lo(e,t,n=sl){return Kt(e,t,n,void 0)}function sl(e,t,n){let r="Invalid value "+I(t);throw e.length>0&&(r+=` at "value${Ro(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 ko(e,t,n,r){const i=[],s=r==null?void 0:r.maxErrors;try{const o=ol(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 ol(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(!Fo(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]=Lo(u,a,(c,f,d)=>{let h=`Variable "$${o}" got invalid value `+I(f);c.length>0&&(h+=` at "${o}${Ro(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=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||!Fo(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 v=Xe(d,c,n);if(v===void 0)throw new _(`Argument "${u}" has invalid value ${ce(d)}.`,{nodes:d});i[u]=v}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 Fo(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 al(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=ul(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 ul(e){return e.alias?e.alias.value:e.name.value}function xo(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 $o(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 Co(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 Mo(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 Vo(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;cl(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 cl(e,t){return te(e)||re(e)||fe(e)?e.getFields()[t]!=null:!1}function Uo(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 Po(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 jo(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 qo(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=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 Go(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 Qo(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 Yo(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&&!ll(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 ll(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 Jo=Object.freeze([uo,Po,mo,xo,_i,lo,Qo,So,co,Uo,ho,go,wo,vo,Bo,Eo,To,bi,Ai,fo,Oi,Go,Ao,Yo,_o,Di]),fl=Object.freeze([yo,jo,qo,Mo,Vo,$o,Co,_i,bi,Ai,Oo,po,Oi,Di,Do]);class Ho{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 dl extends Ho{constructor(t,n,r){super(t,r),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class zo extends Ho{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 Xo(e,t,n=Jo,r,i=new yi(e)){var s;const o=(s=r==null?void 0:r.maxErrors)!==null&&s!==void 0?s:100;t||K(!1,"Must provide document."),hi(e);const a=Object.freeze({}),u=[],c=new zo(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 Wo(e,t,n=fl){const r=[],i=new dl(e,t,o=>{r.push(o)}),s=n.map(o=>o(i));return Gt(e,zr(s)),r}function pl(e){const t=Wo(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
|
|
58
47
|
|
|
59
|
-
`))}function
|
|
48
|
+
`))}function hl(e,t){const n=Wo(e,t);if(n.length!==0)throw new Error(n.map(r=>r.message).join(`
|
|
60
49
|
|
|
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`
|
|
50
|
+
`))}function ml(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 yl(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 vl(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 El(e){return e instanceof Error?e:new gl(e)}class gl 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=El(e);return Tl(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 Tl(e){return Array.isArray(e.path)}const bl=ml((e,t,n)=>al(e.schema,e.fragments,e.variableValues,t,n));function fr(e){arguments.length<2||K(!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;Zo(t,n,r);const s=ea(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=_l(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 Ko(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 Zo(e,t,n){t||K(!1,"Must provide document."),hi(e),n==null||Me(n)||K(!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 ea(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 v=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:v[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:[],M=ko(r,E,a??{},{maxErrors:50});return M.errors?M.errors:{schema:r,fragments:v,rootValue:s,contextValue:o,operation:h,variableValues:M.coerced,fieldResolver:c??Cr,typeResolver:f??ra,subscribeFieldResolver:d??Cr,errors:[]}}function _l(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 Nl(e,r,n,s,i);case be.SUBSCRIPTION:return Yn(e,r,n,s,i)}}function Nl(e,t,n,r,i){return vl(i.entries(),(s,[o,a])=>{const u=Vt(r,o,t.name),c=ta(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;for(const[a,u]of i.entries()){const c=Vt(r,a,t.name),f=ta(e,t,n,u,c);f!==void 0&&(s[a]=f,Ce(f)&&(o=!0))}return o?yl(s):s}function ta(e,t,n,r,i){var s;const o=ia(e.schema,t,r[0]);if(!o)return;const a=o.type,u=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=na(e,o,r,t,i);try{const f=lr(o,r[0],e.variableValues),d=e.contextValue,h=u(n,f,d,c);let v;return Ce(h)?v=h.then(E=>dn(e,a,r,c,i,E)):v=dn(e,a,r,c,i,h),Ce(v)?v.then(void 0,E=>{const M=Ut(E,r,xe(i));return Jn(M,a,e)}):v}catch(f){const d=Ut(f,r,xe(i));return Jn(d,a,e)}}function na(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 Il(e,t,n,r,i,s);if(et(t))return wl(t,s);if(We(t))return Ol(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 Il(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(v=>dn(e,o,n,r,d,v)):h=dn(e,o,n,r,d,c),Ce(h)?(a=!0,h.then(void 0,v=>{const E=Ut(v,n,xe(d));return Jn(E,o,e)})):h}catch(h){const v=Ut(h,n,xe(d));return Jn(v,o,e)}});return a?Promise.all(u):u}function wl(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 Ol(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,Wi(f,e,t,n,r,s),n,r,i,s)):$r(e,Wi(c,e,t,n,r,s),n,r,i,s)}function Wi(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=bl(e,t,n);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,r);if(Ce(a))return a.then(u=>{if(!u)throw Ki(t,s,n);return Yn(e,t,s,i,o)});if(!a)throw Ki(t,s,n)}return Yn(e,t,s,i,o)}function Ki(e,t,n){return new _(`Expected value of type "${e.name}" but got: ${I(t)}.`,{nodes:n})}const ra=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 ia(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 Al(e){return new Promise(t=>t(sa(e)))}function Dl(e){const t=sa(e);if(Ce(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function sa(e){arguments.length<2||K(!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=Xo(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 oa(e){return typeof(e==null?void 0:e[Symbol.asyncIterator])=="function"}function Sl(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 Rl(e){arguments.length<2||K(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const t=await aa(e);return oa(t)?Sl(t,r=>fr({...e,rootValue:r})):t}function Ll(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 aa(...e){const t=Ll(e),{schema:n,document:r,variableValues:i}=t;Zo(n,r,i);const s=ea(t);if(!("schema"in s))return{errors:s};try{const o=await kl(s);if(!oa(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 kl(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=ia(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=na(e,f,c,o,d);try{var v;const E=lr(f,c[0],i),M=e.contextValue,P=await((v=f.subscribe)!==null&&v!==void 0?v:e.subscribeFieldResolver)(s,E,M,h);if(P instanceof Error)throw P;return P}catch(E){throw Ut(E,c,xe(d))}}function Fl(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 xl(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 ua(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`
|
|
62
51
|
query IntrospectionQuery {
|
|
63
52
|
__schema {
|
|
64
53
|
${s}
|
|
@@ -147,14 +136,6 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
147
136
|
ofType {
|
|
148
137
|
kind
|
|
149
138
|
name
|
|
150
|
-
ofType {
|
|
151
|
-
kind
|
|
152
|
-
name
|
|
153
|
-
ofType {
|
|
154
|
-
kind
|
|
155
|
-
name
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
139
|
}
|
|
159
140
|
}
|
|
160
141
|
}
|
|
@@ -163,21 +144,21 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
163
144
|
}
|
|
164
145
|
}
|
|
165
146
|
}
|
|
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(`
|
|
147
|
+
`}function $l(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 Cl(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 Ml(e,t){const n={specifiedByUrl:!0,directiveIsRepeatable:!0,schemaDescription:!0,inputValueDeprecation:!0,...t},r=tr(ua(n)),i=Ko({schema:e,document:r});return!i.errors&&i.data||ye(!1),i.data}function Vl(e,t){Me(e)&&Me(e.__schema)||K(!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,y=>y.name,y=>h(y));for(const y of[...gn,..._n])r[y.name]&&(r[y.name]=y);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(L):[];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(y){if(y.kind===se.LIST){const g=y.ofType;if(!g)throw new Error("Decorated type deeper than introspection query.");return new we(u(g))}if(y.kind===se.NON_NULL){const g=y.ofType;if(!g)throw new Error("Decorated type deeper than introspection query.");const j=u(g);return new W(Ks(j))}return c(y)}function c(y){const g=y.name;if(!g)throw new Error(`Unknown type reference: ${I(y)}.`);const j=r[g];if(!j)throw new Error(`Invalid or incomplete schema, unknown type: ${g}. Ensure that a full introspection query is used in order to build a client schema.`);return j}function f(y){return Xs(c(y))}function d(y){return Ws(c(y))}function h(y){if(y!=null&&y.name!=null&&y.kind!=null)switch(y.kind){case se.SCALAR:return v(y);case se.OBJECT:return M(y);case se.INTERFACE:return U(y);case se.UNION:return P(y);case se.ENUM:return z(y);case se.INPUT_OBJECT:return Z(y)}const g=I(y);throw new Error(`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${g}.`)}function v(y){return new nt({name:y.name,description:y.description,specifiedByURL:y.specifiedByURL})}function E(y){if(y.interfaces===null&&y.kind===se.INTERFACE)return[];if(!y.interfaces){const g=I(y);throw new Error(`Introspection result missing interfaces: ${g}.`)}return y.interfaces.map(d)}function M(y){return new je({name:y.name,description:y.description,interfaces:()=>E(y),fields:()=>Q(y)})}function U(y){return new $t({name:y.name,description:y.description,interfaces:()=>E(y),fields:()=>Q(y)})}function P(y){if(!y.possibleTypes){const g=I(y);throw new Error(`Introspection result missing possibleTypes: ${g}.`)}return new Ct({name:y.name,description:y.description,types:()=>y.possibleTypes.map(f)})}function z(y){if(!y.enumValues){const g=I(y);throw new Error(`Introspection result missing enumValues: ${g}.`)}return new ht({name:y.name,description:y.description,values:ft(y.enumValues,g=>g.name,g=>({description:g.description,deprecationReason:g.deprecationReason}))})}function Z(y){if(!y.inputFields){const g=I(y);throw new Error(`Introspection result missing inputFields: ${g}.`)}return new Mt({name:y.name,description:y.description,fields:()=>C(y.inputFields)})}function Q(y){if(!y.fields)throw new Error(`Introspection result missing fields: ${I(y)}.`);return ft(y.fields,g=>g.name,V)}function V(y){const g=u(y.type);if(!pt(g)){const j=I(g);throw new Error(`Introspection must provide output type for fields, but received: ${j}.`)}if(!y.args){const j=I(y);throw new Error(`Introspection result missing field args: ${j}.`)}return{description:y.description,deprecationReason:y.deprecationReason,type:g,args:C(y.args)}}function C(y){return ft(y,g=>g.name,k)}function k(y){const g=u(y.type);if(!ke(g)){const X=I(g);throw new Error(`Introspection must provide input type for arguments, but received: ${X}.`)}const j=y.defaultValue!=null?Xe(Js(y.defaultValue),g):void 0;return{description:y.description,type:g,defaultValue:j,deprecationReason:y.deprecationReason}}function L(y){if(!y.args){const g=I(y);throw new Error(`Introspection result missing directive args: ${g}.`)}if(!y.locations){const g=I(y);throw new Error(`Introspection result missing directive locations: ${g}.`)}return new rt({name:y.name,description:y.description,isRepeatable:y.isRepeatable,locations:y.locations.slice(),args:C(y.args)})}}function Ul(e,t,n){di(e),t!=null&&t.kind===l.DOCUMENT||K(!1,"Must provide valid Document AST."),(n==null?void 0:n.assumeValid)!==!0&&(n==null?void 0:n.assumeValidSDL)!==!0&&hl(t,e);const r=e.toConfig(),i=ca(r,t,n);return r===i?e:new Qt(i)}function ca(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]=z(p);for(const p of a){var v;const S=p.name.value;h[S]=(v=Zi[S])!==null&&v!==void 0?v:R(p)}const E={query:e.query&&U(e.query),mutation:e.mutation&&U(e.mutation),subscription:e.subscription&&U(e.subscription),...f&&j([f]),...j(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(P),...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 M(p){return le(p)?new we(M(p.ofType)):H(p)?new W(M(p.ofType)):U(p)}function U(p){return h[p.name]}function P(p){const S=p.toConfig();return new rt({...S,args:it(S.args,g)})}function z(p){if(wt(p)||ir(p))return p;if(Ue(p))return V(p);if(te(p))return C(p);if(re(p))return k(p);if(Ne(p))return L(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(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new Mt({...O,fields:()=>({...it(O.fields,x=>({...x,type:M(x.type)})),...T(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function Q(p){var S;const O=p.toConfig(),F=(S=u[p.name])!==null&&S!==void 0?S:[];return new ht({...O,values:{...O.values,...w(F)},extensionASTNodes:O.extensionASTNodes.concat(F)})}function V(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];let x=O.specifiedByURL;for(const J of F){var Y;x=(Y=es(J))!==null&&Y!==void 0?Y:x}return new nt({...O,specifiedByURL:x,extensionASTNodes:O.extensionASTNodes.concat(F)})}function C(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new je({...O,interfaces:()=>[...p.getInterfaces().map(U),...b(F)],fields:()=>({...it(O.fields,y),...A(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function k(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new $t({...O,interfaces:()=>[...p.getInterfaces().map(U),...b(F)],fields:()=>({...it(O.fields,y),...A(F)}),extensionASTNodes:O.extensionASTNodes.concat(F)})}function L(p){var S;const O=p.toConfig(),F=(S=u[O.name])!==null&&S!==void 0?S:[];return new Ct({...O,types:()=>[...p.getTypes().map(U),...D(F)],extensionASTNodes:O.extensionASTNodes.concat(F)})}function y(p){return{...p,type:M(p.type),args:p.args&&it(p.args,g)}}function g(p){return{...p,type:M(p.type)}}function j(p){const S={};for(const F of p){var O;const x=(O=F.operationTypes)!==null&&O!==void 0?O:[];for(const Y of x)S[Y.operation]=X(Y.type)}return S}function X(p){var S;const O=p.name.value,F=(S=Zi[O])!==null&&S!==void 0?S:h[O];if(F===void 0)throw new Error(`Unknown type: "${O}".`);return F}function oe(p){return p.kind===l.LIST_TYPE?new we(oe(p.type)):p.kind===l.NON_NULL_TYPE?new W(oe(p.type)):X(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 x of p){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const J of Y){var F;S[J.name.value]={type:oe(J.type),description:(F=J.description)===null||F===void 0?void 0:F.value,args:B(J.arguments),deprecationReason:Sn(J),astNode:J}}}return S}function B(p){const S=p??[],O=Object.create(null);for(const x of S){var F;const Y=oe(x.type);O[x.name.value]={type:Y,description:(F=x.description)===null||F===void 0?void 0:F.value,defaultValue:Xe(x.defaultValue,Y),deprecationReason:Sn(x),astNode:x}}return O}function T(p){const S=Object.create(null);for(const x of p){var O;const Y=(O=x.fields)!==null&&O!==void 0?O:[];for(const J of Y){var F;const ne=oe(J.type);S[J.name.value]={type:ne,description:(F=J.description)===null||F===void 0?void 0:F.value,defaultValue:Xe(J.defaultValue,ne),deprecationReason:Sn(J),astNode:J}}}return S}function w(p){const S=Object.create(null);for(const x of p){var O;const Y=(O=x.values)!==null&&O!==void 0?O:[];for(const J of Y){var F;S[J.name.value]={description:(F=J.description)===null||F===void 0?void 0:F.value,deprecationReason:Sn(J),astNode:J}}}return S}function b(p){return p.flatMap(S=>{var O,F;return(O=(F=S.interfaces)===null||F===void 0?void 0:F.map(X))!==null&&O!==void 0?O:[]})}function D(p){return p.flatMap(S=>{var O,F;return(O=(F=S.types)===null||F===void 0?void 0:F.map(X))!==null&&O!==void 0?O:[]})}function R(p){var S;const O=p.name.value,F=(S=u[O])!==null&&S!==void 0?S:[];switch(p.kind){case l.OBJECT_TYPE_DEFINITION:{var x;const pe=[p,...F];return new je({name:O,description:(x=p.description)===null||x===void 0?void 0:x.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:F})}case l.INTERFACE_TYPE_DEFINITION:{var Y;const pe=[p,...F];return new $t({name:O,description:(Y=p.description)===null||Y===void 0?void 0:Y.value,interfaces:()=>b(pe),fields:()=>A(pe),astNode:p,extensionASTNodes:F})}case l.ENUM_TYPE_DEFINITION:{var J;const pe=[p,...F];return new ht({name:O,description:(J=p.description)===null||J===void 0?void 0:J.value,values:w(pe),astNode:p,extensionASTNodes:F})}case l.UNION_TYPE_DEFINITION:{var ne;const pe=[p,...F];return new Ct({name:O,description:(ne=p.description)===null||ne===void 0?void 0:ne.value,types:()=>D(pe),astNode:p,extensionASTNodes:F})}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:es(p),astNode:p,extensionASTNodes:F})}case l.INPUT_OBJECT_TYPE_DEFINITION:{var ae;const pe=[p,...F];return new Mt({name:O,description:(ae=p.description)===null||ae===void 0?void 0:ae.value,fields:()=>T(pe),astNode:p,extensionASTNodes:F})}}}}const Zi=ot([...gn,..._n],e=>e.name);function Sn(e){const t=fn(or,e);return t==null?void 0:t.reason}function es(e){const t=fn(ii,e);return t==null?void 0:t.url}function la(e,t){e!=null&&e.kind===l.DOCUMENT||K(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&pl(e);const r=ca({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 Pl(e,t){const n=tr(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return la(n,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}function jl(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 W(r(h.ofType)):i(h)}function i(h){return n[h.name]}function s(h){return h&&i(h)}function o(h){const v=h.toConfig();return new rt({...v,locations:fa(v.locations,E=>E),args:a(v.args)})}function a(h){return Rn(h,v=>({...v,type:r(v.type)}))}function u(h){return Rn(h,v=>({...v,type:r(v.type),args:v.args&&a(v.args)}))}function c(h){return Rn(h,v=>({...v,type:r(v.type)}))}function f(h){return gr(h).map(i)}function d(h){if(Ue(h)||wt(h))return h;if(te(h)){const v=h.toConfig();return new je({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(re(h)){const v=h.toConfig();return new $t({...v,interfaces:()=>f(v.interfaces),fields:()=>u(v.fields)})}if(Ne(h)){const v=h.toConfig();return new Ct({...v,types:()=>f(v.types)})}if(ge(h)){const v=h.toConfig();return new ht({...v,values:Rn(v.values,E=>E)})}if(fe(h)){const v=h.toConfig();return new Mt({...v,fields:()=>c(v.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 fa(e,t=>t.name)}function fa(e,t){return e.slice().sort((n,r)=>{const i=t(n),s=t(r);return mn(i,s)})}function ql(e){return da(e,t=>!si(t),Gl)}function Bl(e){return da(e,si,wt)}function Gl(e){return!ir(e)&&!wt(e)}function da(e,t,n){const r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[Ql(e),...r.map(s=>Zl(s)),...i.map(s=>pa(s))].filter(Boolean).join(`
|
|
167
148
|
|
|
168
|
-
`)}function
|
|
149
|
+
`)}function Ql(e){if(e.description==null&&Yl(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 {
|
|
169
150
|
${t.join(`
|
|
170
151
|
`)}
|
|
171
|
-
}`}function
|
|
152
|
+
}`}function Yl(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 pa(e){if(Ue(e))return Jl(e);if(te(e))return Hl(e);if(re(e))return zl(e);if(Ne(e))return Xl(e);if(ge(e))return Wl(e);if(fe(e))return Kl(e);ye(!1,"Unexpected type: "+I(e))}function Jl(e){return qe(e)+`scalar ${e.name}`+ef(e)}function ha(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Hl(e){return qe(e)+`type ${e.name}`+ha(e)+ma(e)}function zl(e){return qe(e)+`interface ${e.name}`+ha(e)+ma(e)}function Xl(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return qe(e)+"union "+e.name+n}function Wl(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 Kl(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+Mr(n));return qe(e)+`input ${e.name}`+Si(t)}function ma(e){const t=Object.values(e.getFields()).map((n,r)=>qe(n," ",!r)+" "+n.name+ya(n.args," ")+": "+String(n.type)+Ri(n.deprecationReason));return Si(t)}function Si(e){return e.length!==0?` {
|
|
172
153
|
`+e.join(`
|
|
173
154
|
`)+`
|
|
174
|
-
}`:""}function
|
|
155
|
+
}`:""}function ya(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(Mr).join(", ")+")":`(
|
|
175
156
|
`+e.map((n,r)=>qe(n," "+t,!r)+" "+t+Mr(n)).join(`
|
|
176
157
|
`)+`
|
|
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
|
|
158
|
+
`+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 Zl(e){return qe(e)+"directive @"+e.name+ya(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 ef(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:Mu(r)});return(t&&!n?`
|
|
178
159
|
`+t:t)+i.replace(/\n/g,`
|
|
179
160
|
`+t)+`
|
|
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`
|
|
161
|
+
`}function tf(e){const t=[];for(const n of e)t.push(...n.definitions);return{kind:l.DOCUMENT,definitions:t}}function nf(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]=ts(i.selectionSet);break}const r=Object.create(null);for(const i of t){const s=new Set;for(const a of ts(i.selectionSet))va(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 va(e,t,n){if(!e.has(n)){e.add(n);const r=t[n];if(r!==void 0)for(const i of r)va(e,t,i)}}function ts(e){const t=[];return Gt(e,{FragmentSpread(n){t.push(n.name.value)}}),t}function rf(e){const t=Ys(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=!qs(o.kind);s&&(u||o.kind===N.SPREAD)&&(i+=" ");const c=n.slice(o.start,o.end);a===N.BLOCK_STRING?i+=js(o.value,{minimize:!0}):i+=c,s=u}return i}function sf(e){const t=Ea(e);if(t)throw t;return e}function Ea(e){if(typeof e=="string"||K(!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 of(e,t){return ga(e,t).filter(n=>n.type in he)}function af(e,t){return ga(e,t).filter(n=>n.type in Je)}function ga(e,t){return[...cf(e,t),...uf(e,t)]}function uf(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 cf(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(...df(i,s)):Ne(i)&&Ne(s)?n.push(...ff(i,s)):fe(i)&&fe(s)?n.push(...lf(i,s)):te(i)&&te(s)?n.push(...rs(i,s),...ns(i,s)):re(i)&&re(s)?n.push(...rs(i,s),...ns(i,s)):i.constructor!==s.constructor&&n.push({type:he.TYPE_CHANGED_KIND,description:`${i.name} changed from ${is(i)} to ${is(s)}.`});return n}function lf(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 ff(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 df(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 ns(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 rs(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(...pf(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 pf(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=ss(s.defaultValue,s.type),c=ss(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 is(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 ss(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 hf=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:uo,FieldsOnCorrectTypeRule:co,FragmentsOnCompositeTypesRule:lo,GRAPHQL_MAX_INT:xn,GRAPHQL_MIN_INT:$n,GraphQLBoolean:$e,GraphQLDeprecatedDirective:or,GraphQLDirective:rt,GraphQLEnumType:ht,GraphQLError:_,GraphQLFloat:so,GraphQLID:ei,GraphQLIncludeDirective:ti,GraphQLInputObjectType:Mt,GraphQLInt:io,GraphQLInterfaceType:$t,GraphQLList:we,GraphQLNonNull:W,GraphQLObjectType:je,GraphQLScalarType:nt,GraphQLSchema:Qt,GraphQLSkipDirective:ni,GraphQLSpecifiedByDirective:ii,GraphQLString:me,GraphQLUnionType:Ct,get Kind(){return l},KnownArgumentNamesRule:fo,KnownDirectivesRule:bi,KnownFragmentNamesRule:ho,KnownTypeNamesRule:_i,Lexer:Hr,Location:Ms,LoneAnonymousOperationRule:mo,LoneSchemaDefinitionRule:yo,NoDeprecatedCustomRule:Fl,NoFragmentCyclesRule:vo,NoSchemaIntrospectionCustomRule:xl,NoUndefinedVariablesRule:Eo,NoUnusedFragmentsRule:go,NoUnusedVariablesRule:To,get OperationTypeNode(){return be},OverlappingFieldsCanBeMergedRule:_o,PossibleFragmentSpreadsRule:wo,PossibleTypeExtensionsRule:Oo,ProvidedRequiredArgumentsRule:Ao,ScalarLeafsRule:So,SchemaMetaFieldDef:un,SingleFieldSubscriptionsRule:xo,Source:er,Token:Yr,get TokenKind(){return N},TypeInfo:yi,get TypeKind(){return se},TypeMetaFieldDef:cn,TypeNameMetaFieldDef:ln,UniqueArgumentDefinitionNamesRule:$o,UniqueArgumentNamesRule:Oi,UniqueDirectiveNamesRule:Co,UniqueDirectivesPerLocationRule:Ai,UniqueEnumValueNamesRule:Mo,UniqueFieldDefinitionNamesRule:Vo,UniqueFragmentNamesRule:Uo,UniqueInputFieldNamesRule:Di,UniqueOperationNamesRule:Po,UniqueOperationTypesRule:jo,UniqueTypeNamesRule:qo,UniqueVariableNamesRule:Bo,ValidationContext:zo,ValuesOfCorrectTypeRule:Go,VariablesAreInputTypesRule:Qo,VariablesInAllowedPositionRule:Yo,__Directive:ai,__DirectiveLocation:ui,__EnumValue:li,__Field:ci,__InputValue:bn,__Schema:ar,__Type:Pe,__TypeKind:fi,assertAbstractType:_c,assertCompositeType:bc,assertDirective:Dc,assertEnumType:hc,assertEnumValueName:zs,assertInputObjectType:mc,assertInputType:Ec,assertInterfaceType:Ws,assertLeafType:Tc,assertListType:yc,assertName:Ve,assertNamedType:Ic,assertNonNullType:vc,assertNullableType:Ks,assertObjectType:Xs,assertOutputType:gc,assertScalarType:dc,assertSchema:di,assertType:fc,assertUnionType:pc,assertValidName:sf,assertValidSchema:hi,assertWrappingType:Nc,astFromValue:dt,buildASTSchema:la,buildClientSchema:Vl,buildSchema:Pl,coerceInputValue:Lo,concatAST:tf,createSourceEventStream:aa,defaultFieldResolver:Cr,defaultTypeResolver:ra,doTypesOverlap:Lr,execute:fr,executeSync:Ko,extendSchema:Ul,findBreakingChanges:of,findDangerousChanges:af,formatError:Fu,getArgumentValues:lr,getDirectiveValues:fn,getEnterLeaveForKind:xt,getIntrospectionQuery:ua,getLocation:Un,getNamedType:Re,getNullableType:Wr,getOperationAST:$l,getOperationRootType:Cl,getVariableValues:ko,getVisitFn:uc,graphql:Al,graphqlSync:Dl,introspectionFromSchema:Ml,introspectionTypes:_n,isAbstractType:We,isCompositeType:tt,isConstValueNode:kr,isDefinitionNode:Pc,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:oo,isSelectionNode:jc,isSpecifiedDirective:si,isSpecifiedScalarType:ir,isType:yn,isTypeDefinitionNode:Yt,isTypeExtensionNode:ur,isTypeNode:qc,isTypeSubTypeOf:Tt,isTypeSystemDefinitionNode:gi,isTypeSystemExtensionNode:Ti,isUnionType:Ne,isValidNameError:Ea,isValueNode:ao,isWrappingType:vn,lexicographicSortSchema:jl,locatedError:Ut,parse:tr,parseConstValue:Zu,parseType:ec,parseValue:Js,print:ce,printError:ku,printIntrospectionSchema:Bl,printLocation:Cs,printSchema:ql,printSourceLocation:Qr,printType:pa,resolveObjMapThunk:Zr,resolveReadonlyArrayThunk:Kr,responsePathAsArray:xe,separateOperations:nf,specifiedDirectives:vt,specifiedRules:Jo,specifiedScalarTypes:gn,stripIgnoredCharacters:rf,subscribe:Rl,syntaxError:Te,typeFromAST:Fe,validate:Xo,validateSchema:pi,valueFromAST:Xe,valueFromASTUntyped:Pn,version:Du,versionInfo:Su,visit:Gt,visitInParallel:zr,visitWithTypeInfo:vi},Symbol.toStringTag,{value:"Module"})),mf=za(hf);Object.defineProperty(Ft,"__esModule",{value:!0});Ft.resolveRequestDocument=void 0;var os=mf;function as(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 yf(e){if(typeof e=="string"){var t=void 0;try{var n=(0,os.parse)(e);t=as(n)}catch{}return{query:e,operationName:t}}var r=as(e);return{query:(0,os.print)(e),operationName:r}}Ft.resolveRequestDocument=yf;var Xt={},us;function vf(){if(us)return Xt;us=1;var e=ie&&ie.__assign||function(){return e=Object.assign||function(V){for(var C,k=1,L=arguments.length;k<L;k++){C=arguments[k];for(var y in C)Object.prototype.hasOwnProperty.call(C,y)&&(V[y]=C[y])}return V},e.apply(this,arguments)},t=ie&&ie.__awaiter||function(V,C,k,L){function y(g){return g instanceof k?g:new k(function(j){j(g)})}return new(k||(k=Promise))(function(g,j){function X(A){try{m(L.next(A))}catch(B){j(B)}}function oe(A){try{m(L.throw(A))}catch(B){j(B)}}function m(A){A.done?g(A.value):y(A.value).then(X,oe)}m((L=L.apply(V,C||[])).next())})},n=ie&&ie.__generator||function(V,C){var k={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},L,y,g,j;return j={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(j[Symbol.iterator]=function(){return this}),j;function X(m){return function(A){return oe([m,A])}}function oe(m){if(L)throw new TypeError("Generator is already executing.");for(;k;)try{if(L=1,y&&(g=m[0]&2?y.return:m[0]?y.throw||((g=y.return)&&g.call(y),0):y.next)&&!(g=g.call(y,m[1])).done)return g;switch(y=0,g&&(m=[m[0]&2,g.value]),m[0]){case 0:case 1:g=m;break;case 4:return k.label++,{value:m[1],done:!1};case 5:k.label++,y=m[1],m=[0];continue;case 7:m=k.ops.pop(),k.trys.pop();continue;default:if(g=k.trys,!(g=g.length>0&&g[g.length-1])&&(m[0]===6||m[0]===2)){k=0;continue}if(m[0]===3&&(!g||m[1]>g[0]&&m[1]<g[3])){k.label=m[1];break}if(m[0]===6&&k.label<g[1]){k.label=g[1],g=m;break}if(g&&k.label<g[2]){k.label=g[2],k.ops.push(m);break}g[2]&&k.ops.pop(),k.trys.pop();continue}m=C.call(V,k)}catch(A){m=[6,A],y=0}finally{L=g=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",v=function(){function V(C,k,L){this._type=C,this._payload=k,this._id=L}return Object.defineProperty(V.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"text",{get:function(){var C={type:this.type};return this.id!=null&&this.id!=null&&(C.id=this.id),this.payload!=null&&this.payload!=null&&(C.payload=this.payload),JSON.stringify(C)},enumerable:!1,configurable:!0}),V.parse=function(C,k){var L=JSON.parse(C),y=L.type,g=L.payload,j=L.id;return new V(y,k(g),j)},V}(),E=function(){function V(C,k){var L=k.onInit,y=k.onAcknowledged,g=k.onPing,j=k.onPong,X=this;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=C,C.onopen=function(oe){return t(X,void 0,void 0,function(){var m,A,B,T;return n(this,function(w){switch(w.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},A=(m=C).send,B=U,L?[4,L()]:[3,2];case 1:return T=w.sent(),[3,3];case 2:T=null,w.label=3;case 3:return A.apply(m,[B.apply(void 0,[T]).text]),[2]}})})},C.onclose=function(oe){X.socketState.acknowledged=!1,X.socketState.subscriptions={}},C.onerror=function(oe){console.error(oe)},C.onmessage=function(oe){try{var m=M(oe.data);switch(m.type){case o:{X.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(X.socketState.acknowledged=!0,y&&y(m.payload));return}case a:{g?g(m.payload).then(function(b){return C.send(z(b).text)}):C.send(z(null).text);return}case u:{j&&j(m.payload);return}}if(!X.socketState.acknowledged||m.id===void 0||m.id===null||!X.socketState.subscriptions[m.id])return;var A=X.socketState.subscriptions[m.id],B=A.query,T=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:T}));return}case d:{w.error&&w.error(new r.ClientError({errors:m.payload,status:200},{query:B,variables:T}));return}case h:{w.complete&&w.complete(),delete X.socketState.subscriptions[m.id];return}}}catch(b){console.error(b),C.close(1006)}C.close(4400,"Unknown graphql-ws message.")}}return V.prototype.makeSubscribe=function(C,k,L,y){var g=this,j=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[j]={query:C,variables:y,subscriber:L},this.socket.send(Z(j,{query:C,operationName:k,variables:y}).text),function(){g.socket.send(Q(j).text),delete g.socketState.subscriptions[j]}},V.prototype.rawRequest=function(C,k){var L=this;return new Promise(function(y,g){var j;L.rawSubscribe(C,{next:function(X,oe){return j={data:X,extensions:oe}},error:g,complete:function(){return y(j)}},k)})},V.prototype.request=function(C,k){var L=this;return new Promise(function(y,g){var j;L.subscribe(C,{next:function(X){return j=X},error:g,complete:function(){return y(j)}},k)})},V.prototype.subscribe=function(C,k,L){var y=(0,i.resolveRequestDocument)(C),g=y.query,j=y.operationName;return this.makeSubscribe(g,j,k,L)},V.prototype.rawSubscribe=function(C,k,L){return this.makeSubscribe(C,void 0,k,L)},V.prototype.ping=function(C){this.socket.send(P(C).text)},V.prototype.close=function(){this.socket.close(1e3)},V.PROTOCOL="graphql-transport-ws",V}();Xt.GraphQLWebSocketClient=E;function M(V,C){C===void 0&&(C=function(L){return L});var k=v.parse(V,C);return k}function U(V){return new v(s,V)}function P(V){return new v(a,V,void 0)}function z(V){return new v(u,V,void 0)}function Z(V,C){return new v(c,C,V)}function Q(V){return new v(h,void 0,V)}return Xt}(function(e){var t=ie&&ie.__assign||function(){return t=Object.assign||function(T){for(var w,b=1,D=arguments.length;b<D;b++){w=arguments[b];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(T[R]=w[R])}return T},t.apply(this,arguments)},n=ie&&ie.__createBinding||(Object.create?function(T,w,b,D){D===void 0&&(D=b);var R=Object.getOwnPropertyDescriptor(w,b);(!R||("get"in R?!w.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return w[b]}}),Object.defineProperty(T,D,R)}:function(T,w,b,D){D===void 0&&(D=b),T[D]=w[b]}),r=ie&&ie.__setModuleDefault||(Object.create?function(T,w){Object.defineProperty(T,"default",{enumerable:!0,value:w})}:function(T,w){T.default=w}),i=ie&&ie.__importStar||function(T){if(T&&T.__esModule)return T;var w={};if(T!=null)for(var b in T)b!=="default"&&Object.prototype.hasOwnProperty.call(T,b)&&n(w,T,b);return r(w,T),w},s=ie&&ie.__awaiter||function(T,w,b,D){function R(p){return p instanceof b?p:new b(function(S){S(p)})}return new(b||(b=Promise))(function(p,S){function O(Y){try{x(D.next(Y))}catch(J){S(J)}}function F(Y){try{x(D.throw(Y))}catch(J){S(J)}}function x(Y){Y.done?p(Y.value):R(Y.value).then(O,F)}x((D=D.apply(T,w||[])).next())})},o=ie&&ie.__generator||function(T,w){var b={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},D,R,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(x){return function(Y){return F([x,Y])}}function F(x){if(D)throw new TypeError("Generator is already executing.");for(;b;)try{if(D=1,R&&(p=x[0]&2?R.return:x[0]?R.throw||((p=R.return)&&p.call(R),0):R.next)&&!(p=p.call(R,x[1])).done)return p;switch(R=0,p&&(x=[x[0]&2,p.value]),x[0]){case 0:case 1:p=x;break;case 4:return b.label++,{value:x[1],done:!1};case 5:b.label++,R=x[1],x=[0];continue;case 7:x=b.ops.pop(),b.trys.pop();continue;default:if(p=b.trys,!(p=p.length>0&&p[p.length-1])&&(x[0]===6||x[0]===2)){b=0;continue}if(x[0]===3&&(!p||x[1]>p[0]&&x[1]<p[3])){b.label=x[1];break}if(x[0]===6&&b.label<p[1]){b.label=p[1],p=x;break}if(p&&b.label<p[2]){b.label=p[2],b.ops.push(x);break}p[2]&&b.ops.pop(),b.trys.pop();continue}x=w.call(T,b)}catch(Y){x=[6,Y],R=0}finally{D=p=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},a=ie&&ie.__rest||function(T,w){var b={};for(var D in T)Object.prototype.hasOwnProperty.call(T,D)&&w.indexOf(D)<0&&(b[D]=T[D]);if(T!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,D=Object.getOwnPropertySymbols(T);R<D.length;R++)w.indexOf(D[R])<0&&Object.prototype.propertyIsEnumerable.call(T,D[R])&&(b[D[R]]=T[D[R]]);return b},u=ie&&ie.__spreadArray||function(T,w,b){if(b||arguments.length===2)for(var D=0,R=w.length,p;D<R;D++)(p||!(D in w))&&(p||(p=Array.prototype.slice.call(w,0,D)),p[D]=w[D]);return T.concat(p||Array.prototype.slice.call(w))},c=ie&&ie.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};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(lu),d=f,h=c(Gr),v=pn,E=Le,M=hn;Object.defineProperty(e,"ClientError",{enumerable:!0,get:function(){return M.ClientError}});var U=Ft,P=function(T){var w={};return T&&(typeof Headers<"u"&&T instanceof Headers||d&&d.Headers&&T instanceof d.Headers?w=m(T):Array.isArray(T)?T.forEach(function(b){var D=b[0],R=b[1];w[D]=R}):w=T),w},z=function(T){return T.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},Z=function(T){var w=T.query,b=T.variables,D=T.operationName,R=T.jsonSerializer;if(!Array.isArray(w)){var p=["query=".concat(encodeURIComponent(z(w)))];return b&&p.push("variables=".concat(encodeURIComponent(R.stringify(b)))),D&&p.push("operationName=".concat(encodeURIComponent(D))),p.join("&")}if(typeof b<"u"&&!Array.isArray(b))throw new Error("Cannot create query with given variable type, array expected");var S=w.reduce(function(O,F,x){return O.push({query:z(F),variables:b?R.stringify(b[x]):void 0}),O},[]);return"query=".concat(encodeURIComponent(R.stringify(S)))},Q=function(T){var w=T.url,b=T.query,D=T.variables,R=T.operationName,p=T.headers,S=T.fetch,O=T.fetchOptions,F=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,J;return o(this,function(ne){switch(ne.label){case 0:return x=(0,h.default)(b,D,R,O.jsonSerializer),Y=t({method:"POST",headers:t(t({},typeof x=="string"?{"Content-Type":"application/json"}:{}),p),body:x},O),F?[4,Promise.resolve(F(t(t({},Y),{url:w,operationName:R,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()]}})})},V=function(T){var w=T.url,b=T.query,D=T.variables,R=T.operationName,p=T.headers,S=T.fetch,O=T.fetchOptions,F=T.middleware;return s(void 0,void 0,void 0,function(){var x,Y,J;return o(this,function(ne){switch(ne.label){case 0:return x=Z({query:b,variables:D,operationName:R,jsonSerializer:O.jsonSerializer}),Y=t({method:"GET",headers:p},O),F?[4,Promise.resolve(F(t(t({},Y),{url:w,operationName:R,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(x),Y)];case 3:return[2,ne.sent()]}})})},C=function(){function T(w,b){b===void 0&&(b={}),this.url=w,this.options=b}return T.prototype.rawRequest=function(w,b,D){return s(this,void 0,void 0,function(){var R,p,S,O,F,x,Y,J,ne,ve,ae,pe;return o(this,function(Oe){return R=(0,E.parseRawRequestArgs)(w,b,D),p=this.options,S=p.headers,O=p.fetch,F=O===void 0?f.default:O,x=p.method,Y=x===void 0?"POST":x,J=p.requestMiddleware,ne=p.responseMiddleware,ve=a(p,["headers","fetch","method","requestMiddleware","responseMiddleware"]),ae=this.url,R.signal!==void 0&&(ve.signal=R.signal),pe=(0,U.resolveRequestDocument)(R.query).operationName,[2,k({url:ae,query:R.query,variables:R.variables,headers:t(t({},P(X(S))),P(R.requestHeaders)),operationName:pe,fetch:F,method:Y,fetchOptions:ve,middleware:J}).then(function(Ae){return ne&&ne(Ae),Ae}).catch(function(Ae){throw ne&&ne(Ae),Ae})]})})},T.prototype.request=function(w){for(var b=[],D=1;D<arguments.length;D++)b[D-1]=arguments[D];return s(this,void 0,void 0,function(){var R,p,S,O,F,x,Y,J,ne,ve,ae,pe,Oe,Ae,Jt,Ht;return o(this,function(Nn){return R=b[0],p=b[1],S=(0,E.parseRequestArgs)(w,R,p),O=this.options,F=O.headers,x=O.fetch,Y=x===void 0?f.default:x,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,k({url:Oe,query:Jt,variables:S.variables,headers:t(t({},P(X(F))),P(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})]})})},T.prototype.batchRequests=function(w,b){var D=(0,E.parseBatchRequestArgs)(w,b),R=this.options,p=R.headers,S=R.fetch,O=S===void 0?f.default:S,F=R.method,x=F===void 0?"POST":F,Y=R.requestMiddleware,J=R.responseMiddleware,ne=a(R,["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 k({url:ve,query:ae,variables:pe,headers:t(t({},P(X(p))),P(D.requestHeaders)),operationName:void 0,fetch:O,method:x,fetchOptions:ne,middleware:Y}).then(function(Oe){return J&&J(Oe),Oe.data}).catch(function(Oe){throw J&&J(Oe),Oe})},T.prototype.setHeaders=function(w){return this.options.headers=w,this},T.prototype.setHeader=function(w,b){var D,R=this.options.headers;return R?R[w]=b:this.options.headers=(D={},D[w]=b,D),this},T.prototype.setEndpoint=function(w){return this.url=w,this},T}();e.GraphQLClient=C;function k(T){var w=T.url,b=T.query,D=T.variables,R=T.headers,p=T.operationName,S=T.fetch,O=T.method,F=O===void 0?"POST":O,x=T.fetchOptions,Y=T.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=F.toUpperCase()==="POST"?Q:V,ne=Array.isArray(b),[4,J({url:w,query:b,variables:D,operationName:p,headers:R,fetch:S,fetchOptions:x,middleware:Y})];case 1:return ve=dr.sent(),[4,j(ve,x.jsonSerializer)];case 2:if(ae=dr.sent(),pe=ne&&Array.isArray(ae)?!ae.some(function(ba){var _a=ba.data;return!_a}):!!ae.data,Oe=!ae.errors||x.errorPolicy==="all"||x.errorPolicy==="ignore",ve.ok&&Oe&&pe)return Ae=ve.headers,Jt=ve.status,ae.errors,Ht=a(ae,["errors"]),Nn=x.errorPolicy==="ignore"?Ht:ae,[2,t(t({},ne?{data:Nn}:Nn),{headers:Ae,status:Jt})];throw ut=typeof ae=="string"?{error:ae}:ae,new M.ClientError(t(t({},ut),{status:ve.status,headers:ve.headers}),{query:b,variables:D})}})})}function L(T,w){for(var b=[],D=2;D<arguments.length;D++)b[D-2]=arguments[D];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=E.parseRawRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),p=new C(R.url),[2,p.rawRequest(t({},R))]})})}e.rawRequest=L;function y(T,w){for(var b=[],D=2;D<arguments.length;D++)b[D-2]=arguments[D];return s(this,void 0,void 0,function(){var R,p;return o(this,function(S){return R=E.parseRequestExtendedArgs.apply(void 0,u([T,w],b,!1)),p=new C(R.url),[2,p.request(t({},R))]})})}e.request=y;function g(T,w,b){return s(this,void 0,void 0,function(){var D,R;return o(this,function(p){return D=(0,E.parseBatchRequestsExtendedArgs)(T,w,b),R=new C(D.url),[2,R.batchRequests(t({},D))]})})}e.batchRequests=g,e.default=y;function j(T,w){return w===void 0&&(w=v.defaultJsonSerializer),s(this,void 0,void 0,function(){var b,D,R;return o(this,function(p){switch(p.label){case 0:return T.headers.forEach(function(S,O){O.toLowerCase()==="content-type"&&(b=S)}),b&&(b.toLowerCase().startsWith("application/json")||b.toLowerCase().startsWith("application/graphql+json")||b.toLowerCase().startsWith("application/graphql-response+json"))?(R=(D=w).parse,[4,T.text()]):[3,2];case 1:return[2,R.apply(D,[p.sent()])];case 2:return[2,T.text()]}})})}function X(T){return typeof T=="function"?T():T}function oe(T){for(var w=[],b=1;b<arguments.length;b++)w[b-1]=arguments[b];return T.reduce(function(D,R,p){return"".concat(D).concat(R).concat(p in w?w[p]:"")},"")}e.gql=oe;function m(T){var w={};return T.forEach(function(b,D){w[D]=b}),w}var A=vf();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`
|
|
181
162
|
query GET_HREFLANG_DATA
|
|
182
163
|
@cached
|
|
183
164
|
(ttl: 300)
|
|
@@ -294,15 +275,15 @@ ${t.join(`
|
|
|
294
275
|
season_id
|
|
295
276
|
}
|
|
296
277
|
}
|
|
297
|
-
`;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function
|
|
298
|
-
transform: ${c} translate(${(1-
|
|
299
|
-
opacity: ${u-f*U}`}}const Ln={admin:!1,numberOfAdvertsActive:0};function
|
|
278
|
+
`;function Tr(e){return e==null?void 0:e.filter(t=>t!=null)}function Ef(e){const t=e-1;return t*t*t+1}function Hn(e,{delay:t=0,duration:n=400,easing:r=Ef,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),[v,E]=ki(s);return{delay:t,duration:n,easing:r,css:(M,U)=>`
|
|
279
|
+
transform: ${c} translate(${(1-M)*d}${h}, ${(1-M)*v}${E});
|
|
280
|
+
opacity: ${u-f*U}`}}const Ln={admin:!1,numberOfAdvertsActive:0};function gf(){const{subscribe:e,set:t,update:n}=Ss(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 Tf=gf(),bf="/icon-close.svg",Ta="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 _f(e){Es(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 cs(e){var L,y;let t,n,r,i,s,o=((L=e[0].data)==null?void 0:L.title)+"",a,u,c,f,d=(((y=e[0].data)==null?void 0:y.cta_title)??"Recieve Bonus")+"",h,v,E,M,U,P,z,Z,Q=e[2]&&ls(e);function V(g,j){var X;if((g[0].type==1||g[0].type==4)&&((X=g[0].data)!=null&&X.media))return If;if(g[0].type==2)return Nf}let C=V(e),k=C&&C(e);return{c(){var g;t=de("div"),Q&&Q.c(),n=ct(),k&&k.c(),r=ct(),i=de("div"),s=de("p"),a=ct(),u=de("a"),c=de("button"),f=de("span"),h=sn(d),v=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,M=Ta)||$(E,"src",M),$(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=(g=e[0].data)==null?void 0:g.cta_link),$(u,"target","_blank"),$(u,"rel",`
|
|
300
281
|
noopener
|
|
301
282
|
noreferrer
|
|
302
|
-
`),$(i,"id","main-box"),$(i,"class","svelte-1pquetq"),$(t,"id",
|
|
283
|
+
`),$(i,"id","main-box"),$(i,"class","svelte-1pquetq"),$(t,"id",Of),$(t,"class","svelte-1pquetq")},m(g,j){Ke(g,t,j),Q&&Q.m(t,null),ue(t,n),k&&k.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,v),ue(c,E),Z=!0},p(g,j){var X,oe,m;g[2]?Q?Q.p(g,j):(Q=ls(g),Q.c(),Q.m(t,n)):Q&&(Q.d(1),Q=null),C===(C=V(g))&&k?k.p(g,j):(k&&k.d(1),k=C&&C(g),k&&(k.c(),k.m(t,r))),(!Z||j&1)&&o!==(o=((X=g[0].data)==null?void 0:X.title)+"")&&(s.innerHTML=o),(!Z||j&1)&&d!==(d=(((oe=g[0].data)==null?void 0:oe.cta_title)??"Recieve Bonus")+"")&&_r(h,d),(!Z||j&1&&U!==(U=(m=g[0].data)==null?void 0:m.cta_link))&&$(u,"href",U)},i(g){Z||(g&&bt(()=>{Z&&(z&&z.end(1),P=As(t,Hn,{y:500,duration:500}),P.start())}),Z=!0)},o(g){P&&P.invalidate(),g&&(z=Ds(t,Hn,{y:500,duration:500})),Z=!1},d(g){g&&Se(t),Q&&Q.d(),k&&k.d(),g&&z&&z.end()}}}function ls(e){let t,n,r,i;return{c(){t=de("img"),$(t,"id","close"),He(t.src,n=bf)||$(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=bs(t,"click",e[5]),r=!0)},p:Ye,d(s){s&&Se(t),r=!1,i()}}}function Nf(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 If(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",`
|
|
303
284
|
noopener
|
|
304
285
|
noreferrer
|
|
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
|
|
286
|
+
`)},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 wf(e){let t,n=e[1]&&!e[3]&&cs(e);return{c(){n&&n.c(),t=Ts()},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=cs(r),n.c(),tn(n,1),n.m(t.parentNode,t)):n&&(Pa(),wr(n,1,1,()=>{n=null}),ja())},i(r){tn(n)},o(r){wr(n)},d(r){r&&Se(t),n&&n.d(r)}}}const Of="global⮕widget⮕betarenaAdEngine⮕main",Af=1e4,Df=5e3;function Sf(e,t,n){let r,i;Aa(e,Or,c=>n(4,i=c));let{adData:s}=t,o=!1,a=!1;Ns(()=>{r||(setTimeout(()=>{n(1,o=!0),setTimeout(()=>{n(2,a=!0)},Df)},Af),Tf.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 fs extends jr{constructor(t){super(),Pr(this,t,Sf,wf,Xn,{adData:0},_f)}}function Rf(e){Es(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 Lf(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 kf(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 Ff(e){var C,k;let t,n,r,i,s=((C=e[0].data)==null?void 0:C.title)+"",o,a,u,c,f=(((k=e[0].data)==null?void 0:k.cta_title)??"Recieve Bonus")+"",d,h,v,E,M,U,P,z;function Z(L,y){var g;if((L[0].type==1||L[0].type==4)&&((g=L[0].data)!=null&&g.media))return kf;if(L[0].type==2)return Lf}let Q=Z(e),V=Q&&Q(e);return{c(){var L;t=de("div"),V&&V.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(),v=de("img"),$(i,"id","title"),$(i,"class","svelte-58lxu1"),$(v,"id",""),He(v.src,E=Ta)||$(v,"src",E),$(v,"alt","icon-arrow"),$(v,"title","icon-arrow"),$(v,"loading","lazy"),$(v,"class","m-l-10 "),$(c,"class","svelte-58lxu1"),$(u,"href",M=(L=e[0].data)==null?void 0:L.cta_link),$(u,"target","_blank"),$(u,"rel",`
|
|
306
287
|
noopener
|
|
307
288
|
noreferrer
|
|
308
|
-
`),$(r,"id","main-box"),$(r,"class","svelte-58lxu1"),$(t,"id"
|
|
289
|
+
`),$(r,"id","main-box"),$(r,"class","svelte-58lxu1"),$(t,"id",xf),$(t,"class","svelte-58lxu1")},m(L,y){Ke(L,t,y),V&&V.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,v),z=!0},p(L,[y]){var g,j,X;Q===(Q=Z(L))&&V?V.p(L,y):(V&&V.d(1),V=Q&&Q(L),V&&(V.c(),V.m(t,n))),(!z||y&1)&&s!==(s=((g=L[0].data)==null?void 0:g.title)+"")&&_r(o,s),(!z||y&1)&&f!==(f=(((j=L[0].data)==null?void 0:j.cta_title)??"Recieve Bonus")+"")&&_r(d,f),(!z||y&1&&M!==(M=(X=L[0].data)==null?void 0:X.cta_link))&&$(u,"href",M)},i(L){z||(L&&bt(()=>{z&&(P&&P.end(1),U=As(t,Hn,{y:500,duration:500}),U.start())}),z=!0)},o(L){U&&U.invalidate(),L&&(P=Ds(t,Hn,{y:500,duration:500})),z=!1},d(L){L&&Se(t),V&&V.d(),L&&P&&P.end()}}}const xf="global⮕widget⮕betarenaAdEngineX1⮕main";function $f(e,t,n){let{adData:r}=t;return e.$$set=i=>{"adData"in i&&n(0,r=i.adData)},[r]}class Cf extends jr{constructor(t){super(),Pr(this,t,$f,Ff,Xn,{adData:0},Rf)}}const{document:br}=Da;function Mf(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=Ts(),$(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=bs(window,"resize",e[7]),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 Vf(e,t,n){let{deviceWidthList:r=[768,1024],authorId:i=null,authorArticleTagIds:s=[]}=t,o="desktop",a=null,u=new Map,c=new Map;function f(){var M;const E=document.querySelectorAll("[data-betarena-zone-id]");for(const U of E){const P=(M=U.attributes.getNamedItem("data-betarena-zone-id"))==null?void 0:M.value;P&&u.set(parseInt(P),U)}}async function d(E){if(!document)return;const M=await uu(`${Ya}/ads`,E);console.log("response",M),n(4,c=new Map(M.ads??[]));const U=new Map(M.mapZoneIdToCampaignId),P=new Map(M.mapCampaignIdToCreativeId),z=new Map(M.mapZoneIdToAuthorIds),Z=new Map(M.mapZoneIdToTagIds);for(const[Q,V]of u){if(!a)continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k??[])new Cf({target:V,props:{adData:L}})}if(i||s.length>0){for(const[Q,V]of z){if(!i||!V.includes(i))continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k)new fs({target:document.body,props:{adData:L}})}for(const[Q,V]of Z){if(s.filter(L=>V.includes(L)).length==0)continue;const C=U.get(Q)??[],k=Tr(C.map(L=>{if(P.has(L)){const y=P.get(L);for(const g of y)if(c.has(g))return c.get(g)}}));for(const L of k)new fs({target:document.body,props:{adData:L}})}}}async function h(){n(2,o=Ci()),n(3,a=await cu()),f(),d({deviceType:o,isoCountryCode:"PT",authorId:i,tagIds:s,zoneIds:[...u.keys()]})}Ns(async()=>{Or.useLocalStorage(),await h()});const v=()=>{Ci()};return e.$$set=E=>{"deviceWidthList"in E&&n(6,r=E.deviceWidthList),"authorId"in E&&n(0,i=E.authorId),"authorArticleTagIds"in E&&n(1,s=E.authorArticleTagIds)},[i,s,o,a,c,u,r,v]}class Uf extends jr{constructor(t){super(),Pr(this,t,Vf,Mf,Xn,{deviceWidthList:6,authorId:0,authorArticleTagIds:1})}}typeof document<"u"&&new Uf({target:document.body,props:{authorArticleTagIds:[1]}});
|