diff --git a/asset-manifest.json b/asset-manifest.json index d1a3e4427..c052e36d9 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,8 +1,8 @@ { "files": { "main.css": "/apidom/static/css/main.e6c13ad2.css", - "main.js": "/apidom/static/js/main.72d9b5ab.js", - "static/js/946.e4cbaa37.chunk.js": "/apidom/static/js/946.e4cbaa37.chunk.js", + "main.js": "/apidom/static/js/main.ceed4eca.js", + "static/js/946.a2ff35c9.chunk.js": "/apidom/static/js/946.a2ff35c9.chunk.js", "static/js/600.ff494210.chunk.js": "/apidom/static/js/600.ff494210.chunk.js", "static/js/885.3a57cf40.chunk.js": "/apidom/static/js/885.3a57cf40.chunk.js", "static/media/tree-sitter-yaml.wasm": "/apidom/static/media/tree-sitter-yaml.d396281e11774e0afa7a.wasm", @@ -10,13 +10,13 @@ "static/media/tree-sitter-json.wasm": "/apidom/static/media/tree-sitter-json.13ee407b2f9bd26c9437.wasm", "index.html": "/apidom/index.html", "main.e6c13ad2.css.map": "/apidom/static/css/main.e6c13ad2.css.map", - "main.72d9b5ab.js.map": "/apidom/static/js/main.72d9b5ab.js.map", - "946.e4cbaa37.chunk.js.map": "/apidom/static/js/946.e4cbaa37.chunk.js.map", + "main.ceed4eca.js.map": "/apidom/static/js/main.ceed4eca.js.map", + "946.a2ff35c9.chunk.js.map": "/apidom/static/js/946.a2ff35c9.chunk.js.map", "600.ff494210.chunk.js.map": "/apidom/static/js/600.ff494210.chunk.js.map", "885.3a57cf40.chunk.js.map": "/apidom/static/js/885.3a57cf40.chunk.js.map" }, "entrypoints": [ "static/css/main.e6c13ad2.css", - "static/js/main.72d9b5ab.js" + "static/js/main.ceed4eca.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 3f20c1991..39db692ea 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -ApiDOM playground
\ No newline at end of file +ApiDOM playground
\ No newline at end of file diff --git a/static/js/946.a2ff35c9.chunk.js b/static/js/946.a2ff35c9.chunk.js new file mode 100644 index 000000000..49a2a31d6 --- /dev/null +++ b/static/js/946.a2ff35c9.chunk.js @@ -0,0 +1,2 @@ +(()=>{var e={14278:(e,t,s)=>{"use strict";var i={};s.r(i),s.d(i,{hasElementSourceMap:()=>$e,includesClasses:()=>Me,includesSymbols:()=>Be,isAnnotationElement:()=>we,isArrayElement:()=>be,isBooleanElement:()=>fe,isCommentElement:()=>Se,isElement:()=>he,isLinkElement:()=>Ee,isMemberElement:()=>ye,isNullElement:()=>ge,isNumberElement:()=>ue,isObjectElement:()=>ve,isParseResultElement:()=>je,isPrimitiveElement:()=>Oe,isRefElement:()=>xe,isSourceMapElement:()=>Pe,isStringElement:()=>de});var n={};s.r(n),s.d(n,{detect:()=>Ss,detectionRegExp:()=>xs,lexicalAnalysis:()=>ft,mediaTypes:()=>ws,namespace:()=>Es,parse:()=>js,syntacticAnalysis:()=>Tt,syntacticAnalysisDirect:()=>Tt,syntacticAnalysisIndirect:()=>ys});var r={};s.r(r),s.d(r,{detect:()=>cn,lexicalAnalysis:()=>Ms,mediaTypes:()=>on,namespace:()=>rn,parse:()=>an,syntacticAnalysis:()=>nn});var o={};s.r(o),s.d(o,{isJSONReferenceElement:()=>Gr,isJSONSchemaElement:()=>_r,isLinkDescriptionElement:()=>zr,isMediaElement:()=>Kr});var c={};s.r(c),s.d(c,{isReferenceLikeElement:()=>Vo,isSwaggerExtension:()=>Do});var a={};s.r(a),s.d(a,{isContactElement:()=>fc,isDefinitionsElement:()=>Ic,isExampleElement:()=>$c,isExternalDocumentationElement:()=>xc,isHeaderElement:()=>Bc,isHeadersElement:()=>Oc,isInfoElement:()=>uc,isItemsElement:()=>Sc,isJSONReferenceElementExternal:()=>Tc,isLicenseElement:()=>gc,isOperationElement:()=>Ec,isParameterElement:()=>wc,isParametersDefinitionsElement:()=>Ac,isPathItemElement:()=>bc,isPathItemElementExternal:()=>yc,isPathsElement:()=>vc,isReferenceElement:()=>qc,isReferenceElementExternal:()=>Rc,isResponseElement:()=>Pc,isResponsesDefinitionsElement:()=>Cc,isResponsesElement:()=>jc,isSchemaElement:()=>Zc,isScopesElement:()=>Dc,isSecurityDefinitionsElement:()=>kc,isSecurityRequirementElement:()=>Vc,isSecuritySchemeElement:()=>Nc,isSwaggerElement:()=>hc,isSwaggerVersionElement:()=>dc,isTagElement:()=>Mc,isXmlElement:()=>Fc});var l={};s.r(l),s.d(l,{detect:()=>rl,detectionRegExp:()=>nl,mediaTypes:()=>il,namespace:()=>cl,parse:()=>ol});var p={};s.r(p),s.d(p,{detect:()=>pl,detectionRegExp:()=>ll,mediaTypes:()=>al,namespace:()=>hl,parse:()=>ml});var m={};s.r(m),s.d(m,{isOpenApi3_0LikeElement:()=>Pp,isOpenApiExtension:()=>Zp,isParameterLikeElement:()=>Op,isReferenceLikeElement:()=>$p,isRequestBodyLikeElement:()=>Bp,isResponseLikeElement:()=>Mp,isServerLikeElement:()=>qp,isTagLikeElement:()=>Rp});var h={};s.r(h),s.d(h,{isBooleanJsonSchemaElement:()=>Um,isCallbackElement:()=>xm,isComponentsElement:()=>wm,isContactElement:()=>Sm,isExampleElement:()=>jm,isExternalDocumentationElement:()=>Pm,isHeaderElement:()=>Om,isInfoElement:()=>$m,isLicenseElement:()=>Bm,isLinkElement:()=>Mm,isLinkElementExternal:()=>qm,isMediaTypeElement:()=>Km,isOpenApi3_0Element:()=>Zm,isOpenapiElement:()=>Rm,isOperationElement:()=>Tm,isParameterElement:()=>Fm,isPathItemElement:()=>Cm,isPathItemElementExternal:()=>km,isPathsElement:()=>Im,isReferenceElement:()=>Am,isReferenceElementExternal:()=>Nm,isRequestBodyElement:()=>Dm,isResponseElement:()=>Vm,isResponsesElement:()=>Lm,isSchemaElement:()=>Jm,isSecurityRequirementElement:()=>Hm,isServerElement:()=>_m,isServerVariableElement:()=>Gm,isServersElement:()=>zm});var d={};s.r(d),s.d(d,{detect:()=>Ug,detectionRegExp:()=>Jg,mediaTypes:()=>Lg,namespace:()=>_g,parse:()=>Hg});var u={};s.r(u),s.d(u,{detect:()=>zg,detectionRegExp:()=>Kg,mediaTypes:()=>Gg,namespace:()=>Wg,parse:()=>Xg});var g={};s.r(g),s.d(g,{isBooleanJsonSchemaElement:()=>Nv,isCallbackElement:()=>gv,isComponentsElement:()=>fv,isContactElement:()=>vv,isExampleElement:()=>bv,isExternalDocumentationElement:()=>yv,isHeaderElement:()=>Ev,isInfoElement:()=>xv,isJsonSchemaDialectElement:()=>wv,isLicenseElement:()=>Sv,isLinkElement:()=>jv,isLinkElementExternal:()=>Pv,isMediaTypeElement:()=>Jv,isOpenApi3_1Element:()=>$v,isOpenapiElement:()=>Ov,isOperationElement:()=>Bv,isParameterElement:()=>Mv,isPathItemElement:()=>qv,isPathItemElementExternal:()=>Rv,isPathsElement:()=>Zv,isReferenceElement:()=>Tv,isReferenceElementExternal:()=>Fv,isRequestBodyElement:()=>Cv,isResponseElement:()=>kv,isResponsesElement:()=>Iv,isSchemaElement:()=>Av,isSecurityRequirementElement:()=>Dv,isServerElement:()=>Vv,isServerVariableElement:()=>Lv});var f={};s.r(f),s.d(f,{detect:()=>Ty,detectionRegExp:()=>Zy,mediaTypes:()=>Ry,namespace:()=>Cy,parse:()=>Fy});var v={};s.r(v),s.d(v,{detect:()=>Ay,detectionRegExp:()=>Iy,mediaTypes:()=>ky,namespace:()=>Dy,parse:()=>Ny});var b={};s.r(b),s.d(b,{isJSONReferenceElement:()=>Gr,isJSONSchemaElement:()=>tE,isLinkDescriptionElement:()=>sE,isMediaElement:()=>Kr});var y={};s.r(y),s.d(y,{isJSONReferenceElement:()=>Gr,isJSONSchemaElement:()=>zx,isLinkDescriptionElement:()=>Xx});var E={};s.r(E),s.d(E,{isAsyncApi2Element:()=>pw,isAsyncApiVersionElement:()=>mw,isBooleanJsonSchemaElement:()=>Pw,isChannelBindingsElement:()=>hw,isChannelItemElement:()=>dw,isChannelsElement:()=>uw,isComponentsElement:()=>gw,isContactElement:()=>fw,isIdentifierElement:()=>vw,isInfoElement:()=>bw,isLicenseElement:()=>yw,isOperationElement:()=>Ew,isParameterElement:()=>xw,isParametersElement:()=>ww,isReferenceElement:()=>Sw,isSchemaElement:()=>jw,isSecurityRequirementElement:()=>Ow,isServerBindingsElement:()=>Bw,isServerElement:()=>$w,isServerVariableElement:()=>qw,isServersElement:()=>Mw});var x={};s.r(x),s.d(x,{detect:()=>Aq,detectionRegExp:()=>Iq,mediaTypes:()=>kq,namespace:()=>Dq,parse:()=>Nq});var w={};s.r(w),s.d(w,{detect:()=>Jq,detectionRegExp:()=>Lq,mediaTypes:()=>Vq,namespace:()=>Hq,parse:()=>Uq});var S={};s.r(S),s.d(S,{isInfoElement:()=>hT,isMainElement:()=>mT,isPrincipleElement:()=>dT,isRequirementElement:()=>uT,isRequirementLevelElement:()=>gT,isScenarioElement:()=>fT,isStandardElement:()=>vT,isStandardIdentifierElement:()=>bT});var j=s(12578),P=s(2285),O=s(7638);class $ extends P.RP{constructor(e,t,s){super(e,t,s),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}const B=$;class M extends P.RP{constructor(e,t,s){super(e,t,s),this.element="comment"}}const q=M;var R=s(14985);class Z extends P.ON{constructor(e,t,s){super(e,t,s),this.element="parseResult"}get api(){return this.children.filter((e=>e.classes.contains("api"))).first}get results(){return this.children.filter((e=>e.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((e=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if((0,R.Z)(t))return!1;const s=this.content.findIndex((e=>e===t));return-1!==s&&(this.content[s]=e,!0)}}const T=Z;class F extends P.ON{constructor(e,t,s){super(e,t,s),this.element="sourceMap"}get positionStart(){return this.children.filter((e=>e.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((e=>e.classes.contains("position"))).get(1)}set position(e){if(null===e)return;const t=new P.ON([e.start.row,e.start.column,e.start.char]),s=new P.ON([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),s.classes.push("position"),this.push(t).push(s)}}const C=F;class k extends P.lS{constructor(){super(),this.register("annotation",B),this.register("comment",q),this.register("parseResult",T),this.register("sourceMap",C)}}const I=new k,A=e=>{const t=new k;return(0,O.Z)(e)&&t.use(e),t},N=I,D=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:N).toRefract(e)};var V=s(37591),L=s(19475);const J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:N;if((0,L.Z)(e))try{return t.fromRefract(JSON.parse(e))}catch{}return(0,O.Z)(e)&&(0,V.Z)("element",e)?t.fromRefract(e):t.toElement(e)};var U=s(27928),H=s(47217),_=s(21485),G=s(21427);const K=class extends G{constructor(e,t,s){if(super(e,t,s),this.name=this.constructor.name,"string"===typeof t&&(this.message=t),"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=s&&"object"===typeof s&&Object.hasOwn(s,"cause")&&!("cause"in this)){const{cause:e}=s;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack="".concat(this.stack,"\nCAUSE: ").concat(e.stack))}}};class z extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(K,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"===typeof e&&(this.message=e),"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"===typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack="".concat(this.stack,"\nCAUSE: ").concat(e.stack))}}}const X=z;const W=class extends X{constructor(e,t){if(super(e,t),null!=t&&"object"===typeof t){const{cause:e,...s}=t;Object.assign(this,s)}}},Q=(e,t,s)=>{const i=e[t];if(null!=i){if(!s&&"function"===typeof i)return i;const e=s?i.leave:i.enter;if("function"===typeof e)return e}else{const i=s?e.leave:e.enter;if(null!=i){if("function"===typeof i)return i;const e=i[t];if("function"===typeof e)return e}}return null},Y={},ee=e=>null===e||void 0===e?void 0:e.type,te=e=>"string"===typeof ee(e),se=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),ie=function(e,t){let{keyMap:s=null,state:i={},breakSymbol:n=Y,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=Q,nodeTypeGetter:a=ee,nodePredicate:l=te,nodeCloneFn:p=se,detectCycles:m=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,u,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const E=[],x=[];do{v+=1;const e=v===f.length;let s;const S=e&&0!==b.length;if(e){if(s=0===x.length?void 0:E.pop(),y=u,u=x.pop(),S)if(g){y=y.slice();let e=0;for(const[t,s]of b){const i=t-e;s===r?(y.splice(i,1),e+=1):y[i]=s}}else{y=p(y);for(const[e,t]of b)y[e]=t}v=d.index,f=d.keys,b=d.edits,g=d.inArray,d=d.prev}else if(u!==r&&void 0!==u){if(s=g?v:f[v],y=u[s],y===r||void 0===y)continue;E.push(s)}let j;if(!Array.isArray(y)){if(!l(y))throw new W("Invalid AST Node: ".concat(String(y)),{node:y});if(m&&x.includes(y)){E.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(i))t[e]=s;j=r.call(t,y,s,u,E,x)}if(j===n)break;if(j===o){if(!e){E.pop();continue}}else if(void 0!==j&&(b.push([s,j]),!e)){if(!l(j)){E.pop();continue}y=j}}var w;if(void 0===j&&S&&b.push([s,y]),!e)d={inArray:g,index:v,keys:f,edits:b,prev:d},g=Array.isArray(y),f=g?y:null!==(w=h[a(y)])&&void 0!==w?w:[],v=-1,b=[],u!==r&&void 0!==u&&x.push(u),u=y}while(void 0!==d);return 0!==b.length?b[b.length-1][1]:e};ie[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=null,state:i={},breakSymbol:n=Y,deleteNodeSymbol:r=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:c=Q,nodeTypeGetter:a=ee,nodePredicate:l=te,nodeCloneFn:p=se,detectCycles:m=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const h=s||{};let d,u,g=Array.isArray(e),f=[e],v=-1,b=[],y=e;const E=[],x=[];do{v+=1;const e=v===f.length;let s;const S=e&&0!==b.length;if(e){if(s=0===x.length?void 0:E.pop(),y=u,u=x.pop(),S)if(g){y=y.slice();let e=0;for(const[t,s]of b){const i=t-e;s===r?(y.splice(i,1),e+=1):y[i]=s}}else{y=p(y);for(const[e,t]of b)y[e]=t}v=d.index,f=d.keys,b=d.edits,g=d.inArray,d=d.prev}else if(u!==r&&void 0!==u){if(s=g?v:f[v],y=u[s],y===r||void 0===y)continue;E.push(s)}let j;if(!Array.isArray(y)){if(!l(y))throw new W("Invalid AST Node: ".concat(String(y)),{node:y});if(m&&x.includes(y)){E.pop();continue}const r=c(t,a(y),e);if(r){for(const[e,s]of Object.entries(i))t[e]=s;j=await r.call(t,y,s,u,E,x)}if(j===n)break;if(j===o){if(!e){E.pop();continue}}else if(void 0!==j&&(b.push([s,j]),!e)){if(!l(j)){E.pop();continue}y=j}}var w;if(void 0===j&&S&&b.push([s,y]),!e)d={inArray:g,index:v,keys:f,edits:b,prev:d},g=Array.isArray(y),f=g?y:null!==(w=h[a(y)])&&void 0!==w?w:[],v=-1,b=[],u!==r&&void 0!==u&&x.push(u),u=y}while(void 0!==d);return 0!==b.length?b[b.length-1][1]:e};var ne=s(46398),re=s(15944);const oe=(e,t)=>"object"===typeof t&&null!==t&&e in t&&"function"===typeof t[e],ce=e=>"object"===typeof e&&null!=e&&"_storedElement"in e&&"string"===typeof e._storedElement&&"_content"in e,ae=(e,t)=>"object"===typeof t&&null!==t&&"primitive"in t&&("function"===typeof t.primitive&&t.primitive()===e),le=(e,t)=>"object"===typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof P.ON)&&t.classes.includes(e),pe=(e,t)=>"object"===typeof t&&null!==t&&"element"in t&&t.element===e,me=e=>e({hasMethod:oe,hasBasicElementProps:ce,primitiveEq:ae,isElementType:pe,hasClass:le}),he=me((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof P.W_||t(e)&&s(void 0,e)})),de=me((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof P.RP||t(e)&&s("string",e)})),ue=me((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof P.VL||t(e)&&s("number",e)})),ge=me((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof P.zr||t(e)&&s("null",e)})),fe=me((e=>{let{hasBasicElementProps:t,primitiveEq:s}=e;return e=>e instanceof P.hh||t(e)&&s("boolean",e)})),ve=me((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:i}=e;return e=>e instanceof P.Sb||t(e)&&s("object",e)&&i("keys",e)&&i("values",e)&&i("items",e)})),be=me((e=>{let{hasBasicElementProps:t,primitiveEq:s,hasMethod:i}=e;return e=>e instanceof P.ON&&!(e instanceof P.Sb)||t(e)&&s("array",e)&&i("push",e)&&i("unshift",e)&&i("map",e)&&i("reduce",e)})),ye=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof P.c6||t(e)&&s("member",e)&&i(void 0,e)})),Ee=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof P.EA||t(e)&&s("link",e)&&i(void 0,e)})),xe=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof P.tK||t(e)&&s("ref",e)&&i(void 0,e)})),we=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof B||t(e)&&s("annotation",e)&&i("array",e)})),Se=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof q||t(e)&&s("comment",e)&&i("string",e)})),je=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof T||t(e)&&s("parseResult",e)&&i("array",e)})),Pe=me((e=>{let{hasBasicElementProps:t,isElementType:s,primitiveEq:i}=e;return e=>e instanceof C||t(e)&&s("sourceMap",e)&&i("array",e)})),Oe=e=>pe("object",e)||pe("array",e)||pe("boolean",e)||pe("number",e)||pe("string",e)||pe("null",e)||pe("member",e),$e=e=>Pe(e.meta.get("sourceMap")),Be=(e,t)=>{if(0===e.length)return!0;const s=t.attributes.get("symbols");return!!be(s)&&(0,ne.Z)((0,re.Z)(s.toValue()),e)},Me=(e,t)=>0===e.length||(0,ne.Z)((0,re.Z)(t.classes.toValue()),e);const qe=class extends W{constructor(e,t){super(e,t),"undefined"!==typeof t&&(this.value=t.value)}};const Re=class extends qe{};const Ze=class extends qe{},Te=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{visited:s=new WeakMap}=t,i={...t,visited:s};if(s.has(e))return s.get(e);if(e instanceof P.KeyValuePair){const{key:t,value:n}=e,r=he(t)?Te(t,i):t,o=he(n)?Te(n,i):n,c=new P.KeyValuePair(r,o);return s.set(e,c),c}if(e instanceof P.rm){const t=e=>Te(e,i),n=[...e].map(t),r=new P.rm(n);return s.set(e,r),r}if(e instanceof P.O4){const t=e=>Te(e,i),n=[...e].map(t),r=new P.O4(n);return s.set(e,r),r}if(he(e)){const t=ke(e);if(s.set(e,t),e.content)if(he(e.content))t.content=Te(e.content,i);else if(e.content instanceof P.KeyValuePair)t.content=Te(e.content,i);else if(Array.isArray(e.content)){const s=e=>Te(e,i);t.content=e.content.map(s)}else t.content=e.content;else t.content=e.content;return t}throw new Re("Value provided to cloneDeep function couldn't be cloned",{value:e})};Te.safe=e=>{try{return Te(e)}catch{return e}};const Fe=e=>{const{key:t,value:s}=e;return new P.KeyValuePair(t,s)},Ce=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=Te(e.meta)),e.attributes.length>0&&(t._attributes=Te(e.attributes)),he(e.content)){const s=e.content;t.content=Ce(s)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof P.KeyValuePair?t.content=Fe(e.content):t.content=e.content;return t},ke=e=>{if(e instanceof P.KeyValuePair)return Fe(e);if(e instanceof P.rm)return(e=>{const t=[...e];return new P.rm(t)})(e);if(e instanceof P.O4)return(e=>{const t=[...e];return new P.O4(t)})(e);if(he(e))return Ce(e);throw new Ze("Value provided to cloneShallow function couldn't be cloned",{value:e})};ke.safe=e=>{try{return ke(e)}catch{return e}};const Ie=e=>ve(e)?"ObjectElement":be(e)?"ArrayElement":ye(e)?"MemberElement":de(e)?"StringElement":fe(e)?"BooleanElement":ue(e)?"NumberElement":ge(e)?"NullElement":Ee(e)?"LinkElement":xe(e)?"RefElement":void 0,Ae=e=>he(e)?ke(e):se(e),Ne=(0,H.Z)(Ie,L.Z),De={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]},Ve=U({props:{result:[],predicate:_.Z,returnOnTrue:void 0,returnOnFalse:void 0},init(){let{predicate:e=this.predicate,returnOnTrue:t=this.returnOnTrue,returnOnFalse:s=this.returnOnFalse}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=s},methods:{enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}}),Le=function(e,t){let{keyMap:s=De,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ie(e,t,{keyMap:s,nodeTypeGetter:Ie,nodePredicate:Ne,nodeCloneFn:Ae,...i})};Le[Symbol.for("nodejs.util.promisify.custom")]=async function(e,t){let{keyMap:s=De,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ie[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:s,nodeTypeGetter:Ie,nodePredicate:Ne,nodeCloneFn:Ae,...i})};const Je=U({props:{nestingLevel:0,result:""},methods:{enter(e){const{element:t}=e,s=t.charAt(0).toUpperCase()+t.slice(1),i=" ".repeat(this.nestingLevel);this.result+=this.nestingLevel>0?"\n":"",this.result+="".concat(i,"(").concat(s,"Element"),this.nestingLevel+=1},leave(){this.nestingLevel-=1,this.result+=")"}}}),Ue=e=>{const t=Je();return Le(e,t),t.result};var He=s(66557);const _e=e=>"string"===typeof(null===e||void 0===e?void 0:e.type)?e.type:Ie(e),Ge={EphemeralObject:["content"],EphemeralArray:["content"],...De},Ke=function(e,t){let{keyMap:s=Ge,...i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Le(e,t,{keyMap:s,nodeTypeGetter:_e,nodePredicate:He.Z,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...i})};Ke[Symbol.for("nodejs.util.promisify.custom")]=async function(e){let{keyMap:t=Ge,...s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Le[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:_e,nodePredicate:He.Z,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...s})};var ze=s(82601);const Xe=class{constructor(e){(0,ze.Z)(this,"type","EphemeralArray"),(0,ze.Z)(this,"content",[]),(0,ze.Z)(this,"reference",void 0),this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const We=class{constructor(e){(0,ze.Z)(this,"type","EphemeralObject"),(0,ze.Z)(this,"content",[]),(0,ze.Z)(this,"reference",void 0),this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}},Qe=U.init((function(){const e=new WeakMap;this.BooleanElement=function(e){return e.toValue()},this.NumberElement=function(e){return e.toValue()},this.StringElement=function(e){return e.toValue()},this.NullElement=function(){return null},this.ObjectElement={enter(t){if(e.has(t))return e.get(t).toReference();const s=new We(t.content);return e.set(t,s),s}},this.EphemeralObject={leave:e=>e.toObject()},this.MemberElement={enter:e=>[e.key,e.value]},this.ArrayElement={enter(t){if(e.has(t))return e.get(t).toReference();const s=new Xe(t.content);return e.set(t,s),s}},this.EphemeralArray={leave:e=>e.toArray()}})),Ye=e=>he(e)?de(e)||ue(e)||fe(e)||ge(e)?e.toValue():Ke(e,Qe()):e;var et=s(67675),tt=s(34830),st=s(31064);const it=class extends X{};const nt=class extends it{};const rt=class extends Array{constructor(){super(...arguments),(0,ze.Z)(this,"unknownMediaType","application/octet-stream")}filterByFormat(){throw new nt("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new nt("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new nt("latest method in MediaTypes class is not yet implemented.")}};const ot=class extends W{constructor(e,t){super(e,t),"undefined"!==typeof t&&(this.source=t.source,this.parserOptions=t.parserOptions)}},ct=U().init((function(){const e=[],t=async(t,s)=>{if((0,L.Z)(s))return e.find((e=>!!(0,st.Z)(e.mediaTypes)&&e.mediaTypes.includes(s)));const i=await(async t=>{const s=[];for(const i of e)(0,tt.Z)(i.detect)&&await i.detect(t)&&s.push(i);return s})(t);return(0,et.Z)(i)};this.use=function(t){return e.push(t),this},this.findNamespace=async function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=await t(e,s.mediaType);return null===i||void 0===i?void 0:i.namespace},this.findMediaType=async function(e){const s=await t(e,void 0);if("undefined"===typeof s)return(new rt).unknownMediaType;if("undefined"===typeof s.mediaTypes)return(new rt).unknownMediaType;if("undefined"===typeof s.detectionRegExp)return s.mediaTypes.latest();const{detectionRegExp:i}=s,n=e.match(i);if(null===n)return(new rt).unknownMediaType;const{groups:r}=n,o=(null===r||void 0===r?void 0:r.version)||(null===r||void 0===r?void 0:r.version_json)||(null===r||void 0===r?void 0:r.version_yaml),c=null!==r&&void 0!==r&&r.version_json?"json":null!==r&&void 0!==r&&r.version_yaml?"yaml":"generic";return"undefined"===typeof o?s.mediaTypes.latest():s.mediaTypes.findBy(o,c)},this.parse=async function(e){let s,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{s=await t(e,i.mediaType)}catch(n){throw new ot("Encountered an unexpected error while matching parser adapters against the source.",{source:e,parserOptions:i,cause:n})}if((0,R.Z)(s))throw new ot("Source did not match any registered parsers",{source:e,parserOptions:i});try{return s.parse(e,i)}catch(n){throw new ot("Parsing encountered an unexpected error.",{source:e,parserOptions:i,cause:n})}}})),at=ct;var lt=s(44245),pt=s(22376);const mt=globalThis.fetch;(0,tt.Z)(mt)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===ut&&null===gt)gt=ht.init().then((()=>ht.Language.load(dt))).then((e=>{const t=new ht;return t.setLanguage(e),t})).finally((()=>{gt=null})),ut=await gt;else if(null===ut&&null!==gt)ut=await gt;else if(null===ut)throw new X("Error while initializing web-tree-sitter and loading tree-sitter-json grammar.");return ut.parse(e)};var vt=s(1546),bt=s(26418),yt=s(37361);const Et=()=>({predicates:{...i},namespace:N}),xt={toolboxCreator:Et,visitorOptions:{nodeTypeGetter:Ie,exposeEdits:!0}},wt=function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===t.length)return e;const i=(0,vt.Z)(xt,s),{toolboxCreator:n,visitorOptions:r}=i,o=n(),c=t.map((e=>e(o))),a=function(e){let{visitFnGetter:t=Q,nodeTypeGetter:s=ee,breakSymbol:i=Y,deleteNodeSymbol:n=null,skipVisitingNodeSymbol:r=!1,exposeEdits:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const c=Symbol("skip"),a=new Array(e.length).fill(c);return{enter(l){let p=l,m=!1;for(var h=arguments.length,d=new Array(h>1?h-1:0),u=1;u1?o-1:0),p=1;p{let{Type:s,plugins:i=[]}=t;const n=new s(e);return wt(n,i,{toolboxCreator:Et,visitorOptions:{nodeTypeGetter:Ie}})},jt=e=>function(t){return St(t,{...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Type:e})};P.Sb.refract=jt(P.Sb),P.ON.refract=jt(P.ON),P.RP.refract=jt(P.RP),P.hh.refract=jt(P.hh),P.zr.refract=jt(P.zr),P.VL.refract=jt(P.VL),P.EA.refract=jt(P.EA),P.tK.refract=jt(P.tK),B.refract=jt(B),q.refract=jt(q),T.refract=jt(T),C.refract=jt(C);const Pt=class{constructor(e){(0,ze.Z)(this,"hasError",!1),(0,ze.Z)(this,"children",[]),this.type=e.nodeType,this.startPosition=e.startPosition,this.endPosition=e.endPosition,this.startIndex=e.startIndex,this.endIndex=e.endIndex,this.text=e.nodeText,this.isNamed=e.nodeIsNamed,this.isMissing=e.nodeIsMissing}get keyNode(){if("pair"===this.type)return this.children.find((e=>"key"===e.fieldName))}get valueNode(){if("pair"===this.type)return this.children.find((e=>"value"===e.fieldName))}setFieldName(e){return"function"===typeof e.currentFieldName?this.fieldName=e.currentFieldName():this.fieldName=e.currentFieldName,this}setHasError(e){return"function"===typeof e.currentNode?this.hasError=e.currentNode().hasError():this.hasError=e.currentNode.hasError(),this}pushChildren(){this.children.push(...arguments)}},Ot=U({props:{sourceMap:!1,annotations:[]},init(){this.annotations=[];const e=(e,t)=>{if(!this.sourceMap)return;const s=new C,i=(e=>{const t=new P.ON([e.startPosition.row,e.startPosition.column,e.startIndex]),s=new P.ON([e.endPosition.row,e.endPosition.column,e.endIndex]);return t.classes.push("position"),s.classes.push("position"),[t,s]})(e);if(null!==i){const[e,t]=i;s.push(e),s.push(t)}s.astNode=e,t.meta.set("sourceMap",s)};this.enter=function(t){if(t instanceof Pt&&!t.isNamed&&t.isMissing){const s=t.type||t.text,i="(Missing ".concat(s,")"),n=new B(i);n.classes.push("warning"),e(t,n),this.annotations.push(n)}return null},this.document=function(t){const s=new T;return s._content=t.children,e(t,s),s},this.ParseResultElement={leave(e){const t=e.findElements(Oe);if(t.length>0){t[0].classes.push("result")}this.annotations.forEach((t=>{e.push(t)})),this.annotations=[]}},this.object=function(t){const s=new P.Sb;return s._content=t.children,e(t,s),s},this.array=function(t){const s=new P.ON;return s._content=t.children,e(t,s),s},this.pair=function(t){const s=new P.c6;return s.content.key=t.keyNode,s.content.value=t.valueNode,e(t,s),t.children.length>3&&t.children.filter((e=>"ERROR"===e.type)).forEach((e=>{this.ERROR(e,t,[],[t])})),s},this.string=function(t){const s=new P.RP(JSON.parse(t.text));return e(t,s),s},this.number=function(t){const s=new P.VL(Number(t.text));return e(t,s),s},this.null=function(t){const s=new P.zr;return e(t,s),s},this.true=function(t){const s=new P.hh(!0);return e(t,s),s},this.false=function(t){const s=new P.hh(!1);return e(t,s),s},this.ERROR=function(t,s,i,n){const r=!t.hasError,o=t.text,c=r?"(Unexpected ".concat(o,")"):"(Error ".concat(o,")"),a=new B(c);if(a.classes.push("error"),e(t,a),0===n.length){const e=new T;return e.push(a),e}return this.annotations.push(a),null}}}),$t=Ot;class Bt{constructor(e){this.cursor=e}document(){return new Pt(this.cursor)}object(){return new Pt(this.cursor).setFieldName(this.cursor)}array(){return new Pt(this.cursor).setFieldName(this.cursor)}pair(){return new Pt(this.cursor)}string(){return new Pt(this.cursor).setFieldName(this.cursor)}number(){return new Pt(this.cursor).setFieldName(this.cursor)}null(){return new Pt(this.cursor).setFieldName(this.cursor)}true(){return new Pt(this.cursor).setFieldName(this.cursor)}false(){return new Pt(this.cursor).setFieldName(this.cursor)}ERROR(){return new Pt(this.cursor).setHasError(this.cursor)}*[Symbol.iterator](){let e;if(e=this.cursor.nodeType in this?this[this.cursor.nodeType]():new Pt(this.cursor),this.cursor.gotoFirstChild()){const[t]=new Bt(this.cursor);for(e.pushChildren(t);this.cursor.gotoNextSibling();){const t=new Bt(this.cursor);e.pushChildren(...t)}this.cursor.gotoParent()}yield e}}const Mt=Bt,qt={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"],...De},Rt=e=>je(e)?"ParseResultElement":he(e)?Ie(e):ee(e),Zt=e=>he(e)||te(e),Tt=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=$t(),i=e.walk(),n=new Mt(i),[r]=Array.from(n);return ie(r,s,{keyMap:qt,nodeTypeGetter:Rt,nodePredicate:Zt,state:{sourceMap:t}})},Ft=U({statics:{type:"point"},props:{type:"point",row:null,column:null,char:null},init(){let{row:e=null,column:t=null,char:s=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.row=e,this.column=t,this.char=s}}),Ct=U({statics:{type:"position"},props:{type:"position",start:null,end:null},init(){let{start:e=null,end:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.start=e,this.end=t}}),kt=U({props:{type:null,position:null,children:[]},init(){let{children:e=[],position:t=null,isMissing:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stamp:i={}}=arguments.length>1?arguments[1]:void 0;this.type=i.type,this.isMissing=s,this.children=e,this.position=t},methods:{clone(){const e=Object.create(Object.getPrototypeOf(this));return Object.getOwnPropertyNames(this).forEach((t=>{const s=Object.getOwnPropertyDescriptor(this,t);Object.defineProperty(e,t,s)})),e}}}),It=U(kt,{statics:{type:"literal"},props:{value:null},init(){let{value:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.value=e}}),At=U(kt),Nt=U(At,{statics:{type:"document"},methods:{get child(){return(0,et.Z)(this.children)}}}),Dt=U(kt,{statics:{type:"parseResult"},methods:{get rootNode(){return(0,et.Z)(this.children)}}}),Vt=(e,t)=>(null===t||void 0===t?void 0:t.type)===e,Lt=(Vt.bind(void 0,"literal"),Vt.bind(void 0,"position"),Vt.bind(void 0,"point"),Vt.bind(void 0,"parseResult"),Vt.bind(void 0,"document"),Vt.bind(void 0,"string")),Jt=Vt.bind(void 0,"false"),Ut=Vt.bind(void 0,"true"),Ht=Vt.bind(void 0,"null"),_t=Vt.bind(void 0,"number"),Gt=Vt.bind(void 0,"array"),Kt=Vt.bind(void 0,"object"),zt=Vt.bind(void 0,"stringContent"),Xt=Vt.bind(void 0,"escapeSequence"),Wt=Vt.bind(void 0,"property"),Qt=Vt.bind(void 0,"key"),Yt=U(At,{statics:{type:"object"},methods:{get properties(){return this.children.filter(Wt)}}}),es=U(At,{statics:{type:"string"},methods:{get value(){return 1===this.children.length?this.children[0].value:this.children.filter((e=>zt(e)||Xt(e))).reduce(((e,t)=>e+t.value),"")}}}),ts=U(es,{statics:{type:"key"}}),ss=U(At,{statics:{type:"property"},methods:{get key(){return this.children.find(Qt)},get value(){return this.children.find((e=>Jt(e)||Ut(e)||Ht(e)||_t(e)||Lt(e)||Gt(e)||Kt(e)))}}}),is=U(At,{statics:{type:"array"},methods:{get items(){return this.children.filter((e=>Jt(e)||Ut(e)||Ht(e)||_t(e)||Lt(e)||Gt(e)||Kt))}}}),ns=U(At,{statics:{type:"value"},props:{value:null},init(){let{value:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.value=e}}),rs=U(ns,{statics:{type:"stringContent"}}),os=U(ns,{statics:{type:"number"}}),cs=U(ns,{statics:{type:"null"}}),as=U(ns,{statics:{type:"true"}}),ls=U(ns,{statics:{type:"false"}}),ps=U(kt,{statics:{type:"error"},props:{value:null,isUnexpected:!1},init(){let{value:e=null,isUnexpected:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.value=e,this.isUnexpected=t}}),ms={document:["children"],object:["children"],array:["children"],string:["children"],property:["children"],key:["children"],error:["children"]},hs=U({init(){const e=e=>{const t=Ft({row:e.startPosition.row,column:e.startPosition.column,char:e.startIndex}),s=Ft({row:e.endPosition.row,column:e.endPosition.column,char:e.endIndex});return Ct({start:t,end:s})};this.enter=function(t){if(t instanceof Pt&&!t.isNamed){const s=e(t),i=t.type||t.text,{isMissing:n}=t;return It({value:i,position:s,isMissing:n})}},this.document={enter(t){const s=e(t);return Nt({children:t.children,position:s,isMissing:t.isMissing})},leave:e=>Dt({children:[e]})},this.object=function(t){const s=e(t);return Yt({children:t.children,position:s,isMissing:t.isMissing})},this.pair=function(t){const s=e(t),i=t.children.slice(1),{keyNode:n}=t,r=ts({children:(null===n||void 0===n?void 0:n.children)||[],position:null!=n?e(n):null,isMissing:null!=n&&n.isMissing});return ss({children:[r,...i],position:s,isMissing:t.isMissing})},this.array=function(t){const s=e(t);return is({children:t.children,position:s,isMissing:t.isMissing})},this.string=function(t){const s=e(t),i=rs({value:JSON.parse(t.text)});return es({children:[i],position:s,isMissing:t.isMissing})},this.number=function(t){const s=e(t),i=t.text;return os({value:i,position:s,isMissing:t.isMissing})},this.null=function(t){const s=e(t),i=t.text;return cs({value:i,position:s,isMissing:t.isMissing})},this.true=function(t){const s=e(t),i=t.text;return as({value:i,position:s,isMissing:t.isMissing})},this.false=function(t){const s=e(t),i=t.text;return ls({value:i,position:s,isMissing:t.isMissing})},this.ERROR=function(t,s,i,n){const r=e(t),o=ps({children:t.children,position:r,isUnexpected:!t.hasError,isMissing:t.isMissing,value:t.text});return 0===n.length?Dt({children:[o]}):o}}}),ds=hs,us={[Dt.type]:["children"],[Nt.type]:["children"],[Yt.type]:["children"],[ss.type]:["children"],[is.type]:["children"],[ps.type]:["children"],...De},gs=e=>je(e)?"ParseResultElement":he(e)?Ie(e):ee(e),fs=e=>he(e)||te(e),vs=U({props:{sourceMap:!1,annotations:[]},init(){this.annotation=[];const e=(e,t)=>{if(!this.sourceMap)return;const s=new C;s.position=e.position,s.astNode=e,t.meta.set("sourceMap",s)};this.document=function(e){const t=new T;return t._content=e.children,t},this.ParseResultElement={leave(e){const t=e.findElements(Oe);if(t.length>0){t[0].classes.push("result")}this.annotations.forEach((t=>{e.push(t)})),this.annotations=[]}},this.object=function(t){const s=new P.Sb;return s._content=t.children,e(t,s),s},this.property=function(t){const s=new P.c6;return s.content.key=t.key,s.content.value=t.value,e(t,s),t.children.length>3&&t.children.filter((e=>"error"===e.type)).forEach((e=>{this.error(e,t,[],[t])})),s},this.key=function(t){const s=new P.RP(t.value);return e(t,s),s},this.array=function(t){const s=new P.ON;return s._content=t.children,e(t,s),s},this.string=function(t){const s=new P.RP(t.value);return e(t,s),s},this.number=function(t){const s=new P.VL(Number(t.value));return e(t,s),s},this.null=function(t){const s=new P.zr;return e(t,s),s},this.true=function(t){const s=new P.hh(!0);return e(t,s),s},this.false=function(t){const s=new P.hh(!1);return e(t,s),s},this.literal=function(t){if(t.isMissing){const s="(Missing ".concat(t.value,")"),i=new B(s);i.classes.push("warning"),e(t,i),this.annotations.push(i)}return null},this.error=function(t,s,i,n){const r=t.isUnexpected?"(Unexpected ".concat(t.value,")"):"(Error ".concat(t.value,")"),o=new B(r);if(o.classes.push("error"),e(t,o),0===n.length){const e=new T;return e.push(o),e}return this.annotations.push(o),null}}}),bs=vs,ys=function(e){let{sourceMap:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=e.walk(),i=new Mt(s),[n]=Array.from(i),r=ds(),o=bs(),c=ie(n,r,{keyMap:ms,state:{sourceMap:t}});return ie(c.rootNode,o,{keyMap:us,nodeTypeGetter:gs,nodePredicate:fs,state:{sourceMap:t}})},Es=A(),xs=/(?^\s*true\s*$)|(?^\s*false\s*$)|(?^\s*null\s*$)|(?^\s*\d+\s*$)|(?^\s*{\s*)|(?^\s*\[\s*)|(?^\s*"(((?=\\)\\(["\\/bfnrt]|u[0-9a-fA-F]{4}))|[^"\\\x00-\x1F\x7F])*"\s*$)/;const ws=new class extends rt{latest(){return this[0]}}("application/json"),Ss=async e=>{if(!xs.test(e))return!1;try{return"ERROR"!==(await ft(e)).rootNode.type}catch{return!1}},js=async function(e){let{sourceMap:t=!1,syntacticAnalysis:s="direct"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=await ft(e);let n;return n="indirect"===s?ys(i,{sourceMap:t}):Tt(i,{sourceMap:t}),n},Ps=globalThis.fetch;(0,tt.Z)(Ps)&&(globalThis.fetch=function(){for(var e=arguments.length,t=new Array(e),s=0;s{if(null===$s&&null===Bs)Bs=ht.init().then((()=>ht.Language.load(Os))).then((e=>{const t=new ht;return t.setLanguage(e),t})).finally((()=>{Bs=null})),$s=await Bs;else if(null===$s&&null!==Bs)$s=await Bs;else if(null===$s)throw new X("Error while initializing web-tree-sitter and loading tree-sitter-yaml grammar.");return $s.parse(e)};var qs=s(82801);const Rs=class extends W{};const Zs=class extends Rs{constructor(e,t){super(e,t),"undefined"!==typeof t&&(this.specificTagName=t.specificTagName,this.explicitTagName=t.explicitTagName,this.tagKind=t.tagKind,this.tagPosition=t.tagPosition,this.nodeCanonicalContent=t.nodeCanonicalContent,this.node=t.node)}};let Ts=function(e){return e.Scalar="Scalar",e.Sequence="Sequence",e.Mapping="Mapping",e}({});const Fs=U(kt,{statics:{type:"tag"},props:{explicitName:"",kind:null},init(){let{explicitName:e,kind:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.explicitName=e,this.kind=t}});var Cs=s(28854),ks=s(50495),Is=s(89615),As=s(32841),Ns=s(75631),Ds=s(26181),Vs=s(4293),Ls=s(55514),Js=s(52776),Us=s(97307),Hs=s(32157),_s=s(45278),Gs=s(44174),Ks=s(54959),zs=s(33279),Xs=s(21031),Ws=s(70220);const Qs=/^(?