const e=require(`./editor.api-hvIwRq58.cjs`),t=require(`./monaco-editor-6FDvO4UY.cjs`);require(`./monaco.contribution-CDB7N45b.cjs`);function n(e){return i(e,e=>!t.isSpecifiedDirective(e),r)}function r(e){return!t.isSpecifiedScalarType(e)&&!t.isIntrospectionType(e)}function i(e,t,n){let r=e.getDirectives().filter(t),i=Object.values(e.getTypeMap()).filter(n);return[a(e),...r.map(e=>ne(e)),...i.map(e=>s(e))].filter(Boolean).join(`

`)}function a(e){if(e.description==null&&o(e))return;let t=[],n=e.getQueryType();n&&t.push(`  query: ${n.name}`);let r=e.getMutationType();r&&t.push(`  mutation: ${r.name}`);let i=e.getSubscriptionType();return i&&t.push(`  subscription: ${i.name}`),v(e)+`schema {\n${t.join(`
`)}\n}`}function o(e){let t=e.getQueryType();if(t&&t.name!==`Query`)return!1;let n=e.getMutationType();if(n&&n.name!==`Mutation`)return!1;let r=e.getSubscriptionType();return!(r&&r.name!==`Subscription`)}function s(e){if(t.isScalarType(e))return c(e);if(t.isObjectType(e))return u(e);if(t.isInterfaceType(e))return d(e);if(t.isUnionType(e))return f(e);if(t.isEnumType(e))return ee(e);if(t.isInputObjectType(e))return te(e);t.invariant(!1,`Unexpected type: `+t.inspect(e))}function c(e){return v(e)+`scalar ${e.name}`+re(e)}function l(e){let t=e.getInterfaces();return t.length?` implements `+t.map(e=>e.name).join(` & `):``}function u(e){return v(e)+`type ${e.name}`+l(e)+p(e)}function d(e){return v(e)+`interface ${e.name}`+l(e)+p(e)}function f(e){let t=e.getTypes(),n=t.length?` = `+t.join(` | `):``;return v(e)+`union `+e.name+n}function ee(e){let t=e.getValues().map((e,t)=>v(e,`  `,!t)+`  `+e.name+_(e.deprecationReason));return v(e)+`enum ${e.name}`+m(t)}function te(e){let t=Object.values(e.getFields()).map((e,t)=>v(e,`  `,!t)+`  `+g(e));return v(e)+`input ${e.name}`+(e.isOneOf?` @oneOf`:``)+m(t)}function p(e){let t=Object.values(e.getFields()).map((e,t)=>v(e,`  `,!t)+`  `+e.name+h(e.args,`  `)+`: `+String(e.type)+_(e.deprecationReason));return m(t)}function m(e){return e.length===0?``:` {
`+e.join(`
`)+`
}`}function h(e,t=``){return e.length===0?``:e.every(e=>!e.description)?`(`+e.map(g).join(`, `)+`)`:`(
`+e.map((e,n)=>v(e,`  `+t,!n)+`  `+t+g(e)).join(`
`)+`
`+t+`)`}function g(e){let n=t.astFromValue(e.defaultValue,e.type),r=e.name+`: `+String(e.type);return n&&(r+=` = ${t.print(n)}`),r+_(e.deprecationReason)}function ne(e){return v(e)+`directive @`+e.name+h(e.args)+(e.isRepeatable?` repeatable`:``)+` on `+e.locations.join(` | `)}function _(e){return e==null?``:e===`No longer supported`?` @deprecated`:` @deprecated(reason: ${t.print({kind:t.Kind.STRING,value:e})})`}function re(e){return e.specifiedByURL==null?``:` @specifiedBy(url: ${t.print({kind:t.Kind.STRING,value:e.specifiedByURL})})`}function v(e,n=``,r=!0){let{description:i}=e;if(i==null)return``;let a=t.print({kind:t.Kind.STRING,value:i,block:t.isPrintableAsBlockString(i)});return(n&&!r?`
`+n:n)+a.replace(/\n/g,`
`+n)+`
`}var ie;(function(e){function t(e){return typeof e==`string`}e.is=t})(ie||={});var y;(function(e){function t(e){return typeof e==`string`}e.is=t})(y||={});var ae;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(ae||={});var b;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.is=t})(b||={});var x;(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=b.MAX_VALUE),t===Number.MAX_VALUE&&(t=b.MAX_VALUE),{line:e,character:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.uinteger(t.line)&&U.uinteger(t.character)}e.is=n})(x||={});var S;(function(e){function t(e,t,n,r){if(U.uinteger(e)&&U.uinteger(t)&&U.uinteger(n)&&U.uinteger(r))return{start:x.create(e,t),end:x.create(n,r)};if(x.is(e)&&x.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&x.is(t.start)&&x.is(t.end)}e.is=n})(S||={});var C;(function(e){function t(e,t){return{uri:e,range:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&S.is(t.range)&&(U.string(t.uri)||U.undefined(t.uri))}e.is=n})(C||={});var oe;(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&S.is(t.targetRange)&&U.string(t.targetUri)&&S.is(t.targetSelectionRange)&&(S.is(t.originSelectionRange)||U.undefined(t.originSelectionRange))}e.is=n})(oe||={});var w;(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.numberRange(t.red,0,1)&&U.numberRange(t.green,0,1)&&U.numberRange(t.blue,0,1)&&U.numberRange(t.alpha,0,1)}e.is=n})(w||={});var se;(function(e){function t(e,t){return{range:e,color:t}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&S.is(t.range)&&w.is(t.color)}e.is=n})(se||={});var ce;(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.string(t.label)&&(U.undefined(t.textEdit)||O.is(t))&&(U.undefined(t.additionalTextEdits)||U.typedArray(t.additionalTextEdits,O.is))}e.is=n})(ce||={});var le;(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(le||={});var ue;(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return U.defined(n)&&(o.startCharacter=n),U.defined(r)&&(o.endCharacter=r),U.defined(i)&&(o.kind=i),U.defined(a)&&(o.collapsedText=a),o}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.uinteger(t.startLine)&&U.uinteger(t.startLine)&&(U.undefined(t.startCharacter)||U.uinteger(t.startCharacter))&&(U.undefined(t.endCharacter)||U.uinteger(t.endCharacter))&&(U.undefined(t.kind)||U.string(t.kind))}e.is=n})(ue||={});var T;(function(e){function t(e,t){return{location:e,message:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&C.is(t.location)&&U.string(t.message)}e.is=n})(T||={});var de;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(de||={});var fe;(function(e){e.Unnecessary=1,e.Deprecated=2})(fe||={});var pe;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&U.string(t.href)}e.is=t})(pe||={});var E;(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return U.defined(n)&&(o.severity=n),U.defined(r)&&(o.code=r),U.defined(i)&&(o.source=i),U.defined(a)&&(o.relatedInformation=a),o}e.create=t;function n(e){let t=e;return U.defined(t)&&S.is(t.range)&&U.string(t.message)&&(U.number(t.severity)||U.undefined(t.severity))&&(U.integer(t.code)||U.string(t.code)||U.undefined(t.code))&&(U.undefined(t.codeDescription)||U.string(t.codeDescription?.href))&&(U.string(t.source)||U.undefined(t.source))&&(U.undefined(t.relatedInformation)||U.typedArray(t.relatedInformation,T.is))}e.is=n})(E||={});var D;(function(e){function t(e,t,...n){let r={title:e,command:t};return U.defined(n)&&n.length>0&&(r.arguments=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.title)&&U.string(t.command)}e.is=n})(D||={});var O;(function(e){function t(e,t){return{range:e,newText:t}}e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}e.insert=n;function r(e){return{range:e,newText:``}}e.del=r;function i(e){let t=e;return U.objectLiteral(t)&&U.string(t.newText)&&S.is(t.range)}e.is=i})(O||={});var k;(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&U.string(t.label)&&(U.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=n})(k||={});var A;(function(e){function t(e){let t=e;return U.string(t)}e.is=t})(A||={});var me;(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}e.del=r;function i(e){let t=e;return O.is(t)&&(k.is(t.annotationId)||A.is(t.annotationId))}e.is=i})(me||={});var j;(function(e){function t(e,t){return{textDocument:e,edits:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&I.is(t.textDocument)&&Array.isArray(t.edits)}e.is=n})(j||={});var M;(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&U.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||A.is(t.annotationId))}e.is=n})(M||={});var N;(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&U.string(t.oldUri)&&U.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||U.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||U.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||A.is(t.annotationId))}e.is=n})(N||={});var P;(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&U.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||U.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||U.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||A.is(t.annotationId))}e.is=n})(P||={});var F;(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>U.string(e.kind)?M.is(e)||N.is(e)||P.is(e):j.is(e)))}e.is=t})(F||={});var he;(function(e){function t(e){return{uri:e}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)}e.is=n})(he||={});var ge;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.integer(t.version)}e.is=n})(ge||={});var I;(function(e){function t(e,t){return{uri:e,version:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&(t.version===null||U.integer(t.version))}e.is=n})(I||={});var _e;(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.string(t.uri)&&U.string(t.languageId)&&U.integer(t.version)&&U.string(t.text)}e.is=n})(_e||={});var L;(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}e.is=t})(L||={});var R;(function(e){function t(e){let t=e;return U.objectLiteral(e)&&L.is(t.kind)&&U.string(t.value)}e.is=t})(R||={});var ve;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ve||={});var ye;(function(e){e.PlainText=1,e.Snippet=2})(ye||={});var be;(function(e){e.Deprecated=1})(be||={});var xe;(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}e.create=t;function n(e){let t=e;return t&&U.string(t.newText)&&S.is(t.insert)&&S.is(t.replace)}e.is=n})(xe||={});var Se;(function(e){e.asIs=1,e.adjustIndentation=2})(Se||={});var Ce;(function(e){function t(e){let t=e;return t&&(U.string(t.detail)||t.detail===void 0)&&(U.string(t.description)||t.description===void 0)}e.is=t})(Ce||={});var we;(function(e){function t(e){return{label:e}}e.create=t})(we||={});var Te;(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}e.create=t})(Te||={});var z;(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}e.fromPlainText=t;function n(e){let t=e;return U.string(t)||U.objectLiteral(t)&&U.string(t.language)&&U.string(t.value)}e.is=n})(z||={});var Ee;(function(e){function t(e){let t=e;return!!t&&U.objectLiteral(t)&&(R.is(t.contents)||z.is(t.contents)||U.typedArray(t.contents,z.is))&&(e.range===void 0||S.is(e.range))}e.is=t})(Ee||={});var De;(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}e.create=t})(De||={});var Oe;(function(e){function t(e,t,...n){let r={label:e};return U.defined(t)&&(r.documentation=t),U.defined(n)?r.parameters=n:r.parameters=[],r}e.create=t})(Oe||={});var ke;(function(e){e.Text=1,e.Read=2,e.Write=3})(ke||={});var Ae;(function(e){function t(e,t){let n={range:e};return U.number(t)&&(n.kind=t),n}e.create=t})(Ae||={});var je;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(je||={});var Me;(function(e){e.Deprecated=1})(Me||={});var Ne;(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}e.create=t})(Ne||={});var Pe;(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}e.create=t})(Pe||={});var Fe;(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}e.create=t;function n(e){let t=e;return t&&U.string(t.name)&&U.number(t.kind)&&S.is(t.range)&&S.is(t.selectionRange)&&(t.detail===void 0||U.string(t.detail))&&(t.deprecated===void 0||U.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}e.is=n})(Fe||={});var Ie;(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(Ie||={});var B;(function(e){e.Invoked=1,e.Automatic=2})(B||={});var Le;(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}e.create=t;function n(e){let t=e;return U.defined(t)&&U.typedArray(t.diagnostics,E.is)&&(t.only===void 0||U.typedArray(t.only,U.string))&&(t.triggerKind===void 0||t.triggerKind===B.Invoked||t.triggerKind===B.Automatic)}e.is=n})(Le||={});var Re;(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):D.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return t&&U.string(t.title)&&(t.diagnostics===void 0||U.typedArray(t.diagnostics,E.is))&&(t.kind===void 0||U.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||D.is(t.command))&&(t.isPreferred===void 0||U.boolean(t.isPreferred))&&(t.edit===void 0||F.is(t.edit))}e.is=n})(Re||={});var ze;(function(e){function t(e,t){let n={range:e};return U.defined(t)&&(n.data=t),n}e.create=t;function n(e){let t=e;return U.defined(t)&&S.is(t.range)&&(U.undefined(t.command)||D.is(t.command))}e.is=n})(ze||={});var Be;(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&U.uinteger(t.tabSize)&&U.boolean(t.insertSpaces)}e.is=n})(Be||={});var Ve;(function(e){function t(e,t,n){return{range:e,target:t,data:n}}e.create=t;function n(e){let t=e;return U.defined(t)&&S.is(t.range)&&(U.undefined(t.target)||U.string(t.target))}e.is=n})(Ve||={});var He;(function(e){function t(e,t){return{range:e,parent:t}}e.create=t;function n(t){let n=t;return U.objectLiteral(n)&&S.is(n.range)&&(n.parent===void 0||e.is(n.parent))}e.is=n})(He||={});var Ue;(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Ue||={});var We;(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(We||={});var Ge;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}e.is=t})(Ge||={});var Ke;(function(e){function t(e,t){return{range:e,text:t}}e.create=t;function n(e){let t=e;return t!=null&&S.is(t.range)&&U.string(t.text)}e.is=n})(Ke||={});var qe;(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}e.create=t;function n(e){let t=e;return t!=null&&S.is(t.range)&&U.boolean(t.caseSensitiveLookup)&&(U.string(t.variableName)||t.variableName===void 0)}e.is=n})(qe||={});var Je;(function(e){function t(e,t){return{range:e,expression:t}}e.create=t;function n(e){let t=e;return t!=null&&S.is(t.range)&&(U.string(t.expression)||t.expression===void 0)}e.is=n})(Je||={});var Ye;(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}e.create=t;function n(e){let t=e;return U.defined(t)&&S.is(e.stoppedLocation)}e.is=n})(Ye||={});var V;(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}e.is=t})(V||={});var H;(function(e){function t(e){return{value:e}}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&(t.tooltip===void 0||U.string(t.tooltip)||R.is(t.tooltip))&&(t.location===void 0||C.is(t.location))&&(t.command===void 0||D.is(t.command))}e.is=n})(H||={});var Xe;(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}e.create=t;function n(e){let t=e;return U.objectLiteral(t)&&x.is(t.position)&&(U.string(t.label)||U.typedArray(t.label,H.is))&&(t.kind===void 0||V.is(t.kind))&&t.textEdits===void 0||U.typedArray(t.textEdits,O.is)&&(t.tooltip===void 0||U.string(t.tooltip)||R.is(t.tooltip))&&(t.paddingLeft===void 0||U.boolean(t.paddingLeft))&&(t.paddingRight===void 0||U.boolean(t.paddingRight))}e.is=n})(Xe||={});var Ze;(function(e){function t(e){return{kind:`snippet`,value:e}}e.createSnippet=t})(Ze||={});var Qe;(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}e.create=t})(Qe||={});var $e;(function(e){function t(e){return{items:e}}e.create=t})($e||={});var et;(function(e){e.Invoked=0,e.Automatic=1})(et||={});var tt;(function(e){function t(e,t){return{range:e,text:t}}e.create=t})(tt||={});var nt;(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}e.create=t})(nt||={});var rt;(function(e){function t(e){let t=e;return U.objectLiteral(t)&&y.is(t.uri)&&U.string(t.name)}e.is=t})(rt||={});var it;(function(e){function t(e,t,n,r){return new at(e,t,n,r)}e.create=t;function n(e){let t=e;return!!(U.defined(t)&&U.string(t.uri)&&(U.undefined(t.languageId)||U.string(t.languageId))&&U.uinteger(t.lineCount)&&U.func(t.getText)&&U.func(t.positionAt)&&U.func(t.offsetAt))}e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[c++]=r[o++]:e[c++]=a[s++];for(;o<r.length;)e[c++]=r[o++];for(;s<a.length;)e[c++]=a[s++];return e}})(it||={});var at=class{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`
`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`
`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return x.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return x.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},U;(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}e.defined=n;function r(e){return e===void 0}e.undefined=r;function i(e){return e===!0||e===!1}e.boolean=i;function a(e){return t.call(e)===`[object String]`}e.string=a;function o(e){return t.call(e)===`[object Number]`}e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}e.numberRange=s;function c(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}e.integer=c;function l(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}e.uinteger=l;function u(e){return t.call(e)===`[object Function]`}e.func=u;function d(e){return typeof e==`object`&&!!e}e.objectLiteral=d;function f(e,t){return Array.isArray(e)&&e.every(t)}e.typedArray=f})(U||={});function W(e){return{ofRule:e}}function G(e,t){return{ofRule:e,isList:!0,separator:t}}function ot(e,t){let n=e.match;return e.match=e=>{let r=!1;return n&&(r=n(e)),r&&t.every(t=>t.match&&!t.match(e))},e}function K(e,t){return{style:t,match:t=>t.kind===e}}function q(e,t){return{style:t||`punctuation`,match:t=>t.kind===`Punctuation`&&t.value===e}}const st={Document:[G(`Definition`)],Definition(e){switch(e.value){case`{`:return`ShortQuery`;case`query`:return`Query`;case`mutation`:return`Mutation`;case`subscription`:return`Subscription`;case`fragment`:return t.Kind.FRAGMENT_DEFINITION;case`schema`:return`SchemaDef`;case`scalar`:return`ScalarDef`;case`type`:return`ObjectTypeDef`;case`interface`:return`InterfaceDef`;case`union`:return`UnionDef`;case`enum`:return`EnumDef`;case`input`:return`InputDef`;case`extend`:return`ExtendDef`;case`directive`:return`DirectiveDef`}},ShortQuery:[`SelectionSet`],Query:[J(`query`),W(Y(`def`)),W(`VariableDefinitions`),G(`Directive`),`SelectionSet`],Mutation:[J(`mutation`),W(Y(`def`)),W(`VariableDefinitions`),G(`Directive`),`SelectionSet`],Subscription:[J(`subscription`),W(Y(`def`)),W(`VariableDefinitions`),G(`Directive`),`SelectionSet`],VariableDefinitions:[q(`(`),G(`VariableDefinition`),q(`)`)],VariableDefinition:[`Variable`,q(`:`),`Type`,W(`DefaultValue`)],Variable:[q(`$`,`variable`),Y(`variable`)],DefaultValue:[q(`=`),`Value`],SelectionSet:[q(`{`),G(`Selection`),q(`}`)],Selection(e,t){return e.value===`...`?t.match(/[\s\u00a0,]*(on\b|@|{)/,!1)?`InlineFragment`:`FragmentSpread`:t.match(/[\s\u00a0,]*:/,!1)?`AliasedField`:`Field`},AliasedField:[Y(`property`),q(`:`),Y(`qualifier`),W(`Arguments`),G(`Directive`),W(`SelectionSet`)],Field:[Y(`property`),W(`Arguments`),G(`Directive`),W(`SelectionSet`)],Arguments:[q(`(`),G(`Argument`),q(`)`)],Argument:[Y(`attribute`),q(`:`),`Value`],FragmentSpread:[q(`...`),Y(`def`),G(`Directive`)],InlineFragment:[q(`...`),W(`TypeCondition`),G(`Directive`),`SelectionSet`],FragmentDefinition:[J(`fragment`),W(ot(Y(`def`),[J(`on`)])),`TypeCondition`,G(`Directive`),`SelectionSet`],TypeCondition:[J(`on`),`NamedType`],Value(e){switch(e.kind){case`Number`:return`NumberValue`;case`String`:return`StringValue`;case`Punctuation`:switch(e.value){case`[`:return`ListValue`;case`{`:return`ObjectValue`;case`$`:return`Variable`;case`&`:return`NamedType`}return null;case`Name`:switch(e.value){case`true`:case`false`:return`BooleanValue`}return e.value===`null`?`NullValue`:`EnumValue`}},NumberValue:[K(`Number`,`number`)],StringValue:[{style:`string`,match:e=>e.kind===`String`,update(e,t){t.value.startsWith(`"""`)&&(e.inBlockstring=!t.value.slice(3).endsWith(`"""`))}}],BooleanValue:[K(`Name`,`builtin`)],NullValue:[K(`Name`,`keyword`)],EnumValue:[Y(`string-2`)],ListValue:[q(`[`),G(`Value`),q(`]`)],ObjectValue:[q(`{`),G(`ObjectField`),q(`}`)],ObjectField:[Y(`attribute`),q(`:`),`Value`],Type(e){return e.value===`[`?`ListType`:`NonNullType`},ListType:[q(`[`),`Type`,q(`]`),W(q(`!`))],NonNullType:[`NamedType`,W(q(`!`))],NamedType:[ct(`atom`)],Directive:[q(`@`,`meta`),Y(`meta`),W(`Arguments`)],DirectiveDef:[J(`directive`),q(`@`,`meta`),Y(`meta`),W(`ArgumentsDef`),J(`on`),G(`DirectiveLocation`,q(`|`))],InterfaceDef:[J(`interface`),Y(`atom`),W(`Implements`),G(`Directive`),q(`{`),G(`FieldDef`),q(`}`)],Implements:[J(`implements`),G(`NamedType`,q(`&`))],DirectiveLocation:[Y(`string-2`)],SchemaDef:[J(`schema`),G(`Directive`),q(`{`),G(`OperationTypeDef`),q(`}`)],OperationTypeDef:[Y(`keyword`),q(`:`),Y(`atom`)],ScalarDef:[J(`scalar`),Y(`atom`),G(`Directive`)],ObjectTypeDef:[J(`type`),Y(`atom`),W(`Implements`),G(`Directive`),q(`{`),G(`FieldDef`),q(`}`)],FieldDef:[Y(`property`),W(`ArgumentsDef`),q(`:`),`Type`,G(`Directive`)],ArgumentsDef:[q(`(`),G(`InputValueDef`),q(`)`)],InputValueDef:[Y(`attribute`),q(`:`),`Type`,W(`DefaultValue`),G(`Directive`)],UnionDef:[J(`union`),Y(`atom`),G(`Directive`),q(`=`),G(`UnionMember`,q(`|`))],UnionMember:[`NamedType`],EnumDef:[J(`enum`),Y(`atom`),G(`Directive`),q(`{`),G(`EnumValueDef`),q(`}`)],EnumValueDef:[Y(`string-2`),G(`Directive`)],InputDef:[J(`input`),Y(`atom`),G(`Directive`),q(`{`),G(`InputValueDef`),q(`}`)],ExtendDef:[J(`extend`),`ExtensionDefinition`],ExtensionDefinition(e){switch(e.value){case`schema`:return t.Kind.SCHEMA_EXTENSION;case`scalar`:return t.Kind.SCALAR_TYPE_EXTENSION;case`type`:return t.Kind.OBJECT_TYPE_EXTENSION;case`interface`:return t.Kind.INTERFACE_TYPE_EXTENSION;case`union`:return t.Kind.UNION_TYPE_EXTENSION;case`enum`:return t.Kind.ENUM_TYPE_EXTENSION;case`input`:return t.Kind.INPUT_OBJECT_TYPE_EXTENSION}},[t.Kind.SCHEMA_EXTENSION]:[`SchemaDef`],[t.Kind.SCALAR_TYPE_EXTENSION]:[`ScalarDef`],[t.Kind.OBJECT_TYPE_EXTENSION]:[`ObjectTypeDef`],[t.Kind.INTERFACE_TYPE_EXTENSION]:[`InterfaceDef`],[t.Kind.UNION_TYPE_EXTENSION]:[`UnionDef`],[t.Kind.ENUM_TYPE_EXTENSION]:[`EnumDef`],[t.Kind.INPUT_OBJECT_TYPE_EXTENSION]:[`InputDef`]};function J(e){return{style:`keyword`,match:t=>t.kind===`Name`&&t.value===e}}function Y(e){return{style:e,match:e=>e.kind===`Name`,update(e,t){e.name=t.value}}}function ct(e){return{style:e,match:e=>e.kind===`Name`,update(e,t){e.prevState?.prevState&&(e.name=t.value,e.prevState.prevState.type=t.value)}}}var lt;(function(e){e.TYPE_SYSTEM=`TYPE_SYSTEM`,e.EXECUTABLE=`EXECUTABLE`,e.UNKNOWN=`UNKNOWN`})(lt||={});const ut=[t.Kind.SCHEMA_DEFINITION,t.Kind.OPERATION_TYPE_DEFINITION,t.Kind.SCALAR_TYPE_DEFINITION,t.Kind.OBJECT_TYPE_DEFINITION,t.Kind.INTERFACE_TYPE_DEFINITION,t.Kind.UNION_TYPE_DEFINITION,t.Kind.ENUM_TYPE_DEFINITION,t.Kind.INPUT_OBJECT_TYPE_DEFINITION,t.Kind.DIRECTIVE_DEFINITION,t.Kind.SCHEMA_EXTENSION,t.Kind.SCALAR_TYPE_EXTENSION,t.Kind.OBJECT_TYPE_EXTENSION,t.Kind.INTERFACE_TYPE_EXTENSION,t.Kind.UNION_TYPE_EXTENSION,t.Kind.ENUM_TYPE_EXTENSION,t.Kind.INPUT_OBJECT_TYPE_EXTENSION],dt={ALIASED_FIELD:`AliasedField`,ARGUMENTS:`Arguments`,SHORT_QUERY:`ShortQuery`,QUERY:`Query`,MUTATION:`Mutation`,SUBSCRIPTION:`Subscription`,TYPE_CONDITION:`TypeCondition`,INVALID:`Invalid`,COMMENT:`Comment`,SCHEMA_DEF:`SchemaDef`,SCALAR_DEF:`ScalarDef`,OBJECT_TYPE_DEF:`ObjectTypeDef`,OBJECT_VALUE:`ObjectValue`,LIST_VALUE:`ListValue`,INTERFACE_DEF:`InterfaceDef`,UNION_DEF:`UnionDef`,ENUM_DEF:`EnumDef`,ENUM_VALUE:`EnumValue`,FIELD_DEF:`FieldDef`,INPUT_DEF:`InputDef`,INPUT_VALUE_DEF:`InputValueDef`,ARGUMENTS_DEF:`ArgumentsDef`,EXTEND_DEF:`ExtendDef`,EXTENSION_DEFINITION:`ExtensionDefinition`,DIRECTIVE_DEF:`DirectiveDef`,IMPLEMENTS:`Implements`,VARIABLE_DEFINITIONS:`VariableDefinitions`,TYPE:`Type`,VARIABLE:`Variable`},ft=Object.assign(Object.assign({},t.Kind),dt);var X;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(X||={});var pt=[{label:`type`,kind:X.Function},{label:`interface`,kind:X.Function},{label:`union`,kind:X.Function},{label:`input`,kind:X.Function},{label:`scalar`,kind:X.Function},{label:`schema`,kind:X.Function}],mt=[{label:`query`,kind:X.Function},{label:`mutation`,kind:X.Function},{label:`subscription`,kind:X.Function},{label:`fragment`,kind:X.Function},{label:`{`,kind:X.Constructor}],ht=e.__commonJSMin(((e,t)=>{function n(e,t){if(e!=null)return e;var n=Error(t===void 0?`Got unexpected `+e:t);throw n.framesToPop=1,n}t.exports=n,t.exports.default=n,Object.defineProperty(t.exports,`__esModule`,{value:!0})})),gt=e.__toESM(ht()),_t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Z={Error:`Error`,Warning:`Warning`,Information:`Information`,Hint:`Hint`},vt={[Z.Error]:1,[Z.Warning]:2,[Z.Information]:3,[Z.Hint]:4},Q=e=>`getModeId`in e?e.getModeId():e.getLanguageId(),yt=e=>{let{schema:r,documentAST:i,introspectionJSON:a,introspectionJSONString:o,documentString:s,...c}=e;if(r)return{...c,documentString:n(r)};if(o)return{...c,introspectionJSONString:o};if(s)return{...c,documentString:s};if(a)return{...c,introspectionJSONString:JSON.stringify(a)};if(i){let e=t.buildASTSchema(i,c.buildSchemaOptions);return{...c,documentString:n(e)}}throw Error(`No schema supplied`)};var bt=120*1e3,xt=class{_defaults;_idleCheckInterval;_lastUsedTime=0;_configChangeListener;_worker=null;_client=null;constructor(e){this._defaults=e,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._configChangeListener=this._defaults.onDidChange(()=>{this._stopWorker()})}_stopWorker(){this._worker&&=(this._worker.dispose(),null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){this._worker&&Date.now()-this._lastUsedTime>bt&&this._stopWorker()}async _getClient(){if(this._lastUsedTime=Date.now(),!this._client&&!this._worker)try{let{languageId:t,formattingOptions:n,schemas:r,externalFragmentDefinitions:i,completionSettings:a}=this._defaults;this._worker=e.editor.createWebWorker({moduleId:`monaco-graphql/esm/GraphQLWorker.js`,label:t,createData:{languageId:t,formattingOptions:n,languageConfig:{schemas:r?.map(yt),externalFragmentDefinitions:i,fillLeafsOnComplete:a.__experimental__fillLeafsOnComplete}}}),this._client=this._worker.getProxy()}catch(e){console.error(`error loading worker`,e)}return this._client}async getLanguageServiceWorker(...e){let t=await this._getClient();return await this._worker.withSyncedResources(e),t}},St=class{defaults;_worker;_disposables=[];_listener=Object.create(null);constructor(t,n){this.defaults=t,this._worker=n,this._worker=n;let r,i=e=>{let n=Q(e);if(n!==this.defaults.languageId)return;let i=e.uri.toString(),a=t.diagnosticSettings.validateVariablesJSON?.[i];r=setTimeout(()=>{this._doValidate(e.uri,n,a)},400),this._listener[i]=e.onDidChangeContent(()=>{clearTimeout(r),r=setTimeout(()=>{this._doValidate(e.uri,n,a)},400)})},a=t=>{e.editor.setModelMarkers(t,this.defaults.languageId,[]);let n=t.uri.toString(),r=this._listener[n];r&&(r.dispose(),delete this._listener[n])};this._disposables.push(e.editor.onDidCreateModel(i),{dispose(){clearTimeout(r)}},e.editor.onWillDisposeModel(e=>{a(e)}),e.editor.onDidChangeModelLanguage(e=>{a(e.model),i(e.model)}),{dispose:()=>{for(let e of Object.values(this._listener))e.dispose()}},t.onDidChange(()=>{for(let t of e.editor.getModels())Q(t)===this.defaults.languageId&&(a(t),i(t))}));for(let t of e.editor.getModels())Q(t)===this.defaults.languageId&&i(t)}dispose(){for(let e of this._disposables)e.dispose();this._disposables=[]}async _doValidate(t,n,r){let i=await this._worker(t);if(!i)return;let a=await i.doValidation(t.toString());if(e.editor.setModelMarkers(e.editor.getModel(t),n,a),r){if(await Promise.resolve().then(()=>require(`./monaco.contribution-6paRlPLP.cjs`)),!r.length)throw Error(`No variables URI strings provided to validate`);let n=await i.doGetVariablesJSONSchema(t.toString());if(!n)return;let a=e.Uri.file(r[0].replace(`.json`,`-schema.json`)).toString(),o={uri:a,schema:n,fileMatch:r},s=e.languages.json.jsonDefaults.diagnosticsOptions.schemas?.filter(e=>e.uri!==a)||[];e.languages.json.jsonDefaults.setDiagnosticsOptions({schemaValidation:`error`,validate:!0,...this.defaults.diagnosticSettings.jsonDiagnosticSettings,schemas:[...s,o],enableSchemaRequest:!1})}}},$=e.languages.CompletionItemKind,Ct={[X.Text]:$.Text,[X.Method]:$.Method,[X.Function]:$.Function,[X.Constructor]:$.Constructor,[X.Field]:$.Field,[X.Variable]:$.Variable,[X.Class]:$.Class,[X.Interface]:$.Interface,[X.Module]:$.Module,[X.Property]:$.Property,[X.Unit]:$.Unit,[X.Value]:$.Value,[X.Enum]:$.Enum,[X.Keyword]:$.Keyword,[X.Snippet]:$.Snippet,[X.Color]:$.Color,[X.File]:$.File,[X.Reference]:$.Reference,[X.Folder]:$.Folder,[X.EnumMember]:$.EnumMember,[X.Constant]:$.Constant,[X.Struct]:$.Struct,[X.Event]:$.Event,[X.Operator]:$.Operator,[X.TypeParameter]:$.TypeParameter};function wt(e){return e in Ct?Ct[e]:$.Text}function Tt(t){return{range:t.range,kind:wt(t.kind),label:t.label,insertText:t.insertText??t.label,insertTextRules:t.insertText?e.languages.CompletionItemInsertTextRule.InsertAsSnippet:void 0,sortText:t.sortText,filterText:t.filterText,documentation:t.documentation,detail:t.detail,command:t.command}}var Et=class{_worker;constructor(e){this._worker=e,this._worker=e}get triggerCharacters(){return[`:`,`$`,` `,`(`,`@`]}async provideCompletionItems(e,t,n,r){try{return{incomplete:!0,suggestions:(await(await this._worker(e.uri)).doComplete(e.uri.toString(),t)).map(Tt)}}catch(e){return console.error(`Error fetching completion items`,e),{suggestions:[]}}}},Dt=class{_worker;constructor(e){this._worker=e,this._worker=e}async provideDocumentFormattingEdits(e,t,n){let r=await(await this._worker(e.uri)).doFormat(e.uri.toString());return r?[{range:e.getFullModelRange(),text:r}]:[]}},Ot=class{_worker;constructor(e){this._worker=e}async provideHover(e,t,n){let r=e.uri,i=await(await this._worker(e.uri)).doHover(r.toString(),t);return i?{range:i.range,contents:[{value:i.content}]}:{contents:[]}}dispose(){}};function kt(t){let n=[],r=[],i=new xt(t);n.push(i);let a=(...e)=>{try{return i.getLanguageServiceWorker(...e)}catch{throw Error(`Error fetching graphql language service worker`)}};function o(){let{modeConfiguration:n,languageId:i}=t;n.documentFormattingEdits&&r.push(e.languages.registerDocumentFormattingEditProvider(i,new Dt(a)))}function s(n){let{modeConfiguration:i,languageId:s}=t;jt(r),i.completionItems&&r.push(e.languages.registerCompletionItemProvider(s,new Et(a))),i.diagnostics&&r.push(new St(n,a)),i.hovers&&r.push(e.languages.registerHoverProvider(s,new Ot(a))),o()}let{modeConfiguration:c,formattingOptions:l,diagnosticSettings:u,externalFragmentDefinitions:d,schemas:f}=t;return s(t),t.onDidChange(e=>{e.modeConfiguration!==c&&(c=e.modeConfiguration,s(e)),e.formattingOptions!==l&&(l=e.formattingOptions,o()),e.externalFragmentDefinitions!==d&&(d=e.externalFragmentDefinitions,s(e)),e.diagnosticSettings!==u&&(u=e.diagnosticSettings,s(e)),e.schemas!==f&&(f=e.schemas,s(e))}),n.push(At(r)),At(n)}function At(e){return{dispose:()=>jt(e)}}function jt(e){for(;e.length;)e.pop().dispose()}exports.setupMode=kt;