@chillicream/nitro-embedded
Version:
Nitro GraphQL IDE
1 lines • 99.1 kB
JavaScript
(()=>{var e={23845:(e,n,t)=>{"use strict";t.d(n,{mF:()=>f,ag:()=>c,hl:()=>a,wL:()=>T.wL,To:()=>T.To,fc:()=>T.fc,HO:()=>I,qB:()=>v,VX:()=>m,QB:()=>h,c7:()=>y,vZ:()=>E,RI:()=>g,_w:()=>u,CZ:()=>T.CZ,MA:()=>T.MA,iW:()=>T.iW,OY:()=>T.OY,R1:()=>T.R1,T2:()=>T.T2,BN:()=>T.BN,fI:()=>T.fI,kf:()=>T.kf});var i,s,o=t(8330);const r=o.QC,a=o.rE,c=null!==(i="Q2xpZW50Cmc5ZjAwOTFmNTY5NmQ0NTZkOWUwZDQ0ZDMzYjJhZDJlOA==")?i:"",l=(o.rE,new RegExp("^https?:\\/\\/.*?\\.(bananacakepop\\.com|chillicream\\.com|chillicream\\.cloud)","i")),d=null!==(s=null===l||void 0===l?void 0:l.test(self.origin))&&void 0!==s&&s,u=navigator.userAgent.indexOf("Electron")>=0,p=d?"cloud":u?"app":"middleware",f="".concat(r,"/").concat(a," (").concat(p,")");(function(){if(navigator.userAgent.indexOf("Win")>=0)return"Windows";if(navigator.userAgent.indexOf("Mac")>=0)return"macOS";if(navigator.userAgent.indexOf("X11")>=0||navigator.userAgent.indexOf("Linux")>=0)return"Linux"})(),function(){const e=navigator.userAgent.toLowerCase();e.includes("mac os")||e.includes("ipad")}();const v="Authorization",m="Content-Type",h="User-Agent",y=/^https?:\/\//i,E=/{{\s*([a-z0-9_\-|.:+#$!?;,]+)\s*}}/gi,I=/graphql-query-plan/i,g=/^_{2}(?!_)/i;var T=t(18370)},50072:(e,n,t)=>{"use strict";t.d(n,{ppT:()=>h.pp,jIU:()=>h.jI,hPE:()=>h.hP,PhU:()=>h.Ph,Gkb:()=>h.Gk,FxT:()=>l,OYB:()=>v,_um:()=>s._u,OfI:()=>s.Of,K6y:()=>i.K6,TES:()=>s.TE,FH2:()=>s.FH,Ac:()=>s.Ac,SWZ:()=>u,BID:()=>p,qaG:()=>f,Sjm:()=>s.Sj,snc:()=>s.sn,WGI:()=>s.WG,qaW:()=>m.q,PHK:()=>s.PH,lKN:()=>s.lK,x_1:()=>o.x,GUQ:()=>m.GU,mkZ:()=>d,qhv:()=>s.qh,LDz:()=>o.L});var i=t(3455),s=t(52396),o=t(37551),r=(t(75885),t(99850)),a=t(28511);let c=function(e){return e.SDL_SCHEMA="sdl-schema",e.STATISTICS="statistics",e.ITEMS="items",e}({}),l=function(e){return e.SDL_FETCH="sdl-fetch",e.SDL_PROBE="sdl-probe",e.INTROSPECTION="introspection",e}({});function d(e,n,t,i){return(0,r.SE)(["schema","schema-attachment"],"readwrite",(async s=>{var o,r,l,d,u,p;const f={endpoint:e,updatedAt:(0,a.tB)(),hash:v(e,t),indexed:!1,hasUploadType:!!n.getType("Upload"),queryTypeName:null!==(o=null===(r=n.getQueryType())||void 0===r?void 0:r.name)&&void 0!==o?o:null,mutationTypeName:null!==(l=null===(d=n.getMutationType())||void 0===d?void 0:d.name)&&void 0!==l?l:null,subscriptionTypeName:null!==(u=null===(p=n.getSubscriptionType())||void 0===p?void 0:p.name)&&void 0!==u?u:null,schemaKind:i};return await Promise.all([s.store.schema.put(f),s.store.schemaAttachment.put({endpoint:e,kind:c.SDL_SCHEMA,value:t}),s.store.schemaAttachment.delete([e,c.ITEMS]),s.store.schemaAttachment.delete([e,c.STATISTICS]),s.done]),f}))}function u(e){const n=(0,a.c9)(e);return(0,r.EL)("schema",n)}async function p(e){const n=(0,a.c9)(e),t=await(0,r.EL)("schema-attachment",[n,c.ITEMS]);return function(e){return!!e&&e.kind===c.ITEMS}(t)?t.value:void 0}async function f(e){const n=(0,a.c9)(e),t=await(0,r.EL)("schema-attachment",[n,c.STATISTICS]);return function(e){return!!e&&e.kind===c.STATISTICS}(t)?t.value:void 0}function v(e,n){return(0,a.n1)(JSON.stringify(["graphql-schema-entity",e,n]))}var m=t(21244),h=(t(85233),t(9416));t(54700),t(57731),t(95616),t(54161),t(55822)},2622:(e,n,t)=>{"use strict";t.d(n,{FH:()=>u,Of:()=>r,Sj:()=>a,WG:()=>p,sn:()=>c});t(75885);var i=t(99850),s=t(65107),o=t(59943);async function r(e,n){return(0,i.SE)(["attachment","item"],"readonly",(async n=>{const t=await n.store.item.get(e);return(0,o.QH)(t)||(0,o.MT)(t)||(0,o.vA)(t)?l(n,t):n.abort("Item does not exist or is not of type API nor Document.")}),n)}async function a(e,n,t){return(0,i.SE)(["attachment","item","workspace"],"readonly",(async t=>{const i=await t.store.item.get(e);if(!((0,o.QH)(i)||(0,o.MT)(i)||(0,o.vA)(i)))return t.abort("Item does not exist or is not of type API nor Document.");if(!n){const e=await l(t,i);return null===e||void 0===e?void 0:e.http}const[s,r]=await Promise.all([l(t,i),d(t,n)]);var a;return s&&r?null!==(a=(0,o.PH)(s,(0,o.CO)(r.variables)))&&void 0!==a?a:void 0:null===s||void 0===s?void 0:s.http}),t)}async function c(e,n){return(0,i.SE)(["attachment","item","workspace"],"readonly",(async n=>{const t=await n.store.item.get(e);if(!((0,o.QH)(t)||(0,o.MT)(t)||(0,o.vA)(t)))return n.abort("Item does not exist or is not of type API nor Document.");let i=null;if(t.workspaceId){var s,r;const e=await n.store.workspace.get(t.workspaceId);i=null!==(s=null===e||void 0===e||null===(r=e.appState)||void 0===r?void 0:r.activeEnvironmentId)&&void 0!==s?s:null}if(!i){const e=await l(n,t);return null===e||void 0===e?void 0:e.http}const[a,c]=await Promise.all([l(n,t),d(n,i)]);var u;return a&&c?null!==(u=(0,o.PH)(a,(0,o.CO)(c.variables)))&&void 0!==u?u:void 0:null===a||void 0===a?void 0:a.http}),n)}async function l(e,n){const t=await e.store.attachment.get([(0,o.Zm)(n)?n.apiId:n.id,s.iQ]);if((0,o.ZO)(t))return t}async function d(e,n){const t=await e.store.attachment.get([n,s.t_]);if((0,o.as)(t))return t}async function u(e,n){return(0,i.SE)(["attachment","item"],"readonly",(n=>Promise.all(e.map((async e=>{const t=await n.store.item.get(e);return(0,o.Gs)(t)?await n.store.attachment.get([e,s.gV]):n.abort("Item does not exist or is not of type API nor Document.")})))),n)}async function p(e){var n,t;return(0,o.CO)(e&&null!==(n=null===(t=await async function(e){return(0,i.ot)((async n=>{const t=await n.get("attachment",[e,s.t_]);if((0,o.as)(t))return t}))}(e))||void 0===t?void 0:t.variables)&&void 0!==n?n:[])}},52396:(e,n,t)=>{"use strict";t.d(n,{_u:()=>c,Of:()=>i.Of,TE:()=>a,FH:()=>i.FH,Ac:()=>l,Sj:()=>i.Sj,sn:()=>i.sn,WG:()=>i.WG,PH:()=>r.PH,lK:()=>r.lK,qh:()=>p.q});t(46114),t(22197),t(13939),t(43351);var i=t(2622),s=(t(62316),t(36022),t(45155),t(49997),t(57928),t(2813),t(32990),t(37669),t(35033),t(75885),t(99850)),o=(t(28511),t(65107)),r=t(59943);function a(e,n){return(0,s.SE)(["attachment","item"],"readonly",(async n=>{const[t,i]=await Promise.all([n.store.item.get(e),n.store.attachment.get([e,o.tx])]);if((0,r.vA)(t)&&(0,r.Q7)(i))return(0,r.Ls)(t,i)}),n)}function c(e){return(0,s.SE)(["item"],"readonly",(n=>d(n,e)))}function l(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),i=1;i<n;i++)t[i-1]=arguments[i];return(0,s.SE)(["item"],"readonly",(n=>d(n,e,(e=>t.includes(e)))))}async function d(e,n,t){const i=[],s={};for await(const l of e.index.item.kind.iterate([n,o.Er])){const n=l.value;if((0,r.Gs)(n)){var a,c;n.parentId&&!s[n.parentId]&&(s[n.parentId]=await u(e,n.path).then((e=>{var n;return null!==(n=null===e||void 0===e?void 0:e.join("/"))&&void 0!==n?n:""})));const o="".concat(n.parentId&&null!==(a=s[n.parentId])&&void 0!==a&&a.length?"".concat(s[n.parentId],"/"):"").concat(n.name);(null===(c=null===t||void 0===t?void 0:t(o))||void 0===c||c)&&i.push({id:n.id,workspaceId:n.workspaceId,name:o,size:n.size})}}return i}async function u(e,n){return Promise.all(n.slice(0,-1).map((async n=>{const t=await e.store.item.get(n);if(!t)throw new Error("Parent does not exist");return t.name})))}t(82545),t(19340),t(37532),t(94120),t(43744);var p=t(5250);t(2091)},65107:(e,n,t)=>{"use strict";t.d(n,{$R:()=>a,AL:()=>m,Er:()=>h,Jz:()=>l,Uj:()=>f,gV:()=>c,hN:()=>u,iQ:()=>i,mv:()=>d,sd:()=>o,sm:()=>v,t_:()=>r,tx:()=>s,wA:()=>p});const i="connection-settings",s="document-content",o="origin-document-content",r="variable-collection",a="origin-variable-collection",c="file-content",l="variable-json-schema",d="api",u="new-api",p="api-document",f="document",v="historical-document",m="new-document",h="file"},59943:(e,n,t)=>{"use strict";t.d(n,{CO:()=>T,Cz:()=>h,Gs:()=>u,Ls:()=>m,MT:()=>a,PH:()=>y,Q7:()=>f,QH:()=>r,ZO:()=>p,Zm:()=>l,as:()=>v,lK:()=>g,vA:()=>c});t(76523),t(5084),t(75885);var i=t(23845),s=(t(99850),t(54700),t(28511)),o=t(65107);function r(e){return(null===e||void 0===e?void 0:e.kind)===o.mv}function a(e){return(null===e||void 0===e?void 0:e.kind)===o.hN}function c(e){return l(e)||d(e)||function(e){return(null===e||void 0===e?void 0:e.kind)===o.sm}(e)||function(e){return(null===e||void 0===e?void 0:e.kind)===o.AL}(e)}function l(e){return(null===e||void 0===e?void 0:e.kind)===o.wA}function d(e){return(null===e||void 0===e?void 0:e.kind)===o.Uj}function u(e){return(null===e||void 0===e?void 0:e.kind)===o.Er}function p(e){return(null===e||void 0===e?void 0:e.kind)===o.iQ}function f(e){return(null===e||void 0===e?void 0:e.kind)===o.tx||(null===e||void 0===e?void 0:e.kind)===o.sd}function v(e){return(null===e||void 0===e?void 0:e.kind)===o.t_||(null===e||void 0===e?void 0:e.kind)===o.$R}function m(e,n){const{itemId:t,kind:i,workspaceId:s,...o}=n;return{...e,...o}}function h(e){const n=(0,s.n1)(JSON.stringify(e.schema));return{...e,hash:n}}function y(e,n){const t=null===e||void 0===e?void 0:e.http;return t?{...t,authentication:E(t.authentication,n),endpoint:g(t.endpoint,n),sdlEndpoint:t.sdlEndpoint?g(t.sdlEndpoint,n):t.sdlEndpoint,sseSubscriptionEndpoint:t.sseSubscriptionEndpoint?g(t.sseSubscriptionEndpoint,n):t.sseSubscriptionEndpoint,subscriptionEndpoint:t.subscriptionEndpoint?g(t.subscriptionEndpoint,n):t.subscriptionEndpoint,headers:t.headers?t.headers.map((e=>({...e,name:g(e.name,n),value:g(e.value,n)}))):t.headers}:null}function E(e,n){if(e)return e?{...e,basicOptions:e.basicOptions?{password:g(e.basicOptions.password,n),username:g(e.basicOptions.username,n)}:void 0,bearerOptions:e.bearerOptions?{prefix:e.bearerOptions.prefix?g(e.bearerOptions.token,n):void 0,token:g(e.bearerOptions.token,n)}:void 0,oAuth2Options:I(e.oAuth2Options,n),headerValue:e.headerValue?g(e.headerValue,n):void 0}:void 0}function I(e,n){return e?{...e,accessTokenUrl:g(e.accessTokenUrl,n),audience:g(e.audience,n),authorizationUrl:g(e.authorizationUrl,n),clientId:g(e.clientId,n),clientSecret:g(e.clientSecret,n),origin:g(e.origin,n),password:g(e.password,n),prefix:g(e.prefix,n),redirectUrl:g(e.redirectUrl,n),resource:g(e.resource,n),scope:g(e.scope,n),state:g(e.state,n),username:g(e.username,n),sessionId:e.sessionId?g(e.sessionId,n):void 0}:void 0}function g(e,n){let t=e;const s=e.matchAll(i.vZ);for(const i of s){var o;t=t.replace(i[0],null!==(o=n.get(i[1]))&&void 0!==o?o:i[0])}return t}function T(e){const n=new Map;for(const{name:t,value:i,enabled:s}of e)s&&n.set(t,i);return n}},5250:(e,n,t)=>{"use strict";t.d(n,{q:()=>r});var i=t(99850),s=t(65107),o=t(59943);async function r(e,n,t){return(0,i.SE)(["attachment","item"],"readwrite",(async t=>{let i=await t.store.item.get(e);if(!(0,o.vA)(i))return t.abort("Item does not exist or is not of type Document.");const r=(0,o.Cz)({itemId:e,workspaceId:i.workspaceId,kind:s.Jz,schema:n});return await t.store.attachment.put(r),r}),t)}},9416:(e,n,t)=>{"use strict";t.d(n,{Gk:()=>d,Hw:()=>i,JZ:()=>o,Ph:()=>u,X:()=>r,hP:()=>l,jI:()=>c,pp:()=>a,wv:()=>s});const i="no-auth",s="bearer",o="oauth2",r="basic",a="graphql-ws",c="auto",l=c,d="graphql-transport-ws",u="graphql-sse"},11081:(e,n,t)=>{"use strict";t.d(n,{AN:()=>o,L2:()=>i.L,hb:()=>d});var i=t(4537),s=(t(78238),t(20709));function o(e,n,t){return new Promise(((i,o)=>{const{unsubscribe:r}=(0,s.fetchQuery)(d,e,n).subscribe({complete:()=>{i(null)},error:()=>{o(),r()},next:e=>{i(e),r()}});null===t||void 0===t||t.addEventListener("abort",(function e(){r(),o(),null===t||void 0===t||t.removeEventListener("abort",e)}))}))}t(62316),t(93967),t(54913),t(75885);var r=t(23845),a=t(28511),c=t(20278),l=t(41192);const d=new s.Environment({network:s.Network.create(((e,n,t)=>s.Observable.from((0,i.L)("/graphql")).mergeMap((t=>s.Observable.create((i=>s.Observable.from(new Promise(((s,o)=>{(async function(t,i){try{const{uri:s,headers:o}=i;o.set(r.VX,"application/json");const c=await fetch(s,{body:JSON.stringify(e.id?{id:e.id,variables:n}:{query:e.text,variables:n}),headers:o,method:"POST"}),d=await(0,l.z)(c);if((0,a.Td)(d))for await(const e of d){if(!e.json){t.error(new Error("Failed to parse part as json."));break}if("data"in e.body&&t.next(e.body),"incremental"in e.body)for(const n of e.body.incremental)if("data"in n)t.next({...n,hasNext:e.body.hasNext});else if(n.items){const i=n.path.slice(0,-1);let s=n.path.at(-1);for(const o of n.items)t.next({...n,path:i.concat(s++),data:o,hasNext:e.body.hasNext})}else t.next({...n,data:n.items,hasNext:e.body.hasNext})}else t.next(await d.json());t.complete()}catch(s){s instanceof Error?t.error(s,!0):t.error(new Error("Unknown error"),!0)}})(i,t).then(s,o)}))).subscribe({})))))),((e,n)=>s.Observable.from((0,i.L)("/graphql")).map((e=>{let{uri:n,headers:t}=e;const i={};return t.forEach(((e,n)=>{i[n]=e})),(0,c.UU)({url:n,headers:i})})).mergeMap((t=>s.Observable.create((i=>{var s,o;const r=t.subscribe({id:null!==(s=e.id)&&void 0!==s?s:void 0,query:null!==(o=e.text)&&void 0!==o?o:"",variables:n},{next:e=>{var n;let{data:t,errors:s,extensions:o}=e;return i.next({data:null!==t&&void 0!==t?t:void 0,errors:null!==(n=null===s||void 0===s?void 0:s.map((e=>{var n;return{message:e.message,locations:null===(n=e.locations)||void 0===n?void 0:n.map((e=>{let{line:n,column:t}=e;return{line:n,column:t}}))}})))&&void 0!==n?n:[],extensions:o})},complete:i.complete,error:e=>{e instanceof Error?i.error(e,!0):i.error(new Error("Unknown error"),!0)}});return{closed:i.closed,unsubscribe:r}})))))),store:new s.Store(new s.RecordSource)});t(77122)},69529:(e,n,t)=>{"use strict";t.d(n,{FG:()=>i.FG,Q8:()=>s.Q8,S5:()=>i.S5,YR:()=>i.YR,g$:()=>i.g$,mv:()=>o.m,sP:()=>i.sP,tB:()=>i.tB,xs:()=>i.xs});var i=t(67466),s=t(97353),o=t(26845)},13295:(e,n,t)=>{"use strict";t.d(n,{N5:()=>r,VJ:()=>s,c:()=>a,tB:()=>o});var i=t(96243);function s(e){return!!e&&"object"===typeof e&&"kind"in e&&Object.values(i.xs).includes(e.kind)}function o(e){return c(e,i.xs.OPERATION_DEFINITION)}function r(e){return c(e,i.xs.FIELD)}function a(e){return c(e,i.xs.DIRECTIVE)}function c(e,n){return!!e&&"object"===typeof e&&"kind"in e&&e.kind===n&&!("isConst"in e)}},96243:(e,n,t)=>{"use strict";t.d(n,{S5:()=>r,Yp:()=>s,hd:()=>o,xs:()=>i});let i=function(e){return e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLES_DEFINITION="VariablesDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT_DICT="ArgumentDict",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.NUMBER="NumberValue",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}({}),s=function(e){return e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.QUESTION_MARK="?",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.BOOLEAN="Boolean",e.NUMBER="Number",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment",e.KEYWORD="Keyword",e.INVALID="Invalid",e}({});const o={Name:[],Document:["definitions"],OperationDefinition:["name","variablesDefinition","directives","selectionSet"],VariablesDefinition:["variableDefinitions"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","argumentDict","directives","selectionSet"],ArgumentDict:["arguments"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","typeCondition","directives","selectionSet"],NumberValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","argumentDict"],NamedType:["name"],ListType:["type"],NonNullType:["type"]};let r=function(e){return e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription",e}({})},67466:(e,n,t)=>{"use strict";t.d(n,{xs:()=>i.xs,sP:()=>B.sP,S5:()=>i.S5,g$:()=>a.g$,Id:()=>a.Id,tB:()=>s.tB,FG:()=>d,YR:()=>B.YR});var i=t(96243),s=t(13295),o=(t(36022),t(75885),t(62967)),r=t(92398),a=t(30628);const c={...o.qx,DEFAULT:"DefaultValue",NUMBER:"NumberValue"},l={...r.ParseRules,Definition:e=>{switch(e.value){case"{":return"ShortQuery";case"query":return"Query";case"mutation":return"Mutation";case"subscription":return"Subscription";case"fragment":return"FragmentDefinition"}}};function d(e){const n=(0,o.r5)({eatWhitespace:e=>e.eatWhile(r.isIgnored),lexRules:r.LexRules,parseRules:l,editorConfig:{}}),t=e.split(/\n/).map(((e,n,t)=>{let{length:i}=t;return new o.Qb(e+(i>n+1?"\n":""))})),s=n.startState(),d=F("document",i.Yp.SOF,0,1,1,1,0,0),C=[d],B=[{kind:i.xs.DOCUMENT,location:[0,0],definitions:[],tokens:C}];let U=d,Y=0,Q=1,j=1;for(let o=0;o<t.length;o++){const e=t[o];for(j=o+1;!e.eol();){Q=e.column()+1;const t=e.getCurrentPosition(),o=n.token(e,s),r=s.kind,a=e.current();if(r&&"comment"!==o&&"ws"!==o&&(U=F(o,a,C.length,j,Q,e.column()+1,Y+t,Y+e.getCurrentPosition()),C.push(U),U.kind!==i.Yp.INVALID))switch(r){case c.DOCUMENT:I(B,U),E(B,U);break;case c.QUERY:case c.MUTATION:case c.SUBSCRIPTION:y(B,U),I(B,U),E(B,U);break;case c.FRAGMENT_DEFINITION:v(B,U),E(B,U);break;case c.INLINE_FRAGMENT:h(B,U),E(B,U);break;case c.FRAGMENT_SPREAD:m(B,U);break;case c.FIELD:f(B,U),k(B,U),E(B,U);break;case c.ALIASED_FIELD:u(B,U),k(B,U),E(B,U);break;case c.SELECTION_SET:y(B,U),E(B,U);break;case c.VARIABLE_DEFINITIONS:w(B,U),I(B,U);break;case c.VARIABLE_DEFINITION:N(B,U),g(B,U);break;case c.DEFAULT:b(B,U);break;case c.VARIABLE:T(B,U);break;case c.DIRECTIVE:p(B,U);break;case c.LIST_TYPE:N(B,U),A(B,U);break;case c.NAMED_TYPE:x(B,U);break;case c.ARGUMENTS:w(B,U),O(B,U),k(B,U);break;case c.ARGUMENT:S(B,U);break;case c.LIST:case c.OBJECT:w(B,U),O(B,U);break;case c.OBJECT_FIELD:R(B,U);break;case c.BOOLEAN:L(B,U);break;case c.ENUM:M(B,U);break;case c.NULL:_(B,U);break;case c.NUMBER:D(B,U);break;case c.STRING:P(B,U)}}Y+=e.getCurrentPosition(),Q=e.column()+1}const G=(0,a.Am)(B,i.xs.DOCUMENT),V=F("document",i.Yp.EOF,C.length,j,Q,Q,Y,Y);return C.push(V),G.location[1]=V.index,G}function u(e,n){switch(n.kind){case i.Yp.NAME:{let t=(0,a.j1)(e,i.xs.SELECTION_SET,i.xs.FIELD);function s(t){const s={kind:i.xs.FIELD,location:[n.index,n.index],alias:(0,a.Oj)(n)};t.selections.push(s),e.push(s)}(0,a.M8)(e,n),t.kind===i.xs.SELECTION_SET?s(t):t.alias?t.name=(0,a.Oj)(n):(t=(0,a.I)(e,i.xs.SELECTION_SET),s(t))}break;case i.Yp.COLON:(0,a.M8)(e,n)}}function p(e,n){switch(n.kind){case i.Yp.AT:{const t=(0,a.I)(e,i.xs.OPERATION_DEFINITION,i.xs.VARIABLE_DEFINITION,i.xs.FRAGMENT_DEFINITION,i.xs.FIELD,i.xs.FRAGMENT_SPREAD,i.xs.INLINE_FRAGMENT);if((0,a.M8)(e,n),t.kind===i.xs.VARIABLE_DEFINITION){const s={kind:i.xs.DIRECTIVE,location:[n.index,n.index],isConst:!0};t.directives?t.directives.push(s):t.directives=[s],e.push(s)}else{const s={kind:i.xs.DIRECTIVE,location:[n.index,n.index]};t.directives?t.directives.push(s):t.directives=[s],e.push(s)}}break;case i.Yp.NAME:(0,a.M8)(e,n),(0,a.j1)(e,i.xs.DIRECTIVE).name=(0,a.Oj)(n)}}function f(e,n){if(n.kind===i.Yp.NAME){const t=(0,a.I)(e,i.xs.SELECTION_SET);(0,a.M8)(e,n);const s={kind:i.xs.FIELD,location:[n.index,n.index],name:(0,a.Oj)(n)};t.selections.push(s),e.push(s)}}function v(e,n){switch(n.kind){case i.Yp.KEYWORD:if((0,a.M8)(e,n),"fragment"===n.value){const t=(0,a.j1)(e,i.xs.DOCUMENT),s={kind:i.xs.FRAGMENT_DEFINITION,location:[n.index,n.index]};t.definitions.push(s),e.push(s)}break;case i.Yp.NAME:(0,a.M8)(e,n),(0,a.j1)(e,i.xs.FRAGMENT_DEFINITION).name=(0,a.Oj)(n)}}function m(e,n){switch(n.kind){case i.Yp.SPREAD:{const t=(0,a.I)(e,i.xs.SELECTION_SET);(0,a.M8)(e,n);const s={kind:i.xs.FRAGMENT_SPREAD,location:[n.index,n.index]};t.selections.push(s),e.push(s)}break;case i.Yp.NAME:(0,a.M8)(e,n),(0,a.j1)(e,i.xs.FRAGMENT_SPREAD).name=(0,a.Oj)(n)}}function h(e,n){switch(n.kind){case i.Yp.SPREAD:{const t=(0,a.I)(e,i.xs.SELECTION_SET);(0,a.M8)(e,n);const s={kind:i.xs.INLINE_FRAGMENT,location:[n.index,n.index]};t.selections.push(s),e.push(s)}break;case i.Yp.KEYWORD:(0,a.M8)(e,n)}}function y(e,n){switch(n.kind){case i.Yp.BRACE_L:if(1===e.length){const t=(0,a.j1)(e,i.xs.DOCUMENT),s={kind:i.xs.OPERATION_DEFINITION,operationType:i.S5.QUERY,location:[n.index,n.index]};(0,a.M8)(e,n),t.definitions.push(s),e.push(s)}break;case i.Yp.KEYWORD:{const t=(0,a.j1)(e,i.xs.DOCUMENT);(0,a.M8)(e,n);const s={kind:i.xs.OPERATION_DEFINITION,operationType:n.value,location:[n.index,n.index]};t.definitions.push(s),e.push(s)}break;case i.Yp.NAME:(0,a.M8)(e,n),(0,a.j1)(e,i.xs.OPERATION_DEFINITION).name=(0,a.Oj)(n)}}function E(e,n){switch(n.kind){case i.Yp.BRACE_L:{const t={kind:i.xs.SELECTION_SET,location:[n.index,n.index],selections:[],closed:!1};let s=(0,a.I)(e,i.xs.OPERATION_DEFINITION,i.xs.FRAGMENT_DEFINITION,i.xs.INLINE_FRAGMENT,i.xs.FIELD);(0,a.M8)(e,n),s.selectionSet=t,e.push(t)}break;case i.Yp.BRACE_R:{const t=(0,a.Am)(e,i.xs.SELECTION_SET,i.xs.FRAGMENT_SPREAD,i.xs.INLINE_FRAGMENT,i.xs.FIELD);if((0,a.M8)(e,n),t.kind===i.xs.SELECTION_SET)e.splice(-1,1),(0,a.Nm)(t,n),t.closed=!0;else{const[,n]=e.splice(-2,2);n.closed=!0}}}}function I(e,n){switch(n.kind){case i.Yp.PAREN_L:{const t={kind:i.xs.VARIABLES_DEFINITION,location:[n.index,n.index],variableDefinitions:[],closed:!1},s=(0,a.j1)(e,i.xs.OPERATION_DEFINITION);(0,a.M8)(e,n),s.variablesDefinition=t,e.push(t)}break;case i.Yp.PAREN_R:{const t=(0,a.Am)(e,i.xs.VARIABLES_DEFINITION);(0,a.M8)(e,n),(0,a.Nm)(t,n),t.closed=!0}}}function g(e,n){n.kind===i.Yp.COLON&&(0,a.M8)(e,n)}function T(e,n){var t;switch(n.kind){case i.Yp.DOLLAR:{const t=(0,a.I)(e,i.xs.VARIABLES_DEFINITION,i.xs.ARGUMENT,i.xs.OBJECT_FIELD);switch((0,a.M8)(e,n),t.kind){case i.xs.VARIABLES_DEFINITION:{const s={kind:i.xs.VARIABLE_DEFINITION,location:[n.index,n.index],variable:{kind:i.xs.VARIABLE,location:[n.index,n.index]}};t.variableDefinitions.push(s),e.push(s)}break;case i.xs.ARGUMENT:case i.xs.OBJECT_FIELD:{const e={kind:i.xs.VARIABLE,location:[n.index,n.index]};t.value=e}}}break;case i.Yp.NAME:{const s=(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.ARGUMENT,i.xs.OBJECT_FIELD);switch((0,a.M8)(e,n),s.kind){case i.xs.VARIABLE_DEFINITION:(0,a.Nm)(s.variable,n),s.variable.name=(0,a.Oj)(n);break;case i.xs.ARGUMENT:case i.xs.OBJECT_FIELD:(null===(t=s.value)||void 0===t?void 0:t.kind)===i.xs.VARIABLE&&((0,a.Nm)(s.value,n),s.value.name=(0,a.Oj)(n))}}}}function b(e,n){n.kind===i.Yp.EQUALS&&(0,a.M8)(e,n)}function A(e,n){switch(n.kind){case i.Yp.BRACKET_L:{const t=(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.LIST_TYPE);switch((0,a.M8)(e,n),t.kind){case i.xs.VARIABLE_DEFINITION:{const s={kind:i.xs.LIST_TYPE,location:[n.index,n.index],closed:!1};t.type=s,e.push(s)}break;case i.xs.LIST_TYPE:{const s={kind:i.xs.LIST_TYPE,location:[n.index,n.index],closed:!1};t.type=s,e.push(s)}}}break;case i.Yp.BRACKET_R:{const t=(0,a.j1)(e,i.xs.LIST_TYPE,i.xs.NON_NULL_TYPE,i.xs.NAMED_TYPE);switch((0,a.M8)(e,n),t.kind){case i.xs.LIST_TYPE:t.closed=!0;break;case i.xs.NON_NULL_TYPE:case i.xs.NAMED_TYPE:(0,a.j1)(e,i.xs.LIST_TYPE).closed=!0}}}}function N(e,n){if(n.kind===i.Yp.BANG){const t=(0,a.Am)(e,i.xs.LIST_TYPE,i.xs.NAMED_TYPE),s={kind:i.xs.NON_NULL_TYPE,location:[t.location[0],n.index],type:t};(0,a.M8)(e,n),(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.LIST_TYPE).type=s}}function x(e,n){if(n.kind===i.Yp.NAME){const t=(0,a.j1)(e,i.xs.FRAGMENT_DEFINITION,i.xs.INLINE_FRAGMENT,i.xs.VARIABLE_DEFINITION,i.xs.LIST_TYPE),s={kind:i.xs.NAMED_TYPE,location:[n.index,n.index],name:(0,a.Oj)(n)};t.kind===i.xs.FRAGMENT_DEFINITION||t.kind===i.xs.INLINE_FRAGMENT?t.typeCondition=s:(t.type=s,e.push(s))}}function k(e,n){switch(n.kind){case i.Yp.PAREN_L:{const t=(0,a.j1)(e,i.xs.FIELD,i.xs.DIRECTIVE);if(t.kind===i.xs.DIRECTIVE&&"isConst"in t){const s={kind:i.xs.ARGUMENT_DICT,location:[n.index,n.index],isConst:!0,arguments:[],closed:!1};t.argumentDict=s,e.push(s)}else{const s={kind:i.xs.ARGUMENT_DICT,location:[n.index,n.index],arguments:[],closed:!1};t.argumentDict=s,e.push(s)}}break;case i.Yp.PAREN_R:{const t=(0,a.Am)(e,i.xs.ARGUMENT_DICT);(0,a.M8)(e,n),(0,a.Nm)(t,n),t.closed=!0}}}function S(e,n){switch(n.kind){case i.Yp.NAME:{const t=(0,a.I)(e,i.xs.ARGUMENT_DICT);if((0,a.M8)(e,n),"isConst"in t){const s={kind:i.xs.ARGUMENT,location:[n.index,n.index],isConst:!0,name:(0,a.Oj)(n)};t.arguments.push(s),e.push(s)}else{const s={kind:i.xs.ARGUMENT,location:[n.index,n.index],name:(0,a.Oj)(n)};t.arguments.push(s),e.push(s)}}break;case i.Yp.COLON:(0,a.M8)(e,n)}}function w(e,n){switch(n.kind){case i.Yp.BRACKET_L:{const t=(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.ARGUMENT,i.xs.OBJECT_FIELD);if((0,a.M8)(e,n),t.kind===i.xs.VARIABLE_DEFINITION){const s={kind:i.xs.LIST,location:[n.index,n.index],isConst:!0,values:[],closed:!1};t.defaultValue=s,e.push(s)}else{const s={kind:i.xs.LIST,location:[n.index,n.index],values:[],closed:!1};t.value=s,e.push(s)}}break;case i.Yp.BRACKET_R:(0,a.M8)(e,n),(0,a.Am)(e,i.xs.LIST).closed=!0}}function O(e,n){switch(n.kind){case i.Yp.BRACE_L:{const t=(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.ARGUMENT,i.xs.LIST,i.xs.OBJECT_FIELD);switch((0,a.M8)(e,n),t.kind){case i.xs.VARIABLE_DEFINITION:{const s={kind:i.xs.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};t.defaultValue=s,e.push(s)}break;case i.xs.LIST:if("isConst"in t){const s={kind:i.xs.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};t.values.push(s),e.push(s)}else{const s={kind:i.xs.OBJECT,location:[n.index,n.index],fields:[],closed:!1};t.values.push(s),e.push(s)}break;default:if("isConst"in t){const s={kind:i.xs.OBJECT,location:[n.index,n.index],isConst:!0,fields:[],closed:!1};t.value=s,e.push(s)}else{const s={kind:i.xs.OBJECT,location:[n.index,n.index],fields:[],closed:!1};t.value=s,e.push(s)}}break}case i.Yp.BRACE_R:{const t=(0,a.Am)(e,i.xs.OBJECT);(0,a.M8)(e,n),(0,a.Nm)(t,n),t.closed=!0}}}function R(e,n){switch(n.kind){case i.Yp.NAME:{const t=(0,a.j1)(e,i.xs.OBJECT);(0,a.M8)(e,n);const s={kind:i.xs.OBJECT_FIELD,location:[n.index,n.index],name:(0,a.Oj)(n)};t.fields.push(s),e.push(s)}break;case i.Yp.COLON:(0,a.M8)(e,n)}}function L(e,n){n.kind===i.Yp.BOOLEAN&&C(e,n,{kind:i.xs.BOOLEAN,location:[n.index,n.index],value:Boolean(n.value)})}function M(e,n){var t;n.kind===i.Yp.NAME&&C(e,n,{kind:i.xs.ENUM,location:[n.index,n.index],value:null!==(t=n.value)&&void 0!==t?t:""})}function _(e,n){n.kind===i.Yp.KEYWORD&&C(e,n,{kind:i.xs.NULL,location:[n.index,n.index]})}function D(e,n){var t;n.kind===i.Yp.NUMBER&&C(e,n,{kind:i.xs.NUMBER,location:[n.index,n.index],value:null!==(t=n.value)&&void 0!==t?t:"0"})}function P(e,n){if(n.kind===i.Yp.STRING){var t;const s=(0,a.j1)(e,i.xs.ARGUMENT,i.xs.LIST,i.xs.OBJECT_FIELD,i.xs.STRING);let o=null!==(t=n.value)&&void 0!==t?t:"";const r=s.kind===i.xs.STRING,c=/^""".*?"""$/gi.test(o),l=!r&&/^"""/gi.test(o),d=r&&/"""$/gi.test(o),u=!r&&!l,p=u&&/^".*?"$/gi.test(o)||c||d;if(u?o=p?o.slice(1,-1):o.slice(1):c?o=o.slice(0,-3):(l&&(o=o.slice(3)),d&&(o=o.slice(0,-3))),(0,a.M8)(e,n),r)s.value+="\n"+o,s.closed=p,p&&e.splice(-1,1);else{const t={kind:i.xs.STRING,location:[n.index,n.index],value:o,closed:p,block:l};switch(s.kind){case i.xs.VARIABLE_DEFINITION:s.defaultValue=t;break;case i.xs.LIST:s.values.push(t);break;default:s.value=t}l&&!p&&e.push(t)}}}function C(e,n,t){const s=(0,a.j1)(e,i.xs.VARIABLE_DEFINITION,i.xs.ARGUMENT,i.xs.LIST,i.xs.OBJECT_FIELD);switch((0,a.M8)(e,n),s.kind){case i.xs.VARIABLE_DEFINITION:s.defaultValue=t;break;case i.xs.LIST:s.values.push(t);break;default:s.value=t}}function F(e,n,t,s,o,r,c,l){switch(e){case"document":switch(n){case i.Yp.SOF:case i.Yp.EOF:return(0,a.Ey)(n,t,s,o,r,c,l);default:return(0,a.Ey)(i.Yp.INVALID,t,s,o,r,c,l)}case"punctuation":switch(n){case i.Yp.BANG:case i.Yp.BRACE_L:case i.Yp.BRACE_R:case i.Yp.BRACKET_L:case i.Yp.BRACKET_R:case i.Yp.COLON:case i.Yp.EQUALS:case i.Yp.PAREN_L:case i.Yp.PAREN_R:case i.Yp.SPREAD:return(0,a.Ey)(n,t,s,o,r,c,l);default:return(0,a.Ey)(i.Yp.INVALID,t,s,o,r,c,l)}case"attribute":case"atom":case"def":case"property":case"qualifier":case"string-2":return(0,a.zI)(i.Yp.NAME,n,t,s,o,r,c,l);case"builtin":return(0,a.zI)(i.Yp.BOOLEAN,n,t,s,o,r,c,l);case"keyword":return(0,a.zI)(i.Yp.KEYWORD,n,t,s,o,r,c,l);case"number":return(0,a.zI)(i.Yp.NUMBER,n,t,s,o,r,c,l);case"string":return(0,a.zI)(i.Yp.STRING,n,t,s,o,r,c,l);case"meta":case"variable":switch(n){case i.Yp.AT:case i.Yp.DOLLAR:return(0,a.Ey)(n,t,s,o,r,c,l);default:return(0,a.zI)(i.Yp.NAME,n,t,s,o,r,c,l)}default:return(0,a.Ey)(i.Yp.INVALID,t,s,o,r,c,l)}}t(54596),t(72790);var B=t(85890)},30628:(e,n,t)=>{"use strict";t.d(n,{Am:()=>d,Ey:()=>o,I:()=>l,Id:()=>f,M8:()=>u,Nm:()=>p,Oj:()=>s,g$:()=>a,j1:()=>c,zI:()=>r});t(62316);var i=t(96243);function s(e){var n;return{kind:i.xs.NAME,location:[e.index,e.index],value:null!==(n=e.value)&&void 0!==n?n:""}}function o(e,n,t,i,s,o,r){return{kind:e,index:n,start:{line:t,column:i,position:o},end:{line:t,column:s,position:r}}}function r(e,n,t,i,s,o,r,a){return{kind:e,index:t,start:{line:i,column:s,position:r},end:{line:i,column:o,position:a},value:n}}function a(e,n){const t=e[n[0]],i=e[n[1]];return{start:t.start.position,startToken:t,end:i.end.position,endToken:i}}function c(e){let n,t=e.length-1;for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];for(;t>=0&&(n=e[t--]);){var r;if(s.includes(null===(r=n)||void 0===r?void 0:r.kind))return n}throw new Error('Ancestor for kind "'.concat(s,'" not found!'))}function l(e){let n;for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];for(;e.length>0&&(n=e[e.length-1]);){var o;if(i.includes(null===(o=n)||void 0===o?void 0:o.kind))return n;e.splice(-1,1)}throw new Error('Ancestor for kind "'.concat(i,'" not found!'))}function d(e){let n;for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];for(;e.length>0&&(n=e[e.length-1]);){var o;if(e.splice(-1,1),i.includes(null===(o=n)||void 0===o?void 0:o.kind))return n}throw new Error('Ancestor for kind "'.concat(i,'" not found!'))}function u(e,n){for(let t=0;t<e.length;t++)p(e[t],n)}function p(e,n){e.location[1]=n.index}function f(e,n){let t,s,o=!1,r=!0;return e.kind===i.xs.NON_NULL_TYPE?(r=!1,e.type.kind===i.xs.LIST_TYPE?(t=e.type.type,o=!0):t=e.type):e.kind===i.xs.LIST_TYPE?(t=e.type,o=!0):t=e,t?(s=t.kind===i.xs.LIST_TYPE||t.kind===i.xs.NON_NULL_TYPE?f(t,n):n(t.name.value),s&&{kind:"value-type",isList:o,isOptional:r,type:s}):null}},97353:(e,n,t)=>{"use strict";t.d(n,{CM:()=>i,IK:()=>c,TL:()=>d,Q8:()=>u});let i=function(e){return e.SCHEMA_FIELD="__schema",e.TYPENAME_FIELD="__typename",e.TYPE_FIELD="__type",e.TYPE_FIELDS_FIELD="fields",e.TYPE_INTERFACES_FIELD="interfaces",e.TYPE_POSSIBLE_TYPES_FIELD="possibleTypes",e.TYPE_INPUT_FIELDS_FIELD="inputFields",e}({});const s=":",o=".",r="(",a=")";function c(e,n,t){const i=e+o+n;return t?l(i,t):i}function l(e,n){return e+r+n+s+a}function d(e){let n="argument"===e.kind?e.type:"field"===e.kind?e.valueType:e;for(;"value-type"===n.kind;)n=n.type;return n}function u(e){return!!e&&("type"===e.kind||"query-type"===e.kind||"mutation-type"===e.kind||"subscription-type"===e.kind)}},77317:(e,n,t)=>{"use strict";function i(e,n){const t=e.directiveIsRepeatable?"\n isRepeatable":"",i=e.directiveLocations?"\n locations":"\n onField\n onFragment\n onOperation",s=e.inputValueDeprecation?{includeDeprecated:"(includeDeprecated: true)",isDeprecated:"\n isDeprecated",deprecationReason:"\n deprecationReason"}:{includeDeprecated:"",isDeprecated:"",deprecationReason:""},o=function(e){let n="";for(let t=1;t<e;t++){const i=" ".repeat(e-t);n="\n".concat(i,"ofType {\n").concat(i," kind\n").concat(i," name").concat(n,"\n").concat(i,"}")}return n}((null===n||void 0===n?void 0:n.typeDepth)||6),r=e.oneOf?"\n oneOf":"",a=e.specifiedByUrl?"\n specifiedByURL":"",c=e.subscription?"\n subscriptionType {\n name\n }":"";return"query IntrospectionQuery {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }".concat(c,"\n types {\n ...FullType\n }\n directives {\n name\n description").concat(t,"\n args").concat(s.includeDeprecated," {\n ...InputValue\n }").concat(i,"\n }\n }\n}\n\nfragment FullType on __Type {\n kind\n name\n description").concat(a).concat(r,"\n fields(includeDeprecated: true) {\n name\n description\n args").concat(s.includeDeprecated," {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields").concat(s.includeDeprecated," {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n}\n\nfragment InputValue on __InputValue {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue").concat(s.isDeprecated).concat(s.deprecationReason,"\n}\n\nfragment TypeRef on __Type {\n kind\n name").concat(o,"\n}")}t.d(n,{I:()=>i})},26845:(e,n,t)=>{"use strict";t.d(n,{m:()=>h});t(75885);var i=t(67466),s=t(4473),o=t(68341),r=(t(36022),(0,o.A)("documentAST")),a=(0,o.A)("fragments"),c=(0,o.A)("fragmentSpreads"),l=(0,o.A)("error");class d{constructor(e){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),(0,s.A)(this,r)[r]=e}get documentAST(){return(0,s.A)(this,r)[r]}get error(){return(0,s.A)(this,l)[l]}set error(e){(0,s.A)(this,l)[l]=e}get hasError(){return!!(0,s.A)(this,l)[l]}getFragment(e){if(!(0,s.A)(this,a)[a]){(0,s.A)(this,a)[a]=new Map;for(const e of(0,s.A)(this,r)[r].definitions){var n;e.kind===i.xs.FRAGMENT_DEFINITION&&null!==(n=e.name)&&void 0!==n&&n.value&&(0,s.A)(this,a)[a].set(e.name.value,e)}}return(0,s.A)(this,a)[a].get(e)}getFragmentSpreads(e){(0,s.A)(this,c)[c]||((0,s.A)(this,c)[c]=new Map);let n=(0,s.A)(this,c)[c].get(e);if(void 0===n){n=[];const t=[e];let o;for(;o=t.pop();)for(const e of o.selections)e.kind===i.xs.FRAGMENT_SPREAD?n.push(e):e.selectionSet&&t.push(e.selectionSet);(0,s.A)(this,c)[c].set(e,n)}return n}}var u=t(97353);const p=2,f=[u.CM.TYPE_FIELDS_FIELD,u.CM.TYPE_INTERFACES_FIELD,u.CM.TYPE_POSSIBLE_TYPES_FIELD,u.CM.TYPE_INPUT_FIELDS_FIELD];function v(e,n){const t=(null===n||void 0===n?void 0:n.maxNestedListDepth)||p;return{Field(n){if(n.name&&(n.name.value===u.CM.SCHEMA_FIELD||n.name.value===u.CM.TYPE_FIELD)&&s(n))return e.error="Maximum introspection depth exceeded",i.sP}};function s(n){var o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.create(null),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n.kind===i.xs.FRAGMENT_SPREAD){var c,l;const t=null!==(c=null===(l=n.name)||void 0===l?void 0:l.value)&&void 0!==c?c:"";if(!0===r[t])return!1;const i=e.getFragment(t);if(!i)return!1;try{return r[t]=!0,s(i,r,a)}finally{r[t]=void 0}}if(n.kind===i.xs.FIELD&&n.name&&f.includes(n.name.value)&&++a>t)return!0;if("selectionSet"in n&&null!==(o=n.selectionSet)&&void 0!==o&&o.selections)for(const e of n.selectionSet.selections)if(s(e,r,a))return!0;return!1}}t(45155),t(49997),t(57928),t(2813),t(32990),t(37669),t(35033);function m(e){const n=new Set,t=[],s=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition:e=>!!o(e)&&i.sP};function o(i){var r;const a=null===(r=i.name)||void 0===r?void 0:r.value;if(!a||!i.selectionSet||n.has(a))return!1;n.add(a);const c=e.getFragmentSpreads(i.selectionSet);if(null===c||void 0===c||!c.length)return!1;s[a]=t.length;for(const n of c){var l;const i=null===(l=n.name)||void 0===l?void 0:l.value;if(!i)continue;const r=s[i];if(t.push(n),void 0!==r){const n=t.slice(r).slice(0,-1).map((e=>{var n,t;return'"'.concat(null!==(n=null===(t=e.name)||void 0===t?void 0:t.value)&&void 0!==n?n:"",'"')})).join(", ");return e.error='Cannot spread fragment "'.concat(i,'" within itself')+(""!==n?" via ".concat(n,"."):"."),!0}{const n=e.getFragment(i);if(n&&o(n))return!0}t.pop()}return s[a]=void 0,!1}}function h(e){const n=[m,v],t=new d(e);for(const s of n)if((0,i.YR)(e,s(t)),t.error)return{success:!1,errorMessage:t.error};return{success:!0}}},15793:(e,n,t)=>{"use strict";t.d(n,{$b:()=>i,AO:()=>p,Ai:()=>r,Ku:()=>s,NK:()=>h,Rx:()=>m,YQ:()=>c,im:()=>o,nH:()=>d,py:()=>f,yJ:()=>u,yY:()=>v,yi:()=>l,z5:()=>a});let i=function(e){return e[e.error=0]="error",e[e.warning=1]="warning",e[e.info=2]="info",e}({});let s=function(e){return e.GRAPHQL_OPERATION="graphql-operation",e.GRAPHQL_INTROSPECTION="graphql-introspection",e.GRAPHQL_SDL_FETCH="graphql-sdl-fetch",e.GRAPHQL_SDL_PROBE="graphql-sdl-probe",e}({});const o="http-request",r="http-response",a="http-response-body-chunk",c="http-response-cancelled",l="http-response-failed",d="http-response-finished",u="scope-begin",p="scope-end",f="subscription-request-started",v="subscription-request-protocol",m="subscription-request-message",h="subscription-request-stopped"},33462:(e,n,t)=>{"use strict";var i=t(40409),s=t(47924),o=t(50072),r=t(77740),a=t(56242),c=t(90126);function l(e,n){let{id:t,payload:{documentId:i},type:l}=e;const d=new AbortController;(0,s.UT)({id:t,cancel:()=>d.abort(),execute:async()=>{const e=await(0,o.TES)(i,d.signal);let s={documentId:i,operations:[]};if(!e)return void n.sendMessage(new c.Q(l,s,t));const u=await(0,o.snc)(i,d.signal);if(!u)return void n.sendMessage(new c.Q(l,s,t));const p=(0,r.bF)(n,e);if(!p)return void n.sendMessage(new c.Q(l,{documentId:i,operations:[]},t));const f=(0,r.Bg)(p),v=await(0,a.bN)(u.sdlEndpoint||u.endpoint);let m;if(v){var h;const n=e.workspaceId?await(0,o._um)(e.workspaceId):void 0,t=(0,r.DM)(p,(e=>v.getType(e)),(e=>v.getFields(e)),n);m=null===(h=await(0,o.qhv)(i,t))||void 0===h?void 0:h.hash}n.sendMessage(new c.Q(l,{documentId:i,operations:f,variableJsonSchemaHash:m},t))}})}function d(e,n){let{id:t,payload:{documentId:i},type:a}=e;const l=new AbortController;(0,s.UT)({id:t,cancel:()=>l.abort(),execute:async()=>{const e=await(0,o.TES)(i,l.signal),s=(0,r.bF)(n,e);if(!s)return void n.sendMessage(new c.Q(a,{documentId:i,operations:[]},t));const d=(0,r.Bg)(s);n.sendMessage(new c.Q(a,{documentId:i,operations:d},t))}})}var u=t(28511);function p(e,n){let{id:t,payload:{documentId:i}}=e;(0,s.UT)({id:t,cancel:u.lQ,execute:async()=>{const e=await(0,o.TES)(i);let s={documentId:i};if(e&&e.workspaceId){const t=await(0,o.snc)(i);if(t){const c=(0,r.bF)(n,e),l=await(0,a.bN)(t.sdlEndpoint||t.endpoint);if(c&&l){const n=await(0,o._um)(e.workspaceId),t=(0,r.DM)(c,(e=>l.getType(e)),(e=>l.getFields(e)),n),a=await(0,o.qhv)(i,t);s={documentId:i,variableJsonSchemaHash:null===a||void 0===a?void 0:a.hash}}}}n.sendMessage(new c.Q("variable-json-schema-updated",s,t))}})}t(62316),t(5084),t(75885);var f=t(23845),v=t(69529),m=t(15793),h=t(20278),y=t(34145),E=t(1103);const I="Invalid Schema Endpoint for more info double click on the failed Result.",g="Invalid HTTP Header for more info double click on the failed Result.";function T(e,n){let{payload:{documentId:t,workspaceId:i,environmentId:a,operationIndex:c=0}}=e;const l=new AbortController;(0,s.UT)({id:t,cancel:()=>l.abort(),execute:async()=>{var e;const s=await(0,o.TES)(t,l.signal);if(!s)return;const[d,p]=await Promise.all([(0,o.OfI)(t,l.signal),(0,o.WGI)(a)]),f=(0,o.PHK)(d,p);if(!f)return;let m;l.signal.addEventListener("abort",(function e(){var n;null===(n=m)||void 0===n||n.cancel(),l.signal.removeEventListener("abort",e)}));const h=(0,u.sX)(),y=(0,r.bF)(n,s,!0),E=(0,r.P6)(f),I=(0,r.rx)(n,s,a,c,p);if(!y||!I&&null!==(e=s.variables)&&void 0!==e&&e.length){if((0,r.Hn)(E)){const e=v.S5.QUERY;return(0,r.Dt)(n,t,{id:h,operationType:e,operationStatus:"failed",started:(0,u.tB)(),isMultipart:!1,parsedBody:{errors:[{message:g}]}}),(0,r.Ix)(n,t,h,e),void(0,r.Hc)(n,t,E,b(e),h)}m=A(n,i,h,s,v.S5.QUERY,void 0,c,I,f,E)}else{const[e,o]=(0,r.eu)(y,c),a=(0,v.mv)(y);if(a.success||(console.warn(a.errorMessage),(0,r.R4)(n,a.errorMessage,t)),(0,r.Hn)(E)){const i=e===v.S5.SUBSCRIPTION?{id:h,operationName:o,operationType:e,operationStatus:"failed",started:(0,u.tB)(),payload:{errors:[{message:g}]}}:{id:h,operationName:o,operationType:e,operationStatus:"failed",started:(0,u.tB)(),isMultipart:!1,parsedBody:{errors:[{message:g}]}};return(0,r.Dt)(n,t,i),(0,r.Ix)(n,t,h,e),void(0,r.Hc)(n,t,E,b(e,o),h)}const l=!0,[d,p]=a.success&&l?(0,r.I1)(y,s.body,c)(s,I):[s,I];if(e===v.S5.SUBSCRIPTION)m=N(n,i,h,d,e,o,c,p,f,E);else{var T;const t=a.success&&(f.endpoint.length||null!==(T=f.sdlEndpoint)&&void 0!==T&&T.length)?await(0,r.Q0)(i,y,f,o,p):void 0;m=A(n,i,h,d,e,o,c,p,f,E,t,l)}}l.signal.aborted||await m.execute()}})}function b(e,n){const t=n?'"'.concat(n,'" '):"",i=function(e){switch(e){case v.S5.MUTATION:return"Mutation";case v.S5.SUBSCRIPTION:return"Subscription";default:return"Query"}}(e);return"".concat(i," operation ").concat(t)}const A=function(e,n,t,i,s,o,a,c,l,d,p){let f=arguments.length>11&&void 0!==arguments[11]&&arguments[11];if(s===v.S5.SUBSCRIPTION)throw new Error("Subscription type is not allowed!");const h=new AbortController,{id:y,body:E}=i,g=()=>{(0,r.o8)(e,y,t,s)};return{cancel:async()=>h.abort(),execute:()=>new Promise((async i=>{if(null!==l&&void 0!==l&&l.endpoint.length){var v;const I=(0,u.tB)();(0,r.Ym)(e,y,t,s);const T={headers:null!==d&&void 0!==d?d:new Headers,uri:l.endpoint,useGET:l.useGet,includeCookies:l.includeCookies};let b=!1;const A=await(0,r.RK)(T,{operationName:f?void 0:o,query:E,variables:c,files:p},{onComplete:e=>{b||g(),i()},onError:(n,i)=>{b=!0,n instanceof r.S1?(0,r.Mv)(e,y,t,s):((0,r.f5)(e,y,t,{payload:n,success:!1,received:(0,u.tB)(),index:i}),(0,r.Ix)(e,y,t,s))},onNext:(n,i)=>{(0,r.f5)(e,y,t,{payload:n.content,success:!0,received:(0,u.tB)(),index:i})}},(0,r.Dx)(e,y,t,m.Ku.GRAPHQL_OPERATION,{name:o}),h.signal),{parsedBody:N,error:x}=A,k="ClientAbortError"===(null===x||void 0===x?void 0:x.name)?"cancelled":x||null!==N&&void 0!==N&&null!==(v=N.errors)&&void 0!==v&&v.length?"failed":"succeeded";switch(n&&(0,r.R7)(e,y,(0,u.lm)(),n,k,s,o,a),(0,r.Dt)(e,y,{id:t,operationName:o,operationStatus:k,operationType:s,started:I,...A}),k){case"cancelled":(0,r.Mv)(e,y,t,s),i();break;case"failed":(0,r.Ix)(e,y,t,s),i();break;default:A.isMultipart||(g(),i())}}else(0,r.Dt)(e,y,{id:t,operationName:o,operationType:s,operationStatus:"failed",started:(0,u.tB)(),isMultipart:!1,parsedBody:{errors:[{message:I}]}}),(0,r.Ix)(e,y,t,s),(0,r.vl)(e,y,b(s,o),t),i()}))}},N=(e,n,t,i,s,a,c,l,d,p)=>{if(s!==v.S5.SUBSCRIPTION)throw new Error("Only the Subscription type is allowed here!");const f=new AbortController,{id:h,body:y}=i;return{cancel:async()=>f.abort(),execute:async()=>{let i=!1;const v=function(e){if(e)return e.sseSubscriptionEndpoint||e.endpoint;return""}(d),E=function(e){if(e)return e.subscriptionEndpoint||e.endpoint.replace(/^http/i,"ws");return""}(d);if(v.length||E.length)return new Promise((async I=>{var g;const T=(0,u.lm)(),b=p?Object.fromEntries(p.entries()):{},A=null!==(g=d.subscriptionProtocol)&&void 0!==g?g:o.hPE,N=e=>e===o.PhU?v:E;(0,r.Ym)(e,h,t,s),(0,r.pm)(e,h,t,m.Ku.GRAPHQL_OPERATION,(0,u.tB)(),N(A),A,b);const k=o=>{if(i)return;i=!0;const l=function(e){if("type"in e)return["closed"===e.type&&"code"in e?{message:"Subscription closed",extensions:{code:e.code,reason:e.reason,wasClean:e.wasClean}}:{message:"Unknown subscription error"}];if((0,u.Rr)(e))return e.every((e=>"message"in e))?e.map((e=>{let{message:n}=e;return{message:n}})):e.length<=1?[{message:"Unknown subscription error"}]:[{message:"".concat(e.length," unknown subscription errors")}];return["message"in e?{message:e.message}:e]}(o);(0,r.VS)(e,h,t,m.Ku.GRAPHQL_OPERATION,(0,u.tB)(),"failed",l),(0,r.Dt)(e,h,{id:t,operationName:a,operationType:s,operationStatus:"failed",started:(0,u.tB)(),payload:{errors:l}}),n&&(0,r.R7)(e,h,T,n,"failed",s,a,c),(0,r.Ix)(e,h,t,s),I()},w=x[A](N,b,{includeCookies:d.includeCookies,onConnected:i=>{i?k(i):((0,r.Dt)(e,h,{id:t,operationName:a,operationType:s,operationStatus:"succeeded",started:(0,u.tB)()}),n&&(0,r.R7)(e,h,T,n,"succeeded",s,a,c))}});try{function R(){w.close(),(0,r.Mv)(e,h,t,s),(0,r.VS)(e,h,t,m.Ku.GRAPHQL_OPERATION,(0,u.tB)(),"closed"),f.signal.removeEventListener("abort",R),I()}const L=await w.execute({query:y,operationName:a,variables:l},(n=>(0,r.id)(e,h,t,(0,u.tB)(),"string"===typeof n?n:JSON.stringify(n))));w instanceof S&&w.protocol&&(0,r.xN)(e,h,t,m.Ku.GRAPHQL_OPERATION,w.protocol);let M=0;L.subscribe({next:n=>{var i;(0,r.VT)(e,h,t,{payload:n,received:(0,u.tB)(),success:!(null!==n&&void 0!==n&&null!==(i=n.errors)&&void 0!==i&&i.length),index:M++})},error:k,complete:()=>{(0,r.o8)(e,h,t,s),(0,r.VS)(e,h,t,m.Ku.GRAPHQL_OPERATION,(0,u.tB)(),"completed"),I()}}),f.signal.aborted?R():f.signal.addEventListener("abort",R)}catch(O){k(O)}}));(0,r.Dt)(e,h,{id:t,operationName:a,operationType:s,operationStatus:"failed",started:(0,u.tB)(),payload:{errors:[{message:I}]}}),(0,r.Ix)(e,h,t,s),(0,r.vl)(e,h,b(s,a),t)}}};const x={[o.jIU]:(e,n,t)=>new S(e,n,t),[o.Gkb]:(e,n,t)=>new O(e,n,t),[o.ppT]:(e,n,t)=>new w(e,n,t),[o.PhU]:(e,n,t)=>new R(e,n,t)};class k{constructor(e,n,t){this.resolveSubscriptionUrl=e,this.connectionParams=n,this.extraOptions=t}}class S extends k{constructor(){super(...arguments),this.provider=void 0,this.subscriptionProtocol=void 0}async execute(e,n){const t=this;if(!this.provider){const[e,n]=await new Promise((e=>{const n=t.resolveSubscriptionUrl(o.jIU);if(!n.length)return void e([new R(t.resolveSubscriptionUrl,t.connectionParams,t.extraOptions),o.PhU]);const i=new WebSocket(n,[o.Gkb,o.ppT]);i.onopen=function(){if(i.protocol===o.ppT)e([new w(t.resolveSubscriptionUrl,t.connectionParams,t.extraOptions),o.ppT]);else e([new O(t.resolveSubscriptionUrl,t.connectionParams,t.extraOptions),o.Gkb]);i.close()},i.onerror=function(n){e([new R(t.resolveSubscriptionUrl,t.connectionParams,t.extraOptions),o.PhU]),i.close()}}));this.provider=e,this.subscriptionProtocol=n}return this.provider.execute(e,n)}get protocol(){return this.subscriptionProtocol}close(){var e;null===(e=this.provider)||void 0===e||e.close()}}class w extends k{constructor(){super(...arguments),this.closeFunc=void 0,this.observable=void 0}createClient(e){var n;const t=new E.D(this.resolveSubscriptionUrl(o.ppT),{lazy:!1,reconnect:!1,connectionParams:this.connectionParams,connectionCallback:null===(n=this.extraOptions)||void 0===n?void 0:n.onConnected,onMessage:e});return this.closeFunc=()=>{t.close(!0)},t}execute(e,n){return this.observable||(this.observable=L((t=>{const i=this.createClient(n);return i.onError((e=>t.error(e))),i.request(e).subscribe(t).unsubscribe}))),Promise.resolve(this.observable)}close(){var e;null===(e=this.closeFunc)||void 0===e||e.call(this)}}class O extends k{constructor(){super(...arguments),this.closeFunc=void 0,this.observable=void 0}createClient(e){let n,t;const i=(0,y.UU)({url:this.resolveSubscriptionUrl(o.Gkb),lazy:!0,retryAttempts:0,keepAlive:f.iW,connectionParams:this.connectionParams,on:{connected:e=>{var t,i,s,o;e instanceof WebSocket?(n=e,null===(t=this.extraOptions)||void 0===t||null===(i=t.onConnected)||void 0===i||i.call(t)):null===(s=this.extraOptions)||void 0===s||null===(o=s.onConnected)||void 0===o||o.call(s,{message:"Unknown socket"})},error:e=>{var n,t;null===(n=this.extraOptions)||void 0===n||null===(t=n.onConnected)||void 0===t||t.call(n,e)},ping:e=>{e||(t=self.setTimeout((()=>{var e;(null===(e=n)||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&n.close(4408,"Request Timeout")}),f.fc))},pong:e=>{e&&self.clearTimeout(t)},message:e}});return this.close=()=>{i.dispose()},i}execute(e,n){return this.observable||(this.observable=L((t=>this.createClient(n).subscribe(e,{next:function(){return t.next(...arguments)},error:e=>t.error(e),complete:()=>t.complete()})))),Promise.resolve(this.observable)}close(){var e;null===(e=this.closeFunc)||void 0===e||e.call(this)}}class R extends k{constructor(){super(...arguments),this.closeFunc=void 0,this.observable=void 0}createClient(e){var n,t,i;const s=(0,h.UU)({url:this.resolveSubscriptionUrl(o.PhU),retryAttempts:0,credentials:null!==(n=this.extraOptions)&&void 0!==n&&n.includeCookies?"include":"same-origin",referrerPolicy:f._w?"no-referrer":"strict-origin-when-cross-origin",headers:{...this.connectionParams,"content-type":"application/json"},onMessage:e});return null===(t=this.extraOptions)||void 0===t||null===(i=t.onConnected)||void 0===i||i.call(t),this.close=()=>{s.dispose()},s}execute(e,n){return this.observable||(this.observable=L((t=>this.createClient(n).subscribe(e,{next:function(){return t.next(...arguments)},error:e=>t.error(e),complete:()=>t.complete()})))),Promise.resolve(this.observable)}close(){var e;null===(e=this.closeFunc)||void 0===e||e.call(this)}}function L(e){return{subscribe:e}}t(45155),t(49997),t(57928),t(2813),t(32990),t(37669),t(35033);var M=t(11081);const _={endpoint:"",exists:!1,hash:"",indexed:!1,hasMutationType:!1,hasSubscriptionType:!1,hasUploadType:!1};var D;const P=new Set;function C(e,n){let{id:i,type:o,payload:{apiId:a,stageId:l}}=e;const d=new AbortController;(0,s.UT)({id:i,cancel:()=>d.abort(),execute:async()=>{if(P.has(a))throw new r.zX("The schema fetch task cannot be executed concurrently on the same API","MULTIPLE_SCHEMA_FETCHES_DETECTED");try{var e,s;P.add(a);const r=await(0,M.AN)(void 0!==D?D:D=t(41990),{stageId:l},d.signal),p=null===r||void 0===r||null===(e=r.stageById)||void 0===e||null===(s=e.publishedSchema)||void 0===s?void 0:s.version;if(p){const e=await F(p.downloadUrl,(0,u.T6)(l),d.signal);return void n.sendMessage(new c.Q(o,e,i))}n.sendMessage(new c.Q(o,_,i))}finally{P.delete(a)}}})}async function F(e,n,t){const i=await(0,o.SWZ)(n);if(i)return{endpoint:i.endpoint,exists:!0,hash:i.hash,indexed:i.indexed,updatedAt:i.updatedAt,hasMutationType:!!i.mutationTypeName,hasSubscriptionType:!!i.subscriptionTypeName,hasUploadType:i.hasUploadType};const s=await(0,r.L5)(e,t);if(Array.isArray(s)){const[e,t]=s,i=await(0,r.gP)(n,e,t,o.FxT.SDL_FETCH);return{endpoint:i.endpoint,exists:!0,hash:i.hash,indexed:i.indexed,hasMutationType:!!i.mutationTypeName,hasSubscriptionType:!!i.subscriptionTypeName,ha