@devtron-labs/devtron-fe-common-lib 0.0.88-beta-2 → 0.0.88-beta-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Api.d.ts +1 -1
- package/dist/Common/BreadCrumb/BreadCrumb.d.ts +1 -1
- package/dist/Common/BreadCrumb/BreadcrumbStore.d.ts +2 -0
- package/dist/Common/BreadCrumb/Types.d.ts +4 -0
- package/dist/Common/Checkbox.d.ts +1 -1
- package/dist/Common/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +1 -1
- package/dist/Common/Common.service.d.ts +1 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +1 -1
- package/dist/Common/Dialogs/DeleteDialog.d.ts +1 -1
- package/dist/Common/Dialogs/DialogForm.d.ts +1 -1
- package/dist/Common/Helper.d.ts +2 -3
- package/dist/Common/Hooks/useStateFilters/types.d.ts +4 -1
- package/dist/Common/Modals/Modal.d.ts +1 -1
- package/dist/Common/MultiSelectCustomization.d.ts +8 -0
- package/dist/Common/Policy.Types.d.ts +1 -1
- package/dist/Common/RJSF/common/FieldRow.d.ts +1 -1
- package/dist/Common/RJSF/config.d.ts +1 -1
- package/dist/Common/RJSF/constants.d.ts +0 -4
- package/dist/Common/RJSF/templates/ButtonTemplates/AddButton.d.ts +1 -1
- package/dist/Common/RJSF/types.d.ts +1 -1
- package/dist/Common/RJSF/utils.d.ts +1 -2
- package/dist/Common/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/Common/ResizableTextarea.d.ts +1 -1
- package/dist/Common/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +4 -0
- package/dist/Common/SegmentedBarChart/SegmentedBarChart.d.ts +1 -1
- package/dist/Common/Select/Select.d.ts +1 -1
- package/dist/Common/Types.d.ts +6 -5
- package/dist/Common/index.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/Authorization/shared/components/UserRoleGroupsTable/UserRoleGroupTableRow.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/Authorization/shared/components/UserRoleGroupsTable/types.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/Authorization/types.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraConfigForm.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraDescriptionField.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormAction.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraFormItem.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/BuildInfraProfileNameField.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/Footer.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/constants.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/services.d.ts +1 -1
- package/dist/Pages/GlobalConfigurations/BuildInfra/types.d.ts +3 -3
- package/dist/Shared/Components/APIResponseHandler/types.d.ts +2 -2
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/types.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/Sidebar.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/service.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +3 -3
- package/dist/Shared/Components/DatePicker/DateSelect.d.ts +3 -0
- package/dist/Shared/Components/DatePicker/SingleDatePickerComponent.d.ts +12 -0
- package/dist/Shared/Components/DatePicker/TimeSelect.d.ts +3 -0
- package/dist/Shared/Components/DatePicker/constants.d.ts +122 -0
- package/dist/Shared/Components/DatePicker/index.d.ts +4 -0
- package/dist/Shared/Components/DatePicker/types.d.ts +58 -0
- package/dist/Shared/Components/DatePicker/utils.d.ts +47 -0
- package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +3 -0
- package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +4 -0
- package/dist/Shared/Components/FeatureDescription/constant.d.ts +8 -0
- package/dist/Shared/Components/FeatureDescription/index.d.ts +2 -0
- package/dist/Shared/Components/FeatureDescription/types.d.ts +19 -0
- package/dist/Shared/Components/FeatureDescription/utils.d.ts +6 -0
- package/dist/Shared/Components/Header/service.d.ts +1 -1
- package/dist/Shared/Components/ImageCard/types.d.ts +2 -2
- package/dist/Shared/Components/ImageCardAccordion/types.d.ts +2 -2
- package/dist/Shared/Components/ReactSelect/constants.d.ts +14 -0
- package/dist/Shared/Components/ReactSelect/index.d.ts +1 -0
- package/dist/Shared/Components/ReactSelect/utils.d.ts +4 -0
- package/dist/Shared/Components/ScannedByToolModal/ScannedByToolModal.d.ts +1 -1
- package/dist/Shared/Components/index.d.ts +2 -0
- package/dist/Shared/Helpers.d.ts +2 -2
- package/dist/Shared/Providers/UserEmailProvider/UserEmailProvider.d.ts +6 -0
- package/dist/Shared/Providers/UserEmailProvider/index.d.ts +2 -0
- package/dist/Shared/Providers/UserEmailProvider/types.d.ts +5 -0
- package/dist/Shared/Providers/index.d.ts +1 -0
- package/dist/Shared/Providers/types.d.ts +2 -2
- package/dist/Shared/types.d.ts +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/{yaml.worker-cc1a551a.js → yaml.worker-23754585.js} +28 -28
- package/dist/{cssMode-d302cd0c.js → cssMode-737c2ae4.js} +1 -1
- package/dist/{freemarker2-d74ed1a0.js → freemarker2-8fa6ffb9.js} +1 -1
- package/dist/{handlebars-ff309832.js → handlebars-446e0789.js} +1 -1
- package/dist/{html-3067ec3f.js → html-fd748031.js} +1 -1
- package/dist/{htmlMode-4f605288.js → htmlMode-3ded316b.js} +1 -1
- package/dist/{index-f906ad2e.js → index-894b7670.js} +65634 -50418
- package/dist/index.js +396 -385
- package/dist/{javascript-6e3e74e7.js → javascript-12c768f4.js} +1 -1
- package/dist/{jsonMode-3cfaa464.js → jsonMode-3d012233.js} +1 -1
- package/dist/{liquid-7ba93def.js → liquid-fd922791.js} +1 -1
- package/dist/{mdx-d2d5ed5c.js → mdx-5e8fa3a5.js} +1 -1
- package/dist/{python-1590a924.js → python-c82dbf5c.js} +1 -1
- package/dist/{razor-c731ff04.js → razor-e8be9cf0.js} +1 -1
- package/dist/{tsMode-09ac7368.js → tsMode-029b3084.js} +1 -1
- package/dist/{typescript-9a835335.js → typescript-f5b8955d.js} +1 -1
- package/dist/{xml-95118253.js → xml-7b502d63.js} +1 -1
- package/dist/{yaml-8b85418b.js → yaml-f7bc54f5.js} +1 -1
- package/package.json +11 -3
|
@@ -17,8 +17,8 @@ var bA=Object.defineProperty;var vA=(Os,ts,js)=>ts in Os?bA(Os,ts,{enumerable:!0
|
|
|
17
17
|
`+" ".repeat(t)),new Array(Ca).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(Ca).fill(0).map((e,t)=>`\r
|
|
18
18
|
`+" ".repeat(t));var cu;(function(e){e.DEFAULT={allowTrailingComma:!1}})(cu||(cu={}));function Iy(e,t=[],n=cu.DEFAULT){let r=null,i=[];const s=[];function a(u){Array.isArray(i)?i.push(u):r!==null&&(i[r]=u)}return Oy(e,{onObjectBegin:()=>{const u={};a(u),s.push(i),i=u,r=null},onObjectProperty:u=>{r=u},onObjectEnd:()=>{i=s.pop()},onArrayBegin:()=>{const u=[];a(u),s.push(i),i=u,r=null},onArrayEnd:()=>{i=s.pop()},onLiteralValue:a,onError:(u,l,b)=>{t.push({error:u,offset:l,length:b})}},n),i[0]}function pc(e){switch(e.type){case"array":return e.children.map(pc);case"object":const t=Object.create(null);for(let n of e.children){const r=n.children[1];r&&(t[n.children[0].value]=pc(r))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Oy(e,t,n=cu.DEFAULT){const r=My(e,!1),i=[];function s(me){return me?()=>me(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(me){return me?()=>me(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}function o(me){return me?He=>me(He,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function u(me){return me?He=>me(He,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),()=>i.slice()):()=>!0}const l=a(t.onObjectBegin),b=u(t.onObjectProperty),c=s(t.onObjectEnd),N=a(t.onArrayBegin),B=s(t.onArrayEnd),ne=u(t.onLiteralValue),Q=o(t.onSeparator),I=s(t.onComment),he=o(t.onError),Ee=n&&n.disallowComments,Fe=n&&n.allowTrailingComma;function Be(){for(;;){const me=r.scan();switch(r.getTokenError()){case 4:ue(14);break;case 5:ue(15);break;case 3:ue(13);break;case 1:Ee||ue(11);break;case 2:ue(12);break;case 6:ue(16);break}switch(me){case 12:case 13:Ee?ue(10):I();break;case 16:ue(1);break;case 15:case 14:break;default:return me}}}function ue(me,He=[],Ct=[]){if(he(me),He.length+Ct.length>0){let Rt=r.getToken();for(;Rt!==17;){if(He.indexOf(Rt)!==-1){Be();break}else if(Ct.indexOf(Rt)!==-1)break;Rt=Be()}}}function Ae(me){const He=r.getTokenValue();return me?ne(He):(b(He),i.push(He)),Be(),!0}function Qe(){switch(r.getToken()){case 11:const me=r.getTokenValue();let He=Number(me);isNaN(He)&&(ue(2),He=0),ne(He);break;case 7:ne(null);break;case 8:ne(!0);break;case 9:ne(!1);break;default:return!1}return Be(),!0}function Dt(){return r.getToken()!==10?(ue(3,[],[2,5]),!1):(Ae(!1),r.getToken()===6?(Q(":"),Be(),ze()||ue(4,[],[2,5])):ue(5,[],[2,5]),i.pop(),!0)}function Ve(){l(),Be();let me=!1;for(;r.getToken()!==2&&r.getToken()!==17;){if(r.getToken()===5){if(me||ue(4,[],[]),Q(","),Be(),r.getToken()===2&&Fe)break}else me&&ue(6,[],[]);Dt()||ue(4,[],[2,5]),me=!0}return c(),r.getToken()!==2?ue(7,[2],[]):Be(),!0}function Xe(){N(),Be();let me=!0,He=!1;for(;r.getToken()!==4&&r.getToken()!==17;){if(r.getToken()===5){if(He||ue(4,[],[]),Q(","),Be(),r.getToken()===4&&Fe)break}else He&&ue(6,[],[]);me?(i.push(0),me=!1):i[i.length-1]++,ze()||ue(4,[],[4,5]),He=!0}return B(),me||i.pop(),r.getToken()!==4?ue(8,[4],[]):Be(),!0}function ze(){switch(r.getToken()){case 3:return Xe();case 1:return Ve();case 10:return Ae(!0);default:return Qe()}}return Be(),r.getToken()===17?n.allowEmptyContent?!0:(ue(4,[],[]),!1):ze()?(r.getToken()!==17&&ue(9,[],[]),!0):(ue(4,[],[]),!1)}var ch;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ch||(ch={}));var fh;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(fh||(fh={}));const jy=Iy,Ry=pc;var ph;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(ph||(ph={}));var dh;(()=>{var e={470:i=>{function s(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,l){for(var b,c="",N=0,B=-1,ne=0,Q=0;Q<=u.length;++Q){if(Q<u.length)b=u.charCodeAt(Q);else{if(b===47)break;b=47}if(b===47){if(!(B===Q-1||ne===1))if(B!==Q-1&&ne===2){if(c.length<2||N!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var I=c.lastIndexOf("/");if(I!==c.length-1){I===-1?(c="",N=0):N=(c=c.slice(0,I)).length-1-c.lastIndexOf("/"),B=Q,ne=0;continue}}else if(c.length===2||c.length===1){c="",N=0,B=Q,ne=0;continue}}l&&(c.length>0?c+="/..":c="..",N=2)}else c.length>0?c+="/"+u.slice(B+1,Q):c=u.slice(B+1,Q),N=Q-B-1;B=Q,ne=0}else b===46&&ne!==-1?++ne:ne=-1}return c}var o={resolve:function(){for(var u,l="",b=!1,c=arguments.length-1;c>=-1&&!b;c--){var N;c>=0?N=arguments[c]:(u===void 0&&(u=process.cwd()),N=u),s(N),N.length!==0&&(l=N+"/"+l,b=N.charCodeAt(0)===47)}return l=a(l,!b),b?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(u){if(s(u),u.length===0)return".";var l=u.charCodeAt(0)===47,b=u.charCodeAt(u.length-1)===47;return(u=a(u,!l)).length!==0||l||(u="."),u.length>0&&b&&(u+="/"),l?"/"+u:u},isAbsolute:function(u){return s(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,l=0;l<arguments.length;++l){var b=arguments[l];s(b),b.length>0&&(u===void 0?u=b:u+="/"+b)}return u===void 0?".":o.normalize(u)},relative:function(u,l){if(s(u),s(l),u===l||(u=o.resolve(u))===(l=o.resolve(l)))return"";for(var b=1;b<u.length&&u.charCodeAt(b)===47;++b);for(var c=u.length,N=c-b,B=1;B<l.length&&l.charCodeAt(B)===47;++B);for(var ne=l.length-B,Q=N<ne?N:ne,I=-1,he=0;he<=Q;++he){if(he===Q){if(ne>Q){if(l.charCodeAt(B+he)===47)return l.slice(B+he+1);if(he===0)return l.slice(B+he)}else N>Q&&(u.charCodeAt(b+he)===47?I=he:he===0&&(I=0));break}var Ee=u.charCodeAt(b+he);if(Ee!==l.charCodeAt(B+he))break;Ee===47&&(I=he)}var Fe="";for(he=b+I+1;he<=c;++he)he!==c&&u.charCodeAt(he)!==47||(Fe.length===0?Fe+="..":Fe+="/..");return Fe.length>0?Fe+l.slice(B+I):(B+=I,l.charCodeAt(B)===47&&++B,l.slice(B))},_makeLong:function(u){return u},dirname:function(u){if(s(u),u.length===0)return".";for(var l=u.charCodeAt(0),b=l===47,c=-1,N=!0,B=u.length-1;B>=1;--B)if((l=u.charCodeAt(B))===47){if(!N){c=B;break}}else N=!1;return c===-1?b?"/":".":b&&c===1?"//":u.slice(0,c)},basename:function(u,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(u);var b,c=0,N=-1,B=!0;if(l!==void 0&&l.length>0&&l.length<=u.length){if(l.length===u.length&&l===u)return"";var ne=l.length-1,Q=-1;for(b=u.length-1;b>=0;--b){var I=u.charCodeAt(b);if(I===47){if(!B){c=b+1;break}}else Q===-1&&(B=!1,Q=b+1),ne>=0&&(I===l.charCodeAt(ne)?--ne==-1&&(N=b):(ne=-1,N=Q))}return c===N?N=Q:N===-1&&(N=u.length),u.slice(c,N)}for(b=u.length-1;b>=0;--b)if(u.charCodeAt(b)===47){if(!B){c=b+1;break}}else N===-1&&(B=!1,N=b+1);return N===-1?"":u.slice(c,N)},extname:function(u){s(u);for(var l=-1,b=0,c=-1,N=!0,B=0,ne=u.length-1;ne>=0;--ne){var Q=u.charCodeAt(ne);if(Q!==47)c===-1&&(N=!1,c=ne+1),Q===46?l===-1?l=ne:B!==1&&(B=1):l!==-1&&(B=-1);else if(!N){b=ne+1;break}}return l===-1||c===-1||B===0||B===1&&l===c-1&&l===b+1?"":u.slice(l,c)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(l,b){var c=b.dir||b.root,N=b.base||(b.name||"")+(b.ext||"");return c?c===b.root?c+N:c+"/"+N:N}(0,u)},parse:function(u){s(u);var l={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return l;var b,c=u.charCodeAt(0),N=c===47;N?(l.root="/",b=1):b=0;for(var B=-1,ne=0,Q=-1,I=!0,he=u.length-1,Ee=0;he>=b;--he)if((c=u.charCodeAt(he))!==47)Q===-1&&(I=!1,Q=he+1),c===46?B===-1?B=he:Ee!==1&&(Ee=1):B!==-1&&(Ee=-1);else if(!I){ne=he+1;break}return B===-1||Q===-1||Ee===0||Ee===1&&B===Q-1&&B===ne+1?Q!==-1&&(l.base=l.name=ne===0&&N?u.slice(1,Q):u.slice(ne,Q)):(ne===0&&N?(l.name=u.slice(1,B),l.base=u.slice(1,Q)):(l.name=u.slice(ne,B),l.base=u.slice(ne,Q)),l.ext=u.slice(B,Q)),ne>0?l.dir=u.slice(0,ne-1):N&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},t={};function n(i){var s=t[i];if(s!==void 0)return s.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>N,Utils:()=>Xe}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function u(ze,me){if(!ze.scheme&&me)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ze.authority}", path: "${ze.path}", query: "${ze.query}", fragment: "${ze.fragment}"}`);if(ze.scheme&&!s.test(ze.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(ze.path){if(ze.authority){if(!a.test(ze.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(ze.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",b="/",c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class N{constructor(me,He,Ct,Rt,Vt,sn=!1){Is(this,"scheme");Is(this,"authority");Is(this,"path");Is(this,"query");Is(this,"fragment");typeof me=="object"?(this.scheme=me.scheme||l,this.authority=me.authority||l,this.path=me.path||l,this.query=me.query||l,this.fragment=me.fragment||l):(this.scheme=function(Cn,Zn){return Cn||Zn?Cn:"file"}(me,sn),this.authority=He||l,this.path=function(Cn,Zn){switch(Cn){case"https":case"http":case"file":Zn?Zn[0]!==b&&(Zn=b+Zn):Zn=b}return Zn}(this.scheme,Ct||l),this.query=Rt||l,this.fragment=Vt||l,u(this,sn))}static isUri(me){return me instanceof N||!!me&&typeof me.authority=="string"&&typeof me.fragment=="string"&&typeof me.path=="string"&&typeof me.query=="string"&&typeof me.scheme=="string"&&typeof me.fsPath=="string"&&typeof me.with=="function"&&typeof me.toString=="function"}get fsPath(){return Ee(this,!1)}with(me){if(!me)return this;let{scheme:He,authority:Ct,path:Rt,query:Vt,fragment:sn}=me;return He===void 0?He=this.scheme:He===null&&(He=l),Ct===void 0?Ct=this.authority:Ct===null&&(Ct=l),Rt===void 0?Rt=this.path:Rt===null&&(Rt=l),Vt===void 0?Vt=this.query:Vt===null&&(Vt=l),sn===void 0?sn=this.fragment:sn===null&&(sn=l),He===this.scheme&&Ct===this.authority&&Rt===this.path&&Vt===this.query&&sn===this.fragment?this:new ne(He,Ct,Rt,Vt,sn)}static parse(me,He=!1){const Ct=c.exec(me);return Ct?new ne(Ct[2]||l,Ae(Ct[4]||l),Ae(Ct[5]||l),Ae(Ct[7]||l),Ae(Ct[9]||l),He):new ne(l,l,l,l,l)}static file(me){let He=l;if(i&&(me=me.replace(/\\/g,b)),me[0]===b&&me[1]===b){const Ct=me.indexOf(b,2);Ct===-1?(He=me.substring(2),me=b):(He=me.substring(2,Ct),me=me.substring(Ct)||b)}return new ne("file",He,me,l,l)}static from(me){const He=new ne(me.scheme,me.authority,me.path,me.query,me.fragment);return u(He,!0),He}toString(me=!1){return Fe(this,me)}toJSON(){return this}static revive(me){if(me){if(me instanceof N)return me;{const He=new ne(me);return He._formatted=me.external,He._fsPath=me._sep===B?me.fsPath:null,He}}return me}}const B=i?1:void 0;class ne extends N{constructor(){super(...arguments);Is(this,"_formatted",null);Is(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=Ee(this,!1)),this._fsPath}toString(He=!1){return He?Fe(this,!0):(this._formatted||(this._formatted=Fe(this,!1)),this._formatted)}toJSON(){const He={$mid:1};return this._fsPath&&(He.fsPath=this._fsPath,He._sep=B),this._formatted&&(He.external=this._formatted),this.path&&(He.path=this.path),this.scheme&&(He.scheme=this.scheme),this.authority&&(He.authority=this.authority),this.query&&(He.query=this.query),this.fragment&&(He.fragment=this.fragment),He}}const Q={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function I(ze,me,He){let Ct,Rt=-1;for(let Vt=0;Vt<ze.length;Vt++){const sn=ze.charCodeAt(Vt);if(sn>=97&&sn<=122||sn>=65&&sn<=90||sn>=48&&sn<=57||sn===45||sn===46||sn===95||sn===126||me&&sn===47||He&&sn===91||He&&sn===93||He&&sn===58)Rt!==-1&&(Ct+=encodeURIComponent(ze.substring(Rt,Vt)),Rt=-1),Ct!==void 0&&(Ct+=ze.charAt(Vt));else{Ct===void 0&&(Ct=ze.substr(0,Vt));const Cn=Q[sn];Cn!==void 0?(Rt!==-1&&(Ct+=encodeURIComponent(ze.substring(Rt,Vt)),Rt=-1),Ct+=Cn):Rt===-1&&(Rt=Vt)}}return Rt!==-1&&(Ct+=encodeURIComponent(ze.substring(Rt))),Ct!==void 0?Ct:ze}function he(ze){let me;for(let He=0;He<ze.length;He++){const Ct=ze.charCodeAt(He);Ct===35||Ct===63?(me===void 0&&(me=ze.substr(0,He)),me+=Q[Ct]):me!==void 0&&(me+=ze[He])}return me!==void 0?me:ze}function Ee(ze,me){let He;return He=ze.authority&&ze.path.length>1&&ze.scheme==="file"?`//${ze.authority}${ze.path}`:ze.path.charCodeAt(0)===47&&(ze.path.charCodeAt(1)>=65&&ze.path.charCodeAt(1)<=90||ze.path.charCodeAt(1)>=97&&ze.path.charCodeAt(1)<=122)&&ze.path.charCodeAt(2)===58?me?ze.path.substr(1):ze.path[1].toLowerCase()+ze.path.substr(2):ze.path,i&&(He=He.replace(/\//g,"\\")),He}function Fe(ze,me){const He=me?he:I;let Ct="",{scheme:Rt,authority:Vt,path:sn,query:Cn,fragment:Zn}=ze;if(Rt&&(Ct+=Rt,Ct+=":"),(Vt||Rt==="file")&&(Ct+=b,Ct+=b),Vt){let Un=Vt.indexOf("@");if(Un!==-1){const $r=Vt.substr(0,Un);Vt=Vt.substr(Un+1),Un=$r.lastIndexOf(":"),Un===-1?Ct+=He($r,!1,!1):(Ct+=He($r.substr(0,Un),!1,!1),Ct+=":",Ct+=He($r.substr(Un+1),!1,!0)),Ct+="@"}Vt=Vt.toLowerCase(),Un=Vt.lastIndexOf(":"),Un===-1?Ct+=He(Vt,!1,!0):(Ct+=He(Vt.substr(0,Un),!1,!0),Ct+=Vt.substr(Un))}if(sn){if(sn.length>=3&&sn.charCodeAt(0)===47&&sn.charCodeAt(2)===58){const Un=sn.charCodeAt(1);Un>=65&&Un<=90&&(sn=`/${String.fromCharCode(Un+32)}:${sn.substr(3)}`)}else if(sn.length>=2&&sn.charCodeAt(1)===58){const Un=sn.charCodeAt(0);Un>=65&&Un<=90&&(sn=`${String.fromCharCode(Un+32)}:${sn.substr(2)}`)}Ct+=He(sn,!0,!1)}return Cn&&(Ct+="?",Ct+=He(Cn,!1,!1)),Zn&&(Ct+="#",Ct+=me?Zn:I(Zn,!1,!1)),Ct}function Be(ze){try{return decodeURIComponent(ze)}catch{return ze.length>3?ze.substr(0,3)+Be(ze.substr(3)):ze}}const ue=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Ae(ze){return ze.match(ue)?ze.replace(ue,me=>Be(me)):ze}var Qe=n(470);const Dt=Qe.posix||Qe,Ve="/";var Xe;(function(ze){ze.joinPath=function(me,...He){return me.with({path:Dt.join(me.path,...He)})},ze.resolvePath=function(me,...He){let Ct=me.path,Rt=!1;Ct[0]!==Ve&&(Ct=Ve+Ct,Rt=!0);let Vt=Dt.resolve(Ct,...He);return Rt&&Vt[0]===Ve&&!me.authority&&(Vt=Vt.substring(1)),me.with({path:Vt})},ze.dirname=function(me){if(me.path.length===0||me.path===Ve)return me;let He=Dt.dirname(me.path);return He.length===1&&He.charCodeAt(0)===46&&(He=""),me.with({path:He})},ze.basename=function(me){return Dt.basename(me.path)},ze.extname=function(me){return Dt.extname(me.path)}})(Xe||(Xe={}))})(),dh=r})();const{URI:yi,Utils:SA}=dh;var hh;(function(e){function t(n){return typeof n=="string"}e.is=t})(hh||(hh={}));var dc;(function(e){function t(n){return typeof n=="string"}e.is=t})(dc||(dc={}));var mh;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(mh||(mh={}));var fu;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(n){return typeof n=="number"&&e.MIN_VALUE<=n&&n<=e.MAX_VALUE}e.is=t})(fu||(fu={}));var Hr;(function(e){function t(r,i){return r===Number.MAX_VALUE&&(r=fu.MAX_VALUE),i===Number.MAX_VALUE&&(i=fu.MAX_VALUE),{line:r,character:i}}e.create=t;function n(r){let i=r;return Ft.objectLiteral(i)&&Ft.uinteger(i.line)&&Ft.uinteger(i.character)}e.is=n})(Hr||(Hr={}));var In;(function(e){function t(r,i,s,a){if(Ft.uinteger(r)&&Ft.uinteger(i)&&Ft.uinteger(s)&&Ft.uinteger(a))return{start:Hr.create(r,i),end:Hr.create(s,a)};if(Hr.is(r)&&Hr.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}e.create=t;function n(r){let i=r;return Ft.objectLiteral(i)&&Hr.is(i.start)&&Hr.is(i.end)}e.is=n})(In||(In={}));var xa;(function(e){function t(r,i){return{uri:r,range:i}}e.create=t;function n(r){let i=r;return Ft.objectLiteral(i)&&In.is(i.range)&&(Ft.string(i.uri)||Ft.undefined(i.uri))}e.is=n})(xa||(xa={}));var hc;(function(e){function t(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function n(r){let i=r;return Ft.objectLiteral(i)&&In.is(i.targetRange)&&Ft.string(i.targetUri)&&In.is(i.targetSelectionRange)&&(In.is(i.originSelectionRange)||Ft.undefined(i.originSelectionRange))}e.is=n})(hc||(hc={}));var mc;(function(e){function t(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&Ft.numberRange(i.red,0,1)&&Ft.numberRange(i.green,0,1)&&Ft.numberRange(i.blue,0,1)&&Ft.numberRange(i.alpha,0,1)}e.is=n})(mc||(mc={}));var gh;(function(e){function t(r,i){return{range:r,color:i}}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&In.is(i.range)&&mc.is(i.color)}e.is=n})(gh||(gh={}));var yh;(function(e){function t(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&Ft.string(i.label)&&(Ft.undefined(i.textEdit)||Nr.is(i))&&(Ft.undefined(i.additionalTextEdits)||Ft.typedArray(i.additionalTextEdits,Nr.is))}e.is=n})(yh||(yh={}));var Dh;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(Dh||(Dh={}));var gc;(function(e){function t(r,i,s,a,o,u){const l={startLine:r,endLine:i};return Ft.defined(s)&&(l.startCharacter=s),Ft.defined(a)&&(l.endCharacter=a),Ft.defined(o)&&(l.kind=o),Ft.defined(u)&&(l.collapsedText=u),l}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&Ft.uinteger(i.startLine)&&Ft.uinteger(i.startLine)&&(Ft.undefined(i.startCharacter)||Ft.uinteger(i.startCharacter))&&(Ft.undefined(i.endCharacter)||Ft.uinteger(i.endCharacter))&&(Ft.undefined(i.kind)||Ft.string(i.kind))}e.is=n})(gc||(gc={}));var yc;(function(e){function t(r,i){return{location:r,message:i}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&xa.is(i.location)&&Ft.string(i.message)}e.is=n})(yc||(yc={}));var Hn;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(Hn||(Hn={}));var Dc;(function(e){e.Unnecessary=1,e.Deprecated=2})(Dc||(Dc={}));var bh;(function(e){function t(n){const r=n;return Ft.objectLiteral(r)&&Ft.string(r.href)}e.is=t})(bh||(bh={}));var Di;(function(e){function t(r,i,s,a,o,u){let l={range:r,message:i};return Ft.defined(s)&&(l.severity=s),Ft.defined(a)&&(l.code=a),Ft.defined(o)&&(l.source=o),Ft.defined(u)&&(l.relatedInformation=u),l}e.create=t;function n(r){var i;let s=r;return Ft.defined(s)&&In.is(s.range)&&Ft.string(s.message)&&(Ft.number(s.severity)||Ft.undefined(s.severity))&&(Ft.integer(s.code)||Ft.string(s.code)||Ft.undefined(s.code))&&(Ft.undefined(s.codeDescription)||Ft.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(Ft.string(s.source)||Ft.undefined(s.source))&&(Ft.undefined(s.relatedInformation)||Ft.typedArray(s.relatedInformation,yc.is))}e.is=n})(Di||(Di={}));var Vs;(function(e){function t(r,i,...s){let a={title:r,command:i};return Ft.defined(s)&&s.length>0&&(a.arguments=s),a}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.string(i.title)&&Ft.string(i.command)}e.is=n})(Vs||(Vs={}));var Nr;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function n(s,a){return{range:{start:s,end:s},newText:a}}e.insert=n;function r(s){return{range:s,newText:""}}e.del=r;function i(s){const a=s;return Ft.objectLiteral(a)&&Ft.string(a.newText)&&In.is(a.range)}e.is=i})(Nr||(Nr={}));var bc;(function(e){function t(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&Ft.string(i.label)&&(Ft.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(Ft.string(i.description)||i.description===void 0)}e.is=n})(bc||(bc={}));var Sa;(function(e){function t(n){const r=n;return Ft.string(r)}e.is=t})(Sa||(Sa={}));var vh;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}e.del=r;function i(s){const a=s;return Nr.is(a)&&(bc.is(a.annotationId)||Sa.is(a.annotationId))}e.is=i})(vh||(vh={}));var vc;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Sc.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(vc||(vc={}));var Ec;(function(e){function t(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="create"&&Ft.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||Ft.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ft.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Sa.is(i.annotationId))}e.is=n})(Ec||(Ec={}));var Ac;(function(e){function t(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){let i=r;return i&&i.kind==="rename"&&Ft.string(i.oldUri)&&Ft.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||Ft.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||Ft.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Sa.is(i.annotationId))}e.is=n})(Ac||(Ac={}));var Cc;(function(e){function t(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function n(r){let i=r;return i&&i.kind==="delete"&&Ft.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||Ft.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||Ft.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Sa.is(i.annotationId))}e.is=n})(Cc||(Cc={}));var xc;(function(e){function t(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>Ft.string(i.kind)?Ec.is(i)||Ac.is(i)||Cc.is(i):vc.is(i)))}e.is=t})(xc||(xc={}));var Eh;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.string(i.uri)}e.is=n})(Eh||(Eh={}));var Ah;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.string(i.uri)&&Ft.integer(i.version)}e.is=n})(Ah||(Ah={}));var Sc;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.string(i.uri)&&(i.version===null||Ft.integer(i.version))}e.is=n})(Sc||(Sc={}));var Ch;(function(e){function t(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.string(i.uri)&&Ft.string(i.languageId)&&Ft.integer(i.version)&&Ft.string(i.text)}e.is=n})(Ch||(Ch={}));var is;(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(n){const r=n;return r===e.PlainText||r===e.Markdown}e.is=t})(is||(is={}));var Co;(function(e){function t(n){const r=n;return Ft.objectLiteral(n)&&is.is(r.kind)&&Ft.string(r.value)}e.is=t})(Co||(Co={}));var bi;(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})(bi||(bi={}));var Kr;(function(e){e.PlainText=1,e.Snippet=2})(Kr||(Kr={}));var xh;(function(e){e.Deprecated=1})(xh||(xh={}));var Sh;(function(e){function t(r,i,s){return{newText:r,insert:i,replace:s}}e.create=t;function n(r){const i=r;return i&&Ft.string(i.newText)&&In.is(i.insert)&&In.is(i.replace)}e.is=n})(Sh||(Sh={}));var wc;(function(e){e.asIs=1,e.adjustIndentation=2})(wc||(wc={}));var wh;(function(e){function t(n){const r=n;return r&&(Ft.string(r.detail)||r.detail===void 0)&&(Ft.string(r.description)||r.description===void 0)}e.is=t})(wh||(wh={}));var Fc;(function(e){function t(n){return{label:n}}e.create=t})(Fc||(Fc={}));var Nc;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(Nc||(Nc={}));var pu;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){const i=r;return Ft.string(i)||Ft.objectLiteral(i)&&Ft.string(i.language)&&Ft.string(i.value)}e.is=n})(pu||(pu={}));var Fh;(function(e){function t(n){let r=n;return!!r&&Ft.objectLiteral(r)&&(Co.is(r.contents)||pu.is(r.contents)||Ft.typedArray(r.contents,pu.is))&&(n.range===void 0||In.is(n.range))}e.is=t})(Fh||(Fh={}));var Nh;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Nh||(Nh={}));var Th;(function(e){function t(n,r,...i){let s={label:n};return Ft.defined(r)&&(s.documentation=r),Ft.defined(i)?s.parameters=i:s.parameters=[],s}e.create=t})(Th||(Th={}));var _h;(function(e){e.Text=1,e.Read=2,e.Write=3})(_h||(_h={}));var Lh;(function(e){function t(n,r){let i={range:n};return Ft.number(r)&&(i.kind=r),i}e.create=t})(Lh||(Lh={}));var Qi;(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})(Qi||(Qi={}));var kh;(function(e){e.Deprecated=1})(kh||(kh={}));var Ph;(function(e){function t(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(Ph||(Ph={}));var Bh;(function(e){function t(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}e.create=t})(Bh||(Bh={}));var Mh;(function(e){function t(r,i,s,a,o,u){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function n(r){let i=r;return i&&Ft.string(i.name)&&Ft.number(i.kind)&&In.is(i.range)&&In.is(i.selectionRange)&&(i.detail===void 0||Ft.string(i.detail))&&(i.deprecated===void 0||Ft.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=n})(Mh||(Mh={}));var Fs;(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"})(Fs||(Fs={}));var du;(function(e){e.Invoked=1,e.Automatic=2})(du||(du={}));var Ih;(function(e){function t(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.typedArray(i.diagnostics,Di.is)&&(i.only===void 0||Ft.typedArray(i.only,Ft.string))&&(i.triggerKind===void 0||i.triggerKind===du.Invoked||i.triggerKind===du.Automatic)}e.is=n})(Ih||(Ih={}));var ss;(function(e){function t(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Vs.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function n(r){let i=r;return i&&Ft.string(i.title)&&(i.diagnostics===void 0||Ft.typedArray(i.diagnostics,Di.is))&&(i.kind===void 0||Ft.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Vs.is(i.command))&&(i.isPreferred===void 0||Ft.boolean(i.isPreferred))&&(i.edit===void 0||xc.is(i.edit))}e.is=n})(ss||(ss={}));var Tc;(function(e){function t(r,i){let s={range:r};return Ft.defined(i)&&(s.data=i),s}e.create=t;function n(r){let i=r;return Ft.defined(i)&&In.is(i.range)&&(Ft.undefined(i.command)||Vs.is(i.command))}e.is=n})(Tc||(Tc={}));var Oh;(function(e){function t(r,i){return{tabSize:r,insertSpaces:i}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&Ft.uinteger(i.tabSize)&&Ft.boolean(i.insertSpaces)}e.is=n})(Oh||(Oh={}));var jh;(function(e){function t(r,i,s){return{range:r,target:i,data:s}}e.create=t;function n(r){let i=r;return Ft.defined(i)&&In.is(i.range)&&(Ft.undefined(i.target)||Ft.string(i.target))}e.is=n})(jh||(jh={}));var hu;(function(e){function t(r,i){return{range:r,parent:i}}e.create=t;function n(r){let i=r;return Ft.objectLiteral(i)&&In.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=n})(hu||(hu={}));var Rh;(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"})(Rh||(Rh={}));var $h;(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"})($h||($h={}));var Vh;(function(e){function t(n){const r=n;return Ft.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}e.is=t})(Vh||(Vh={}));var qh;(function(e){function t(r,i){return{range:r,text:i}}e.create=t;function n(r){const i=r;return i!=null&&In.is(i.range)&&Ft.string(i.text)}e.is=n})(qh||(qh={}));var Uh;(function(e){function t(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}e.create=t;function n(r){const i=r;return i!=null&&In.is(i.range)&&Ft.boolean(i.caseSensitiveLookup)&&(Ft.string(i.variableName)||i.variableName===void 0)}e.is=n})(Uh||(Uh={}));var Wh;(function(e){function t(r,i){return{range:r,expression:i}}e.create=t;function n(r){const i=r;return i!=null&&In.is(i.range)&&(Ft.string(i.expression)||i.expression===void 0)}e.is=n})(Wh||(Wh={}));var Gh;(function(e){function t(r,i){return{frameId:r,stoppedLocation:i}}e.create=t;function n(r){const i=r;return Ft.defined(i)&&In.is(r.stoppedLocation)}e.is=n})(Gh||(Gh={}));var _c;(function(e){e.Type=1,e.Parameter=2;function t(n){return n===1||n===2}e.is=t})(_c||(_c={}));var Lc;(function(e){function t(r){return{value:r}}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&(i.tooltip===void 0||Ft.string(i.tooltip)||Co.is(i.tooltip))&&(i.location===void 0||xa.is(i.location))&&(i.command===void 0||Vs.is(i.command))}e.is=n})(Lc||(Lc={}));var Jh;(function(e){function t(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}e.create=t;function n(r){const i=r;return Ft.objectLiteral(i)&&Hr.is(i.position)&&(Ft.string(i.label)||Ft.typedArray(i.label,Lc.is))&&(i.kind===void 0||_c.is(i.kind))&&i.textEdits===void 0||Ft.typedArray(i.textEdits,Nr.is)&&(i.tooltip===void 0||Ft.string(i.tooltip)||Co.is(i.tooltip))&&(i.paddingLeft===void 0||Ft.boolean(i.paddingLeft))&&(i.paddingRight===void 0||Ft.boolean(i.paddingRight))}e.is=n})(Jh||(Jh={}));var Yh;(function(e){function t(n){return{kind:"snippet",value:n}}e.createSnippet=t})(Yh||(Yh={}));var Hh;(function(e){function t(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}e.create=t})(Hh||(Hh={}));var zh;(function(e){function t(n){return{items:n}}e.create=t})(zh||(zh={}));var Qh;(function(e){e.Invoked=0,e.Automatic=1})(Qh||(Qh={}));var Xh;(function(e){function t(n,r){return{range:n,text:r}}e.create=t})(Xh||(Xh={}));var Kh;(function(e){function t(n,r){return{triggerKind:n,selectedCompletionInfo:r}}e.create=t})(Kh||(Kh={}));var Zh;(function(e){function t(n){const r=n;return Ft.objectLiteral(r)&&dc.is(r.uri)&&Ft.string(r.name)}e.is=t})(Zh||(Zh={}));var em;(function(e){function t(s,a,o,u){return new $y(s,a,o,u)}e.create=t;function n(s){let a=s;return!!(Ft.defined(a)&&Ft.string(a.uri)&&(Ft.undefined(a.languageId)||Ft.string(a.languageId))&&Ft.uinteger(a.lineCount)&&Ft.func(a.getText)&&Ft.func(a.positionAt)&&Ft.func(a.offsetAt))}e.is=n;function r(s,a){let o=s.getText(),u=i(a,(b,c)=>{let N=b.range.start.line-c.range.start.line;return N===0?b.range.start.character-c.range.start.character:N}),l=o.length;for(let b=u.length-1;b>=0;b--){let c=u[b],N=s.offsetAt(c.range.start),B=s.offsetAt(c.range.end);if(B<=l)o=o.substring(0,N)+c.newText+o.substring(B,o.length);else throw new Error("Overlapping edit");l=N}return o}e.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);let b=0,c=0,N=0;for(;b<u.length&&c<l.length;)a(u[b],l[c])<=0?s[N++]=u[b++]:s[N++]=l[c++];for(;b<u.length;)s[N++]=u[b++];for(;c<l.length;)s[N++]=l[c++];return s}})(em||(em={}));class $y{constructor(t,n,r,i){this._uri=t,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let n=this.offsetAt(t.start),r=this.offsetAt(t.end);return this._content.substring(n,r)}return this._content}update(t,n){this._content=t.text,this._version=n,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let t=[],n=this._content,r=!0;for(let i=0;i<n.length;i++){r&&(t.push(i),r=!1);let s=n.charAt(i);r=s==="\r"||s===`
|
|
19
19
|
`,s==="\r"&&i+1<n.length&&n.charAt(i+1)===`
|
|
20
|
-
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Hr.create(0,t);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return Hr.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}}var Ft;(function(e){const t=Object.prototype.toString;function n(B){return typeof B<"u"}e.defined=n;function r(B){return typeof B>"u"}e.undefined=r;function i(B){return B===!0||B===!1}e.boolean=i;function s(B){return t.call(B)==="[object String]"}e.string=s;function a(B){return t.call(B)==="[object Number]"}e.number=a;function o(B,ne,Q){return t.call(B)==="[object Number]"&&ne<=B&&B<=Q}e.numberRange=o;function u(B){return t.call(B)==="[object Number]"&&-2147483648<=B&&B<=2147483647}e.integer=u;function l(B){return t.call(B)==="[object Number]"&&0<=B&&B<=2147483647}e.uinteger=l;function b(B){return t.call(B)==="[object Function]"}e.func=b;function c(B){return B!==null&&typeof B=="object"}e.objectLiteral=c;function N(B,ne){return Array.isArray(B)&&B.every(ne)}e.typedArray=N})(Ft||(Ft={}));const kc=Symbol.for("yaml.alias"),Pc=Symbol.for("yaml.document"),Ns=Symbol.for("yaml.map"),tm=Symbol.for("yaml.pair"),as=Symbol.for("yaml.scalar"),wa=Symbol.for("yaml.seq"),wi=Symbol.for("yaml.node.type"),Xi=e=>!!e&&typeof e=="object"&&e[wi]===kc,xo=e=>!!e&&typeof e=="object"&&e[wi]===Pc,Pr=e=>!!e&&typeof e=="object"&&e[wi]===Ns,dr=e=>!!e&&typeof e=="object"&&e[wi]===tm,qn=e=>!!e&&typeof e=="object"&&e[wi]===as,Br=e=>!!e&&typeof e=="object"&&e[wi]===wa;function Lr(e){if(e&&typeof e=="object")switch(e[wi]){case Ns:case wa:return!0}return!1}function
|
|
21
|
-
`)}}ii.defaultYaml={explicit:!1,version:"1.2"},ii.defaultTags={"!!":"tag:yaml.org,2002:"};function nm(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function rm(e){const t=new Set;return wr(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function im(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function Hy(e,t){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=rm(e));const a=im(t,i);return i.add(a),a},setAnchors:()=>{for(const s of n){const a=r.get(s);if(typeof a=="object"&&a.anchor&&(qn(a.node)||Lr(a.node)))a.node.anchor=a.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:r}}function Na(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const a=r[i],o=Na(e,r,String(i),a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),a=Na(e,r,i,s);a===void 0?r.delete(i):a!==s&&r.set(i,a)}else if(r instanceof Set)for(const i of Array.from(r)){const s=Na(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const a=Na(e,r,i,s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}return e.call(t,n,r)}function Fi(e,t,n){if(Array.isArray(e))return e.map((r,i)=>Fi(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Vy(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}class Bc{constructor(t){Object.defineProperty(this,wi,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!xo(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=Fi(this,"",a);if(typeof i=="function")for(const{count:u,res:l}of a.anchors.values())i(l,u);return typeof s=="function"?Na(s,{"":o},"",o):o}}class Mc extends Bc{constructor(t){super(kc),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return wr(t,{Node:(r,i)=>{if(i===this)return wr.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i);if(!a){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let o=r.get(a);if(o||(Fi(a,null,n),o=r.get(a)),!o||o.res===void 0){const u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=mu(i,a,r)),o.count*o.aliasCount>s)){const u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return o.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(nm(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}}function mu(e,t,n){if(Xi(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Lr(t)){let r=0;for(const i of t.items){const s=mu(e,i,n);s>r&&(r=s)}return r}else if(dr(t)){const r=mu(e,t.key,n),i=mu(e,t.value,n);return Math.max(r,i)}return 1}const sm=e=>!e||typeof e!="function"&&typeof e!="object";class Qn extends Bc{constructor(t){super(as),this.value=t}toJSON(t,n){return n?.keep?this.value:Fi(this.value,t,n)}toString(){return String(this.value)}}Qn.BLOCK_FOLDED="BLOCK_FOLDED",Qn.BLOCK_LITERAL="BLOCK_LITERAL",Qn.PLAIN="PLAIN",Qn.QUOTE_DOUBLE="QUOTE_DOUBLE",Qn.QUOTE_SINGLE="QUOTE_SINGLE";const zy="tag:yaml.org,2002:";function Qy(e,t,n){if(t){const r=n.filter(s=>s.tag===t),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function wo(e,t,n){if(xo(e)&&(e=e.contents),
|
|
20
|
+
`&&i++}r&&n.length>0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return Hr.create(0,t);for(;r<i;){let a=Math.floor((r+i)/2);n[a]>t?i=a:r=a+1}let s=r-1;return Hr.create(s,t-n[s])}offsetAt(t){let n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;let r=n[t.line],i=t.line+1<n.length?n[t.line+1]:this._content.length;return Math.max(Math.min(r+t.character,i),r)}get lineCount(){return this.getLineOffsets().length}}var Ft;(function(e){const t=Object.prototype.toString;function n(B){return typeof B<"u"}e.defined=n;function r(B){return typeof B>"u"}e.undefined=r;function i(B){return B===!0||B===!1}e.boolean=i;function s(B){return t.call(B)==="[object String]"}e.string=s;function a(B){return t.call(B)==="[object Number]"}e.number=a;function o(B,ne,Q){return t.call(B)==="[object Number]"&&ne<=B&&B<=Q}e.numberRange=o;function u(B){return t.call(B)==="[object Number]"&&-2147483648<=B&&B<=2147483647}e.integer=u;function l(B){return t.call(B)==="[object Number]"&&0<=B&&B<=2147483647}e.uinteger=l;function b(B){return t.call(B)==="[object Function]"}e.func=b;function c(B){return B!==null&&typeof B=="object"}e.objectLiteral=c;function N(B,ne){return Array.isArray(B)&&B.every(ne)}e.typedArray=N})(Ft||(Ft={}));const kc=Symbol.for("yaml.alias"),Pc=Symbol.for("yaml.document"),Ns=Symbol.for("yaml.map"),tm=Symbol.for("yaml.pair"),as=Symbol.for("yaml.scalar"),wa=Symbol.for("yaml.seq"),wi=Symbol.for("yaml.node.type"),Xi=e=>!!e&&typeof e=="object"&&e[wi]===kc,xo=e=>!!e&&typeof e=="object"&&e[wi]===Pc,Pr=e=>!!e&&typeof e=="object"&&e[wi]===Ns,dr=e=>!!e&&typeof e=="object"&&e[wi]===tm,qn=e=>!!e&&typeof e=="object"&&e[wi]===as,Br=e=>!!e&&typeof e=="object"&&e[wi]===wa;function Lr(e){if(e&&typeof e=="object")switch(e[wi]){case Ns:case wa:return!0}return!1}function hr(e){if(e&&typeof e=="object")switch(e[wi]){case kc:case Ns:case as:case wa:return!0}return!1}const Vy=e=>(qn(e)||Lr(e))&&!!e.anchor,qs=Symbol("break visit"),qy=Symbol("skip children"),So=Symbol("remove node");function wr(e,t){const n=Uy(t);xo(e)?Fa(null,e.contents,n,Object.freeze([e]))===So&&(e.contents=null):Fa(null,e,n,Object.freeze([]))}wr.BREAK=qs,wr.SKIP=qy,wr.REMOVE=So;function Fa(e,t,n,r){const i=Wy(e,t,n,r);if(hr(i)||dr(i))return Gy(e,r,i),Fa(e,i,n,r);if(typeof i!="symbol"){if(Lr(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){const a=Fa(s,t.items[s],n,r);if(typeof a=="number")s=a-1;else{if(a===qs)return qs;a===So&&(t.items.splice(s,1),s-=1)}}}else if(dr(t)){r=Object.freeze(r.concat(t));const s=Fa("key",t.key,n,r);if(s===qs)return qs;s===So&&(t.key=null);const a=Fa("value",t.value,n,r);if(a===qs)return qs;a===So&&(t.value=null)}}return i}function Uy(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Wy(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(Pr(t))return n.Map?.(e,t,r);if(Br(t))return n.Seq?.(e,t,r);if(dr(t))return n.Pair?.(e,t,r);if(qn(t))return n.Scalar?.(e,t,r);if(Xi(t))return n.Alias?.(e,t,r)}function Gy(e,t,n){const r=t[t.length-1];if(Lr(r))r.items[e]=n;else if(dr(r))e==="key"?r.key=n:r.value=n;else if(xo(r))r.contents=n;else{const i=Xi(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Jy={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Yy=e=>e.replace(/[!,[\]{}]/g,t=>Jy[t]);class ii{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},ii.defaultYaml,t),this.tags=Object.assign({},ii.defaultTags,n)}clone(){const t=new ii(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new ii(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:ii.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},ii.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:ii.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},ii.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[s,a]=r;return this.tags[s]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[s]=r;if(s==="1.1"||s==="1.2")return this.yaml.version=s,!0;{const a=/^\d+\.\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,a),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}const[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(a){return n(String(a)),null}return r==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+Yy(t.substring(r.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let i;if(t&&r.length>0&&hr(t.contents)){const s={};wr(t.contents,(a,o)=>{hr(o)&&o.tag&&(s[o.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,a]of r)s==="!!"&&a==="tag:yaml.org,2002:"||(!t||i.some(o=>o.startsWith(a)))&&n.push(`%TAG ${s} ${a}`);return n.join(`
|
|
21
|
+
`)}}ii.defaultYaml={explicit:!1,version:"1.2"},ii.defaultTags={"!!":"tag:yaml.org,2002:"};function nm(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function rm(e){const t=new Set;return wr(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function im(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function Hy(e,t){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=rm(e));const a=im(t,i);return i.add(a),a},setAnchors:()=>{for(const s of n){const a=r.get(s);if(typeof a=="object"&&a.anchor&&(qn(a.node)||Lr(a.node)))a.node.anchor=a.anchor;else{const o=new Error("Failed to resolve repeated object (this should not happen)");throw o.source=s,o}}},sourceObjects:r}}function Na(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const a=r[i],o=Na(e,r,String(i),a);o===void 0?delete r[i]:o!==a&&(r[i]=o)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),a=Na(e,r,i,s);a===void 0?r.delete(i):a!==s&&r.set(i,a)}else if(r instanceof Set)for(const i of Array.from(r)){const s=Na(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const a=Na(e,r,i,s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}return e.call(t,n,r)}function Fi(e,t,n){if(Array.isArray(e))return e.map((r,i)=>Fi(r,String(i),n));if(e&&typeof e.toJSON=="function"){if(!n||!Vy(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e=="bigint"&&!n?.keep?Number(e):e}class Bc{constructor(t){Object.defineProperty(this,wi,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!xo(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=Fi(this,"",a);if(typeof i=="function")for(const{count:u,res:l}of a.anchors.values())i(l,u);return typeof s=="function"?Na(s,{"":o},"",o):o}}class Mc extends Bc{constructor(t){super(kc),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let n;return wr(t,{Node:(r,i)=>{if(i===this)return wr.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,a=this.resolve(i);if(!a){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(u)}let o=r.get(a);if(o||(Fi(a,null,n),o=r.get(a)),!o||o.res===void 0){const u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(s>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=mu(i,a,r)),o.count*o.aliasCount>s)){const u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}return o.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(nm(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}}function mu(e,t,n){if(Xi(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Lr(t)){let r=0;for(const i of t.items){const s=mu(e,i,n);s>r&&(r=s)}return r}else if(dr(t)){const r=mu(e,t.key,n),i=mu(e,t.value,n);return Math.max(r,i)}return 1}const sm=e=>!e||typeof e!="function"&&typeof e!="object";class Qn extends Bc{constructor(t){super(as),this.value=t}toJSON(t,n){return n?.keep?this.value:Fi(this.value,t,n)}toString(){return String(this.value)}}Qn.BLOCK_FOLDED="BLOCK_FOLDED",Qn.BLOCK_LITERAL="BLOCK_LITERAL",Qn.PLAIN="PLAIN",Qn.QUOTE_DOUBLE="QUOTE_DOUBLE",Qn.QUOTE_SINGLE="QUOTE_SINGLE";const zy="tag:yaml.org,2002:";function Qy(e,t,n){if(t){const r=n.filter(s=>s.tag===t),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>r.identify?.(e)&&!r.format)}function wo(e,t,n){if(xo(e)&&(e=e.contents),hr(e))return e;if(dr(e)){const c=n.schema[Ns].createNode?.(n.schema,null,n);return c.items.push(e),c}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:a,sourceObjects:o}=n;let u;if(r&&e&&typeof e=="object"){if(u=o.get(e),u)return u.anchor||(u.anchor=i(e)),new Mc(u.anchor);u={anchor:null,node:null},o.set(e,u)}t?.startsWith("!!")&&(t=zy+t.slice(2));let l=Qy(e,t,a.tags);if(!l){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const c=new Qn(e);return u&&(u.node=c),c}l=e instanceof Map?a[Ns]:Symbol.iterator in Object(e)?a[wa]:a[Ns]}s&&(s(l),delete n.onTagObj);const b=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from=="function"?l.nodeClass.from(n.schema,e,n):new Qn(e);return t?b.tag=t:l.default||(b.tag=l.tag),u&&(u.node=b),b}function gu(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s=="number"&&Number.isInteger(s)&&s>=0){const a=[];a[s]=r,r=a}else r=new Map([[s,r]])}return wo(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Fo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class Ic extends Bc{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>hr(r)||dr(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Fo(t))this.add(n);else{const[r,...i]=t,s=this.get(r,!0);if(Lr(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,gu(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(Lr(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,s=this.get(r,!0);return i.length===0?!n&&qn(s)?s.value:s:Lr(s)?s.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!dr(n))return!1;const r=n.value;return r==null||t&&qn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return Lr(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(Lr(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,gu(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}Ic.maxFlowStringSingleLineLength=60;const Xy=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function os(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Us=(e,t,n)=>e.endsWith(`
|
|
22
22
|
`)?os(n,t):n.includes(`
|
|
23
23
|
`)?`
|
|
24
24
|
`+os(n,t):(e.endsWith(" ")?"":" ")+n,am="flow",Oc="block",yu="quoted";function Du(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return e;const u=Math.max(1+s,1+i-t.length);if(e.length<=u)return e;const l=[],b={};let c=i-t.length;typeof r=="number"&&(r>i-Math.max(2,s)?l.push(0):c=i-r);let N,B,ne=!1,Q=-1,I=-1,he=-1;n===Oc&&(Q=om(e,Q,t.length),Q!==-1&&(c=Q+u));for(let Fe;Fe=e[Q+=1];){if(n===yu&&Fe==="\\"){switch(I=Q,e[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}he=Q}if(Fe===`
|
|
@@ -49,9 +49,9 @@ ${l}${ue}`}function Zy(e,t,n,r){const{type:i,value:s}=e,{actualString:a,implicit
|
|
|
49
49
|
`)||b&&/[[\]{},]/.test(s))return Ta(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||b||!s.includes(`
|
|
50
50
|
`)?Ta(s,t):Eu(e,t,n,r);if(!o&&!b&&i!==Qn.PLAIN&&s.includes(`
|
|
51
51
|
`))return Eu(e,t,n,r);if(vu(s)){if(u==="")return t.forceBlockIndent=!0,Eu(e,t,n,r);if(o&&u===l)return Ta(s,t)}const c=s.replace(/\n+/g,`$&
|
|
52
|
-
${u}`);if(a){const N=Q=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(c),{compat:B,tags:ne}=t.doc.schema;if(ne.some(N)||B?.some(N))return Ta(s,t)}return o?c:Du(c,u,am,bu(t,!1))}function $c(e,t,n,r){const{implicitKey:i,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==Qn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=Qn.QUOTE_DOUBLE);const u=b=>{switch(b){case Qn.BLOCK_FOLDED:case Qn.BLOCK_LITERAL:return i||s?Ta(a.value,t):Eu(a,t,n,r);case Qn.QUOTE_DOUBLE:return No(a.value,t);case Qn.QUOTE_SINGLE:return jc(a.value,t);case Qn.PLAIN:return Zy(a,t,n,r);default:return null}};let l=u(o);if(l===null){const{defaultKeyType:b,defaultStringType:c}=t.options,N=i&&b||c;if(l=u(N),l===null)throw new Error(`Unsupported default string type ${N}`)}return l}function um(e,t){const n=Object.assign({blockQuote:!0,commentString:Xy,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function eD(e,t){if(t.tag){const i=e.filter(s=>s.tag===t.tag);if(i.length>0)return i.find(s=>s.format===t.format)??i[0]}let n,r;if(qn(t)){r=t.value;const i=e.filter(s=>s.identify?.(r));n=i.find(s=>s.format===t.format)??i.find(s=>!s.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function tD(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(qn(e)||Lr(e))&&e.anchor;s&&nm(s)&&(n.add(s),i.push(`&${s}`));const a=e.tag?e.tag:t.default?null:t.tag;return a&&i.push(r.directives.tagString(a)),i.join(" ")}function _a(e,t,n,r){if(dr(e))return e.toString(t,n,r);if(Xi(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const s=
|
|
53
|
-
${t.indent}${o}`:o}function nD({key:e,value:t},n,r,i){const{allNullValues:s,doc:a,indent:o,indentStep:u,options:{commentString:l,indentSeq:b,simpleKeys:c}}=n;let N=
|
|
54
|
-
${o}:`):(I=`${I}:`,N&&(I+=Us(I,n.indent,l(N))));let he,Ee,Fe;
|
|
52
|
+
${u}`);if(a){const N=Q=>Q.default&&Q.tag!=="tag:yaml.org,2002:str"&&Q.test?.test(c),{compat:B,tags:ne}=t.doc.schema;if(ne.some(N)||B?.some(N))return Ta(s,t)}return o?c:Du(c,u,am,bu(t,!1))}function $c(e,t,n,r){const{implicitKey:i,inFlow:s}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==Qn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=Qn.QUOTE_DOUBLE);const u=b=>{switch(b){case Qn.BLOCK_FOLDED:case Qn.BLOCK_LITERAL:return i||s?Ta(a.value,t):Eu(a,t,n,r);case Qn.QUOTE_DOUBLE:return No(a.value,t);case Qn.QUOTE_SINGLE:return jc(a.value,t);case Qn.PLAIN:return Zy(a,t,n,r);default:return null}};let l=u(o);if(l===null){const{defaultKeyType:b,defaultStringType:c}=t.options,N=i&&b||c;if(l=u(N),l===null)throw new Error(`Unsupported default string type ${N}`)}return l}function um(e,t){const n=Object.assign({blockQuote:!0,commentString:Xy,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function eD(e,t){if(t.tag){const i=e.filter(s=>s.tag===t.tag);if(i.length>0)return i.find(s=>s.format===t.format)??i[0]}let n,r;if(qn(t)){r=t.value;const i=e.filter(s=>s.identify?.(r));n=i.find(s=>s.format===t.format)??i.find(s=>!s.format)}else r=t,n=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!n){const i=r?.constructor?.name??typeof r;throw new Error(`Tag not resolved for ${i} value`)}return n}function tD(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const i=[],s=(qn(e)||Lr(e))&&e.anchor;s&&nm(s)&&(n.add(s),i.push(`&${s}`));const a=e.tag?e.tag:t.default?null:t.tag;return a&&i.push(r.directives.tagString(a)),i.join(" ")}function _a(e,t,n,r){if(dr(e))return e.toString(t,n,r);if(Xi(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const s=hr(e)?e:t.doc.createNode(e,{onTagObj:u=>i=u});i||(i=eD(t.doc.schema.tags,s));const a=tD(s,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const o=typeof i.stringify=="function"?i.stringify(s,t,n,r):qn(s)?$c(s,t,n,r):s.toString(t,n,r);return a?qn(s)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
53
|
+
${t.indent}${o}`:o}function nD({key:e,value:t},n,r,i){const{allNullValues:s,doc:a,indent:o,indentStep:u,options:{commentString:l,indentSeq:b,simpleKeys:c}}=n;let N=hr(e)&&e.comment||null;if(c){if(N)throw new Error("With simple keys, key nodes cannot have comments");if(Lr(e)||!hr(e)&&typeof e=="object"){const Qe="With simple keys, collection cannot be used as a key value";throw new Error(Qe)}}let B=!c&&(!e||N&&t==null&&!n.inFlow||Lr(e)||(qn(e)?e.type===Qn.BLOCK_FOLDED||e.type===Qn.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!B&&(c||!s),indent:o+u});let ne=!1,Q=!1,I=_a(e,n,()=>ne=!0,()=>Q=!0);if(!B&&!n.inFlow&&I.length>1024){if(c)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");B=!0}if(n.inFlow){if(s||t==null)return ne&&r&&r(),I===""?"?":B?`? ${I}`:I}else if(s&&!c||t==null&&B)return I=`? ${I}`,N&&!ne?I+=Us(I,n.indent,l(N)):Q&&i&&i(),I;ne&&(N=null),B?(N&&(I+=Us(I,n.indent,l(N))),I=`? ${I}
|
|
54
|
+
${o}:`):(I=`${I}:`,N&&(I+=Us(I,n.indent,l(N))));let he,Ee,Fe;hr(t)?(he=!!t.spaceBefore,Ee=t.commentBefore,Fe=t.comment):(he=!1,Ee=null,Fe=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!B&&!N&&qn(t)&&(n.indentAtStart=I.length+1),Q=!1,!b&&u.length>=2&&!n.inFlow&&!B&&Br(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let Be=!1;const ue=_a(t,n,()=>Be=!0,()=>Q=!0);let Ae=" ";if(N||he||Ee){if(Ae=he?`
|
|
55
55
|
`:"",Ee){const Qe=l(Ee);Ae+=`
|
|
56
56
|
${os(Qe,n.indent)}`}ue===""&&!n.inFlow?Ae===`
|
|
57
57
|
`&&(Ae=`
|
|
@@ -60,20 +60,20 @@ ${os(Qe,n.indent)}`}ue===""&&!n.inFlow?Ae===`
|
|
|
60
60
|
${n.indent}`}else if(!B&&Lr(t)){const Qe=ue[0],Dt=ue.indexOf(`
|
|
61
61
|
`),Ve=Dt!==-1,Xe=n.inFlow??t.flow??t.items.length===0;if(Ve||!Xe){let ze=!1;if(Ve&&(Qe==="&"||Qe==="!")){let me=ue.indexOf(" ");Qe==="&"&&me!==-1&&me<Dt&&ue[me+1]==="!"&&(me=ue.indexOf(" ",me+1)),(me===-1||Dt<me)&&(ze=!0)}ze||(Ae=`
|
|
62
62
|
${n.indent}`)}}else(ue===""||ue[0]===`
|
|
63
|
-
`)&&(Ae="");return I+=Ae+ue,n.inFlow?Be&&r&&r():Fe&&!Be?I+=Us(I,n.indent,l(Fe)):Q&&i&&i(),I}function lm(e,t){(e==="debug"||e==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(t):console.warn(t))}const cm="<<";function fm(e,t,{key:n,value:r}){if(e?.doc.schema.merge&&rD(n))if(r=Xi(r)?r.resolve(e.doc):r,Br(r))for(const i of r.items)Vc(e,t,i);else if(Array.isArray(r))for(const i of r)Vc(e,t,i);else Vc(e,t,r);else{const i=Fi(n,"",e);if(t instanceof Map)t.set(i,Fi(r,i,e));else if(t instanceof Set)t.add(i);else{const s=iD(n,i,e),a=Fi(r,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}const rD=e=>e===cm||qn(e)&&e.value===cm&&(!e.type||e.type===Qn.PLAIN);function Vc(e,t,n){const r=e&&Xi(n)?n.resolve(e.doc):n;if(!Pr(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[s,a]of i)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function iD(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(
|
|
63
|
+
`)&&(Ae="");return I+=Ae+ue,n.inFlow?Be&&r&&r():Fe&&!Be?I+=Us(I,n.indent,l(Fe)):Q&&i&&i(),I}function lm(e,t){(e==="debug"||e==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(t):console.warn(t))}const cm="<<";function fm(e,t,{key:n,value:r}){if(e?.doc.schema.merge&&rD(n))if(r=Xi(r)?r.resolve(e.doc):r,Br(r))for(const i of r.items)Vc(e,t,i);else if(Array.isArray(r))for(const i of r)Vc(e,t,i);else Vc(e,t,r);else{const i=Fi(n,"",e);if(t instanceof Map)t.set(i,Fi(r,i,e));else if(t instanceof Set)t.add(i);else{const s=iD(n,i,e),a=Fi(r,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}const rD=e=>e===cm||qn(e)&&e.value===cm&&(!e.type||e.type===Qn.PLAIN);function Vc(e,t,n){const r=e&&Xi(n)?n.resolve(e.doc):n;if(!Pr(r))throw new Error("Merge sources must be maps or map aliases");const i=r.toJSON(null,e,Map);for(const[s,a]of i)t instanceof Map?t.has(s)||t.set(s,a):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function iD(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(hr(e)&&n?.doc){const r=um(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'..."'),lm(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function qc(e,t,n){const r=wo(e,void 0,n),i=wo(t,void 0,n);return new si(r,i)}class si{constructor(t,n=null){Object.defineProperty(this,wi,{value:tm}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return hr(n)&&(n=n.clone(t)),hr(r)&&(r=r.clone(t)),new si(n,r)}toJSON(t,n){const r=n?.mapAsMap?new Map:{};return fm(n,r,this)}toString(t,n,r){return t?.doc?nD(this,t,n,r):JSON.stringify(this)}}function pm(e,t,n){return(t.inFlow??e.flow?aD:sD)(e,t,n)}function sD({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:a,onComment:o}){const{indent:u,options:{commentString:l}}=n,b=Object.assign({},n,{indent:s,type:null});let c=!1;const N=[];for(let ne=0;ne<t.length;++ne){const Q=t[ne];let I=null;if(hr(Q))!c&&Q.spaceBefore&&N.push(""),Au(n,N,Q.commentBefore,c),Q.comment&&(I=Q.comment);else if(dr(Q)){const Ee=hr(Q.key)?Q.key:null;Ee&&(!c&&Ee.spaceBefore&&N.push(""),Au(n,N,Ee.commentBefore,c))}c=!1;let he=_a(Q,b,()=>I=null,()=>c=!0);I&&(he+=Us(he,s,l(I))),c&&I&&(c=!1),N.push(r+he)}let B;if(N.length===0)B=i.start+i.end;else{B=N[0];for(let ne=1;ne<N.length;++ne){const Q=N[ne];B+=Q?`
|
|
64
64
|
${u}${Q}`:`
|
|
65
65
|
`}}return e?(B+=`
|
|
66
|
-
`+os(l(e),u),o&&o()):c&&a&&a(),B}function aD({items:e},t,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=t;r+=s;const u=Object.assign({},t,{indent:r,inFlow:!0,type:null});let l=!1,b=0;const c=[];for(let ne=0;ne<e.length;++ne){const Q=e[ne];let I=null;if(
|
|
66
|
+
`+os(l(e),u),o&&o()):c&&a&&a(),B}function aD({items:e},t,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:a,options:{commentString:o}}=t;r+=s;const u=Object.assign({},t,{indent:r,inFlow:!0,type:null});let l=!1,b=0;const c=[];for(let ne=0;ne<e.length;++ne){const Q=e[ne];let I=null;if(hr(Q))Q.spaceBefore&&c.push(""),Au(t,c,Q.commentBefore,!1),Q.comment&&(I=Q.comment);else if(dr(Q)){const Ee=hr(Q.key)?Q.key:null;Ee&&(Ee.spaceBefore&&c.push(""),Au(t,c,Ee.commentBefore,!1),Ee.comment&&(l=!0));const Fe=hr(Q.value)?Q.value:null;Fe?(Fe.comment&&(I=Fe.comment),Fe.commentBefore&&(l=!0)):Q.value==null&&Ee?.comment&&(I=Ee.comment)}I&&(l=!0);let he=_a(Q,u,()=>I=null);ne<e.length-1&&(he+=","),I&&(he+=Us(he,r,o(I))),!l&&(c.length>b||he.includes(`
|
|
67
67
|
`))&&(l=!0),c.push(he),b=c.length}const{start:N,end:B}=n;if(c.length===0)return N+B;if(!l){const ne=c.reduce((Q,I)=>Q+I.length+2,2);l=t.options.lineWidth>0&&ne>t.options.lineWidth}if(l){let ne=N;for(const Q of c)ne+=Q?`
|
|
68
68
|
${s}${i}${Q}`:`
|
|
69
69
|
`;return`${ne}
|
|
70
|
-
${i}${B}`}else return`${N}${a}${c.join(" ")}${a}${B}`}function Au({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=os(t(r),e);n.push(s.trimStart())}}function Ws(e,t){const n=qn(t)?t.value:t;for(const r of e)if(dr(r)&&(r.key===t||r.key===n||qn(r.key)&&r.key.value===n))return r}class Ni extends Ic{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ns,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:s}=r,a=new this(t),o=(u,l)=>{if(typeof s=="function")l=s.call(n,u,l);else if(Array.isArray(s)&&!s.includes(u))return;(l!==void 0||i)&&a.items.push(qc(u,l,r))};if(n instanceof Map)for(const[u,l]of n)o(u,l);else if(n&&typeof n=="object")for(const u of Object.keys(n))o(u,n[u]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;dr(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new si(t,t?.value):r=new si(t.key,t.value);const i=Ws(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);qn(i.value)&&sm(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const a=this.items.findIndex(o=>s(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){const n=Ws(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const i=Ws(this.items,t)?.value;return(!n&&qn(i)?i.value:i)??void 0}has(t){return!!Ws(this.items,t)}set(t,n){this.add(new si(t,n),!0)}toJSON(t,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)fm(n,i,s);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!dr(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),pm(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const La={collection:"map",default:!0,nodeClass:Ni,tag:"tag:yaml.org,2002:map",resolve(e,t){return Pr(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Ni.from(e,t,n)};class Gs extends Ic{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(wa,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Cu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Cu(t);if(typeof r!="number")return;const i=this.items[r];return!n&&qn(i)?i.value:i}has(t){const n=Cu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Cu(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];qn(i)&&sm(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Fi(s,String(i++),n));return r}toString(t,n,r){return t?pm(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof i=="function"){const u=n instanceof Set?o:String(a++);o=i.call(n,u,o)}s.items.push(wo(o,void 0,r))}}return s}}function Cu(e){let t=qn(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const ka={collection:"seq",default:!0,nodeClass:Gs,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Br(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Gs.from(e,t,n)},xu={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),$c(e,t,n,r)}},Su={identify:e=>e==null,createNode:()=>new Qn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Qn(null),stringify:({source:e},t)=>typeof e=="string"&&Su.test.test(e)?e:t.options.nullStr},Uc={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Qn(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Uc.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function ji({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=t-(s.length-a-1);for(;o-- >0;)s+="0"}return s}const dm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF
|
|
70
|
+
${i}${B}`}else return`${N}${a}${c.join(" ")}${a}${B}`}function Au({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){const s=os(t(r),e);n.push(s.trimStart())}}function Ws(e,t){const n=qn(t)?t.value:t;for(const r of e)if(dr(r)&&(r.key===t||r.key===n||qn(r.key)&&r.key.value===n))return r}class Ni extends Ic{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Ns,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:s}=r,a=new this(t),o=(u,l)=>{if(typeof s=="function")l=s.call(n,u,l);else if(Array.isArray(s)&&!s.includes(u))return;(l!==void 0||i)&&a.items.push(qc(u,l,r))};if(n instanceof Map)for(const[u,l]of n)o(u,l);else if(n&&typeof n=="object")for(const u of Object.keys(n))o(u,n[u]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;dr(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new si(t,t?.value):r=new si(t.key,t.value);const i=Ws(this.items,r.key),s=this.schema?.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);qn(i.value)&&sm(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const a=this.items.findIndex(o=>s(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){const n=Ws(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const i=Ws(this.items,t)?.value;return(!n&&qn(i)?i.value:i)??void 0}has(t){return!!Ws(this.items,t)}set(t,n){this.add(new si(t,n),!0)}toJSON(t,n,r){const i=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(i);for(const s of this.items)fm(n,i,s);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!dr(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),pm(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}const La={collection:"map",default:!0,nodeClass:Ni,tag:"tag:yaml.org,2002:map",resolve(e,t){return Pr(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Ni.from(e,t,n)};class Gs extends Ic{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(wa,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Cu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Cu(t);if(typeof r!="number")return;const i=this.items[r];return!n&&qn(i)?i.value:i}has(t){const n=Cu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Cu(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];qn(i)&&sm(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n?.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Fi(s,String(i++),n));return r}toString(t,n,r){return t?pm(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof i=="function"){const u=n instanceof Set?o:String(a++);o=i.call(n,u,o)}s.items.push(wo(o,void 0,r))}}return s}}function Cu(e){let t=qn(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const ka={collection:"seq",default:!0,nodeClass:Gs,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Br(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Gs.from(e,t,n)},xu={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),$c(e,t,n,r)}},Su={identify:e=>e==null,createNode:()=>new Qn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Qn(null),stringify:({source:e},t)=>typeof e=="string"&&Su.test.test(e)?e:t.options.nullStr},Uc={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Qn(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Uc.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function ji({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r=="bigint")return String(r);const i=typeof r=="number"?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(r);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(s)){let a=s.indexOf(".");a<0&&(a=s.length,s+=".");let o=t-(s.length-a-1);for(;o-- >0;)s+="0"}return s}const dm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ji},hm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():ji(e)}},mm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Qn(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:ji},wu=e=>typeof e=="bigint"||Number.isInteger(e),Wc=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function gm(e,t,n){const{value:r}=e;return wu(r)&&r>=0?n+r.toString(t):ji(e)}const ym={identify:e=>wu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Wc(e,2,8,n),stringify:e=>gm(e,8,"0o")},Dm={identify:wu,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Wc(e,0,10,n),stringify:ji},bm={identify:e=>wu(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Wc(e,2,16,n),stringify:e=>gm(e,16,"0x")},oD=[La,ka,xu,Su,Uc,ym,Dm,bm,dm,hm,mm];function vm(e){return typeof e=="bigint"||Number.isInteger(e)}const Fu=({value:e})=>JSON.stringify(e),uD=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Fu},{identify:e=>e==null,createNode:()=>new Qn(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Fu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:e=>e==="true",stringify:Fu},{identify:vm,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>vm(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Fu}],lD={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},cD=[La,ka].concat(uD,lD),Gc={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Buffer=="function")return Buffer.from(e,"base64");if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},r,i,s){const a=n;let o;if(typeof Buffer=="function")o=a instanceof Buffer?a.toString("base64"):Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let u="";for(let l=0;l<a.length;++l)u+=String.fromCharCode(a[l]);o=btoa(u)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t||(t=Qn.BLOCK_LITERAL),t!==Qn.QUOTE_DOUBLE){const u=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),l=Math.ceil(o.length/u),b=new Array(l);for(let c=0,N=0;c<l;++c,N+=u)b[c]=o.substr(N,u);o=b.join(t===Qn.BLOCK_LITERAL?`
|
|
71
71
|
`:" ")}return $c({comment:e,type:t,value:o},r,i,s)}};function Em(e,t){if(Br(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!dr(r)){if(Pr(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");const i=r.items[0]||new si(new Qn(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}
|
|
72
72
|
${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}
|
|
73
|
-
${s.comment}`:r.comment}r=i}e.items[n]=dr(r)?r:new si(r)}}else t("Expected a sequence for this tag");return e}function Am(e,t,n){const{replacer:r}=n,i=new Gs(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(s++),a));let o,u;if(Array.isArray(a))if(a.length===2)o=a[0],u=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const l=Object.keys(a);if(l.length===1)o=l[0],u=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;i.items.push(qc(o,u,n))}return i}const Jc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Em,createNode:Am};class Pa extends Gs{constructor(){super(),this.add=Ni.prototype.add.bind(this),this.delete=Ni.prototype.delete.bind(this),this.get=Ni.prototype.get.bind(this),this.has=Ni.prototype.has.bind(this),this.set=Ni.prototype.set.bind(this),this.tag=Pa.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,a;if(dr(i)?(s=Fi(i.key,"",n),a=Fi(i.value,s,n)):s=Fi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}static from(t,n,r){const i=Am(t,n,r),s=new this;return s.items=i.items,s}}Pa.tag="tag:yaml.org,2002:omap";const Yc={collection:"seq",identify:e=>e instanceof Map,nodeClass:Pa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Em(e,t),r=[];for(const{key:i}of n.items)qn(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Pa,n)},createNode:(e,t,n)=>Pa.from(e,t,n)};function Cm({value:e,source:t},n){return t&&(e?xm:Sm).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const xm={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Qn(!0),stringify:Cm},Sm={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Qn(!1),stringify:Cm},fD={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF
|
|
73
|
+
${s.comment}`:r.comment}r=i}e.items[n]=dr(r)?r:new si(r)}}else t("Expected a sequence for this tag");return e}function Am(e,t,n){const{replacer:r}=n,i=new Gs(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(s++),a));let o,u;if(Array.isArray(a))if(a.length===2)o=a[0],u=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const l=Object.keys(a);if(l.length===1)o=l[0],u=a[o];else throw new TypeError(`Expected tuple with one key, not ${l.length} keys`)}else o=a;i.items.push(qc(o,u,n))}return i}const Jc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Em,createNode:Am};class Pa extends Gs{constructor(){super(),this.add=Ni.prototype.add.bind(this),this.delete=Ni.prototype.delete.bind(this),this.get=Ni.prototype.get.bind(this),this.has=Ni.prototype.has.bind(this),this.set=Ni.prototype.set.bind(this),this.tag=Pa.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const i of this.items){let s,a;if(dr(i)?(s=Fi(i.key,"",n),a=Fi(i.value,s,n)):s=Fi(i,"",n),r.has(s))throw new Error("Ordered maps must not include duplicate keys");r.set(s,a)}return r}static from(t,n,r){const i=Am(t,n,r),s=new this;return s.items=i.items,s}}Pa.tag="tag:yaml.org,2002:omap";const Yc={collection:"seq",identify:e=>e instanceof Map,nodeClass:Pa,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Em(e,t),r=[];for(const{key:i}of n.items)qn(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new Pa,n)},createNode:(e,t,n)=>Pa.from(e,t,n)};function Cm({value:e,source:t},n){return t&&(e?xm:Sm).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const xm={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Qn(!0),stringify:Cm},Sm={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Qn(!1),stringify:Cm},fD={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ji},pD={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():ji(e)}},dD={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Qn(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const r=e.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(t.minFractionDigits=r.length)}return t},stringify:ji},To=e=>typeof e=="bigint"||Number.isInteger(e);function Nu(e,t,n,{intAsBigInt:r}){const i=e[0];if((i==="-"||i==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const a=BigInt(e);return i==="-"?BigInt(-1)*a:a}const s=parseInt(e,n);return i==="-"?-1*s:s}function Hc(e,t,n){const{value:r}=e;if(To(r)){const i=r.toString(t);return r<0?"-"+n+i.substr(1):n+i}return ji(e)}const hD={identify:To,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Nu(e,2,2,n),stringify:e=>Hc(e,2,"0b")},mD={identify:To,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Nu(e,1,8,n),stringify:e=>Hc(e,8,"0")},gD={identify:To,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Nu(e,0,10,n),stringify:ji},yD={identify:To,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Nu(e,2,16,n),stringify:e=>Hc(e,16,"0x")};class Ba extends Ni{constructor(t){super(t),this.tag=Ba.tag}add(t){let n;dr(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new si(t.key,null):n=new si(t,null),Ws(this.items,n.key)||this.items.push(n)}get(t,n){const r=Ws(this.items,t);return!n&&dr(r)?qn(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Ws(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new si(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof i=="function"&&(a=i.call(n,a,a)),s.items.push(qc(a,null,r));return s}}Ba.tag="tag:yaml.org,2002:set";const zc={collection:"map",identify:e=>e instanceof Set,nodeClass:Ba,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Ba.from(e,t,n),resolve(e,t){if(Pr(e)){if(e.hasAllNullValues(!0))return Object.assign(new Ba,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Qc(e,t){const n=e[0],r=n==="-"||n==="+"?e.substring(1):e,i=a=>t?BigInt(a):Number(a),s=r.replace(/_/g,"").split(":").reduce((a,o)=>a*i(60)+i(o),i(0));return n==="-"?i(-1)*s:s}function wm(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return ji(e);let r="";t<0&&(r="-",t*=n(-1));const i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Fm={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Qc(e,n),stringify:wm},Nm={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Qc(e,!1),stringify:wm},Tu={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Tu.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,r,i,s,a,o]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(n,r-1,i,s||0,a||0,o||0,u);const b=t[8];if(b&&b!=="Z"){let c=Qc(b,!1);Math.abs(c)<30&&(c*=60),l-=6e4*c}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Tm=[La,ka,xu,Su,xm,Sm,hD,mD,gD,yD,fD,pD,dD,Gc,Yc,Jc,zc,Fm,Nm,Tu],_m=new Map([["core",oD],["failsafe",[La,ka,xu]],["json",cD],["yaml11",Tm],["yaml-1.1",Tm]]),Lm={binary:Gc,bool:Uc,float:mm,floatExp:hm,floatNaN:dm,floatTime:Nm,int:Dm,intHex:bm,intOct:ym,intTime:Fm,map:La,null:Su,omap:Yc,pairs:Jc,seq:ka,set:zc,timestamp:Tu},DD={"tag:yaml.org,2002:binary":Gc,"tag:yaml.org,2002:omap":Yc,"tag:yaml.org,2002:pairs":Jc,"tag:yaml.org,2002:set":zc,"tag:yaml.org,2002:timestamp":Tu};function Xc(e,t){let n=_m.get(t);if(!n)if(Array.isArray(e))n=[];else{const r=Array.from(_m.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${r} or define customTags array`)}if(Array.isArray(e))for(const r of e)n=n.concat(r);else typeof e=="function"&&(n=e(n.slice()));return n.map(r=>{if(typeof r!="string")return r;const i=Lm[r];if(i)return i;const s=Object.keys(Lm).map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown custom tag "${r}"; use one of ${s}`)})}const bD=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class Kc{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(t)?Xc(t,"compat"):t?Xc(null,t):null,this.merge=!!r,this.name=typeof s=="string"&&s||"core",this.knownTags=i?DD:{},this.tags=Xc(n,this.name),this.toStringOptions=o??null,Object.defineProperty(this,Ns,{value:La}),Object.defineProperty(this,as,{value:xu}),Object.defineProperty(this,wa,{value:ka}),this.sortMapEntries=typeof a=="function"?a:a===!0?bD:null}clone(){const t=Object.create(Kc.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}}function vD(e,t){const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");const i=um(e,t),{commentString:s}=i.options;if(e.commentBefore){n.length!==1&&n.unshift("");const u=s(e.commentBefore);n.unshift(os(u,""))}let a=!1,o=null;if(e.contents){if(hr(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){const b=s(e.contents.commentBefore);n.push(os(b,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const u=o?void 0:()=>a=!0;let l=_a(e.contents,i,()=>o=null,u);o&&(l+=Us(l,"",s(o))),(l[0]==="|"||l[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(_a(e.contents,i));if(e.directives?.docEnd)if(e.comment){const u=s(e.comment);u.includes(`
|
|
74
74
|
`)?(n.push("..."),n.push(os(u,""))):n.push(`... ${u}`)}else n.push("...");else{let u=e.comment;u&&a&&(u=u.replace(/^\n+/,"")),u&&((!a||o)&&n[n.length-1]!==""&&n.push(""),n.push(os(s(u),"")))}return n.join(`
|
|
75
75
|
`)+`
|
|
76
|
-
`}class _u{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,wi,{value:Pc});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:a}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new ii({version:a}),this.setSchema(a,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){const t=Object.create(_u.prototype,{[wi]:{value:Pc}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=
|
|
76
|
+
`}class _u{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,wi,{value:Pc});let i=null;typeof n=="function"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},r);this.options=s;let{version:a}=s;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new ii({version:a}),this.setSchema(a,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){const t=Object.create(_u.prototype,{[wi]:{value:Pc}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=hr(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Ma(this.contents)&&this.contents.add(t)}addIn(t,n){Ma(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=rm(this);t.anchor=!n||r.has(n)?im(n||"a",r):n}return new Mc(t.anchor)}createNode(t,n,r){let i;if(typeof n=="function")t=n.call({"":t},"",t),i=n;else if(Array.isArray(n)){const I=Ee=>typeof Ee=="number"||Ee instanceof String||Ee instanceof Number,he=n.filter(I).map(String);he.length>0&&(n=n.concat(he)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:a,flow:o,keepUndefined:u,onTagObj:l,tag:b}=r??{},{onAnchor:c,setAnchors:N,sourceObjects:B}=Hy(this,a||"a"),ne={aliasDuplicateObjects:s??!0,keepUndefined:u??!1,onAnchor:c,onTagObj:l,replacer:i,schema:this.schema,sourceObjects:B},Q=wo(t,b,ne);return o&&Lr(Q)&&(Q.flow=!0),N(),Q}createPair(t,n,r={}){const i=this.createNode(t,null,r),s=this.createNode(n,null,r);return new si(i,s)}delete(t){return Ma(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Fo(t)?this.contents==null?!1:(this.contents=null,!0):Ma(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Lr(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Fo(t)?!n&&qn(this.contents)?this.contents.value:this.contents:Lr(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Lr(this.contents)?this.contents.has(t):!1}hasIn(t){return Fo(t)?this.contents!==void 0:Lr(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=gu(this.schema,[t],n):Ma(this.contents)&&this.contents.set(t,n)}setIn(t,n){Fo(t)?this.contents=n:this.contents==null?this.contents=gu(this.schema,Array.from(t),n):Ma(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let r;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new ii({version:"1.1"}),r={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new ii({version:t}),r={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new Kc(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:a}={}){const o={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},u=Fi(this.contents,n??"",o);if(typeof s=="function")for(const{count:l,res:b}of o.anchors.values())s(b,l);return typeof a=="function"?Na(a,{"":u},"",u):u}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return vD(this,t)}}function Ma(e){if(Lr(e))return!0;throw new Error("Expected a YAML collection as document contents")}class km extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class _o extends km{constructor(t,n,r){super("YAMLParseError",t,n,r)}}class ED extends km{constructor(t,n,r){super("YAMLWarning",t,n,r)}}const Pm=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(o=>t.linePos(o));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,a=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const o=Math.min(s-39,a.length-79);a="…"+a.substring(o),s-=o-1}if(a.length>80&&(a=a.substring(0,79)+"…"),r>1&&/^ *$/.test(a.substring(0,s))){let o=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);o.length>80&&(o=o.substring(0,79)+`…
|
|
77
77
|
`),a=o+a}if(/[^ ]/.test(a)){let o=1;const u=n.linePos[1];u&&u.line===r&&u.col>i&&(o=Math.max(1,Math.min(u.col-i,80-s)));const l=" ".repeat(s)+"^".repeat(o);n.message+=`:
|
|
78
78
|
|
|
79
79
|
${a}
|
|
@@ -85,7 +85,7 @@ ${l}
|
|
|
85
85
|
`+Ae.comment:l.comment=Ae.comment),c=Ae.end;continue}!a&&n.options.strict&&Lo(Fe)&&i(Fe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(I===0)Ae.comma&&i(Ae.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(Ae.comma||i(Ae.start,"MISSING_CHAR",`Missing , between ${o} items`),Ae.comment){let Qe="";e:for(const Dt of Ee)switch(Dt.type){case"comma":case"space":break;case"comment":Qe=Dt.source.substring(1);break e;default:break e}if(Qe){let Dt=l.items[l.items.length-1];dr(Dt)&&(Dt=Dt.value??Dt.key),Dt.comment?Dt.comment+=`
|
|
86
86
|
`+Qe:Dt.comment=Qe,Ae.comment=Ae.comment.substring(Qe.length+1)}}if(!a&&!Be&&!Ae.found){const Qe=ue?e(n,ue,Ae,i):t(n,Ae.end,Be,null,Ae,i);l.items.push(Qe),c=Qe.range[2],tf(ue)&&i(Qe.range,"BLOCK_IN_FLOW",ef)}else{const Qe=Ae.end,Dt=Fe?e(n,Fe,Ae,i):t(n,Qe,Ee,null,Ae,i);tf(Fe)&&i(Dt.range,"BLOCK_IN_FLOW",ef);const Ve=Ia(Be??[],{flow:o,indicator:"map-value-ind",next:ue,offset:Dt.range[2],onError:i,startOnNewline:!1});if(Ve.found){if(!a&&!Ae.found&&n.options.strict){if(Be)for(const me of Be){if(me===Ve.found)break;if(me.type==="newline"){i(me,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}Ae.start<Ve.found.offset-1024&&i(Ve.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else ue&&("source"in ue&&ue.source&&ue.source[0]===":"?i(ue,"MISSING_CHAR",`Missing space after : in ${o}`):i(Ve.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const Xe=ue?e(n,ue,Ve,i):Ve.found?t(n,Ve.end,Be,null,Ve,i):null;Xe?tf(ue)&&i(Xe.range,"BLOCK_IN_FLOW",ef):Ve.comment&&(Dt.comment?Dt.comment+=`
|
|
87
87
|
`+Ve.comment:Dt.comment=Ve.comment);const ze=new si(Dt,Xe);if(n.options.keepSourceTokens&&(ze.srcToken=he),a){const me=l;Bm(n,me.items,Dt)&&i(Qe,"DUPLICATE_KEY","Map keys must be unique"),me.items.push(ze)}else{const me=new Ni(n.schema);me.flow=!0,me.items.push(ze),l.items.push(me)}c=Xe?Xe.range[2]:Ve.end}}const N=a?"}":"]",[B,...ne]=r.end;let Q=c;if(B&&B.source===N)Q=B.offset+B.source.length;else{const I=o[0].toUpperCase()+o.substring(1),he=b?`${I} must end with a ${N}`:`${I} in block collection must be sufficiently indented and end with a ${N}`;i(c,b?"MISSING_CHAR":"BAD_INDENT",he),B&&B.source.length!==1&&ne.unshift(B)}if(ne.length>0){const I=ko(ne,Q,n.options.strict,i);I.comment&&(l.comment?l.comment+=`
|
|
88
|
-
`+I.comment:l.comment=I.comment),l.range=[r.offset,Q,I.offset]}else l.range=[r.offset,Q,Q];return l}function nf(e,t,n,r,i,s){const a=n.type==="block-map"?AD(e,t,n,r,s):n.type==="block-seq"?CD(e,t,n,r,s):xD(e,t,n,r,s),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function SD(e,t,n,r,i){const s=r?t.directives.tagName(r.source,c=>i(r,"TAG_RESOLVE_FAILED",c)):null,a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!r||!s||s==="!"||s===Ni.tagName&&a==="map"||s===Gs.tagName&&a==="seq"||!a)return nf(e,t,n,i,s);let o=t.schema.tags.find(c=>c.tag===s&&c.collection===a);if(!o){const c=t.schema.knownTags[s];if(c&&c.collection===a)t.schema.tags.push(Object.assign({},c,{default:!1})),o=c;else return c?.collection?i(r,"BAD_COLLECTION_TYPE",`${c.tag} used for ${a} collection, but expects ${c.collection}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),nf(e,t,n,i,s)}const u=nf(e,t,n,i,s,o),l=o.resolve?.(u,c=>i(r,"TAG_RESOLVE_FAILED",c),t.options)??u,b=
|
|
88
|
+
`+I.comment:l.comment=I.comment),l.range=[r.offset,Q,I.offset]}else l.range=[r.offset,Q,Q];return l}function nf(e,t,n,r,i,s){const a=n.type==="block-map"?AD(e,t,n,r,s):n.type==="block-seq"?CD(e,t,n,r,s):xD(e,t,n,r,s),o=a.constructor;return i==="!"||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function SD(e,t,n,r,i){const s=r?t.directives.tagName(r.source,c=>i(r,"TAG_RESOLVE_FAILED",c)):null,a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!r||!s||s==="!"||s===Ni.tagName&&a==="map"||s===Gs.tagName&&a==="seq"||!a)return nf(e,t,n,i,s);let o=t.schema.tags.find(c=>c.tag===s&&c.collection===a);if(!o){const c=t.schema.knownTags[s];if(c&&c.collection===a)t.schema.tags.push(Object.assign({},c,{default:!1})),o=c;else return c?.collection?i(r,"BAD_COLLECTION_TYPE",`${c.tag} used for ${a} collection, but expects ${c.collection}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),nf(e,t,n,i,s)}const u=nf(e,t,n,i,s,o),l=o.resolve?.(u,c=>i(r,"TAG_RESOLVE_FAILED",c),t.options)??u,b=hr(l)?l:new Qn(l);return b.range=u.range,b.tag=s,o?.format&&(b.format=o.format),b}function wD(e,t,n){const r=e.offset,i=FD(e,t,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};const s=i.mode===">"?Qn.BLOCK_FOLDED:Qn.BLOCK_LITERAL,a=e.source?ND(e.source):[];let o=a.length;for(let Q=a.length-1;Q>=0;--Q){const I=a[Q][1];if(I===""||I==="\r")o=Q;else break}if(o===0){const Q=i.chomp==="+"&&a.length>0?`
|
|
89
89
|
`.repeat(Math.max(1,a.length-1)):"";let I=r+i.length;return e.source&&(I+=e.source.length),{value:Q,type:s,comment:i.comment,range:[r,I,I]}}let u=e.indent+i.indent,l=e.offset+i.length,b=0;for(let Q=0;Q<o;++Q){const[I,he]=a[Q];if(he===""||he==="\r")i.indent===0&&I.length>u&&(u=I.length);else{if(I.length<u){const Ee="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(l+I.length,"MISSING_CHAR",Ee)}i.indent===0&&(u=I.length),b=Q;break}l+=I.length+he.length+1}for(let Q=a.length-1;Q>=o;--Q)a[Q][0].length>u&&(o=Q+1);let c="",N="",B=!1;for(let Q=0;Q<b;++Q)c+=a[Q][0].slice(u)+`
|
|
90
90
|
`;for(let Q=b;Q<o;++Q){let[I,he]=a[Q];l+=I.length+he.length+1;const Ee=he[he.length-1]==="\r";if(Ee&&(he=he.slice(0,-1)),he&&I.length<u){const Be=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;n(l-he.length-(Ee?2:1),"BAD_INDENT",Be),I=""}s===Qn.BLOCK_LITERAL?(c+=N+I.slice(u)+he,N=`
|
|
91
91
|
`):I.length>u||he[0]===" "?(N===" "?N=`
|
|
@@ -126,12 +126,12 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
126
126
|
`:case`\r
|
|
127
127
|
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ti(e){switch(e){case void 0:case" ":case`
|
|
128
128
|
`:case"\r":case" ":return!0;default:return!1}}const Ym="0123456789ABCDEFabcdef".split(""),GD="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(""),uf=",[]{}".split(""),JD=` ,[]{}
|
|
129
|
-
\r `.split(""),lf=e=>!e||JD.includes(e);class YD{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){t
|
|
129
|
+
\r `.split(""),lf=e=>!e||JD.includes(e);class YD{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
|
|
130
130
|
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
131
131
|
`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+t];if(n==="\r"){const i=this.buffer[r+t+1];if(i===`
|
|
132
132
|
`||!i&&!this.atEnd)return t+r+1}return n===`
|
|
133
133
|
`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&Ti(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
|
|
134
|
-
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Wm&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length
|
|
134
|
+
`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Wm&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,r=t.indexOf("#");for(;r!==-1;){const s=t[r-1];if(s===" "||s===" "){n=r-1;break}else r=t.indexOf("#",r+1)}for(;;){const s=t[n-1];if(s===" "||s===" ")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Gm,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if(n==="---"&&Ti(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"doc";if(n==="..."&&Ti(this.charAt(3)))return yield*this.pushCount(3),"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ti(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ti(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(lf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&i[0]!=="#"||r===0&&(i.startsWith("---")||i.startsWith("..."))&&Ti(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Jm,yield*this.parseLineStart();let s=0;for(;i[s]===",";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-s),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(lf),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const a=this.charAt(1);if(this.flowKey||Ti(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]==="\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let i=r.indexOf(`
|
|
135
135
|
`,this.pos);if(i!==-1){for(;i!==-1;){const s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`
|
|
136
136
|
`,s)}i!==-1&&(n=i-(r[i-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ti(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let i=this.pos;r=this.buffer[i];++i)switch(r){case" ":n+=1;break;case`
|
|
137
137
|
`:t=i,n=0;break;case"\r":{const s=this.buffer[i+1];if(!s&&!this.atEnd)return this.setNext("block-scalar");if(s===`
|
|
@@ -182,7 +182,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
182
182
|
`)return D+2;if(h===`
|
|
183
183
|
`||h==="\r"||h==="\u2028"||h==="\u2029")return D+1}return D}A.exports=p}}),Dn=Te({"src/utils/text/get-next-non-space-non-comment-character-index-with-start-index.js"(m,A){Re();var p=Gt(),v=Xt(),D=Wt(),{skipSpaces:f}=Lt();function d(h,E){let x=null,P=E;for(;P!==x;)x=P,P=f(h,P),P=p(h,P),P=D(h,P),P=v(h,P);return P}A.exports=d}}),De=Te({"src/common/util.js"(m,A){Re();var{default:p}=(Jf(),Yn(yl)),v=Vr(),{getSupportInfo:D}=Tt(),f=It(),d=gl(),{skipWhitespace:h,skipSpaces:E,skipToLineEnd:x,skipEverythingButNewLine:P}=Lt(),T=Gt(),k=Wt(),C=Xt(),S=Dn(),j=ge=>ge[ge.length-2];function X(ge){return(oe,qe,rt)=>{let Ge=rt&&rt.backwards;if(qe===!1)return!1;let{length:mt}=oe,ve=qe;for(;ve>=0&&ve<mt;){let Ie=oe.charAt(ve);if(ge instanceof RegExp){if(!ge.test(Ie))return ve}else if(!ge.includes(Ie))return ve;Ge?ve--:ve++}return ve===-1||ve===mt?ve:!1}}function te(ge,oe){let qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},rt=E(ge,qe.backwards?oe-1:oe,qe),Ge=C(ge,rt,qe);return rt!==Ge}function $(ge,oe,qe){for(let rt=oe;rt<qe;++rt)if(ge.charAt(rt)===`
|
|
184
184
|
`)return!0;return!1}function K(ge,oe,qe){let rt=qe(oe)-1;rt=E(ge,rt,{backwards:!0}),rt=C(ge,rt,{backwards:!0}),rt=E(ge,rt,{backwards:!0});let Ge=C(ge,rt,{backwards:!0});return rt!==Ge}function G(ge,oe){let qe=null,rt=oe;for(;rt!==qe;)qe=rt,rt=x(ge,rt),rt=T(ge,rt),rt=E(ge,rt);return rt=k(ge,rt),rt=C(ge,rt),rt!==!1&&te(ge,rt)}function re(ge,oe,qe){return G(ge,qe(oe))}function ee(ge,oe,qe){return S(ge,qe(oe))}function be(ge,oe,qe){return ge.charAt(ee(ge,oe,qe))}function F(ge,oe){let qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E(ge,qe.backwards?oe-1:oe,qe)!==oe}function J(ge,oe){let qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,rt=0;for(let Ge=qe;Ge<ge.length;++Ge)ge[Ge]===" "?rt=rt+oe-rt%oe:rt++;return rt}function w(ge,oe){let qe=ge.lastIndexOf(`
|
|
185
|
-
`);return qe===-1?0:J(ge.slice(qe+1).match(/^[\t ]*/)[0],oe)}function R(ge,oe){let qe={quote:'"',regex:/"/g,escaped:"""},rt={quote:"'",regex:/'/g,escaped:"'"},Ge=oe==="'"?rt:qe,mt=Ge===rt?qe:rt,ve=Ge;if(ge.includes(Ge.quote)||ge.includes(mt.quote)){let Ie=(ge.match(Ge.regex)||[]).length,pt=(ge.match(mt.regex)||[]).length;ve=Ie>pt?mt:Ge}return ve}function y(ge,oe){let qe=ge.slice(1,-1),rt=oe.parser==="json"||oe.parser==="json5"&&oe.quoteProps==="preserve"&&!oe.singleQuote?'"':oe.__isInHtmlAttribute?"'":R(qe,oe.singleQuote?"'":'"').quote;return _(qe,rt,!(oe.parser==="css"||oe.parser==="less"||oe.parser==="scss"||oe.__embeddedInHtml))}function _(ge,oe,qe){let rt=oe==='"'?"'":'"',Ge=/\\(.)|(["'])/gs,mt=ge.replace(Ge,(ve,Ie,pt)=>Ie===rt?Ie:pt===oe?"\\"+pt:pt||(qe&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(Ie)?Ie:"\\"+Ie));return oe+mt+oe}function M(ge){return ge.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}function q(ge,oe){let qe=ge.match(new RegExp(`(${p(oe)})+`,"g"));return qe===null?0:qe.reduce((rt,Ge)=>Math.max(rt,Ge.length/oe.length),0)}function U(ge,oe){let qe=ge.match(new RegExp(`(${p(oe)})+`,"g"));if(qe===null)return 0;let rt=new Map,Ge=0;for(let mt of qe){let ve=mt.length/oe.length;rt.set(ve,!0),ve>Ge&&(Ge=ve)}for(let mt=1;mt<Ge;mt++)if(!rt.get(mt))return mt;return Ge+1}function z(ge,oe){(ge.comments||(ge.comments=[])).push(oe),oe.printed=!1,oe.nodeDescription=Ue(ge)}function ie(ge,oe){oe.leading=!0,oe.trailing=!1,z(ge,oe)}function ce(ge,oe,qe){oe.leading=!1,oe.trailing=!1,qe&&(oe.marker=qe),z(ge,oe)}function ye(ge,oe){oe.leading=!1,oe.trailing=!0,z(ge,oe)}function fe(ge,oe){let{languages:qe}=D({plugins:oe.plugins}),rt=qe.find(Ge=>{let{name:mt}=Ge;return mt.toLowerCase()===ge})||qe.find(Ge=>{let{aliases:mt}=Ge;return Array.isArray(mt)&&mt.includes(ge)})||qe.find(Ge=>{let{extensions:mt}=Ge;return Array.isArray(mt)&&mt.includes(`.${ge}`)});return rt&&rt.parsers[0]}function _e(ge){return ge&&ge.type==="front-matter"}function se(ge){let oe=new WeakMap;return function(qe){return oe.has(qe)||oe.set(qe,Symbol(ge)),oe.get(qe)}}function Ue(ge){let oe=ge.type||ge.kind||"(unknown type)",qe=String(ge.name||ge.id&&(typeof ge.id=="object"?ge.id.name:ge.id)||ge.key&&(typeof ge.key=="object"?ge.key.name:ge.key)||ge.value&&(typeof ge.value=="object"?"":String(ge.value))||ge.operator||"");return qe.length>20&&(qe=qe.slice(0,19)+"…"),oe+(qe?" "+qe:"")}A.exports={inferParserByLanguage:fe,getStringWidth:d,getMaxContinuousCount:q,getMinNotPresentContinuousCount:U,getPenultimate:j,getLast:v,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:S,getNextNonSpaceNonCommentCharacterIndex:ee,getNextNonSpaceNonCommentCharacter:be,skip:X,skipWhitespace:h,skipSpaces:E,skipToLineEnd:x,skipEverythingButNewLine:P,skipInlineComment:T,skipTrailingComment:k,skipNewline:C,isNextLineEmptyAfterIndex:G,isNextLineEmpty:re,isPreviousLineEmpty:K,hasNewline:te,hasNewlineInRange:$,hasSpaces:F,getAlignmentSize:J,getIndentSize:w,getPreferredQuote:R,printString:y,printNumber:M,makeString:_,addLeadingComment:ie,addDanglingComment:ce,addTrailingComment:ye,isFrontMatterNode:_e,isNonEmptyArray:f,createGroupIdMapper:se}}}),Z={};Sn(Z,{basename:()=>xt,default:()=>xr,delimiter:()=>sr,dirname:()=>je,extname:()=>Ot,isAbsolute:()=>Ne,join:()=>Me,normalize:()=>le,relative:()=>Ce,resolve:()=>H,sep:()=>$n});function O(m,A){for(var p=0,v=m.length-1;v>=0;v--){var D=m[v];D==="."?m.splice(v,1):D===".."?(m.splice(v,1),p++):p&&(m.splice(v,1),p--)}if(A)for(;p--;p)m.unshift("..");return m}function H(){for(var m="",A=!1,p=arguments.length-1;p>=-1&&!A;p--){var v=p>=0?arguments[p]:"/";if(typeof v!="string")throw new TypeError("Arguments to path.resolve must be strings");v&&(m=v+"/"+m,A=v.charAt(0)==="/")}return m=O(zt(m.split("/"),function(D){return!!D}),!A).join("/"),(A?"/":"")+m||"."}function le(m){var A=Ne(m),p=di(m,-1)==="/";return m=O(zt(m.split("/"),function(v){return!!v}),!A).join("/"),!m&&!A&&(m="."),m&&p&&(m+="/"),(A?"/":"")+m}function Ne(m){return m.charAt(0)==="/"}function Me(){var m=Array.prototype.slice.call(arguments,0);return le(zt(m,function(A,p){if(typeof A!="string")throw new TypeError("Arguments to path.join must be strings");return A}).join("/"))}function Ce(m,A){m=H(m).substr(1),A=H(A).substr(1);function p(x){for(var P=0;P<x.length&&x[P]==="";P++);for(var T=x.length-1;T>=0&&x[T]==="";T--);return P>T?[]:x.slice(P,T-P+1)}for(var v=p(m.split("/")),D=p(A.split("/")),f=Math.min(v.length,D.length),d=f,h=0;h<f;h++)if(v[h]!==D[h]){d=h;break}for(var E=[],h=d;h<v.length;h++)E.push("..");return E=E.concat(D.slice(d)),E.join("/")}function je(m){var A=on(m),p=A[0],v=A[1];return!p&&!v?".":(v&&(v=v.substr(0,v.length-1)),p+v)}function xt(m,A){var p=on(m)[2];return A&&p.substr(-1*A.length)===A&&(p=p.substr(0,p.length-A.length)),p}function Ot(m){return on(m)[3]}function zt(m,A){if(m.filter)return m.filter(A);for(var p=[],v=0;v<m.length;v++)A(m[v],v,m)&&p.push(m[v]);return p}var vn,on,$n,sr,xr,di,ui=pn({"node-modules-polyfills:path"(){Re(),vn=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,on=function(m){return vn.exec(m).slice(1)},$n="/",sr=":",xr={extname:Ot,basename:xt,dirname:je,sep:$n,delimiter:sr,relative:Ce,join:Me,isAbsolute:Ne,normalize:le,resolve:H},di="ab".substr(-1)==="b"?function(m,A,p){return m.substr(A,p)}:function(m,A,p){return A<0&&(A=m.length+A),m.substr(A,p)}}}),vt=Te({"node-modules-polyfills-commonjs:path"(m,A){Re();var p=(ui(),Yn(Z));if(p&&p.default){A.exports=p.default;for(let v in p)A.exports[v]=p[v]}else p&&(A.exports=p)}}),en=Te({"src/common/errors.js"(m,A){Re();var p=class extends Error{},v=class extends Error{},D=class extends Error{},f=class extends Error{};A.exports={ConfigError:p,DebugError:v,UndefinedParserError:D,ArgExpansionBailout:f}}}),hn={};Sn(hn,{__assign:()=>de,__asyncDelegator:()=>Qf,__asyncGenerator:()=>zf,__asyncValues:()=>Xf,__await:()=>hi,__awaiter:()=>Gi,__classPrivateFieldGet:()=>tp,__classPrivateFieldSet:()=>np,__createBinding:()=>ia,__decorate:()=>or,__exportStar:()=>eo,__extends:()=>An,__generator:()=>ki,__importDefault:()=>ep,__importStar:()=>Zf,__makeTemplateObject:()=>Kf,__metadata:()=>Wi,__param:()=>Li,__read:()=>bl,__rest:()=>Wn,__spread:()=>Yf,__spreadArrays:()=>Hf,__values:()=>qo});function An(m,A){pe(m,A);function p(){this.constructor=m}m.prototype=A===null?Object.create(A):(p.prototype=A.prototype,new p)}function Wn(m,A){var p={};for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&A.indexOf(v)<0&&(p[v]=m[v]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,v=Object.getOwnPropertySymbols(m);D<v.length;D++)A.indexOf(v[D])<0&&Object.prototype.propertyIsEnumerable.call(m,v[D])&&(p[v[D]]=m[v[D]]);return p}function or(m,A,p,v){var D=arguments.length,f=D<3?A:v===null?v=Object.getOwnPropertyDescriptor(A,p):v,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(m,A,p,v);else for(var h=m.length-1;h>=0;h--)(d=m[h])&&(f=(D<3?d(f):D>3?d(A,p,f):d(A,p))||f);return D>3&&f&&Object.defineProperty(A,p,f),f}function Li(m,A){return function(p,v){A(p,v,m)}}function Wi(m,A){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,A)}function Gi(m,A,p,v){function D(f){return f instanceof p?f:new p(function(d){d(f)})}return new(p||(p=Promise))(function(f,d){function h(P){try{x(v.next(P))}catch(T){d(T)}}function E(P){try{x(v.throw(P))}catch(T){d(T)}}function x(P){P.done?f(P.value):D(P.value).then(h,E)}x((v=v.apply(m,A||[])).next())})}function ki(m,A){var p={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},v,D,f,d;return d={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function h(x){return function(P){return E([x,P])}}function E(x){if(v)throw new TypeError("Generator is already executing.");for(;p;)try{if(v=1,D&&(f=x[0]&2?D.return:x[0]?D.throw||((f=D.return)&&f.call(D),0):D.next)&&!(f=f.call(D,x[1])).done)return f;switch(D=0,f&&(x=[x[0]&2,f.value]),x[0]){case 0:case 1:f=x;break;case 4:return p.label++,{value:x[1],done:!1};case 5:p.label++,D=x[1],x=[0];continue;case 7:x=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!(f=f.length>0&&f[f.length-1])&&(x[0]===6||x[0]===2)){p=0;continue}if(x[0]===3&&(!f||x[1]>f[0]&&x[1]<f[3])){p.label=x[1];break}if(x[0]===6&&p.label<f[1]){p.label=f[1],f=x;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(x);break}f[2]&&p.ops.pop(),p.trys.pop();continue}x=A.call(m,p)}catch(P){x=[6,P],D=0}finally{v=f=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}}function ia(m,A,p,v){v===void 0&&(v=p),m[v]=A[p]}function eo(m,A){for(var p in m)p!=="default"&&!A.hasOwnProperty(p)&&(A[p]=m[p])}function qo(m){var A=typeof Symbol=="function"&&Symbol.iterator,p=A&&m[A],v=0;if(p)return p.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&v>=m.length&&(m=void 0),{value:m&&m[v++],done:!m}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function bl(m,A){var p=typeof Symbol=="function"&&m[Symbol.iterator];if(!p)return m;var v=p.call(m),D,f=[],d;try{for(;(A===void 0||A-- >0)&&!(D=v.next()).done;)f.push(D.value)}catch(h){d={error:h}}finally{try{D&&!D.done&&(p=v.return)&&p.call(v)}finally{if(d)throw d.error}}return f}function Yf(){for(var m=[],A=0;A<arguments.length;A++)m=m.concat(bl(arguments[A]));return m}function Hf(){for(var m=0,A=0,p=arguments.length;A<p;A++)m+=arguments[A].length;for(var v=Array(m),D=0,A=0;A<p;A++)for(var f=arguments[A],d=0,h=f.length;d<h;d++,D++)v[D]=f[d];return v}function hi(m){return this instanceof hi?(this.v=m,this):new hi(m)}function zf(m,A,p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v=p.apply(m,A||[]),D,f=[];return D={},d("next"),d("throw"),d("return"),D[Symbol.asyncIterator]=function(){return this},D;function d(k){v[k]&&(D[k]=function(C){return new Promise(function(S,j){f.push([k,C,S,j])>1||h(k,C)})})}function h(k,C){try{E(v[k](C))}catch(S){T(f[0][3],S)}}function E(k){k.value instanceof hi?Promise.resolve(k.value.v).then(x,P):T(f[0][2],k)}function x(k){h("next",k)}function P(k){h("throw",k)}function T(k,C){k(C),f.shift(),f.length&&h(f[0][0],f[0][1])}}function Qf(m){var A,p;return A={},v("next"),v("throw",function(D){throw D}),v("return"),A[Symbol.iterator]=function(){return this},A;function v(D,f){A[D]=m[D]?function(d){return(p=!p)?{value:hi(m[D](d)),done:D==="return"}:f?f(d):d}:f}}function Xf(m){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=m[Symbol.asyncIterator],p;return A?A.call(m):(m=typeof qo=="function"?qo(m):m[Symbol.iterator](),p={},v("next"),v("throw"),v("return"),p[Symbol.asyncIterator]=function(){return this},p);function v(f){p[f]=m[f]&&function(d){return new Promise(function(h,E){d=m[f](d),D(h,E,d.done,d.value)})}}function D(f,d,h,E){Promise.resolve(E).then(function(x){f({value:x,done:h})},d)}}function Kf(m,A){return Object.defineProperty?Object.defineProperty(m,"raw",{value:A}):m.raw=A,m}function Zf(m){if(m&&m.__esModule)return m;var A={};if(m!=null)for(var p in m)Object.hasOwnProperty.call(m,p)&&(A[p]=m[p]);return A.default=m,A}function ep(m){return m&&m.__esModule?m:{default:m}}function tp(m,A){if(!A.has(m))throw new TypeError("attempted to get private field on non-instance");return A.get(m)}function np(m,A,p){if(!A.has(m))throw new TypeError("attempted to set private field on non-instance");return A.set(m,p),p}var pe,de,We=pn({"node_modules/tslib/tslib.es6.js"(){Re(),pe=function(m,A){return pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var D in v)v.hasOwnProperty(D)&&(p[D]=v[D])},pe(m,A)},de=function(){return de=Object.assign||function(m){for(var A,p=1,v=arguments.length;p<v;p++){A=arguments[p];for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(m[D]=A[D])}return m},de.apply(this,arguments)}}}),Ye=Te({"node_modules/vnopts/lib/descriptors/api.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0}),m.apiDescriptor={key:A=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(A)?A:JSON.stringify(A),value(A){if(A===null||typeof A!="object")return JSON.stringify(A);if(Array.isArray(A))return`[${A.map(v=>m.apiDescriptor.value(v)).join(", ")}]`;let p=Object.keys(A);return p.length===0?"{}":`{ ${p.map(v=>`${m.apiDescriptor.key(v)}: ${m.apiDescriptor.value(A[v])}`).join(", ")} }`},pair:A=>{let{key:p,value:v}=A;return m.apiDescriptor.value({[p]:v})}}}}),tt=Te({"node_modules/vnopts/lib/descriptors/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Ye(),m)}}),nt=Te({"scripts/build/shims/chalk.cjs"(m,A){Re();var p=v=>v;p.grey=p,p.red=p,p.bold=p,p.yellow=p,p.blue=p,p.default=p,A.exports=p}}),St=Te({"node_modules/vnopts/lib/handlers/deprecated/common.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt();m.commonDeprecatedHandler=(p,v,D)=>{let{descriptor:f}=D,d=[`${A.default.yellow(typeof p=="string"?f.key(p):f.pair(p))} is deprecated`];return v&&d.push(`we now treat it as ${A.default.blue(typeof v=="string"?f.key(v):f.pair(v))}`),d.join("; ")+"."}}}),Nt=Te({"node_modules/vnopts/lib/handlers/deprecated/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(St(),m)}}),Kt=Te({"node_modules/vnopts/lib/handlers/invalid/common.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt();m.commonInvalidHandler=(p,v,D)=>[`Invalid ${A.default.red(D.descriptor.key(p))} value.`,`Expected ${A.default.blue(D.schemas[p].expected(D))},`,`but received ${A.default.red(D.descriptor.value(v))}.`].join(" ")}}),nn=Te({"node_modules/vnopts/lib/handlers/invalid/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Kt(),m)}}),dn=Te({"node_modules/vnopts/node_modules/leven/index.js"(m,A){Re();var p=[],v=[];A.exports=function(D,f){if(D===f)return 0;var d=D;D.length>f.length&&(D=f,f=d);var h=D.length,E=f.length;if(h===0)return E;if(E===0)return h;for(;h>0&&D.charCodeAt(~-h)===f.charCodeAt(~-E);)h--,E--;if(h===0)return E;for(var x=0;x<h&&D.charCodeAt(x)===f.charCodeAt(x);)x++;if(h-=x,E-=x,h===0)return E;for(var P,T,k,C,S=0,j=0;S<h;)v[x+S]=D.charCodeAt(x+S),p[S]=++S;for(;j<E;)for(P=f.charCodeAt(x+j),k=j++,T=j,S=0;S<h;S++)C=P===v[x+S]?k:k+1,k=p[S],T=p[S]=k>T?C>T?T+1:C:C>k?k+1:C;return T}}}),kn=Te({"node_modules/vnopts/lib/handlers/unknown/leven.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt(),p=dn();m.levenUnknownHandler=(v,D,f)=>{let{descriptor:d,logger:h,schemas:E}=f,x=[`Ignored unknown option ${A.default.yellow(d.pair({key:v,value:D}))}.`],P=Object.keys(E).sort().find(T=>p(v,T)<3);P&&x.push(`Did you mean ${A.default.blue(d.key(P))}?`),h.warn(x.join(" "))}}}),lr=Te({"node_modules/vnopts/lib/handlers/unknown/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(kn(),m)}}),cr=Te({"node_modules/vnopts/lib/handlers/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Nt(),m),A.__exportStar(nn(),m),A.__exportStar(lr(),m)}}),jn=Te({"node_modules/vnopts/lib/schema.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function p(f,d){let h=new f(d),E=Object.create(h);for(let x of A)x in d&&(E[x]=D(d[x],h,v.prototype[x].length));return E}m.createSchema=p;var v=class{constructor(f){this.name=f.name}static create(f){return p(this,f)}default(f){}expected(f){return"nothing"}validate(f,d){return!1}deprecated(f,d){return!1}forward(f,d){}redirect(f,d){}overlap(f,d,h){return f}preprocess(f,d){return f}postprocess(f,d){return f}};m.Schema=v;function D(f,d,h){return typeof f=="function"?function(){for(var E=arguments.length,x=new Array(E),P=0;P<E;P++)x[P]=arguments[P];return f(...x.slice(0,h-1),d,...x.slice(h-1))}:()=>f}}}),ir=Te({"node_modules/vnopts/lib/schemas/alias.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{constructor(v){super(v),this._sourceName=v.sourceName}expected(v){return v.schemas[this._sourceName].expected(v)}validate(v,D){return D.schemas[this._sourceName].validate(v,D)}redirect(v,D){return this._sourceName}};m.AliasSchema=p}}),er=Te({"node_modules/vnopts/lib/schemas/any.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"anything"}validate(){return!0}};m.AnySchema=p}}),qr=Te({"node_modules/vnopts/lib/schemas/array.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn)),p=jn(),v=class extends p.Schema{constructor(f){var{valueSchema:d,name:h=d.name}=f,E=A.__rest(f,["valueSchema","name"]);super(Object.assign({},E,{name:h})),this._valueSchema=d}expected(f){return`an array of ${this._valueSchema.expected(f)}`}validate(f,d){if(!Array.isArray(f))return!1;let h=[];for(let E of f){let x=d.normalizeValidateResult(this._valueSchema.validate(E,d),E);x!==!0&&h.push(x.value)}return h.length===0?!0:{value:h}}deprecated(f,d){let h=[];for(let E of f){let x=d.normalizeDeprecatedResult(this._valueSchema.deprecated(E,d),E);x!==!1&&h.push(...x.map(P=>{let{value:T}=P;return{value:[T]}}))}return h}forward(f,d){let h=[];for(let E of f){let x=d.normalizeForwardResult(this._valueSchema.forward(E,d),E);h.push(...x.map(D))}return h}redirect(f,d){let h=[],E=[];for(let x of f){let P=d.normalizeRedirectResult(this._valueSchema.redirect(x,d),x);"remain"in P&&h.push(P.remain),E.push(...P.redirect.map(D))}return h.length===0?{redirect:E}:{redirect:E,remain:h}}overlap(f,d){return f.concat(d)}};m.ArraySchema=v;function D(f){let{from:d,to:h}=f;return{from:[d],to:h}}}}),ur=Te({"node_modules/vnopts/lib/schemas/boolean.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"true or false"}validate(v){return typeof v=="boolean"}};m.BooleanSchema=p}}),Jr=Te({"node_modules/vnopts/lib/utils.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});function A(C,S){let j=Object.create(null);for(let X of C){let te=X[S];if(j[te])throw new Error(`Duplicate ${S} ${JSON.stringify(te)}`);j[te]=X}return j}m.recordFromArray=A;function p(C,S){let j=new Map;for(let X of C){let te=X[S];if(j.has(te))throw new Error(`Duplicate ${S} ${JSON.stringify(te)}`);j.set(te,X)}return j}m.mapFromArray=p;function v(){let C=Object.create(null);return S=>{let j=JSON.stringify(S);return C[j]?!0:(C[j]=!0,!1)}}m.createAutoChecklist=v;function D(C,S){let j=[],X=[];for(let te of C)S(te)?j.push(te):X.push(te);return[j,X]}m.partition=D;function f(C){return C===Math.floor(C)}m.isInt=f;function d(C,S){if(C===S)return 0;let j=typeof C,X=typeof S,te=["undefined","object","boolean","number","string"];return j!==X?te.indexOf(j)-te.indexOf(X):j!=="string"?Number(C)-Number(S):C.localeCompare(S)}m.comparePrimitive=d;function h(C){return C===void 0?{}:C}m.normalizeDefaultResult=h;function E(C,S){return C===!0?!0:C===!1?{value:S}:C}m.normalizeValidateResult=E;function x(C,S){let j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return C===!1?!1:C===!0?j?!0:[{value:S}]:"value"in C?[C]:C.length===0?!1:C}m.normalizeDeprecatedResult=x;function P(C,S){return typeof C=="string"||"key"in C?{from:S,to:C}:"from"in C?{from:C.from,to:C.to}:{from:S,to:C.to}}m.normalizeTransferResult=P;function T(C,S){return C===void 0?[]:Array.isArray(C)?C.map(j=>P(j,S)):[P(C,S)]}m.normalizeForwardResult=T;function k(C,S){let j=T(typeof C=="object"&&"redirect"in C?C.redirect:C,S);return j.length===0?{remain:S,redirect:j}:typeof C=="object"&&"remain"in C?{remain:C.remain,redirect:j}:{redirect:j}}m.normalizeRedirectResult=k}}),gr=Te({"node_modules/vnopts/lib/schemas/choice.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=Jr(),v=class extends A.Schema{constructor(D){super(D),this._choices=p.mapFromArray(D.choices.map(f=>f&&typeof f=="object"?f:{value:f}),"value")}expected(D){let{descriptor:f}=D,d=Array.from(this._choices.keys()).map(x=>this._choices.get(x)).filter(x=>!x.deprecated).map(x=>x.value).sort(p.comparePrimitive).map(f.value),h=d.slice(0,-2),E=d.slice(-2);return h.concat(E.join(" or ")).join(", ")}validate(D){return this._choices.has(D)}deprecated(D){let f=this._choices.get(D);return f&&f.deprecated?{value:D}:!1}forward(D){let f=this._choices.get(D);return f?f.forward:void 0}redirect(D){let f=this._choices.get(D);return f?f.redirect:void 0}};m.ChoiceSchema=v}}),Fr=Te({"node_modules/vnopts/lib/schemas/number.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"a number"}validate(v,D){return typeof v=="number"}};m.NumberSchema=p}}),to=Te({"node_modules/vnopts/lib/schemas/integer.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Jr(),p=Fr(),v=class extends p.NumberSchema{expected(){return"an integer"}validate(D,f){return f.normalizeValidateResult(super.validate(D,f),D)===!0&&A.isInt(D)}};m.IntegerSchema=v}}),zv=Te({"node_modules/vnopts/lib/schemas/string.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"a string"}validate(v){return typeof v=="string"}};m.StringSchema=p}}),Qv=Te({"node_modules/vnopts/lib/schemas/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(ir(),m),A.__exportStar(er(),m),A.__exportStar(qr(),m),A.__exportStar(ur(),m),A.__exportStar(gr(),m),A.__exportStar(to(),m),A.__exportStar(Fr(),m),A.__exportStar(zv(),m)}}),Xv=Te({"node_modules/vnopts/lib/defaults.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Ye(),p=St(),v=nn(),D=kn();m.defaultDescriptor=A.apiDescriptor,m.defaultUnknownHandler=D.levenUnknownHandler,m.defaultInvalidHandler=v.commonInvalidHandler,m.defaultDeprecatedHandler=p.commonDeprecatedHandler}}),Kv=Te({"node_modules/vnopts/lib/normalize.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Xv(),p=Jr();m.normalize=(D,f,d)=>new v(f,d).normalize(D);var v=class{constructor(D,f){let{logger:d=console,descriptor:h=A.defaultDescriptor,unknown:E=A.defaultUnknownHandler,invalid:x=A.defaultInvalidHandler,deprecated:P=A.defaultDeprecatedHandler}=f||{};this._utils={descriptor:h,logger:d||{warn:()=>{}},schemas:p.recordFromArray(D,"name"),normalizeDefaultResult:p.normalizeDefaultResult,normalizeDeprecatedResult:p.normalizeDeprecatedResult,normalizeForwardResult:p.normalizeForwardResult,normalizeRedirectResult:p.normalizeRedirectResult,normalizeValidateResult:p.normalizeValidateResult},this._unknownHandler=E,this._invalidHandler=x,this._deprecatedHandler=P,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=p.createAutoChecklist()}normalize(D){let f={},d=[D],h=()=>{for(;d.length!==0;){let E=d.shift(),x=this._applyNormalization(E,f);d.push(...x)}};h();for(let E of Object.keys(this._utils.schemas)){let x=this._utils.schemas[E];if(!(E in f)){let P=p.normalizeDefaultResult(x.default(this._utils));"value"in P&&d.push({[E]:P.value})}}h();for(let E of Object.keys(this._utils.schemas)){let x=this._utils.schemas[E];E in f&&(f[E]=x.postprocess(f[E],this._utils))}return f}_applyNormalization(D,f){let d=[],[h,E]=p.partition(Object.keys(D),x=>x in this._utils.schemas);for(let x of h){let P=this._utils.schemas[x],T=P.preprocess(D[x],this._utils),k=p.normalizeValidateResult(P.validate(T,this._utils),T);if(k!==!0){let{value:X}=k,te=this._invalidHandler(x,X,this._utils);throw typeof te=="string"?new Error(te):te}let C=X=>{let{from:te,to:$}=X;d.push(typeof $=="string"?{[$]:te}:{[$.key]:$.value})},S=X=>{let{value:te,redirectTo:$}=X,K=p.normalizeDeprecatedResult(P.deprecated(te,this._utils),T,!0);if(K!==!1)if(K===!0)this._hasDeprecationWarned(x)||this._utils.logger.warn(this._deprecatedHandler(x,$,this._utils));else for(let{value:G}of K){let re={key:x,value:G};if(!this._hasDeprecationWarned(re)){let ee=typeof $=="string"?{key:$,value:G}:$;this._utils.logger.warn(this._deprecatedHandler(re,ee,this._utils))}}};p.normalizeForwardResult(P.forward(T,this._utils),T).forEach(C);let j=p.normalizeRedirectResult(P.redirect(T,this._utils),T);if(j.redirect.forEach(C),"remain"in j){let X=j.remain;f[x]=x in f?P.overlap(f[x],X,this._utils):X,S({value:X})}for(let{from:X,to:te}of j.redirect)S({value:X,redirectTo:te})}for(let x of E){let P=D[x],T=this._unknownHandler(x,P,this._utils);if(T)for(let k of Object.keys(T)){let C={[k]:T[k]};k in this._utils.schemas?d.push(C):Object.assign(f,C)}}return d}};m.Normalizer=v}}),Zv=Te({"node_modules/vnopts/lib/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(tt(),m),A.__exportStar(cr(),m),A.__exportStar(Qv(),m),A.__exportStar(Kv(),m),A.__exportStar(jn(),m)}}),e2=Te({"src/main/options-normalizer.js"(m,A){Re();var p=Zv(),v=Vr(),D={key:k=>k.length===1?`-${k}`:`--${k}`,value:k=>p.apiDescriptor.value(k),pair:k=>{let{key:C,value:S}=k;return S===!1?`--no-${C}`:S===!0?D.key(C):S===""?`${D.key(C)} without an argument`:`${D.key(C)}=${S}`}},f=k=>{let{colorsModule:C,levenshteinDistance:S}=k;return class extends p.ChoiceSchema{constructor(j){let{name:X,flags:te}=j;super({name:X,choices:te}),this._flags=[...te].sort()}preprocess(j,X){if(typeof j=="string"&&j.length>0&&!this._flags.includes(j)){let te=this._flags.find($=>S($,j)<3);if(te)return X.logger.warn([`Unknown flag ${C.yellow(X.descriptor.value(j))},`,`did you mean ${C.blue(X.descriptor.value(te))}?`].join(" ")),te}return j}expected(){return"a flag"}}},d;function h(k,C){let{logger:S=!1,isCLI:j=!1,passThrough:X=!1,colorsModule:te=null,levenshteinDistance:$=null}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=X?Array.isArray(X)?(J,w)=>X.includes(J)?{[J]:w}:void 0:(J,w)=>({[J]:w}):(J,w,R)=>{let y=R.schemas,_=wt(y,lt);return p.levenUnknownHandler(J,w,Object.assign(Object.assign({},R),{},{schemas:_}))},G=j?D:p.apiDescriptor,re=E(C,{isCLI:j,colorsModule:te,levenshteinDistance:$}),ee=new p.Normalizer(re,{logger:S,unknown:K,descriptor:G}),be=S!==!1;be&&d&&(ee._hasDeprecationWarned=d);let F=ee.normalize(k);return be&&(d=ee._hasDeprecationWarned),j&&F["plugin-search"]===!1&&(F["plugin-search-dir"]=!1),F}function E(k,C){let{isCLI:S,colorsModule:j,levenshteinDistance:X}=C,te=[];S&&te.push(p.AnySchema.create({name:"_"}));for(let $ of k)te.push(x($,{isCLI:S,optionInfos:k,colorsModule:j,levenshteinDistance:X})),$.alias&&S&&te.push(p.AliasSchema.create({name:$.alias,sourceName:$.name}));return te}function x(k,C){let{isCLI:S,optionInfos:j,colorsModule:X,levenshteinDistance:te}=C,{name:$}=k;if($==="plugin-search-dir"||$==="pluginSearchDirs")return p.AnySchema.create({name:$,preprocess(ee){return ee===!1||(ee=Array.isArray(ee)?ee:[ee]),ee},validate(ee){return ee===!1?!0:ee.every(be=>typeof be=="string")},expected(){return"false or paths to plugin search dir"}});let K={name:$},G,re={};switch(k.type){case"int":G=p.IntegerSchema,S&&(K.preprocess=Number);break;case"string":G=p.StringSchema;break;case"choice":G=p.ChoiceSchema,K.choices=k.choices.map(ee=>typeof ee=="object"&&ee.redirect?Object.assign(Object.assign({},ee),{},{redirect:{to:{key:k.name,value:ee.redirect}}}):ee);break;case"boolean":G=p.BooleanSchema;break;case"flag":G=f({colorsModule:X,levenshteinDistance:te}),K.flags=j.flatMap(ee=>[ee.alias,ee.description&&ee.name,ee.oppositeDescription&&`no-${ee.name}`].filter(Boolean));break;case"path":G=p.StringSchema;break;default:throw new Error(`Unexpected type ${k.type}`)}if(k.exception?K.validate=(ee,be,F)=>k.exception(ee)||be.validate(ee,F):K.validate=(ee,be,F)=>ee===void 0||be.validate(ee,F),k.redirect&&(re.redirect=ee=>ee?{to:{key:k.redirect.option,value:k.redirect.value}}:void 0),k.deprecated&&(re.deprecated=!0),S&&!k.array){let ee=K.preprocess||(be=>be);K.preprocess=(be,F,J)=>F.preprocess(ee(Array.isArray(be)?v(be):be),J)}return k.array?p.ArraySchema.create(Object.assign(Object.assign(Object.assign({},S?{preprocess:ee=>Array.isArray(ee)?ee:[ee]}:{}),re),{},{valueSchema:G.create(K)})):G.create(Object.assign(Object.assign({},K),re))}function P(k,C,S){return h(k,C,S)}function T(k,C,S){return h(k,C,Object.assign({isCLI:!0},S))}A.exports={normalizeApiOptions:P,normalizeCliOptions:T}}}),ni=Te({"src/language-js/loc.js"(m,A){Re();var p=It();function v(E){var x,P;let T=E.range?E.range[0]:E.start,k=(x=(P=E.declaration)===null||P===void 0?void 0:P.decorators)!==null&&x!==void 0?x:E.decorators;return p(k)?Math.min(v(k[0]),T):T}function D(E){return E.range?E.range[1]:E.end}function f(E,x){let P=v(E);return Number.isInteger(P)&&P===v(x)}function d(E,x){let P=D(E);return Number.isInteger(P)&&P===D(x)}function h(E,x){return f(E,x)&&d(E,x)}A.exports={locStart:v,locEnd:D,hasSameLocStart:f,hasSameLoc:h}}}),t2=Te({"src/main/load-parser.js"(m,A){Re(),A.exports=()=>{}}}),n2=Te({"scripts/build/shims/babel-highlight.cjs"(m,A){Re();var p=nt(),v={shouldHighlight:()=>!1,getChalk:()=>p};A.exports=v}}),r2=Te({"node_modules/@babel/code-frame/lib/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0}),m.codeFrameColumns=d,m.default=h;var A=n2(),p=!1;function v(E){return{gutter:E.grey,marker:E.red.bold,message:E.red.bold}}var D=/\r\n|[\n\r\u2028\u2029]/;function f(E,x,P){let T=Object.assign({column:0,line:-1},E.start),k=Object.assign({},T,E.end),{linesAbove:C=2,linesBelow:S=3}=P||{},j=T.line,X=T.column,te=k.line,$=k.column,K=Math.max(j-(C+1),0),G=Math.min(x.length,te+S);j===-1&&(K=0),te===-1&&(G=x.length);let re=te-j,ee={};if(re)for(let be=0;be<=re;be++){let F=be+j;if(!X)ee[F]=!0;else if(be===0){let J=x[F-1].length;ee[F]=[X,J-X+1]}else if(be===re)ee[F]=[0,$];else{let J=x[F-be].length;ee[F]=[0,J]}}else X===$?X?ee[j]=[X,0]:ee[j]=!0:ee[j]=[X,$-X];return{start:K,end:G,markerLines:ee}}function d(E,x){let P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=(P.highlightCode||P.forceColor)&&(0,A.shouldHighlight)(P),k=(0,A.getChalk)(P),C=v(k),S=(ee,be)=>T?ee(be):be,j=E.split(D),{start:X,end:te,markerLines:$}=f(x,j,P),K=x.start&&typeof x.start.column=="number",G=String(te).length,re=(T?(0,A.default)(E,P):E).split(D,te).slice(X,te).map((ee,be)=>{let F=X+1+be,J=` ${` ${F}`.slice(-G)} |`,w=$[F],R=!$[F+1];if(w){let y="";if(Array.isArray(w)){let _=ee.slice(0,Math.max(w[0]-1,0)).replace(/[^\t]/g," "),M=w[1]||1;y=[`
|
|
185
|
+
`);return qe===-1?0:J(ge.slice(qe+1).match(/^[\t ]*/)[0],oe)}function R(ge,oe){let qe={quote:'"',regex:/"/g,escaped:"""},rt={quote:"'",regex:/'/g,escaped:"'"},Ge=oe==="'"?rt:qe,mt=Ge===rt?qe:rt,ve=Ge;if(ge.includes(Ge.quote)||ge.includes(mt.quote)){let Ie=(ge.match(Ge.regex)||[]).length,pt=(ge.match(mt.regex)||[]).length;ve=Ie>pt?mt:Ge}return ve}function y(ge,oe){let qe=ge.slice(1,-1),rt=oe.parser==="json"||oe.parser==="json5"&&oe.quoteProps==="preserve"&&!oe.singleQuote?'"':oe.__isInHtmlAttribute?"'":R(qe,oe.singleQuote?"'":'"').quote;return _(qe,rt,!(oe.parser==="css"||oe.parser==="less"||oe.parser==="scss"||oe.__embeddedInHtml))}function _(ge,oe,qe){let rt=oe==='"'?"'":'"',Ge=/\\(.)|(["'])/gs,mt=ge.replace(Ge,(ve,Ie,pt)=>Ie===rt?Ie:pt===oe?"\\"+pt:pt||(qe&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(Ie)?Ie:"\\"+Ie));return oe+mt+oe}function M(ge){return ge.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")}function q(ge,oe){let qe=ge.match(new RegExp(`(${p(oe)})+`,"g"));return qe===null?0:qe.reduce((rt,Ge)=>Math.max(rt,Ge.length/oe.length),0)}function U(ge,oe){let qe=ge.match(new RegExp(`(${p(oe)})+`,"g"));if(qe===null)return 0;let rt=new Map,Ge=0;for(let mt of qe){let ve=mt.length/oe.length;rt.set(ve,!0),ve>Ge&&(Ge=ve)}for(let mt=1;mt<Ge;mt++)if(!rt.get(mt))return mt;return Ge+1}function z(ge,oe){(ge.comments||(ge.comments=[])).push(oe),oe.printed=!1,oe.nodeDescription=Ue(ge)}function ie(ge,oe){oe.leading=!0,oe.trailing=!1,z(ge,oe)}function ce(ge,oe,qe){oe.leading=!1,oe.trailing=!1,qe&&(oe.marker=qe),z(ge,oe)}function ye(ge,oe){oe.leading=!1,oe.trailing=!0,z(ge,oe)}function fe(ge,oe){let{languages:qe}=D({plugins:oe.plugins}),rt=qe.find(Ge=>{let{name:mt}=Ge;return mt.toLowerCase()===ge})||qe.find(Ge=>{let{aliases:mt}=Ge;return Array.isArray(mt)&&mt.includes(ge)})||qe.find(Ge=>{let{extensions:mt}=Ge;return Array.isArray(mt)&&mt.includes(`.${ge}`)});return rt&&rt.parsers[0]}function _e(ge){return ge&&ge.type==="front-matter"}function se(ge){let oe=new WeakMap;return function(qe){return oe.has(qe)||oe.set(qe,Symbol(ge)),oe.get(qe)}}function Ue(ge){let oe=ge.type||ge.kind||"(unknown type)",qe=String(ge.name||ge.id&&(typeof ge.id=="object"?ge.id.name:ge.id)||ge.key&&(typeof ge.key=="object"?ge.key.name:ge.key)||ge.value&&(typeof ge.value=="object"?"":String(ge.value))||ge.operator||"");return qe.length>20&&(qe=qe.slice(0,19)+"…"),oe+(qe?" "+qe:"")}A.exports={inferParserByLanguage:fe,getStringWidth:d,getMaxContinuousCount:q,getMinNotPresentContinuousCount:U,getPenultimate:j,getLast:v,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:S,getNextNonSpaceNonCommentCharacterIndex:ee,getNextNonSpaceNonCommentCharacter:be,skip:X,skipWhitespace:h,skipSpaces:E,skipToLineEnd:x,skipEverythingButNewLine:P,skipInlineComment:T,skipTrailingComment:k,skipNewline:C,isNextLineEmptyAfterIndex:G,isNextLineEmpty:re,isPreviousLineEmpty:K,hasNewline:te,hasNewlineInRange:$,hasSpaces:F,getAlignmentSize:J,getIndentSize:w,getPreferredQuote:R,printString:y,printNumber:M,makeString:_,addLeadingComment:ie,addDanglingComment:ce,addTrailingComment:ye,isFrontMatterNode:_e,isNonEmptyArray:f,createGroupIdMapper:se}}}),Z={};Sn(Z,{basename:()=>xt,default:()=>xr,delimiter:()=>sr,dirname:()=>je,extname:()=>Ot,isAbsolute:()=>Ne,join:()=>Me,normalize:()=>le,relative:()=>Ce,resolve:()=>H,sep:()=>$n});function O(m,A){for(var p=0,v=m.length-1;v>=0;v--){var D=m[v];D==="."?m.splice(v,1):D===".."?(m.splice(v,1),p++):p&&(m.splice(v,1),p--)}if(A)for(;p--;p)m.unshift("..");return m}function H(){for(var m="",A=!1,p=arguments.length-1;p>=-1&&!A;p--){var v=p>=0?arguments[p]:"/";if(typeof v!="string")throw new TypeError("Arguments to path.resolve must be strings");v&&(m=v+"/"+m,A=v.charAt(0)==="/")}return m=O(zt(m.split("/"),function(D){return!!D}),!A).join("/"),(A?"/":"")+m||"."}function le(m){var A=Ne(m),p=di(m,-1)==="/";return m=O(zt(m.split("/"),function(v){return!!v}),!A).join("/"),!m&&!A&&(m="."),m&&p&&(m+="/"),(A?"/":"")+m}function Ne(m){return m.charAt(0)==="/"}function Me(){var m=Array.prototype.slice.call(arguments,0);return le(zt(m,function(A,p){if(typeof A!="string")throw new TypeError("Arguments to path.join must be strings");return A}).join("/"))}function Ce(m,A){m=H(m).substr(1),A=H(A).substr(1);function p(x){for(var P=0;P<x.length&&x[P]==="";P++);for(var T=x.length-1;T>=0&&x[T]==="";T--);return P>T?[]:x.slice(P,T-P+1)}for(var v=p(m.split("/")),D=p(A.split("/")),f=Math.min(v.length,D.length),d=f,h=0;h<f;h++)if(v[h]!==D[h]){d=h;break}for(var E=[],h=d;h<v.length;h++)E.push("..");return E=E.concat(D.slice(d)),E.join("/")}function je(m){var A=on(m),p=A[0],v=A[1];return!p&&!v?".":(v&&(v=v.substr(0,v.length-1)),p+v)}function xt(m,A){var p=on(m)[2];return A&&p.substr(-1*A.length)===A&&(p=p.substr(0,p.length-A.length)),p}function Ot(m){return on(m)[3]}function zt(m,A){if(m.filter)return m.filter(A);for(var p=[],v=0;v<m.length;v++)A(m[v],v,m)&&p.push(m[v]);return p}var vn,on,$n,sr,xr,di,ui=pn({"node-modules-polyfills:path"(){Re(),vn=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,on=function(m){return vn.exec(m).slice(1)},$n="/",sr=":",xr={extname:Ot,basename:xt,dirname:je,sep:$n,delimiter:sr,relative:Ce,join:Me,isAbsolute:Ne,normalize:le,resolve:H},di="ab".substr(-1)==="b"?function(m,A,p){return m.substr(A,p)}:function(m,A,p){return A<0&&(A=m.length+A),m.substr(A,p)}}}),vt=Te({"node-modules-polyfills-commonjs:path"(m,A){Re();var p=(ui(),Yn(Z));if(p&&p.default){A.exports=p.default;for(let v in p)A.exports[v]=p[v]}else p&&(A.exports=p)}}),en=Te({"src/common/errors.js"(m,A){Re();var p=class extends Error{},v=class extends Error{},D=class extends Error{},f=class extends Error{};A.exports={ConfigError:p,DebugError:v,UndefinedParserError:D,ArgExpansionBailout:f}}}),hn={};Sn(hn,{__assign:()=>de,__asyncDelegator:()=>Qf,__asyncGenerator:()=>zf,__asyncValues:()=>Xf,__await:()=>hi,__awaiter:()=>Gi,__classPrivateFieldGet:()=>tp,__classPrivateFieldSet:()=>np,__createBinding:()=>ia,__decorate:()=>or,__exportStar:()=>eo,__extends:()=>An,__generator:()=>ki,__importDefault:()=>ep,__importStar:()=>Zf,__makeTemplateObject:()=>Kf,__metadata:()=>Wi,__param:()=>Li,__read:()=>bl,__rest:()=>Wn,__spread:()=>Yf,__spreadArrays:()=>Hf,__values:()=>qo});function An(m,A){pe(m,A);function p(){this.constructor=m}m.prototype=A===null?Object.create(A):(p.prototype=A.prototype,new p)}function Wn(m,A){var p={};for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&A.indexOf(v)<0&&(p[v]=m[v]);if(m!=null&&typeof Object.getOwnPropertySymbols=="function")for(var D=0,v=Object.getOwnPropertySymbols(m);D<v.length;D++)A.indexOf(v[D])<0&&Object.prototype.propertyIsEnumerable.call(m,v[D])&&(p[v[D]]=m[v[D]]);return p}function or(m,A,p,v){var D=arguments.length,f=D<3?A:v===null?v=Object.getOwnPropertyDescriptor(A,p):v,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(m,A,p,v);else for(var h=m.length-1;h>=0;h--)(d=m[h])&&(f=(D<3?d(f):D>3?d(A,p,f):d(A,p))||f);return D>3&&f&&Object.defineProperty(A,p,f),f}function Li(m,A){return function(p,v){A(p,v,m)}}function Wi(m,A){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(m,A)}function Gi(m,A,p,v){function D(f){return f instanceof p?f:new p(function(d){d(f)})}return new(p||(p=Promise))(function(f,d){function h(P){try{x(v.next(P))}catch(T){d(T)}}function E(P){try{x(v.throw(P))}catch(T){d(T)}}function x(P){P.done?f(P.value):D(P.value).then(h,E)}x((v=v.apply(m,A||[])).next())})}function ki(m,A){var p={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},v,D,f,d;return d={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function h(x){return function(P){return E([x,P])}}function E(x){if(v)throw new TypeError("Generator is already executing.");for(;p;)try{if(v=1,D&&(f=x[0]&2?D.return:x[0]?D.throw||((f=D.return)&&f.call(D),0):D.next)&&!(f=f.call(D,x[1])).done)return f;switch(D=0,f&&(x=[x[0]&2,f.value]),x[0]){case 0:case 1:f=x;break;case 4:return p.label++,{value:x[1],done:!1};case 5:p.label++,D=x[1],x=[0];continue;case 7:x=p.ops.pop(),p.trys.pop();continue;default:if(f=p.trys,!(f=f.length>0&&f[f.length-1])&&(x[0]===6||x[0]===2)){p=0;continue}if(x[0]===3&&(!f||x[1]>f[0]&&x[1]<f[3])){p.label=x[1];break}if(x[0]===6&&p.label<f[1]){p.label=f[1],f=x;break}if(f&&p.label<f[2]){p.label=f[2],p.ops.push(x);break}f[2]&&p.ops.pop(),p.trys.pop();continue}x=A.call(m,p)}catch(P){x=[6,P],D=0}finally{v=f=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}}function ia(m,A,p,v){v===void 0&&(v=p),m[v]=A[p]}function eo(m,A){for(var p in m)p!=="default"&&!A.hasOwnProperty(p)&&(A[p]=m[p])}function qo(m){var A=typeof Symbol=="function"&&Symbol.iterator,p=A&&m[A],v=0;if(p)return p.call(m);if(m&&typeof m.length=="number")return{next:function(){return m&&v>=m.length&&(m=void 0),{value:m&&m[v++],done:!m}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function bl(m,A){var p=typeof Symbol=="function"&&m[Symbol.iterator];if(!p)return m;var v=p.call(m),D,f=[],d;try{for(;(A===void 0||A-- >0)&&!(D=v.next()).done;)f.push(D.value)}catch(h){d={error:h}}finally{try{D&&!D.done&&(p=v.return)&&p.call(v)}finally{if(d)throw d.error}}return f}function Yf(){for(var m=[],A=0;A<arguments.length;A++)m=m.concat(bl(arguments[A]));return m}function Hf(){for(var m=0,A=0,p=arguments.length;A<p;A++)m+=arguments[A].length;for(var v=Array(m),D=0,A=0;A<p;A++)for(var f=arguments[A],d=0,h=f.length;d<h;d++,D++)v[D]=f[d];return v}function hi(m){return this instanceof hi?(this.v=m,this):new hi(m)}function zf(m,A,p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v=p.apply(m,A||[]),D,f=[];return D={},d("next"),d("throw"),d("return"),D[Symbol.asyncIterator]=function(){return this},D;function d(k){v[k]&&(D[k]=function(C){return new Promise(function(S,j){f.push([k,C,S,j])>1||h(k,C)})})}function h(k,C){try{E(v[k](C))}catch(S){T(f[0][3],S)}}function E(k){k.value instanceof hi?Promise.resolve(k.value.v).then(x,P):T(f[0][2],k)}function x(k){h("next",k)}function P(k){h("throw",k)}function T(k,C){k(C),f.shift(),f.length&&h(f[0][0],f[0][1])}}function Qf(m){var A,p;return A={},v("next"),v("throw",function(D){throw D}),v("return"),A[Symbol.iterator]=function(){return this},A;function v(D,f){A[D]=m[D]?function(d){return(p=!p)?{value:hi(m[D](d)),done:D==="return"}:f?f(d):d}:f}}function Xf(m){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=m[Symbol.asyncIterator],p;return A?A.call(m):(m=typeof qo=="function"?qo(m):m[Symbol.iterator](),p={},v("next"),v("throw"),v("return"),p[Symbol.asyncIterator]=function(){return this},p);function v(f){p[f]=m[f]&&function(d){return new Promise(function(h,E){d=m[f](d),D(h,E,d.done,d.value)})}}function D(f,d,h,E){Promise.resolve(E).then(function(x){f({value:x,done:h})},d)}}function Kf(m,A){return Object.defineProperty?Object.defineProperty(m,"raw",{value:A}):m.raw=A,m}function Zf(m){if(m&&m.__esModule)return m;var A={};if(m!=null)for(var p in m)Object.hasOwnProperty.call(m,p)&&(A[p]=m[p]);return A.default=m,A}function ep(m){return m&&m.__esModule?m:{default:m}}function tp(m,A){if(!A.has(m))throw new TypeError("attempted to get private field on non-instance");return A.get(m)}function np(m,A,p){if(!A.has(m))throw new TypeError("attempted to set private field on non-instance");return A.set(m,p),p}var pe,de,We=pn({"node_modules/tslib/tslib.es6.js"(){Re(),pe=function(m,A){return pe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,v){p.__proto__=v}||function(p,v){for(var D in v)v.hasOwnProperty(D)&&(p[D]=v[D])},pe(m,A)},de=function(){return de=Object.assign||function(m){for(var A,p=1,v=arguments.length;p<v;p++){A=arguments[p];for(var D in A)Object.prototype.hasOwnProperty.call(A,D)&&(m[D]=A[D])}return m},de.apply(this,arguments)}}}),Ye=Te({"node_modules/vnopts/lib/descriptors/api.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0}),m.apiDescriptor={key:A=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(A)?A:JSON.stringify(A),value(A){if(A===null||typeof A!="object")return JSON.stringify(A);if(Array.isArray(A))return`[${A.map(v=>m.apiDescriptor.value(v)).join(", ")}]`;let p=Object.keys(A);return p.length===0?"{}":`{ ${p.map(v=>`${m.apiDescriptor.key(v)}: ${m.apiDescriptor.value(A[v])}`).join(", ")} }`},pair:A=>{let{key:p,value:v}=A;return m.apiDescriptor.value({[p]:v})}}}}),tt=Te({"node_modules/vnopts/lib/descriptors/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Ye(),m)}}),nt=Te({"scripts/build/shims/chalk.cjs"(m,A){Re();var p=v=>v;p.grey=p,p.red=p,p.bold=p,p.yellow=p,p.blue=p,p.default=p,A.exports=p}}),St=Te({"node_modules/vnopts/lib/handlers/deprecated/common.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt();m.commonDeprecatedHandler=(p,v,D)=>{let{descriptor:f}=D,d=[`${A.default.yellow(typeof p=="string"?f.key(p):f.pair(p))} is deprecated`];return v&&d.push(`we now treat it as ${A.default.blue(typeof v=="string"?f.key(v):f.pair(v))}`),d.join("; ")+"."}}}),Nt=Te({"node_modules/vnopts/lib/handlers/deprecated/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(St(),m)}}),Kt=Te({"node_modules/vnopts/lib/handlers/invalid/common.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt();m.commonInvalidHandler=(p,v,D)=>[`Invalid ${A.default.red(D.descriptor.key(p))} value.`,`Expected ${A.default.blue(D.schemas[p].expected(D))},`,`but received ${A.default.red(D.descriptor.value(v))}.`].join(" ")}}),nn=Te({"node_modules/vnopts/lib/handlers/invalid/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Kt(),m)}}),dn=Te({"node_modules/vnopts/node_modules/leven/index.js"(m,A){Re();var p=[],v=[];A.exports=function(D,f){if(D===f)return 0;var d=D;D.length>f.length&&(D=f,f=d);var h=D.length,E=f.length;if(h===0)return E;if(E===0)return h;for(;h>0&&D.charCodeAt(~-h)===f.charCodeAt(~-E);)h--,E--;if(h===0)return E;for(var x=0;x<h&&D.charCodeAt(x)===f.charCodeAt(x);)x++;if(h-=x,E-=x,h===0)return E;for(var P,T,k,C,S=0,j=0;S<h;)v[x+S]=D.charCodeAt(x+S),p[S]=++S;for(;j<E;)for(P=f.charCodeAt(x+j),k=j++,T=j,S=0;S<h;S++)C=P===v[x+S]?k:k+1,k=p[S],T=p[S]=k>T?C>T?T+1:C:C>k?k+1:C;return T}}}),kn=Te({"node_modules/vnopts/lib/handlers/unknown/leven.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=nt(),p=dn();m.levenUnknownHandler=(v,D,f)=>{let{descriptor:d,logger:h,schemas:E}=f,x=[`Ignored unknown option ${A.default.yellow(d.pair({key:v,value:D}))}.`],P=Object.keys(E).sort().find(T=>p(v,T)<3);P&&x.push(`Did you mean ${A.default.blue(d.key(P))}?`),h.warn(x.join(" "))}}}),lr=Te({"node_modules/vnopts/lib/handlers/unknown/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(kn(),m)}}),cr=Te({"node_modules/vnopts/lib/handlers/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(Nt(),m),A.__exportStar(nn(),m),A.__exportStar(lr(),m)}}),jn=Te({"node_modules/vnopts/lib/schema.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function p(f,d){let h=new f(d),E=Object.create(h);for(let x of A)x in d&&(E[x]=D(d[x],h,v.prototype[x].length));return E}m.createSchema=p;var v=class{constructor(f){this.name=f.name}static create(f){return p(this,f)}default(f){}expected(f){return"nothing"}validate(f,d){return!1}deprecated(f,d){return!1}forward(f,d){}redirect(f,d){}overlap(f,d,h){return f}preprocess(f,d){return f}postprocess(f,d){return f}};m.Schema=v;function D(f,d,h){return typeof f=="function"?function(){for(var E=arguments.length,x=new Array(E),P=0;P<E;P++)x[P]=arguments[P];return f(...x.slice(0,h-1),d,...x.slice(h-1))}:()=>f}}}),ir=Te({"node_modules/vnopts/lib/schemas/alias.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{constructor(v){super(v),this._sourceName=v.sourceName}expected(v){return v.schemas[this._sourceName].expected(v)}validate(v,D){return D.schemas[this._sourceName].validate(v,D)}redirect(v,D){return this._sourceName}};m.AliasSchema=p}}),er=Te({"node_modules/vnopts/lib/schemas/any.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"anything"}validate(){return!0}};m.AnySchema=p}}),qr=Te({"node_modules/vnopts/lib/schemas/array.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn)),p=jn(),v=class extends p.Schema{constructor(f){var{valueSchema:d,name:h=d.name}=f,E=A.__rest(f,["valueSchema","name"]);super(Object.assign({},E,{name:h})),this._valueSchema=d}expected(f){return`an array of ${this._valueSchema.expected(f)}`}validate(f,d){if(!Array.isArray(f))return!1;let h=[];for(let E of f){let x=d.normalizeValidateResult(this._valueSchema.validate(E,d),E);x!==!0&&h.push(x.value)}return h.length===0?!0:{value:h}}deprecated(f,d){let h=[];for(let E of f){let x=d.normalizeDeprecatedResult(this._valueSchema.deprecated(E,d),E);x!==!1&&h.push(...x.map(P=>{let{value:T}=P;return{value:[T]}}))}return h}forward(f,d){let h=[];for(let E of f){let x=d.normalizeForwardResult(this._valueSchema.forward(E,d),E);h.push(...x.map(D))}return h}redirect(f,d){let h=[],E=[];for(let x of f){let P=d.normalizeRedirectResult(this._valueSchema.redirect(x,d),x);"remain"in P&&h.push(P.remain),E.push(...P.redirect.map(D))}return h.length===0?{redirect:E}:{redirect:E,remain:h}}overlap(f,d){return f.concat(d)}};m.ArraySchema=v;function D(f){let{from:d,to:h}=f;return{from:[d],to:h}}}}),ur=Te({"node_modules/vnopts/lib/schemas/boolean.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"true or false"}validate(v){return typeof v=="boolean"}};m.BooleanSchema=p}}),Jr=Te({"node_modules/vnopts/lib/utils.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});function A(C,S){let j=Object.create(null);for(let X of C){let te=X[S];if(j[te])throw new Error(`Duplicate ${S} ${JSON.stringify(te)}`);j[te]=X}return j}m.recordFromArray=A;function p(C,S){let j=new Map;for(let X of C){let te=X[S];if(j.has(te))throw new Error(`Duplicate ${S} ${JSON.stringify(te)}`);j.set(te,X)}return j}m.mapFromArray=p;function v(){let C=Object.create(null);return S=>{let j=JSON.stringify(S);return C[j]?!0:(C[j]=!0,!1)}}m.createAutoChecklist=v;function D(C,S){let j=[],X=[];for(let te of C)S(te)?j.push(te):X.push(te);return[j,X]}m.partition=D;function f(C){return C===Math.floor(C)}m.isInt=f;function d(C,S){if(C===S)return 0;let j=typeof C,X=typeof S,te=["undefined","object","boolean","number","string"];return j!==X?te.indexOf(j)-te.indexOf(X):j!=="string"?Number(C)-Number(S):C.localeCompare(S)}m.comparePrimitive=d;function h(C){return C===void 0?{}:C}m.normalizeDefaultResult=h;function E(C,S){return C===!0?!0:C===!1?{value:S}:C}m.normalizeValidateResult=E;function x(C,S){let j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return C===!1?!1:C===!0?j?!0:[{value:S}]:"value"in C?[C]:C.length===0?!1:C}m.normalizeDeprecatedResult=x;function P(C,S){return typeof C=="string"||"key"in C?{from:S,to:C}:"from"in C?{from:C.from,to:C.to}:{from:S,to:C.to}}m.normalizeTransferResult=P;function T(C,S){return C===void 0?[]:Array.isArray(C)?C.map(j=>P(j,S)):[P(C,S)]}m.normalizeForwardResult=T;function k(C,S){let j=T(typeof C=="object"&&"redirect"in C?C.redirect:C,S);return j.length===0?{remain:S,redirect:j}:typeof C=="object"&&"remain"in C?{remain:C.remain,redirect:j}:{redirect:j}}m.normalizeRedirectResult=k}}),yr=Te({"node_modules/vnopts/lib/schemas/choice.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=Jr(),v=class extends A.Schema{constructor(D){super(D),this._choices=p.mapFromArray(D.choices.map(f=>f&&typeof f=="object"?f:{value:f}),"value")}expected(D){let{descriptor:f}=D,d=Array.from(this._choices.keys()).map(x=>this._choices.get(x)).filter(x=>!x.deprecated).map(x=>x.value).sort(p.comparePrimitive).map(f.value),h=d.slice(0,-2),E=d.slice(-2);return h.concat(E.join(" or ")).join(", ")}validate(D){return this._choices.has(D)}deprecated(D){let f=this._choices.get(D);return f&&f.deprecated?{value:D}:!1}forward(D){let f=this._choices.get(D);return f?f.forward:void 0}redirect(D){let f=this._choices.get(D);return f?f.redirect:void 0}};m.ChoiceSchema=v}}),Fr=Te({"node_modules/vnopts/lib/schemas/number.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"a number"}validate(v,D){return typeof v=="number"}};m.NumberSchema=p}}),to=Te({"node_modules/vnopts/lib/schemas/integer.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Jr(),p=Fr(),v=class extends p.NumberSchema{expected(){return"an integer"}validate(D,f){return f.normalizeValidateResult(super.validate(D,f),D)===!0&&A.isInt(D)}};m.IntegerSchema=v}}),zv=Te({"node_modules/vnopts/lib/schemas/string.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=jn(),p=class extends A.Schema{expected(){return"a string"}validate(v){return typeof v=="string"}};m.StringSchema=p}}),Qv=Te({"node_modules/vnopts/lib/schemas/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(ir(),m),A.__exportStar(er(),m),A.__exportStar(qr(),m),A.__exportStar(ur(),m),A.__exportStar(yr(),m),A.__exportStar(to(),m),A.__exportStar(Fr(),m),A.__exportStar(zv(),m)}}),Xv=Te({"node_modules/vnopts/lib/defaults.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Ye(),p=St(),v=nn(),D=kn();m.defaultDescriptor=A.apiDescriptor,m.defaultUnknownHandler=D.levenUnknownHandler,m.defaultInvalidHandler=v.commonInvalidHandler,m.defaultDeprecatedHandler=p.commonDeprecatedHandler}}),Kv=Te({"node_modules/vnopts/lib/normalize.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=Xv(),p=Jr();m.normalize=(D,f,d)=>new v(f,d).normalize(D);var v=class{constructor(D,f){let{logger:d=console,descriptor:h=A.defaultDescriptor,unknown:E=A.defaultUnknownHandler,invalid:x=A.defaultInvalidHandler,deprecated:P=A.defaultDeprecatedHandler}=f||{};this._utils={descriptor:h,logger:d||{warn:()=>{}},schemas:p.recordFromArray(D,"name"),normalizeDefaultResult:p.normalizeDefaultResult,normalizeDeprecatedResult:p.normalizeDeprecatedResult,normalizeForwardResult:p.normalizeForwardResult,normalizeRedirectResult:p.normalizeRedirectResult,normalizeValidateResult:p.normalizeValidateResult},this._unknownHandler=E,this._invalidHandler=x,this._deprecatedHandler=P,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=p.createAutoChecklist()}normalize(D){let f={},d=[D],h=()=>{for(;d.length!==0;){let E=d.shift(),x=this._applyNormalization(E,f);d.push(...x)}};h();for(let E of Object.keys(this._utils.schemas)){let x=this._utils.schemas[E];if(!(E in f)){let P=p.normalizeDefaultResult(x.default(this._utils));"value"in P&&d.push({[E]:P.value})}}h();for(let E of Object.keys(this._utils.schemas)){let x=this._utils.schemas[E];E in f&&(f[E]=x.postprocess(f[E],this._utils))}return f}_applyNormalization(D,f){let d=[],[h,E]=p.partition(Object.keys(D),x=>x in this._utils.schemas);for(let x of h){let P=this._utils.schemas[x],T=P.preprocess(D[x],this._utils),k=p.normalizeValidateResult(P.validate(T,this._utils),T);if(k!==!0){let{value:X}=k,te=this._invalidHandler(x,X,this._utils);throw typeof te=="string"?new Error(te):te}let C=X=>{let{from:te,to:$}=X;d.push(typeof $=="string"?{[$]:te}:{[$.key]:$.value})},S=X=>{let{value:te,redirectTo:$}=X,K=p.normalizeDeprecatedResult(P.deprecated(te,this._utils),T,!0);if(K!==!1)if(K===!0)this._hasDeprecationWarned(x)||this._utils.logger.warn(this._deprecatedHandler(x,$,this._utils));else for(let{value:G}of K){let re={key:x,value:G};if(!this._hasDeprecationWarned(re)){let ee=typeof $=="string"?{key:$,value:G}:$;this._utils.logger.warn(this._deprecatedHandler(re,ee,this._utils))}}};p.normalizeForwardResult(P.forward(T,this._utils),T).forEach(C);let j=p.normalizeRedirectResult(P.redirect(T,this._utils),T);if(j.redirect.forEach(C),"remain"in j){let X=j.remain;f[x]=x in f?P.overlap(f[x],X,this._utils):X,S({value:X})}for(let{from:X,to:te}of j.redirect)S({value:X,redirectTo:te})}for(let x of E){let P=D[x],T=this._unknownHandler(x,P,this._utils);if(T)for(let k of Object.keys(T)){let C={[k]:T[k]};k in this._utils.schemas?d.push(C):Object.assign(f,C)}}return d}};m.Normalizer=v}}),Zv=Te({"node_modules/vnopts/lib/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0});var A=(We(),Yn(hn));A.__exportStar(tt(),m),A.__exportStar(cr(),m),A.__exportStar(Qv(),m),A.__exportStar(Kv(),m),A.__exportStar(jn(),m)}}),e2=Te({"src/main/options-normalizer.js"(m,A){Re();var p=Zv(),v=Vr(),D={key:k=>k.length===1?`-${k}`:`--${k}`,value:k=>p.apiDescriptor.value(k),pair:k=>{let{key:C,value:S}=k;return S===!1?`--no-${C}`:S===!0?D.key(C):S===""?`${D.key(C)} without an argument`:`${D.key(C)}=${S}`}},f=k=>{let{colorsModule:C,levenshteinDistance:S}=k;return class extends p.ChoiceSchema{constructor(j){let{name:X,flags:te}=j;super({name:X,choices:te}),this._flags=[...te].sort()}preprocess(j,X){if(typeof j=="string"&&j.length>0&&!this._flags.includes(j)){let te=this._flags.find($=>S($,j)<3);if(te)return X.logger.warn([`Unknown flag ${C.yellow(X.descriptor.value(j))},`,`did you mean ${C.blue(X.descriptor.value(te))}?`].join(" ")),te}return j}expected(){return"a flag"}}},d;function h(k,C){let{logger:S=!1,isCLI:j=!1,passThrough:X=!1,colorsModule:te=null,levenshteinDistance:$=null}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=X?Array.isArray(X)?(J,w)=>X.includes(J)?{[J]:w}:void 0:(J,w)=>({[J]:w}):(J,w,R)=>{let y=R.schemas,_=wt(y,lt);return p.levenUnknownHandler(J,w,Object.assign(Object.assign({},R),{},{schemas:_}))},G=j?D:p.apiDescriptor,re=E(C,{isCLI:j,colorsModule:te,levenshteinDistance:$}),ee=new p.Normalizer(re,{logger:S,unknown:K,descriptor:G}),be=S!==!1;be&&d&&(ee._hasDeprecationWarned=d);let F=ee.normalize(k);return be&&(d=ee._hasDeprecationWarned),j&&F["plugin-search"]===!1&&(F["plugin-search-dir"]=!1),F}function E(k,C){let{isCLI:S,colorsModule:j,levenshteinDistance:X}=C,te=[];S&&te.push(p.AnySchema.create({name:"_"}));for(let $ of k)te.push(x($,{isCLI:S,optionInfos:k,colorsModule:j,levenshteinDistance:X})),$.alias&&S&&te.push(p.AliasSchema.create({name:$.alias,sourceName:$.name}));return te}function x(k,C){let{isCLI:S,optionInfos:j,colorsModule:X,levenshteinDistance:te}=C,{name:$}=k;if($==="plugin-search-dir"||$==="pluginSearchDirs")return p.AnySchema.create({name:$,preprocess(ee){return ee===!1||(ee=Array.isArray(ee)?ee:[ee]),ee},validate(ee){return ee===!1?!0:ee.every(be=>typeof be=="string")},expected(){return"false or paths to plugin search dir"}});let K={name:$},G,re={};switch(k.type){case"int":G=p.IntegerSchema,S&&(K.preprocess=Number);break;case"string":G=p.StringSchema;break;case"choice":G=p.ChoiceSchema,K.choices=k.choices.map(ee=>typeof ee=="object"&&ee.redirect?Object.assign(Object.assign({},ee),{},{redirect:{to:{key:k.name,value:ee.redirect}}}):ee);break;case"boolean":G=p.BooleanSchema;break;case"flag":G=f({colorsModule:X,levenshteinDistance:te}),K.flags=j.flatMap(ee=>[ee.alias,ee.description&&ee.name,ee.oppositeDescription&&`no-${ee.name}`].filter(Boolean));break;case"path":G=p.StringSchema;break;default:throw new Error(`Unexpected type ${k.type}`)}if(k.exception?K.validate=(ee,be,F)=>k.exception(ee)||be.validate(ee,F):K.validate=(ee,be,F)=>ee===void 0||be.validate(ee,F),k.redirect&&(re.redirect=ee=>ee?{to:{key:k.redirect.option,value:k.redirect.value}}:void 0),k.deprecated&&(re.deprecated=!0),S&&!k.array){let ee=K.preprocess||(be=>be);K.preprocess=(be,F,J)=>F.preprocess(ee(Array.isArray(be)?v(be):be),J)}return k.array?p.ArraySchema.create(Object.assign(Object.assign(Object.assign({},S?{preprocess:ee=>Array.isArray(ee)?ee:[ee]}:{}),re),{},{valueSchema:G.create(K)})):G.create(Object.assign(Object.assign({},K),re))}function P(k,C,S){return h(k,C,S)}function T(k,C,S){return h(k,C,Object.assign({isCLI:!0},S))}A.exports={normalizeApiOptions:P,normalizeCliOptions:T}}}),ni=Te({"src/language-js/loc.js"(m,A){Re();var p=It();function v(E){var x,P;let T=E.range?E.range[0]:E.start,k=(x=(P=E.declaration)===null||P===void 0?void 0:P.decorators)!==null&&x!==void 0?x:E.decorators;return p(k)?Math.min(v(k[0]),T):T}function D(E){return E.range?E.range[1]:E.end}function f(E,x){let P=v(E);return Number.isInteger(P)&&P===v(x)}function d(E,x){let P=D(E);return Number.isInteger(P)&&P===D(x)}function h(E,x){return f(E,x)&&d(E,x)}A.exports={locStart:v,locEnd:D,hasSameLocStart:f,hasSameLoc:h}}}),t2=Te({"src/main/load-parser.js"(m,A){Re(),A.exports=()=>{}}}),n2=Te({"scripts/build/shims/babel-highlight.cjs"(m,A){Re();var p=nt(),v={shouldHighlight:()=>!1,getChalk:()=>p};A.exports=v}}),r2=Te({"node_modules/@babel/code-frame/lib/index.js"(m){Re(),Object.defineProperty(m,"__esModule",{value:!0}),m.codeFrameColumns=d,m.default=h;var A=n2(),p=!1;function v(E){return{gutter:E.grey,marker:E.red.bold,message:E.red.bold}}var D=/\r\n|[\n\r\u2028\u2029]/;function f(E,x,P){let T=Object.assign({column:0,line:-1},E.start),k=Object.assign({},T,E.end),{linesAbove:C=2,linesBelow:S=3}=P||{},j=T.line,X=T.column,te=k.line,$=k.column,K=Math.max(j-(C+1),0),G=Math.min(x.length,te+S);j===-1&&(K=0),te===-1&&(G=x.length);let re=te-j,ee={};if(re)for(let be=0;be<=re;be++){let F=be+j;if(!X)ee[F]=!0;else if(be===0){let J=x[F-1].length;ee[F]=[X,J-X+1]}else if(be===re)ee[F]=[0,$];else{let J=x[F-be].length;ee[F]=[0,J]}}else X===$?X?ee[j]=[X,0]:ee[j]=!0:ee[j]=[X,$-X];return{start:K,end:G,markerLines:ee}}function d(E,x){let P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=(P.highlightCode||P.forceColor)&&(0,A.shouldHighlight)(P),k=(0,A.getChalk)(P),C=v(k),S=(ee,be)=>T?ee(be):be,j=E.split(D),{start:X,end:te,markerLines:$}=f(x,j,P),K=x.start&&typeof x.start.column=="number",G=String(te).length,re=(T?(0,A.default)(E,P):E).split(D,te).slice(X,te).map((ee,be)=>{let F=X+1+be,J=` ${` ${F}`.slice(-G)} |`,w=$[F],R=!$[F+1];if(w){let y="";if(Array.isArray(w)){let _=ee.slice(0,Math.max(w[0]-1,0)).replace(/[^\t]/g," "),M=w[1]||1;y=[`
|
|
186
186
|
`,S(C.gutter,J.replace(/\d/g," "))," ",_,S(C.marker,"^").repeat(M)].join(""),R&&P.message&&(y+=" "+S(C.message,P.message))}return[S(C.marker,">"),S(C.gutter,J),ee.length>0?` ${ee}`:"",y].join("")}else return` ${S(C.gutter,J)}${ee.length>0?` ${ee}`:""}`}).join(`
|
|
187
187
|
`);return P.message&&!K&&(re=`${" ".repeat(G+1)}${P.message}
|
|
188
188
|
${re}`),T?k.reset(re):re}function h(E,x,P){let T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(!p){p=!0;let k="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(Cr.emitWarning)Cr.emitWarning(k,"DeprecationWarning");else{let C=new Error(k);C.name="DeprecationWarning",console.warn(new Error(k))}}return P=Math.max(P,0),d(E,{start:{column:P,line:x}},T)}}}),rp=Te({"src/main/parser.js"(m,A){Re();var{ConfigError:p}=en(),v=ni();t2();var{locStart:D,locEnd:f}=v,d=Object.getOwnPropertyNames,h=Object.getOwnPropertyDescriptor;function E(T){let k={};for(let C of T.plugins)if(C.parsers)for(let S of d(C.parsers))Object.defineProperty(k,S,h(C.parsers,S));return k}function x(T){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E(T);if(typeof T.parser=="function")return{parse:T.parser,astFormat:"estree",locStart:D,locEnd:f};if(typeof T.parser=="string"){if(Object.prototype.hasOwnProperty.call(k,T.parser))return k[T.parser];throw new p(`Couldn't resolve parser "${T.parser}". Parsers must be explicitly added to the standalone bundle.`)}}function P(T,k){let C=E(k),S=Object.defineProperties({},Object.fromEntries(Object.keys(C).map(X=>[X,{enumerable:!0,get(){return C[X].parse}}]))),j=x(k,C);try{return j.preprocess&&(T=j.preprocess(T,k)),{text:T,ast:j.parse(T,S,k)}}catch(X){let{loc:te}=X;if(te){let{codeFrameColumns:$}=r2();throw X.codeFrame=$(T,te,{highlightCode:!0}),X.message+=`
|
|
@@ -353,25 +353,25 @@ ${le}
|
|
|
353
353
|
`),O}Y.parse=Dn}}),es=c({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(Y){I();var g=Gr();function W(pe,de,We){return We?`#${We.replace(/[\s\S]^/gm,`$&${de}#`)}
|
|
354
354
|
${de}${pe}`:pe}function Se(pe,de,We){return We?We.indexOf(`
|
|
355
355
|
`)===-1?`${pe} #${We}`:`${pe}
|
|
356
|
-
`+We.replace(/^/gm,`${de||""}#`):pe}var ke=class{};function Pe(pe,de,We){if(Array.isArray(pe))return pe.map((Ye,tt)=>Pe(Ye,String(tt),We));if(pe&&typeof pe.toJSON=="function"){let Ye=We&&We.anchors&&We.anchors.get(pe);Ye&&(We.onCreate=nt=>{Ye.res=nt,delete We.onCreate});let tt=pe.toJSON(de,We);return Ye&&We.onCreate&&We.onCreate(tt),tt}return(!We||!We.keep)&&typeof pe=="bigint"?Number(pe):pe}var et=class extends ke{constructor(pe){super(),this.value=pe}toJSON(pe,de){return de&&de.keep?this.value:Pe(this.value,pe,de)}toString(){return String(this.value)}};function gt(pe,de,We){let Ye=We;for(let tt=de.length-1;tt>=0;--tt){let nt=de[tt];if(Number.isInteger(nt)&&nt>=0){let St=[];St[nt]=Ye,Ye=St}else{let St={};Object.defineProperty(St,nt,{value:Ye,writable:!0,enumerable:!0,configurable:!0}),Ye=St}}return pe.createNode(Ye,!1)}var jt=pe=>pe==null||typeof pe=="object"&&pe[Symbol.iterator]().next().done,at=class extends ke{constructor(pe){super(),g._defineProperty(this,"items",[]),this.schema=pe}addIn(pe,de){if(jt(pe))this.add(de);else{let[We,...Ye]=pe,tt=this.get(We,!0);if(tt instanceof at)tt.addIn(Ye,de);else if(tt===void 0&&this.schema)this.set(We,gt(this.schema,Ye,de));else throw new Error(`Expected YAML collection at ${We}. Remaining path: ${Ye}`)}}deleteIn(pe){let[de,...We]=pe;if(We.length===0)return this.delete(de);let Ye=this.get(de,!0);if(Ye instanceof at)return Ye.deleteIn(We);throw new Error(`Expected YAML collection at ${de}. Remaining path: ${We}`)}getIn(pe,de){let[We,...Ye]=pe,tt=this.get(We,!0);return Ye.length===0?!de&&tt instanceof et?tt.value:tt:tt instanceof at?tt.getIn(Ye,de):void 0}hasAllNullValues(){return this.items.every(pe=>{if(!pe||pe.type!=="PAIR")return!1;let de=pe.value;return de==null||de instanceof et&&de.value==null&&!de.commentBefore&&!de.comment&&!de.tag})}hasIn(pe){let[de,...We]=pe;if(We.length===0)return this.has(de);let Ye=this.get(de,!0);return Ye instanceof at?Ye.hasIn(We):!1}setIn(pe,de){let[We,...Ye]=pe;if(Ye.length===0)this.set(We,de);else{let tt=this.get(We,!0);if(tt instanceof at)tt.setIn(Ye,de);else if(tt===void 0&&this.schema)this.set(We,gt(this.schema,Ye,de));else throw new Error(`Expected YAML collection at ${We}. Remaining path: ${Ye}`)}}toJSON(){return null}toString(pe,de,We,Ye){let{blockItem:tt,flowChars:nt,isMap:St,itemIndent:Nt}=de,{indent:Kt,indentStep:nn,stringify:dn}=pe,kn=this.type===g.Type.FLOW_MAP||this.type===g.Type.FLOW_SEQ||pe.inFlow;kn&&(Nt+=nn);let lr=St&&this.hasAllNullValues();pe=Object.assign({},pe,{allNullValues:lr,indent:Nt,inFlow:kn,type:null});let cr=!1,jn=!1,ir=this.items.reduce((qr,ur,Jr)=>{let
|
|
357
|
-
`)&&(jn=!0),kn&&Jr<this.items.length-1&&(Fr+=","),Fr=Se(Fr,Nt,
|
|
358
|
-
${nn}${Kt}${
|
|
356
|
+
`+We.replace(/^/gm,`${de||""}#`):pe}var ke=class{};function Pe(pe,de,We){if(Array.isArray(pe))return pe.map((Ye,tt)=>Pe(Ye,String(tt),We));if(pe&&typeof pe.toJSON=="function"){let Ye=We&&We.anchors&&We.anchors.get(pe);Ye&&(We.onCreate=nt=>{Ye.res=nt,delete We.onCreate});let tt=pe.toJSON(de,We);return Ye&&We.onCreate&&We.onCreate(tt),tt}return(!We||!We.keep)&&typeof pe=="bigint"?Number(pe):pe}var et=class extends ke{constructor(pe){super(),this.value=pe}toJSON(pe,de){return de&&de.keep?this.value:Pe(this.value,pe,de)}toString(){return String(this.value)}};function gt(pe,de,We){let Ye=We;for(let tt=de.length-1;tt>=0;--tt){let nt=de[tt];if(Number.isInteger(nt)&&nt>=0){let St=[];St[nt]=Ye,Ye=St}else{let St={};Object.defineProperty(St,nt,{value:Ye,writable:!0,enumerable:!0,configurable:!0}),Ye=St}}return pe.createNode(Ye,!1)}var jt=pe=>pe==null||typeof pe=="object"&&pe[Symbol.iterator]().next().done,at=class extends ke{constructor(pe){super(),g._defineProperty(this,"items",[]),this.schema=pe}addIn(pe,de){if(jt(pe))this.add(de);else{let[We,...Ye]=pe,tt=this.get(We,!0);if(tt instanceof at)tt.addIn(Ye,de);else if(tt===void 0&&this.schema)this.set(We,gt(this.schema,Ye,de));else throw new Error(`Expected YAML collection at ${We}. Remaining path: ${Ye}`)}}deleteIn(pe){let[de,...We]=pe;if(We.length===0)return this.delete(de);let Ye=this.get(de,!0);if(Ye instanceof at)return Ye.deleteIn(We);throw new Error(`Expected YAML collection at ${de}. Remaining path: ${We}`)}getIn(pe,de){let[We,...Ye]=pe,tt=this.get(We,!0);return Ye.length===0?!de&&tt instanceof et?tt.value:tt:tt instanceof at?tt.getIn(Ye,de):void 0}hasAllNullValues(){return this.items.every(pe=>{if(!pe||pe.type!=="PAIR")return!1;let de=pe.value;return de==null||de instanceof et&&de.value==null&&!de.commentBefore&&!de.comment&&!de.tag})}hasIn(pe){let[de,...We]=pe;if(We.length===0)return this.has(de);let Ye=this.get(de,!0);return Ye instanceof at?Ye.hasIn(We):!1}setIn(pe,de){let[We,...Ye]=pe;if(Ye.length===0)this.set(We,de);else{let tt=this.get(We,!0);if(tt instanceof at)tt.setIn(Ye,de);else if(tt===void 0&&this.schema)this.set(We,gt(this.schema,Ye,de));else throw new Error(`Expected YAML collection at ${We}. Remaining path: ${Ye}`)}}toJSON(){return null}toString(pe,de,We,Ye){let{blockItem:tt,flowChars:nt,isMap:St,itemIndent:Nt}=de,{indent:Kt,indentStep:nn,stringify:dn}=pe,kn=this.type===g.Type.FLOW_MAP||this.type===g.Type.FLOW_SEQ||pe.inFlow;kn&&(Nt+=nn);let lr=St&&this.hasAllNullValues();pe=Object.assign({},pe,{allNullValues:lr,indent:Nt,inFlow:kn,type:null});let cr=!1,jn=!1,ir=this.items.reduce((qr,ur,Jr)=>{let yr;ur&&(!cr&&ur.spaceBefore&&qr.push({type:"comment",str:""}),ur.commentBefore&&ur.commentBefore.match(/^.*$/gm).forEach(to=>{qr.push({type:"comment",str:`#${to}`})}),ur.comment&&(yr=ur.comment),kn&&(!cr&&ur.spaceBefore||ur.commentBefore||ur.comment||ur.key&&(ur.key.commentBefore||ur.key.comment)||ur.value&&(ur.value.commentBefore||ur.value.comment))&&(jn=!0)),cr=!1;let Fr=dn(ur,pe,()=>yr=null,()=>cr=!0);return kn&&!jn&&Fr.includes(`
|
|
357
|
+
`)&&(jn=!0),kn&&Jr<this.items.length-1&&(Fr+=","),Fr=Se(Fr,Nt,yr),cr&&(yr||kn)&&(cr=!1),qr.push({type:"item",str:Fr}),qr},[]),er;if(ir.length===0)er=nt.start+nt.end;else if(kn){let{start:qr,end:ur}=nt,Jr=ir.map(yr=>yr.str);if(jn||Jr.reduce((yr,Fr)=>yr+Fr.length+2,2)>at.maxFlowStringSingleLineLength){er=qr;for(let yr of Jr)er+=yr?`
|
|
358
|
+
${nn}${Kt}${yr}`:`
|
|
359
359
|
`;er+=`
|
|
360
360
|
${Kt}${ur}`}else er=`${qr} ${Jr.join(" ")} ${ur}`}else{let qr=ir.map(tt);er=qr.shift();for(let ur of qr)er+=ur?`
|
|
361
361
|
${Kt}${ur}`:`
|
|
362
362
|
`}return this.comment?(er+=`
|
|
363
|
-
`+this.comment.replace(/^/gm,`${Kt}#`),We&&We()):cr&&Ye&&Ye(),er}};g._defineProperty(at,"maxFlowStringSingleLineLength",60);function bt(pe){let de=pe instanceof et?pe.value:pe;return de&&typeof de=="string"&&(de=Number(de)),Number.isInteger(de)&&de>=0?de:null}var Tt=class extends at{add(pe){this.items.push(pe)}delete(pe){let de=bt(pe);return typeof de!="number"?!1:this.items.splice(de,1).length>0}get(pe,de){let We=bt(pe);if(typeof We!="number")return;let Ye=this.items[We];return!de&&Ye instanceof et?Ye.value:Ye}has(pe){let de=bt(pe);return typeof de=="number"&&de<this.items.length}set(pe,de){let We=bt(pe);if(typeof We!="number")throw new Error(`Expected a valid index, not ${pe}.`);this.items[We]=de}toJSON(pe,de){let We=[];de&&de.onCreate&&de.onCreate(We);let Ye=0;for(let tt of this.items)We.push(Pe(tt,String(Ye++),de));return We}toString(pe,de,We){return pe?super.toString(pe,{blockItem:Ye=>Ye.type==="comment"?Ye.str:`- ${Ye.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(pe.indent||"")+" "},de,We):JSON.stringify(this)}},It=(pe,de,We)=>de===null?"":typeof de!="object"?String(de):pe instanceof ke&&We&&We.doc?pe.toString({anchors:Object.create(null),doc:We.doc,indent:"",indentStep:We.indentStep,inFlow:!0,inStringifyKey:!0,stringify:We.stringify}):JSON.stringify(de),Lt=class extends ke{constructor(pe){let de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super(),this.key=pe,this.value=de,this.type=Lt.Type.PAIR}get commentBefore(){return this.key instanceof ke?this.key.commentBefore:void 0}set commentBefore(pe){if(this.key==null&&(this.key=new et(null)),this.key instanceof ke)this.key.commentBefore=pe;else{let de="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(de)}}addToJSMap(pe,de){let We=Pe(this.key,"",pe);if(de instanceof Map){let Ye=Pe(this.value,We,pe);de.set(We,Ye)}else if(de instanceof Set)de.add(We);else{let Ye=It(this.key,We,pe),tt=Pe(this.value,Ye,pe);Ye in de?Object.defineProperty(de,Ye,{value:tt,writable:!0,enumerable:!0,configurable:!0}):de[Ye]=tt}return de}toJSON(pe,de){let We=de&&de.mapAsMap?new Map:{};return this.addToJSMap(de,We)}toString(pe,de,We){if(!pe||!pe.doc)return JSON.stringify(this);let{indent:Ye,indentSeq:tt,simpleKeys:nt}=pe.doc.options,{key:St,value:Nt}=this,Kt=St instanceof ke&&St.comment;if(nt){if(Kt)throw new Error("With simple keys, key nodes cannot have comments");if(St instanceof at){let
|
|
363
|
+
`+this.comment.replace(/^/gm,`${Kt}#`),We&&We()):cr&&Ye&&Ye(),er}};g._defineProperty(at,"maxFlowStringSingleLineLength",60);function bt(pe){let de=pe instanceof et?pe.value:pe;return de&&typeof de=="string"&&(de=Number(de)),Number.isInteger(de)&&de>=0?de:null}var Tt=class extends at{add(pe){this.items.push(pe)}delete(pe){let de=bt(pe);return typeof de!="number"?!1:this.items.splice(de,1).length>0}get(pe,de){let We=bt(pe);if(typeof We!="number")return;let Ye=this.items[We];return!de&&Ye instanceof et?Ye.value:Ye}has(pe){let de=bt(pe);return typeof de=="number"&&de<this.items.length}set(pe,de){let We=bt(pe);if(typeof We!="number")throw new Error(`Expected a valid index, not ${pe}.`);this.items[We]=de}toJSON(pe,de){let We=[];de&&de.onCreate&&de.onCreate(We);let Ye=0;for(let tt of this.items)We.push(Pe(tt,String(Ye++),de));return We}toString(pe,de,We){return pe?super.toString(pe,{blockItem:Ye=>Ye.type==="comment"?Ye.str:`- ${Ye.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(pe.indent||"")+" "},de,We):JSON.stringify(this)}},It=(pe,de,We)=>de===null?"":typeof de!="object"?String(de):pe instanceof ke&&We&&We.doc?pe.toString({anchors:Object.create(null),doc:We.doc,indent:"",indentStep:We.indentStep,inFlow:!0,inStringifyKey:!0,stringify:We.stringify}):JSON.stringify(de),Lt=class extends ke{constructor(pe){let de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;super(),this.key=pe,this.value=de,this.type=Lt.Type.PAIR}get commentBefore(){return this.key instanceof ke?this.key.commentBefore:void 0}set commentBefore(pe){if(this.key==null&&(this.key=new et(null)),this.key instanceof ke)this.key.commentBefore=pe;else{let de="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(de)}}addToJSMap(pe,de){let We=Pe(this.key,"",pe);if(de instanceof Map){let Ye=Pe(this.value,We,pe);de.set(We,Ye)}else if(de instanceof Set)de.add(We);else{let Ye=It(this.key,We,pe),tt=Pe(this.value,Ye,pe);Ye in de?Object.defineProperty(de,Ye,{value:tt,writable:!0,enumerable:!0,configurable:!0}):de[Ye]=tt}return de}toJSON(pe,de){let We=de&&de.mapAsMap?new Map:{};return this.addToJSMap(de,We)}toString(pe,de,We){if(!pe||!pe.doc)return JSON.stringify(this);let{indent:Ye,indentSeq:tt,simpleKeys:nt}=pe.doc.options,{key:St,value:Nt}=this,Kt=St instanceof ke&&St.comment;if(nt){if(Kt)throw new Error("With simple keys, key nodes cannot have comments");if(St instanceof at){let yr="With simple keys, collection cannot be used as a key value";throw new Error(yr)}}let nn=!nt&&(!St||Kt||(St instanceof ke?St instanceof at||St.type===g.Type.BLOCK_FOLDED||St.type===g.Type.BLOCK_LITERAL:typeof St=="object")),{doc:dn,indent:kn,indentStep:lr,stringify:cr}=pe;pe=Object.assign({},pe,{implicitKey:!nn,indent:kn+lr});let jn=!1,ir=cr(St,pe,()=>Kt=null,()=>jn=!0);if(ir=Se(ir,pe.indent,Kt),!nn&&ir.length>1024){if(nt)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");nn=!0}if(pe.allNullValues&&!nt)return this.comment?(ir=Se(ir,pe.indent,this.comment),de&&de()):jn&&!Kt&&We&&We(),pe.inFlow&&!nn?ir:`? ${ir}`;ir=nn?`? ${ir}
|
|
364
364
|
${kn}:`:`${ir}:`,this.comment&&(ir=Se(ir,pe.indent,this.comment),de&&de());let er="",qr=null;if(Nt instanceof ke){if(Nt.spaceBefore&&(er=`
|
|
365
|
-
`),Nt.commentBefore){let
|
|
366
|
-
${
|
|
365
|
+
`),Nt.commentBefore){let yr=Nt.commentBefore.replace(/^/gm,`${pe.indent}#`);er+=`
|
|
366
|
+
${yr}`}qr=Nt.comment}else Nt&&typeof Nt=="object"&&(Nt=dn.schema.createNode(Nt,!0));pe.implicitKey=!1,!nn&&!this.comment&&Nt instanceof et&&(pe.indentAtStart=ir.length+1),jn=!1,!tt&&Ye>=2&&!pe.inFlow&&!nn&&Nt instanceof Tt&&Nt.type!==g.Type.FLOW_SEQ&&!Nt.tag&&!dn.anchors.getName(Nt)&&(pe.indent=pe.indent.substr(2));let ur=cr(Nt,pe,()=>qr=null,()=>jn=!0),Jr=" ";return er||this.comment?Jr=`${er}
|
|
367
367
|
${pe.indent}`:!nn&&Nt instanceof at?(!(ur[0]==="["||ur[0]==="{")||ur.includes(`
|
|
368
368
|
`))&&(Jr=`
|
|
369
369
|
${pe.indent}`):ur[0]===`
|
|
370
370
|
`&&(Jr=""),jn&&!qr&&We&&We(),Se(ir+Jr+ur,pe.indent,qr)}};g._defineProperty(Lt,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var Gt=(pe,de)=>{if(pe instanceof Wt){let We=de.get(pe.source);return We.count*We.aliasCount}else if(pe instanceof at){let We=0;for(let Ye of pe.items){let tt=Gt(Ye,de);tt>We&&(We=tt)}return We}else if(pe instanceof Lt){let We=Gt(pe.key,de),Ye=Gt(pe.value,de);return Math.max(We,Ye)}return 1},Wt=class extends ke{static stringify(pe,de){let{range:We,source:Ye}=pe,{anchors:tt,doc:nt,implicitKey:St,inStringifyKey:Nt}=de,Kt=Object.keys(tt).find(dn=>tt[dn]===Ye);if(!Kt&&Nt&&(Kt=nt.anchors.getName(Ye)||nt.anchors.newName()),Kt)return`*${Kt}${St?" ":""}`;let nn=nt.anchors.getName(Ye)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${nn} [${We}]`)}constructor(pe){super(),this.source=pe,this.type=g.Type.ALIAS}set tag(pe){throw new Error("Alias nodes cannot have tags")}toJSON(pe,de){if(!de)return Pe(this.source,pe,de);let{anchors:We,maxAliasCount:Ye}=de,tt=We.get(this.source);if(!tt||tt.res===void 0){let nt="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new g.YAMLReferenceError(this.cstNode,nt):new ReferenceError(nt)}if(Ye>=0&&(tt.count+=1,tt.aliasCount===0&&(tt.aliasCount=Gt(this.source,We)),tt.count*tt.aliasCount>Ye)){let nt="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new g.YAMLReferenceError(this.cstNode,nt):new ReferenceError(nt)}return tt.res}toString(pe){return Wt.stringify(this,pe)}};g._defineProperty(Wt,"default",!0);function Xt(pe,de){let We=de instanceof et?de.value:de;for(let Ye of pe)if(Ye instanceof Lt&&(Ye.key===de||Ye.key===We||Ye.key&&Ye.key.value===We))return Ye}var Dn=class extends at{add(pe,de){pe?pe instanceof Lt||(pe=new Lt(pe.key||pe,pe.value)):pe=new Lt(pe);let We=Xt(this.items,pe.key),Ye=this.schema&&this.schema.sortMapEntries;if(We)if(de)We.value=pe.value;else throw new Error(`Key ${pe.key} already set`);else if(Ye){let tt=this.items.findIndex(nt=>Ye(pe,nt)<0);tt===-1?this.items.push(pe):this.items.splice(tt,0,pe)}else this.items.push(pe)}delete(pe){let de=Xt(this.items,pe);return de?this.items.splice(this.items.indexOf(de),1).length>0:!1}get(pe,de){let We=Xt(this.items,pe),Ye=We&&We.value;return!de&&Ye instanceof et?Ye.value:Ye}has(pe){return!!Xt(this.items,pe)}set(pe,de){this.add(new Lt(pe,de),!0)}toJSON(pe,de,We){let Ye=We?new We:de&&de.mapAsMap?new Map:{};de&&de.onCreate&&de.onCreate(Ye);for(let tt of this.items)tt.addToJSMap(de,Ye);return Ye}toString(pe,de,We){if(!pe)return JSON.stringify(this);for(let Ye of this.items)if(!(Ye instanceof Lt))throw new Error(`Map items must all be pairs; found ${JSON.stringify(Ye)} instead`);return super.toString(pe,{blockItem:Ye=>Ye.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:pe.indent||""},de,We)}},De="<<",Z=class extends Lt{constructor(pe){if(pe instanceof Lt){let de=pe.value;de instanceof Tt||(de=new Tt,de.items.push(pe.value),de.range=pe.value.range),super(pe.key,de),this.range=pe.range}else super(new et(De),new Tt);this.type=Lt.Type.MERGE_PAIR}addToJSMap(pe,de){for(let{source:We}of this.value.items){if(!(We instanceof Dn))throw new Error("Merge sources must be maps");let Ye=We.toJSON(null,pe,Map);for(let[tt,nt]of Ye)de instanceof Map?de.has(tt)||de.set(tt,nt):de instanceof Set?de.add(tt):Object.prototype.hasOwnProperty.call(de,tt)||Object.defineProperty(de,tt,{value:nt,writable:!0,enumerable:!0,configurable:!0})}return de}toString(pe,de){let We=this.value;if(We.items.length>1)return super.toString(pe,de);this.value=We.items[0];let Ye=super.toString(pe,de);return this.value=We,Ye}},O={defaultType:g.Type.BLOCK_LITERAL,lineWidth:76},H={trueStr:"true",falseStr:"false"},le={asBigInt:!1},Ne={nullStr:"null"},Me={defaultType:g.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function Ce(pe,de,We){for(let{format:Ye,test:tt,resolve:nt}of de)if(tt){let St=pe.match(tt);if(St){let Nt=nt.apply(null,St);return Nt instanceof et||(Nt=new et(Nt)),Ye&&(Nt.format=Ye),Nt}}return We&&(pe=We(pe)),new et(pe)}var je="flow",xt="block",Ot="quoted",zt=(pe,de)=>{let We=pe[de+1];for(;We===" "||We===" ";){do We=pe[de+=1];while(We&&We!==`
|
|
371
|
-
`);We=pe[de+1]}return de};function vn(pe,de,We,Ye){let{indentAtStart:tt,lineWidth:nt=80,minContentWidth:St=20,onFold:Nt,onOverflow:Kt}=Ye;if(!nt||nt<0)return pe;let nn=Math.max(1+St,1+nt-de.length);if(pe.length<=nn)return pe;let dn=[],kn={},lr=nt-de.length;typeof tt=="number"&&(tt>nt-Math.max(2,St)?dn.push(0):lr=nt-tt);let cr,jn,ir=!1,er=-1,qr=-1,ur=-1;We===xt&&(er=zt(pe,er),er!==-1&&(lr=er+nn));for(let
|
|
372
|
-
`)We===xt&&(er=zt(pe,er)),lr=er+nn,cr=void 0;else{if(
|
|
371
|
+
`);We=pe[de+1]}return de};function vn(pe,de,We,Ye){let{indentAtStart:tt,lineWidth:nt=80,minContentWidth:St=20,onFold:Nt,onOverflow:Kt}=Ye;if(!nt||nt<0)return pe;let nn=Math.max(1+St,1+nt-de.length);if(pe.length<=nn)return pe;let dn=[],kn={},lr=nt-de.length;typeof tt=="number"&&(tt>nt-Math.max(2,St)?dn.push(0):lr=nt-tt);let cr,jn,ir=!1,er=-1,qr=-1,ur=-1;We===xt&&(er=zt(pe,er),er!==-1&&(lr=er+nn));for(let yr;yr=pe[er+=1];){if(We===Ot&&yr==="\\"){switch(qr=er,pe[er+1]){case"x":er+=3;break;case"u":er+=5;break;case"U":er+=9;break;default:er+=1}ur=er}if(yr===`
|
|
372
|
+
`)We===xt&&(er=zt(pe,er)),lr=er+nn,cr=void 0;else{if(yr===" "&&jn&&jn!==" "&&jn!==`
|
|
373
373
|
`&&jn!==" "){let Fr=pe[er+1];Fr&&Fr!==" "&&Fr!==`
|
|
374
|
-
`&&Fr!==" "&&(cr=er)}if(er>=lr)if(cr)dn.push(cr),lr=cr+nn,cr=void 0;else if(We===Ot){for(;jn===" "||jn===" ";)jn=
|
|
374
|
+
`&&Fr!==" "&&(cr=er)}if(er>=lr)if(cr)dn.push(cr),lr=cr+nn,cr=void 0;else if(We===Ot){for(;jn===" "||jn===" ";)jn=yr,yr=pe[er+=1],ir=!0;let Fr=er>ur+1?er-2:qr-1;if(kn[Fr])return pe;dn.push(Fr),kn[Fr]=!0,lr=Fr+nn,cr=void 0}else ir=!0}jn=yr}if(ir&&Kt&&Kt(),dn.length===0)return pe;Nt&&Nt();let Jr=pe.slice(0,dn[0]);for(let yr=0;yr<dn.length;++yr){let Fr=dn[yr],to=dn[yr+1]||pe.length;Fr===0?Jr=`
|
|
375
375
|
${de}${pe.slice(0,to)}`:(We===Ot&&kn[Fr]&&(Jr+=`${pe[Fr]}\\`),Jr+=`
|
|
376
376
|
${de}${pe.slice(Fr+1,to)}`)}return Jr}var on=pe=>{let{indentAtStart:de}=pe;return de?Object.assign({indentAtStart:de},Me.fold):Me.fold},$n=pe=>/^(%|---|\.\.\.)/m.test(pe);function sr(pe,de,We){if(!de||de<0)return!1;let Ye=de-We,tt=pe.length;if(tt<=Ye)return!1;for(let nt=0,St=0;nt<tt;++nt)if(pe[nt]===`
|
|
377
377
|
`){if(nt-St>Ye)return!0;if(St=nt+1,tt-St<=Ye)return!1}return!0}function xr(pe,de){let{implicitKey:We}=de,{jsonEncoding:Ye,minMultiLineLength:tt}=Me.doubleQuoted,nt=JSON.stringify(pe);if(Ye)return nt;let St=de.indent||($n(pe)?" ":""),Nt="",Kt=0;for(let nn=0,dn=nt[nn];dn;dn=nt[++nn])if(dn===" "&&nt[nn+1]==="\\"&&nt[nn+2]==="n"&&(Nt+=nt.slice(Kt,nn)+"\\ ",nn+=1,Kt=nn,dn="\\"),dn==="\\")switch(nt[nn+1]){case"u":{Nt+=nt.slice(Kt,nn);let kn=nt.substr(nn+2,4);switch(kn){case"0000":Nt+="\\0";break;case"0007":Nt+="\\a";break;case"000b":Nt+="\\v";break;case"001b":Nt+="\\e";break;case"0085":Nt+="\\N";break;case"00a0":Nt+="\\_";break;case"2028":Nt+="\\L";break;case"2029":Nt+="\\P";break;default:kn.substr(0,2)==="00"?Nt+="\\x"+kn.substr(2):Nt+=nt.substr(nn,6)}nn+=5,Kt=nn+1}break;case"n":if(We||nt[nn+2]==='"'||nt.length<tt)nn+=1;else{for(Nt+=nt.slice(Kt,nn)+`
|
|
@@ -410,9 +410,9 @@ ${je.commentBefore}`:Ce}O.comment=le.after.join(`
|
|
|
410
410
|
`)||null}}function Wt(O,H){let{tagPrefixes:le}=O,[Ne,Me]=H.parameters;if(!Ne||!Me){let Ce="Insufficient parameters given for %TAG directive";throw new g.YAMLSemanticError(H,Ce)}if(le.some(Ce=>Ce.handle===Ne)){let Ce="The %TAG directive must only be given at most once per handle in the same document.";throw new g.YAMLSemanticError(H,Ce)}return{handle:Ne,prefix:Me}}function Xt(O,H){let[le]=H.parameters;if(H.name==="YAML:1.0"&&(le="1.0"),!le){let Ne="Insufficient parameters given for %YAML directive";throw new g.YAMLSemanticError(H,Ne)}if(!et[le]){let Ne=`Document will be parsed as YAML ${O.version||O.options.version} rather than YAML ${le}`;O.warnings.push(new g.YAMLWarning(H,Ne))}return le}function Dn(O,H,le){let Ne=[],Me=!1;for(let Ce of H){let{comment:je,name:xt}=Ce;switch(xt){case"TAG":try{O.tagPrefixes.push(Wt(O,Ce))}catch(Ot){O.errors.push(Ot)}Me=!0;break;case"YAML":case"YAML:1.0":if(O.version){let Ot="The %YAML directive must only be given at most once per document.";O.errors.push(new g.YAMLSemanticError(Ce,Ot))}try{O.version=Xt(O,Ce)}catch(Ot){O.errors.push(Ot)}Me=!0;break;default:if(xt){let Ot=`YAML only supports %TAG and %YAML directives, and not %${xt}`;O.warnings.push(new g.YAMLWarning(Ce,Ot))}}je&&Ne.push(je)}if(le&&!Me&&(O.version||le.version||O.options.version)==="1.1"){let Ce=je=>{let{handle:xt,prefix:Ot}=je;return{handle:xt,prefix:Ot}};O.tagPrefixes=le.tagPrefixes.map(Ce),O.version=le.version}O.commentBefore=Ne.join(`
|
|
411
411
|
`)||null}function De(O){if(O instanceof W.Collection)return!0;throw new Error("Expected a YAML collection as document contents")}var Z=class{constructor(O){this.anchors=new Tt(O.anchorPrefix),this.commentBefore=null,this.comment=null,this.contents=null,this.directivesEndMarker=null,this.errors=[],this.options=O,this.schema=null,this.tagPrefixes=[],this.version=null,this.warnings=[]}add(O){return De(this.contents),this.contents.add(O)}addIn(O,H){De(this.contents),this.contents.addIn(O,H)}delete(O){return De(this.contents),this.contents.delete(O)}deleteIn(O){return W.isEmptyPath(O)?this.contents==null?!1:(this.contents=null,!0):(De(this.contents),this.contents.deleteIn(O))}getDefaults(){return Z.defaults[this.version]||Z.defaults[this.options.version]||{}}get(O,H){return this.contents instanceof W.Collection?this.contents.get(O,H):void 0}getIn(O,H){return W.isEmptyPath(O)?!H&&this.contents instanceof W.Scalar?this.contents.value:this.contents:this.contents instanceof W.Collection?this.contents.getIn(O,H):void 0}has(O){return this.contents instanceof W.Collection?this.contents.has(O):!1}hasIn(O){return W.isEmptyPath(O)?this.contents!==void 0:this.contents instanceof W.Collection?this.contents.hasIn(O):!1}set(O,H){De(this.contents),this.contents.set(O,H)}setIn(O,H){W.isEmptyPath(O)?this.contents=H:(De(this.contents),this.contents.setIn(O,H))}setSchema(O,H){if(!O&&!H&&this.schema)return;typeof O=="number"&&(O=O.toFixed(1)),O==="1.0"||O==="1.1"||O==="1.2"?(this.version?this.version=O:this.options.version=O,delete this.options.schema):O&&typeof O=="string"&&(this.options.schema=O),Array.isArray(H)&&(this.options.customTags=H);let le=Object.assign({},this.getDefaults(),this.options);this.schema=new Se.Schema(le)}parse(O,H){this.options.keepCstNodes&&(this.cstNode=O),this.options.keepNodeTypes&&(this.type="DOCUMENT");let{directives:le=[],contents:Ne=[],directivesEndMarker:Me,error:Ce,valueRange:je}=O;if(Ce&&(Ce.source||(Ce.source=this),this.errors.push(Ce)),Dn(this,le,H),Me&&(this.directivesEndMarker=!0),this.range=je?[je.start,je.end]:null,this.setSchema(),this.anchors._cstAliases=[],Gt(this,Ne),this.anchors.resolveNodes(),this.options.prettyErrors){for(let xt of this.errors)xt instanceof g.YAMLError&&xt.makePretty();for(let xt of this.warnings)xt instanceof g.YAMLError&&xt.makePretty()}return this}listNonDefaultTags(){return Lt(this.contents).filter(O=>O.indexOf(Se.Schema.defaultPrefix)!==0)}setTagPrefix(O,H){if(O[0]!=="!"||O[O.length-1]!=="!")throw new Error("Handle must start and end with !");if(H){let le=this.tagPrefixes.find(Ne=>Ne.handle===O);le?le.prefix=H:this.tagPrefixes.push({handle:O,prefix:H})}else this.tagPrefixes=this.tagPrefixes.filter(le=>le.handle!==O)}toJSON(O,H){let{keepBlobsInJSON:le,mapAsMap:Ne,maxAliasCount:Me}=this.options,Ce=le&&(typeof O!="string"||!(this.contents instanceof W.Scalar)),je={doc:this,indentStep:" ",keep:Ce,mapAsMap:Ce&&!!Ne,maxAliasCount:Me,stringify:bt},xt=Object.keys(this.anchors.map);xt.length>0&&(je.anchors=new Map(xt.map(zt=>[this.anchors.map[zt],{alias:[],aliasCount:0,count:1}])));let Ot=W.toJSON(this.contents,O,je);if(typeof H=="function"&&je.anchors)for(let{count:zt,res:vn}of je.anchors.values())H(vn,zt);return Ot}toString(){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");let O=this.options.indent;if(!Number.isInteger(O)||O<=0){let xt=JSON.stringify(O);throw new Error(`"indent" option must be a positive integer, not ${xt}`)}this.setSchema();let H=[],le=!1;if(this.version){let xt="%YAML 1.2";this.schema.name==="yaml-1.1"&&(this.version==="1.0"?xt="%YAML:1.0":this.version==="1.1"&&(xt="%YAML 1.1")),H.push(xt),le=!0}let Ne=this.listNonDefaultTags();this.tagPrefixes.forEach(xt=>{let{handle:Ot,prefix:zt}=xt;Ne.some(vn=>vn.indexOf(zt)===0)&&(H.push(`%TAG ${Ot} ${zt}`),le=!0)}),(le||this.directivesEndMarker)&&H.push("---"),this.commentBefore&&((le||!this.directivesEndMarker)&&H.unshift(""),H.unshift(this.commentBefore.replace(/^/gm,"#")));let Me={anchors:Object.create(null),doc:this,indent:"",indentStep:" ".repeat(O),stringify:bt},Ce=!1,je=null;if(this.contents){this.contents instanceof W.Node&&(this.contents.spaceBefore&&(le||this.directivesEndMarker)&&H.push(""),this.contents.commentBefore&&H.push(this.contents.commentBefore.replace(/^/gm,"#")),Me.forceBlockIndent=!!this.comment,je=this.contents.comment);let xt=je?null:()=>Ce=!0,Ot=bt(this.contents,Me,()=>je=null,xt);H.push(W.addComment(Ot,"",je))}else this.contents!==void 0&&H.push(bt(this.contents,Me));return this.comment&&((!Ce||je)&&H[H.length-1]!==""&&H.push(""),H.push(this.comment.replace(/^/gm,"#"))),H.join(`
|
|
412
412
|
`)+`
|
|
413
|
-
`}};g._defineProperty(Z,"defaults",et),Y.Document=Z,Y.defaultOptions=ke,Y.scalarOptions=Pe}}),dl=c({"node_modules/yaml/dist/index.js"(Y){I();var g=Za(),W=ti(),Se=na(),ke=Gr(),Pe=ta();es();function et(Lt){let Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Wt=arguments.length>2?arguments[2]:void 0;Wt===void 0&&typeof Gt=="string"&&(Wt=Gt,Gt=!0);let Xt=Object.assign({},W.Document.defaults[W.defaultOptions.version],W.defaultOptions);return new Se.Schema(Xt).createNode(Lt,Gt,Wt)}var gt=class extends W.Document{constructor(Lt){super(Object.assign({},W.defaultOptions,Lt))}};function jt(Lt,Gt){let Wt=[],Xt;for(let Dn of g.parse(Lt)){let De=new gt(Gt);De.parse(Dn,Xt),Wt.push(De),Xt=De}return Wt}function at(Lt,Gt){let Wt=g.parse(Lt),Xt=new gt(Gt).parse(Wt[0]);if(Wt.length>1){let Dn="Source contains multiple documents; please use YAML.parseAllDocuments()";Xt.errors.unshift(new ke.YAMLSemanticError(Wt[1],Dn))}return Xt}function bt(Lt,Gt){let Wt=at(Lt,Gt);if(Wt.warnings.forEach(Xt=>Pe.warn(Xt)),Wt.errors.length>0)throw Wt.errors[0];return Wt.toJSON()}function Tt(Lt,Gt){let Wt=new gt(Gt);return Wt.contents=Lt,String(Wt)}var It={createNode:et,defaultOptions:W.defaultOptions,Document:gt,parse:bt,parseAllDocuments:jt,parseCST:g.parse,parseDocument:at,scalarOptions:W.scalarOptions,stringify:Tt};Y.YAML=It}}),hl=c({"node_modules/yaml/index.js"(Y,g){I(),g.exports=dl().YAML}}),ml=c({"node_modules/yaml/dist/util.js"(Y){I();var g=es(),W=Gr();Y.findPair=g.findPair,Y.parseMap=g.resolveMap,Y.parseSeq=g.resolveSeq,Y.stringifyNumber=g.stringifyNumber,Y.stringifyString=g.stringifyString,Y.toJSON=g.toJSON,Y.Type=W.Type,Y.YAMLError=W.YAMLError,Y.YAMLReferenceError=W.YAMLReferenceError,Y.YAMLSemanticError=W.YAMLSemanticError,Y.YAMLSyntaxError=W.YAMLSyntaxError,Y.YAMLWarning=W.YAMLWarning}}),qf=c({"node_modules/yaml/util.js"(Y){I();var g=ml();Y.findPair=g.findPair,Y.toJSON=g.toJSON,Y.parseMap=g.parseMap,Y.parseSeq=g.parseSeq,Y.stringifyNumber=g.stringifyNumber,Y.stringifyString=g.stringifyString,Y.Type=g.Type,Y.YAMLError=g.YAMLError,Y.YAMLReferenceError=g.YAMLReferenceError,Y.YAMLSemanticError=g.YAMLSemanticError,Y.YAMLSyntaxError=g.YAMLSyntaxError,Y.YAMLWarning=g.YAMLWarning}}),gl=c({"node_modules/yaml-unist-parser/lib/yaml.js"(Y){I(),Y.__esModule=!0;var g=hl();Y.Document=g.Document;var W=hl();Y.parseCST=W.parseCST;var Se=qf();Y.YAMLError=Se.YAMLError,Y.YAMLSyntaxError=Se.YAMLSyntaxError,Y.YAMLSemanticError=Se.YAMLSemanticError}}),ra=c({"node_modules/yaml-unist-parser/lib/parse.js"(Y){I(),Y.__esModule=!0;var g=Ku(),W=xf(),Se=Zu(),ke=Sf(),Pe=Yn(),et=tl(),gt=Re(),jt=ms(),at=Ms(),bt=pi(),Tt=Zi(),It=Ka(),Lt=gl();function Gt(Wt){var Xt=Lt.parseCST(Wt);bt.addOrigRange(Xt);for(var Dn=Xt.map(function(Ot){return new Lt.Document({merge:!1,keepCstNodes:!0}).parse(Ot)}),De=new g.default(Wt),Z=[],O={text:Wt,locator:De,comments:Z,transformOffset:function(Ot){return jt.transformOffset(Ot,O)},transformRange:function(Ot){return at.transformRange(Ot,O)},transformNode:function(Ot){return Pe.transformNode(Ot,O)},transformContent:function(Ot){return et.transformContent(Ot,O)}},H=0,le=Dn;H<le.length;H++)for(var Ne=le[H],Me=0,Ce=Ne.errors;Me<Ce.length;Me++){var je=Ce[Me];if(!(je instanceof Lt.YAMLSemanticError&&je.message==='Map keys must be unique; "<<" is repeated'))throw gt.transformError(je,O)}Dn.forEach(function(Ot){return ke.removeCstBlankLine(Ot.cstNode)});var xt=Se.createRoot(O.transformRange({origStart:0,origEnd:O.text.length}),Dn.map(O.transformNode),Z);return W.attachComments(xt),It.updatePositions(xt),Tt.removeFakeNodes(xt),xt}Y.parse=Gt}}),Uf=c({"node_modules/yaml-unist-parser/lib/index.js"(Y){I(),Y.__esModule=!0;var g=(tr(),ne(Be));g.__exportStar(ra(),Y)}});I();var Wf=he(),{hasPragma:wn}=Ee(),{locStart:yl,locEnd:Gf}=Fe();function Jf(Y){let{parse:g}=Uf();try{let W=g(Y);return delete W.comments,W}catch(W){throw W!=null&&W.position?Wf(W.message,W.position):W}}var Dl={astFormat:"yaml",parse:Jf,hasPragma:wn,locStart:yl,locEnd:Gf};s.exports={parsers:{yaml:Dl}}});return r()})})(t0);var n0=t0.exports,eb=XD(n0),tb=Os({__proto__:null,default:eb},[n0]);function r0(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function ff(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function nb(e){return r0(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}function Ra(e){return typeof e=="boolean"}var $i;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})($i||($i={}));var i0;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[is.Markdown,is.PlainText],commitCharactersSupport:!0}}}}})(i0||(i0={}));function rb(e,t){return t.length===0?e:e.replace(/{(\d+)}/g,(n,[r])=>r in t?t[r]:n)}var ib=(e,t,...n)=>rb(t,n);function Hs(){return ib}var zs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=Hs();Bo("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),Bo("dateTimeFormatWarning","String is not a RFC3339 date-time."),Bo("dateFormatWarning","String is not a RFC3339 date."),Bo("timeFormatWarning","String is not a RFC3339 time."),Bo("emailFormatWarning","String is not an e-mail address.");var Qs=function(){function e(t,n,r){r===void 0&&(r=0),this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}();(function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="null",i.value=null,i}return t})(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,i)||this;return s.type="boolean",s.value=r,s}return t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,r,i)||this;return s.type="string",s.value="",s}return t}(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,r)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Qs);function sb(e){return Ra(e)?e?{}:{not:{}}:e}var s0;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(s0||(s0={})),function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}();function Bu(e){return Ry(e)}function ab(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var n=String(e),r="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",u,l=0,b=n.length;l<b;l++)switch(u=n[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+u;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=u;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+u;break;case"*":for(var c=n[l-1],N=1;n[l+1]==="*";)N++,l++;var B=n[l+1];if(!s)r+=".*";else{var ne=N>1&&(c==="/"||c===void 0||c==="{"||c===",")&&(B==="/"||B===void 0||B===","||B==="}");ne?(B==="/"?l++:c==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=u}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var Ts=Hs(),ob="!",ub="/",lb=function(){function e(t,n){this.globWrappers=[];try{for(var r=0,i=t;r<i.length;r++){var s=i[r],a=s[0]!==ob;a||(s=s.substring(1)),s.length>0&&(s[0]===ub&&(s=s.substring(1)),this.globWrappers.push({regexp:ab("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var n=!1,r=0,i=this.globWrappers;r<i.length;r++){var s=i[r],a=s.regexp,o=s.include;a.test(t)&&(n=o)}return n},e.prototype.getURIs=function(){return this.uris},e}(),cb=function(){function e(t,n,r){this.service=t,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Vi(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return t.service.resolveSchemaContent(n,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),Vi=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e}(),Mo=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e.prototype.getSection=function(t){var n=this.getSectionRecursive(t,this.schema);if(n)return sb(n)},e.prototype.getSectionRecursive=function(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;var r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(var i=0,s=Object.keys(n.patternProperties);i<s.length;i++){var a=s[i],o=nb(a);if(o.test(r))return this.getSectionRecursive(t,n.patternProperties[a])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){var u=parseInt(r,10);if(!isNaN(u)&&n.items[u])return this.getSectionRecursive(t,n.items[u])}else if(n.items)return this.getSectionRecursive(t,n.items)}}},e}(),fb=function(){function e(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(n){var r=yi.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this;this.cachedSchemaForResource=void 0;var r=!1;t=_s(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return n.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o<s.length;o++){var u=s[o];u&&(u.url===a||u.dependencies[a])&&(u.url!==a&&i.push(u.url),u.clearSchema(),s[o]=void 0,r=!0)}return r},e.prototype.setSchemaContributions=function(t){if(t.schemas){var n=t.schemas;for(var r in n){var i=_s(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(Array.isArray(t.schemaAssociations))for(var s=t.schemaAssociations,a=0,o=s;a<o.length;a++){var u=o[a],l=u.uris.map(_s),b=this.addFilePatternAssociation(u.pattern,l);this.contributionAssociations.push(b)}},e.prototype.addSchemaHandle=function(t,n){var r=new cb(this,t,n);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)},e.prototype.addFilePatternAssociation=function(t,n){var r=new lb(t,n);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(t,n,r){var i=_s(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,n&&this.addFilePatternAssociation(n,[t]),r?this.addSchemaHandle(i,r):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var n=0,r=this.contributionAssociations;n<r.length;n++){var i=r[n];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var n=_s(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var n=Ts("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Mu(t));return this.promise.resolve(new Vi({},[n]))}return this.requestService(t).then(function(r){if(!r){var i=Ts("json.schema.nocontent","Unable to load schema from '{0}': No content.",Mu(t));return new Vi({},[i])}var s={},a=[];s=jy(r,a);var o=a.length?[Ts("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Mu(t),a[0].offset)]:[];return new Vi(s,o)},function(r){var i=r.toString(),s=r.toString().split("Error: ");return s.length>1&&(i=s[1]),ff(i,".")&&(i=i.substr(0,i.length-1)),new Vi({},[Ts("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Mu(t),i)])})},e.prototype.resolveSchemaContent=function(t,n,r){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=_s(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Mo({},[Ts("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Ts("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(B,ne){if(!ne)return B;var Q=B;return ne[0]==="/"&&(ne=ne.substr(1)),ne.split("/").some(function(I){return I=I.replace(/~1/g,"/").replace(/~0/g,"~"),Q=Q[I],!Q}),Q},b=function(B,ne,Q,I){var he=I?decodeURIComponent(I):void 0,Ee=l(ne,he);if(Ee)for(var Fe in Ee)Ee.hasOwnProperty(Fe)&&!B.hasOwnProperty(Fe)&&(B[Fe]=Ee[Fe]);else s.push(Ts("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",he,Q))},c=function(B,ne,Q,I,he){u&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(ne)&&(ne=u.resolveRelativePath(ne,I)),ne=_s(ne);var Ee=i.getOrAddSchemaHandle(ne);return Ee.getUnresolvedSchema().then(function(Fe){if(he[ne]=!0,Fe.errors.length){var Be=Q?ne+"#"+Q:ne;s.push(Ts("json.schema.problemloadingref","Problems loading reference '{0}': {1}",Be,Fe.errors[0]))}return b(B,Fe.schema,ne,Q),N(B,Fe.schema,ne,Ee.dependencies)})},N=function(B,ne,Q,I){if(!B||typeof B!="object")return Promise.resolve(null);for(var he=[B],Ee=[],Fe=[],Be=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];typeof He=="object"&&he.push(He)}},ue=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];if(typeof He=="object")for(var Ct in He){var Rt=Ct,Vt=He[Rt];typeof Vt=="object"&&he.push(Vt)}}},Ae=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];if(Array.isArray(He))for(var Ct=0,Rt=He;Ct<Rt.length;Ct++){var Vt=Rt[Ct];typeof Vt=="object"&&he.push(Vt)}}},Qe=function(Ve){for(var Xe=[];Ve.$ref;){var ze=Ve.$ref,me=ze.split("#",2);if(delete Ve.$ref,me[0].length>0){Fe.push(c(Ve,me[0],me[1],Q,I));return}else Xe.indexOf(ze)===-1&&(b(Ve,ne,Q,me[1]),Xe.push(ze))}Be(Ve.items,Ve.additionalItems,Ve.additionalProperties,Ve.not,Ve.contains,Ve.propertyNames,Ve.if,Ve.then,Ve.else),ue(Ve.definitions,Ve.properties,Ve.patternProperties,Ve.dependencies),Ae(Ve.anyOf,Ve.allOf,Ve.oneOf,Ve.items)};he.length;){var Dt=he.pop();Ee.indexOf(Dt)>=0||(Ee.push(Dt),Qe(Dt))}return i.promise.all(Fe)};return N(a,a,n,r).then(function(B){return new Mo(a,s)})},e.prototype.getSchemaForResource=function(t,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(he){return he.keyNode.value==="$schema"&&he.valueNode&&he.valueNode.type==="string"});if(r.length>0){var i=r[0].valueNode;if(i&&i.type==="string"){var s=Bu(i);if(s&&r0(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=_s(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=db(t),b=0,c=this.filePatternAssociations;b<c.length;b++){var N=c[b];if(N.matchesPattern(l))for(var B=0,ne=N.getURIs();B<ne.length;B++){var Q=ne[B];o[Q]||(u.push(Q),o[Q]=!0)}}var I=u.length>0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:I},I},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(function(s){return{$ref:s}})};return this.addSchemaHandle(r,i)},e.prototype.getMatchingSchemas=function(t,n,r){if(r){var i=r.id||"schemaservice://untitled/matchingSchemas/"+pb++;return this.resolveSchemaContent(new Vi(r),i,{}).then(function(s){return n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,n).then(function(s){return s?n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),pb=0;function _s(e){try{return yi.parse(e).toString()}catch{return e}}function db(e){try{return yi.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Mu(e){try{var t=yi.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function hb(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,"\\$&").replace(/[*]/g,".*")}function mb(e,t){if(e.length<t)return 0;for(let n=0;n<t;n++){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return t}function a0(e){try{return new RegExp(e,"u")}catch{return new RegExp(e)}}function gb(e,t){t++;for(let n=t;n<e.length;n++){const r=e.charAt(n);if(r===" "||r===" ")t++;else return t}return t}function Io(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Io(e[n],t[n]))return!1}else{const i=[];for(r in e)i.push(r);i.sort();const s=[];for(r in t)s.push(r);if(s.sort(),!Io(i,s))return!1;for(n=0;n<i.length;n++)if(!Io(e[i[n]],t[i[n]]))return!1}return!0}function _i(e){return typeof e=="number"}function Xs(e){return typeof e<"u"}function $a(e){return typeof e=="boolean"}function Va(e){return typeof e=="string"}function yb(e){return Symbol.iterator in Object(e)}function us(e){var t;return e?e instanceof Error&&(t=e.stack)!=null?t:e.toString():"null"}function pf(e){const t=e.type&&e.closestTitle;return e.title?e.title:e.$id?o0(e.$id):e.$ref||e._$ref?o0(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(" | "):t?e.type.concat("(",e.closestTitle,")"):e.type||e.closestTitle}function o0(e){const t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/);let n=!!t&&t[1];return n||(n="typeNotFound",console.error(`$ref (${e}) not parsed properly`)),n}function u0(e,t){const n=yi.parse(t);let r=Ys.basename(n.fsPath);return Ys.extname(n.fsPath)||(r+=".json"),Object.getOwnPropertyDescriptor(e,"name")?Object.getOwnPropertyDescriptor(e,"name").value+` (${r})`:e.title?e.description?e.title+" - "+e.description+` (${r})`:e.title+` (${r})`:r}function Db(e){return e.type!=="object"&&!df(e)}function df(e){return!!(e.anyOf||e.allOf||e.oneOf)}var bb=Hs(),vb=function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Hn.Error)},e.prototype.doValidation=function(t,n,r,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(c){var N=c.range.start.line+" "+c.range.start.character+" "+c.message;o[N]||(o[N]=!0,a.push(c))},l=function(c){var N=r?.trailingCommas?Iu(r.trailingCommas):Hn.Error,B=r?.comments?Iu(r.comments):s.commentSeverity,ne=r?.schemaValidation?Iu(r.schemaValidation):Hn.Warning,Q=r?.schemaRequest?Iu(r.schemaRequest):Hn.Warning;if(c){if(c.errors.length&&n.root&&Q){var I=n.root,he=I.type==="object"?I.properties[0]:void 0;if(he&&he.keyNode.value==="$schema"){var Ee=he.valueNode||he,Fe=In.create(t.positionAt(Ee.offset),t.positionAt(Ee.offset+Ee.length));u(Di.create(Fe,c.errors[0],Q,$i.SchemaResolveError))}else{var Fe=In.create(t.positionAt(I.offset),t.positionAt(I.offset+1));u(Di.create(Fe,c.errors[0],Q,$i.SchemaResolveError))}}else if(ne){var Be=n.validate(t,c.schema,ne);Be&&Be.forEach(u)}l0(c.schema)&&(B=void 0),c0(c.schema)&&(N=void 0)}for(var ue=0,Ae=n.syntaxErrors;ue<Ae.length;ue++){var Qe=Ae[ue];if(Qe.code===$i.TrailingComma){if(typeof N!="number")continue;Qe.severity=N}u(Qe)}if(typeof B=="number"){var Dt=bb("InvalidCommentToken","Comments are not permitted in JSON.");n.comments.forEach(function(Ve){u(Di.create(Ve,Dt,B,$i.CommentNotPermitted))})}return a};if(i){var b=i.id||"schemaservice://untitled/"+Eb++;return this.jsonSchemaService.resolveSchemaContent(new Vi(i),b,{}).then(function(c){return l(c)})}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(function(c){return l(c)})},e}(),Eb=0;function l0(e){if(e&&typeof e=="object"){if(Ra(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],i=l0(r);if(Ra(i))return i}}}function c0(e){if(e&&typeof e=="object"){if(Ra(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Ra(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var i=r[n],s=c0(i);if(Ra(s))return s}}}function Iu(e){switch(e){case"error":return Hn.Error;case"warning":return Hn.Warning;case"ignore":return}}var f0=48,Ab=57,Cb=65,Ou=97,xb=102;function Mr(e){return e<f0?0:e<=Ab?e-f0:(e<Ou&&(e+=Ou-Cb),e>=Ou&&e<=xb?e-Ou+10:0)}function Sb(e){if(e[0]==="#")switch(e.length){case 4:return{red:Mr(e.charCodeAt(1))*17/255,green:Mr(e.charCodeAt(2))*17/255,blue:Mr(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Mr(e.charCodeAt(1))*17/255,green:Mr(e.charCodeAt(2))*17/255,blue:Mr(e.charCodeAt(3))*17/255,alpha:Mr(e.charCodeAt(4))*17/255};case 7:return{red:(Mr(e.charCodeAt(1))*16+Mr(e.charCodeAt(2)))/255,green:(Mr(e.charCodeAt(3))*16+Mr(e.charCodeAt(4)))/255,blue:(Mr(e.charCodeAt(5))*16+Mr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Mr(e.charCodeAt(1))*16+Mr(e.charCodeAt(2)))/255,green:(Mr(e.charCodeAt(3))*16+Mr(e.charCodeAt(4)))/255,blue:(Mr(e.charCodeAt(5))*16+Mr(e.charCodeAt(6)))/255,alpha:(Mr(e.charCodeAt(7))*16+Mr(e.charCodeAt(8)))/255}}}var wb=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ff(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,b=s.items;l<b.length;l++){var c=b[l];if(c.type==="object")for(var N=0,B=c.properties;N<B.length;N++){var ne=B[N];if(ne.keyNode.value==="key"&&ne.valueNode){var Q=xa.create(t.uri,Ls(t,c));if(u.push({name:Bu(ne.valueNode),kind:Qi.Function,location:Q}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),u}}}return u}for(var I=[{node:s,containerName:""}],he=0,Ee=!1,Fe=[],Be=function(Ae,Qe){Ae.type==="array"?Ae.items.forEach(function(Dt){Dt&&I.push({node:Dt,containerName:Qe})}):Ae.type==="object"&&Ae.properties.forEach(function(Dt){var Ve=Dt.valueNode;if(Ve)if(a>0){a--;var Xe=xa.create(t.uri,Ls(t,Dt)),ze=Qe?Qe+"."+Dt.keyNode.value:Dt.keyNode.value;Fe.push({name:i.getKeyLabel(Dt),kind:i.getSymbolKind(Ve.type),location:Xe,containerName:Qe}),I.push({node:Ve,containerName:ze})}else Ee=!0})};he<I.length;){var ue=I[he++];Be(ue.node,ue.containerName)}return Ee&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),Fe},e.prototype.findDocumentSymbols2=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ff(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,b=s.items;l<b.length;l++){var c=b[l];if(c.type==="object")for(var N=0,B=c.properties;N<B.length;N++){var ne=B[N];if(ne.keyNode.value==="key"&&ne.valueNode){var Q=Ls(t,c),I=Ls(t,ne.keyNode);if(u.push({name:Bu(ne.valueNode),kind:Qi.Function,range:Q,selectionRange:I}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),u}}}return u}for(var he=[],Ee=[{node:s,result:he}],Fe=0,Be=!1,ue=function(Qe,Dt){Qe.type==="array"?Qe.items.forEach(function(Ve,Xe){if(Ve)if(a>0){a--;var ze=Ls(t,Ve),me=ze,He=String(Xe),Ct={name:He,kind:i.getSymbolKind(Ve.type),range:ze,selectionRange:me,children:[]};Dt.push(Ct),Ee.push({result:Ct.children,node:Ve})}else Be=!0}):Qe.type==="object"&&Qe.properties.forEach(function(Ve){var Xe=Ve.valueNode;if(Xe)if(a>0){a--;var ze=Ls(t,Ve),me=Ls(t,Ve.keyNode),He=[],Ct={name:i.getKeyLabel(Ve),kind:i.getSymbolKind(Xe.type),range:ze,selectionRange:me,children:He,detail:i.getDetail(Xe)};Dt.push(Ct),Ee.push({result:He,node:Xe})}else Be=!0})};Fe<Ee.length;){var Ae=Ee[Fe++];ue(Ae.node,Ae.result)}return Be&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),he},e.prototype.getSymbolKind=function(t){switch(t){case"object":return Qi.Module;case"string":return Qi.String;case"number":return Qi.Number;case"array":return Qi.Array;case"boolean":return Qi.Boolean;default:return Qi.Variable}},e.prototype.getKeyLabel=function(t){var n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"↵")),n&&n.trim()?n:'"'+n+'"'},e.prototype.getDetail=function(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(function(i){var s=[];if(i)for(var a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(i.schema),u={},l=0,b=o;l<b.length;l++){var c=b[l];if(!c.inverted&&c.schema&&(c.schema.format==="color"||c.schema.format==="color-hex")&&c.node&&c.node.type==="string"){var N=String(c.node.offset);if(!u[N]){var B=Sb(Bu(c.node));if(B){var ne=Ls(t,c.node);s.push({color:B,range:ne})}if(u[N]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})},e.prototype.getColorPresentations=function(t,n,r,i){var s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),u=Math.round(r.blue*255);function l(c){var N=c.toString(16);return N.length!==2?"0"+N:N}var b;return r.alpha===1?b="#"+l(a)+l(o)+l(u):b="#"+l(a)+l(o)+l(u)+l(Math.round(r.alpha*255)),s.push({label:b,textEdit:Nr.replace(i,JSON.stringify(b))}),s},e}();function Ls(e,t){return In.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var On=Hs(),p0={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Fb={id:On("schema.json.id","A unique identifier for the schema."),$schema:On("schema.json.$schema","The schema to verify this document against."),title:On("schema.json.title","A descriptive title of the element."),description:On("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:On("schema.json.default","A default value. Used by suggestions."),multipleOf:On("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:On("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:On("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:On("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:On("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:On("schema.json.maxLength","The maximum length of a string."),minLength:On("schema.json.minLength","The minimum length of a string."),pattern:On("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:On("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:On("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:On("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:On("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:On("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:On("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:On("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:On("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:On("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:On("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:On("schema.json.properties","A map of property names to schemas for each property."),patternProperties:On("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:On("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:On("schema.json.enum","The set of literal values that are valid."),type:On("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:On("schema.json.format","Describes the format expected for the value."),allOf:On("schema.json.allOf","An array of schemas, all of which must match."),anyOf:On("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:On("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:On("schema.json.not","A schema which must not match."),$id:On("schema.json.$id","A unique identifier for the schema."),$ref:On("schema.json.$ref","Reference a definition hosted on any location."),$comment:On("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:On("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:On("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:On("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:On("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:On("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:On("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:On("schema.json.contentEncoding","Describes the content encoding of a string property."),if:On("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:On("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:On("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(d0 in p0.schemas){ju=p0.schemas[d0];for(qa in ju.properties)Ru=ju.properties[qa],typeof Ru=="boolean"&&(Ru=ju.properties[qa]={}),hf=Fb[qa],hf?Ru.description=hf:console.log(qa+": localize('schema.json."+qa+`', "")`)}var ju,Ru,hf,qa,d0;function Nb(e,t){var n=[];return t.visit(function(r){var i;if(r.type==="property"&&r.keyNode.value==="$ref"&&((i=r.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=r.valueNode.value,a=_b(t,s);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:Tb(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Tb(e,t){return In.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function _b(e,t){var n=Lb(t);return n?mf(n,e.root):null}function mf(e,t){if(!t)return null;if(e.length===0)return t;var n=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(a){return a.keyNode.value===n});return r?mf(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(n),s=t.items[i];return s?mf(e,s):null}return null}function Lb(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(kb)}function kb(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function $u(e,t){for(const n of t.documents)if(n.internalDocument&&n.internalDocument.range[0]<=e&&n.internalDocument.range[2]>=e)return n;return t.documents.length===1?t.documents[0]:null}function h0(e){const t=["mapping","scalar","sequence"];return e?e.filter(n=>{if(typeof n=="string"){const r=n.split(" "),i=r[1]&&r[1].toLowerCase()||"scalar";return i==="map"?!1:t.indexOf(i)!==-1}return!1}):[]}function m0(e,t){if(!t||!e||t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--)if(e[n]!==t[n])return!1;return!0}var nr=Hs(),gf="Property {0} is not allowed.",Pb={"color-hex":{errorMessage:nr("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:nr("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:nr("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:nr("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:nr("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/},ipv4:{errorMessage:nr("ipv4FormatWarning","String does not match IPv4 format."),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:nr("ipv6FormatWarning","String does not match IPv6 format."),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},Vu="YAML",g0="yaml-schema: ",ai;(function(e){e.missingRequiredPropWarning="missingRequiredPropWarning",e.typeMismatchWarning="typeMismatchWarning",e.constWarning="constWarning"})(ai||(ai={}));var Bb={[ai.missingRequiredPropWarning]:'Missing property "{0}".',[ai.typeMismatchWarning]:'Incorrect type. Expected "{0}".',[ai.constWarning]:"Value must be {0}."},Ks=class{constructor(e,t,n,r){this.offset=n,this.length=r,this.parent=e,this.internalNode=t}getNodeFromOffsetEndInclusive(e){const t=[],n=a=>{if(e>=a.offset&&e<=a.offset+a.length){const o=a.children;for(let u=0;u<o.length&&o[u].offset<=e;u++){const l=n(o[u]);l&&t.push(l)}return a}return null},r=n(this);let i=Number.MAX_VALUE,s=null;for(const a of t){const o=a.length+a.offset-e+(e-a.offset);o<i&&(s=a,i=o)}return s||r}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Mb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="null",this.value=null}},Ib=class extends Ks{constructor(e,t,n,r,i){super(e,t,r,i),this.type="boolean",this.value=n}},Ob=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="array",this.items=[]}get children(){return this.items}},jb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},qu=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="string",this.value=""}},Rb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="property",this.colonOffset=-1}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},$b=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="object",this.properties=[]}get children(){return this.properties}};function oi(e){if(e!==void 0)return $a(e)?e?{}:{not:{}}:(typeof e!="object"&&(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),e={type:e}),e)}var y0;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(y0||(y0={}));var Vb=class yg{constructor(t=-1,n=null){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){this.schemas.push(...t.schemas)}include(t){return(this.focusOffset===-1||D0(t,this.focusOffset))&&t!==this.exclude}newSub(){return new yg(-1,this.exclude)}},Oo=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Oo.instance=new Oo;var fi=class{constructor(e){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,e?this.enumValues=[]:this.enumValues=null}hasProblems(){return!!this.problems.length}mergeAll(e){for(const t of e)this.merge(t)}merge(e){this.problems=this.problems.concat(e.problems)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const t of this.problems)t.code===$i.EnumValueMismatch&&(t.message=nr("enumWarning","Value is not accepted. Valid values: {0}.",[...new Set(this.enumValues)].map(n=>JSON.stringify(n)).join(", ")))}}mergeWarningGeneric(e,t){var n,r;if((n=this.problems)!=null&&n.length)for(const i of t){const s=this.problems.filter(a=>a.problemType===i);for(const a of s){const o=(r=e.problems)==null?void 0:r.find(u=>u.problemType===i&&a.location.offset===u.location.offset&&(i!==ai.missingRequiredPropWarning||m0(u.problemArgs,a.problemArgs)));o&&(o.problemArgs.length&&(o.problemArgs.filter(u=>!a.problemArgs.includes(u)).forEach(u=>a.problemArgs.push(u)),a.message=Uu(a.problemType,a.problemArgs)),this.mergeSources(o,a))}}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,t){const n=e.source.replace(g0,"");t.source.includes(n)||(t.source=t.source+" | "+n),t.schemaUri.includes(e.schemaUri[0])||(t.schemaUri=t.schemaUri.concat(e.schemaUri))}compareGeneric(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesMatches-e.propertiesMatches}compareKubernetes(e){const t=this.hasProblems();return this.propertiesMatches!==e.propertiesMatches?this.propertiesMatches-e.propertiesMatches:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:t!==e.hasProblems()?t?-1:1:this.propertiesMatches-e.propertiesMatches}};function Ua(e){switch(e.type){case"array":return e.children.map(Ua);case"object":{const t=Object.create(null);for(let n=0,r=e.children;n<r.length;n++){const i=r[n],s=i.children[1];s&&(t[i.children[0].value]=Ua(s))}return t}case"null":case"string":case"number":case"boolean":return e.value;default:return}}function D0(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function b0(e,t,n){if(n===void 0&&(n=!1),D0(e,t,n)){const r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){const s=b0(r[i],t,n);if(s)return s}return e}}var qb=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return b0(this.root,e,t)}getNodeFromOffsetEndInclusive(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)}visit(e){if(this.root){const t=n=>{let r=e(n);const i=n.children;if(Array.isArray(i))for(let s=0;s<i.length&&r;s++)r=t(i[s]);return r};t(this.root)}}validate(e,t){if(this.root&&t){const n=new fi(this.isKubernetes);return zr(this.root,t,t,n,Oo.instance,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri}),n.problems.map(r=>{const i=In.create(e.positionAt(r.location.offset),e.positionAt(r.location.offset+r.location.length)),s=Di.create(i,r.message,r.severity,r.code?r.code:$i.Undefined,r.source);return s.data={schemaUri:r.schemaUri,...r.data},s})}return null}getMatchingSchemas(e,t=-1,n=null,r){const i=new Vb(t,n);return this.root&&e&&zr(this.root,e,e,new fi(this.isKubernetes),i,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r}),i.schemas}};function zr(e,t,n,r,i,s){const{isKubernetes:a,callFromAutoComplete:o}=s;if(!e||typeof t!="object")return;switch(t.url||(t.url=n.url),t.closestTitle=t.title||n.closestTitle,e.type){case"object":N(e,t,r,i);break;case"array":c(e,t,r,i);break;case"string":b(e,t,r);break;case"number":l(e,t,r);break;case"property":return zr(e.valueNode,t,t,r,i,s)}u(),i.add({node:e,schema:t});function u(){function Q(ue){return e.type===ue||ue==="integer"&&e.type==="number"&&e.isInteger}if(Array.isArray(t.type))t.type.some(Q)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:t.errorMessage||nr("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", ")),source:hr(t,n),schemaUri:mr(t,n)});else if(t.type&&!Q(t.type)){const ue=t.type==="object"?pf(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:t.errorMessage||Uu(ai.typeMismatchWarning,[ue]),source:hr(t,n),schemaUri:mr(t,n),problemType:ai.typeMismatchWarning,problemArgs:[ue]})}if(Array.isArray(t.allOf))for(const ue of t.allOf)zr(e,oi(ue),t,r,i,s);const I=oi(t.not);if(I){const ue=new fi(a),Ae=i.newSub();zr(e,I,t,ue,Ae,s),ue.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:nr("notSchemaWarning","Matches a schema that is not allowed."),source:hr(t,n),schemaUri:mr(t,n)});for(const Qe of Ae.schemas)Qe.inverted=!Qe.inverted,i.add(Qe)}const he=(ue,Ae)=>{var Qe;const Dt=[],Ve=[],Xe=[];let ze=null;for(const me of ue){const He={...oi(me)},Ct=new fi(a),Rt=i.newSub();zr(e,He,t,Ct,Rt,s),(!Ct.hasProblems()||o)&&(Dt.push(He),Ve.push(He),Ct.propertiesMatches===0&&Xe.push(He),He.format&&Ve.pop()),ze?a?ze=B(Ct,ze,He,Rt):ze=ne(e,Ae,Ct,ze,He,Rt):ze={schema:He,validationResult:Ct,matchingSchemas:Rt}}return Ve.length>1&&(Ve.length>1||Xe.length===0)&&Ae&&r.problems.push({location:{offset:e.offset,length:1},severity:Hn.Warning,message:nr("oneOfWarning","Matches multiple schemas when only one must validate."),source:hr(t,n),schemaUri:mr(t,n)}),ze!==null&&(r.merge(ze.validationResult),r.propertiesMatches+=ze.validationResult.propertiesMatches,r.propertiesValueMatches+=ze.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||ze.validationResult.enumValueMatch,(Qe=ze.validationResult.enumValues)!=null&&Qe.length&&(r.enumValues=(r.enumValues||[]).concat(ze.validationResult.enumValues)),i.merge(ze.matchingSchemas)),Dt.length};Array.isArray(t.anyOf)&&he(t.anyOf,!1),Array.isArray(t.oneOf)&&he(t.oneOf,!0);const Ee=(ue,Ae)=>{const Qe=new fi(a),Dt=i.newSub();zr(e,oi(ue),Ae,Qe,Dt,s),r.merge(Qe),r.propertiesMatches+=Qe.propertiesMatches,r.propertiesValueMatches+=Qe.propertiesValueMatches,i.merge(Dt)},Fe=(ue,Ae,Qe,Dt)=>{const Ve=oi(ue),Xe=new fi(a),ze=i.newSub();zr(e,Ve,Ae,Xe,ze,s),i.merge(ze);const{filePatternAssociation:me}=Ve;me&&(new cv(me).matchesPattern(s.uri)||Xe.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:nr("ifFilePatternAssociation",`filePatternAssociation '${me}' does not match with doc uri '${s.uri}'.`),source:hr(t,Ae),schemaUri:mr(t,Ae)})),Xe.hasProblems()?Dt&&Ee(Dt,Ae):Qe&&Ee(Qe,Ae)},Be=oi(t.if);if(Be&&Fe(Be,t,oi(t.then),oi(t.else)),Array.isArray(t.enum)){const ue=Ua(e);let Ae=!1;for(const Qe of t.enum)if(Io(ue,Qe)||o&&Va(ue)&&Va(Qe)&&ue&&Qe.startsWith(ue)){Ae=!0;break}r.enumValues=t.enum,r.enumValueMatch=Ae,Ae||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,code:$i.EnumValueMismatch,message:t.errorMessage||nr("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(Qe=>JSON.stringify(Qe)).join(", ")),source:hr(t,n),schemaUri:mr(t,n)})}if(Xs(t.const)){const ue=Ua(e);!Io(ue,t.const)&&!(o&&Va(ue)&&Va(t.const)&&t.const.startsWith(ue))?(r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,code:$i.EnumValueMismatch,problemType:ai.constWarning,message:t.errorMessage||Uu(ai.constWarning,[JSON.stringify(t.const)]),source:hr(t,n),schemaUri:mr(t,n),problemArgs:[JSON.stringify(t.const)]}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[t.const]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Hn.Warning,message:t.deprecationMessage,source:hr(t,n),schemaUri:mr(t,n)})}function l(Q,I,he){const Ee=Q.value;_i(I.multipleOf)&&Ee%I.multipleOf!==0&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("multipleOfWarning","Value is not divisible by {0}.",I.multipleOf),source:hr(I,n),schemaUri:mr(I,n)});function Fe(Ve,Xe){if(_i(Xe))return Xe;if($a(Xe)&&Xe)return Ve}function Be(Ve,Xe){if(!$a(Xe)||!Xe)return Ve}const ue=Fe(I.minimum,I.exclusiveMinimum);_i(ue)&&Ee<=ue&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",ue),source:hr(I,n),schemaUri:mr(I,n)});const Ae=Fe(I.maximum,I.exclusiveMaximum);_i(Ae)&&Ee>=Ae&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",Ae),source:hr(I,n),schemaUri:mr(I,n)});const Qe=Be(I.minimum,I.exclusiveMinimum);_i(Qe)&&Ee<Qe&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minimumWarning","Value is below the minimum of {0}.",Qe),source:hr(I,n),schemaUri:mr(I,n)});const Dt=Be(I.maximum,I.exclusiveMaximum);_i(Dt)&&Ee>Dt&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maximumWarning","Value is above the maximum of {0}.",Dt),source:hr(I,n),schemaUri:mr(I,n)})}function b(Q,I,he){if(_i(I.minLength)&&Q.value.length<I.minLength&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minLengthWarning","String is shorter than the minimum length of {0}.",I.minLength),source:hr(I,n),schemaUri:mr(I,n)}),_i(I.maxLength)&&Q.value.length>I.maxLength&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maxLengthWarning","String is longer than the maximum length of {0}.",I.maxLength),source:hr(I,n),schemaUri:mr(I,n)}),Va(I.pattern)&&(a0(I.pattern).test(Q.value)||he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||nr("patternWarning",'String does not match the pattern of "{0}".',I.pattern),source:hr(I,n),schemaUri:mr(I,n)})),I.format)switch(I.format){case"uri":case"uri-reference":{let Ee;if(!Q.value)Ee=nr("uriEmpty","URI expected.");else try{!yi.parse(Q.value).scheme&&I.format==="uri"&&(Ee=nr("uriSchemeMissing","URI with a scheme is expected."))}catch(Fe){Ee=Fe.message}Ee&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||nr("uriFormatWarning","String is not a URI: {0}",Ee),source:hr(I,n),schemaUri:mr(I,n)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"ipv4":case"ipv6":{const Ee=Pb[I.format];(!Q.value||!Ee.pattern.test(Q.value))&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||Ee.errorMessage,source:hr(I,n),schemaUri:mr(I,n)})}break}}function c(Q,I,he,Ee){if(Array.isArray(I.items)){const Be=I.items;for(let ue=0;ue<Be.length;ue++){const Ae=Be[ue],Qe=oi(Ae),Dt=new fi(a),Ve=Q.items[ue];Ve?(zr(Ve,Qe,I,Dt,Ee,s),he.mergePropertyMatch(Dt),he.mergeEnumValues(Dt)):Q.items.length>=Be.length&&he.propertiesValueMatches++}if(Q.items.length>Be.length)if(typeof I.additionalItems=="object")for(let ue=Be.length;ue<Q.items.length;ue++){const Ae=new fi(a);zr(Q.items[ue],I.additionalItems,I,Ae,Ee,s),he.mergePropertyMatch(Ae),he.mergeEnumValues(Ae)}else I.additionalItems===!1&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",Be.length),source:hr(I,n),schemaUri:mr(I,n)})}else{const Be=oi(I.items);if(Be){const ue=new fi(a);Q.items.forEach(Ae=>{if(Be.oneOf&&Be.oneOf.length===1){const Qe=Be.oneOf[0],Dt={...oi(Qe)};Dt.title=I.title,Dt.closestTitle=I.closestTitle,zr(Ae,Dt,I,ue,Ee,s),he.mergePropertyMatch(ue),he.mergeEnumValues(ue)}else zr(Ae,Be,I,ue,Ee,s),he.mergePropertyMatch(ue),he.mergeEnumValues(ue)})}}const Fe=oi(I.contains);if(Fe&&(Q.items.some(ue=>{const Ae=new fi(a);return zr(ue,Fe,I,Ae,Oo.instance,s),!Ae.hasProblems()})||he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.errorMessage||nr("requiredItemMissingWarning","Array does not contain required item."),source:hr(I,n),schemaUri:mr(I,n)})),_i(I.minItems)&&Q.items.length<I.minItems&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minItemsWarning","Array has too few items. Expected {0} or more.",I.minItems),source:hr(I,n),schemaUri:mr(I,n)}),_i(I.maxItems)&&Q.items.length>I.maxItems&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maxItemsWarning","Array has too many items. Expected {0} or fewer.",I.maxItems),source:hr(I,n),schemaUri:mr(I,n)}),I.uniqueItems===!0){const Be=Ua(Q);Be.some((Ae,Qe)=>Qe!==Be.lastIndexOf(Ae))&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("uniqueItemsWarning","Array has duplicate items."),source:hr(I,n),schemaUri:mr(I,n)})}}function N(Q,I,he,Ee){var Fe;const Be=Object.create(null),ue=[],Ae=[...Q.properties];for(;Ae.length>0;){const Ve=Ae.pop(),Xe=Ve.keyNode.value;if(Xe==="<<"&&Ve.valueNode)switch(Ve.valueNode.type){case"object":{Ae.push(...Ve.valueNode.properties);break}case"array":{Ve.valueNode.items.forEach(ze=>{ze&&yb(ze.properties)&&Ae.push(...ze.properties)});break}}else Be[Xe]=Ve.valueNode,ue.push(Xe)}if(Array.isArray(I.required)){for(const Ve of I.required)if(Be[Ve]===void 0){const Xe=Q.parent&&Q.parent.type==="property"&&Q.parent.keyNode,ze=Xe?{offset:Xe.offset,length:Xe.length}:{offset:Q.offset,length:1};he.problems.push({location:ze,severity:Hn.Warning,message:Uu(ai.missingRequiredPropWarning,[Ve]),source:hr(I,n),schemaUri:mr(I,n),problemArgs:[Ve],problemType:ai.missingRequiredPropWarning})}}const Qe=Ve=>{let Xe=ue.indexOf(Ve);for(;Xe>=0;)ue.splice(Xe,1),Xe=ue.indexOf(Ve)};if(I.properties)for(const Ve of Object.keys(I.properties)){Qe(Ve);const Xe=I.properties[Ve],ze=Be[Ve];if(ze)if($a(Xe))if(Xe)he.propertiesMatches++,he.propertiesValueMatches++;else{const me=ze.parent;he.problems.push({location:{offset:me.keyNode.offset,length:me.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,Ve),source:hr(I,n),schemaUri:mr(I,n)})}else{Xe.url=(Fe=I.url)!=null?Fe:n.url;const me=new fi(a);zr(ze,Xe,I,me,Ee,s),he.mergePropertyMatch(me),he.mergeEnumValues(me)}}if(I.patternProperties)for(const Ve of Object.keys(I.patternProperties)){const Xe=a0(Ve);for(const ze of ue.slice(0))if(Xe.test(ze)){Qe(ze);const me=Be[ze];if(me){const He=I.patternProperties[Ve];if($a(He))if(He)he.propertiesMatches++,he.propertiesValueMatches++;else{const Ct=me.parent;he.problems.push({location:{offset:Ct.keyNode.offset,length:Ct.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,ze),source:hr(I,n),schemaUri:mr(I,n)})}else{const Ct=new fi(a);zr(me,He,I,Ct,Ee,s),he.mergePropertyMatch(Ct),he.mergeEnumValues(Ct)}}}}if(typeof I.additionalProperties=="object")for(const Ve of ue){const Xe=Be[Ve];if(Xe){const ze=new fi(a);zr(Xe,I.additionalProperties,I,ze,Ee,s),he.mergePropertyMatch(ze),he.mergeEnumValues(ze)}}else if((I.additionalProperties===!1||I.type==="object"&&I.additionalProperties===void 0&&s.disableAdditionalProperties===!0)&&ue.length>0){const Ve=I.properties&&Object.keys(I.properties).filter(Xe=>!Be[Xe]);for(const Xe of ue){const ze=Be[Xe];if(ze){let me=null;ze.type!=="property"?(me=ze.parent,me.type==="object"&&(me=me.properties[0])):me=ze;const He={location:{offset:me.keyNode.offset,length:me.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,Xe),source:hr(I,n),schemaUri:mr(I,n)};Ve?.length&&(He.data={properties:Ve}),he.problems.push(He)}}}if(_i(I.maxProperties)&&Q.properties.length>I.maxProperties&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("MaxPropWarning","Object has more properties than limit of {0}.",I.maxProperties),source:hr(I,n),schemaUri:mr(I,n)}),_i(I.minProperties)&&Q.properties.length<I.minProperties&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("MinPropWarning","Object has fewer properties than the required number of {0}",I.minProperties),source:hr(I,n),schemaUri:mr(I,n)}),I.dependencies){for(const Ve of Object.keys(I.dependencies))if(Be[Ve]){const ze=I.dependencies[Ve];if(Array.isArray(ze))for(const me of ze)Be[me]?he.propertiesValueMatches++:he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",me,Ve),source:hr(I,n),schemaUri:mr(I,n)});else{const me=oi(ze);if(me){const He=new fi(a);zr(Q,me,I,He,Ee,s),he.mergePropertyMatch(He),he.mergeEnumValues(He)}}}}const Dt=oi(I.propertyNames);if(Dt)for(const Ve of Q.properties){const Xe=Ve.keyNode;Xe&&zr(Xe,Dt,I,he,Oo.instance,s)}}function B(Q,I,he,Ee){const Fe=Q.compareKubernetes(I.validationResult);return Fe>0?I={schema:he,validationResult:Q,matchingSchemas:Ee}:Fe===0&&(I.matchingSchemas.merge(Ee),I.validationResult.mergeEnumValues(Q)),I}function ne(Q,I,he,Ee,Fe,Be){if(!I&&!he.hasProblems()&&(!Ee.validationResult.hasProblems()||o))Ee.matchingSchemas.merge(Be),Ee.validationResult.propertiesMatches+=he.propertiesMatches,Ee.validationResult.propertiesValueMatches+=he.propertiesValueMatches;else{const ue=he.compareGeneric(Ee.validationResult);ue>0||ue===0&&I&&Ee.schema.type==="object"&&Q.type!=="null"&&Q.type!==Ee.schema.type?Ee={schema:Fe,validationResult:he,matchingSchemas:Be}:ue===0&&(Ee.matchingSchemas.merge(Be),Ee.validationResult.mergeEnumValues(he),Ee.validationResult.mergeWarningGeneric(he,[ai.missingRequiredPropWarning,ai.typeMismatchWarning,ai.constWarning]))}return Ee}}function hr(e,t){var n;if(e){let r;if(e.title)r=e.title;else if(e.closestTitle)r=e.closestTitle;else if(t.closestTitle)r=t.closestTitle;else{const i=(n=e.url)!=null?n:t.url;if(i){const s=yi.parse(i);s.scheme==="file"&&(r=s.fsPath),r=s.toString()}}if(r)return`${g0}${r}`}return Vu}function mr(e,t){var n;const r=(n=e.url)!=null?n:t.url;return r?[r]:[]}function Uu(e,t){return nr(e,Bb[e],t.join(" | "))}var Ub=1e3,yf=0,Df=new Set;function Wa(e,t,n,r){if(e||(yf=0),!t)return null;if(Pr(t))return Wb(t,e,n,r);if(dr(t))return Gb(t,e,n,r);if(Br(t))return Jb(t,e,n,r);if(qn(t))return Yb(t,e);if(Xi(t)&&!Df.has(t)&&yf<Ub){Df.add(t);const i=Hb(t,e,n,r);return Df.delete(t),i}else return}function Wb(e,t,n,r){let i;e.flow&&!e.range?i=zb(e):i=e.range;const s=new $b(t,e,...v0(i,r));for(const a of e.items)dr(a)&&s.properties.push(Wa(s,a,n,r));return s}function Gb(e,t,n,r){const i=e.key,s=e.value,a=i.range[0];let o=i.range[1],u=i.range[2];s&&(o=s.range[1],u=s.range[2]);const l=new Rb(t,e,...v0([a,o,u],r));if(Xi(i)){const b=new qu(t,i,...ks(i.range));b.value=i.source,l.keyNode=b}else l.keyNode=Wa(l,i,n,r);return l.valueNode=Wa(l,s,n,r),l}function Jb(e,t,n,r){const i=new Ob(t,e,...ks(e.range));for(const s of e.items)if(yr(s)){const a=Wa(i,s,n,r);a&&i.children.push(a)}return i}function Yb(e,t){if(e.value===null)return new Mb(t,e,...ks(e.range));switch(typeof e.value){case"string":{const n=new qu(t,e,...ks(e.range));return n.value=e.value,n}case"boolean":return new Ib(t,e,e.value,...ks(e.range));case"number":{const n=new jb(t,e,...ks(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{const n=new qu(t,e,...ks(e.range));return n.value=e.source,n}}}function Hb(e,t,n,r){yf++;const i=e.resolve(n);if(i)return Wa(t,i,n,r);{const s=new qu(t,e,...ks(e.range));return s.value=e.source,s}}function ks(e){return[e[0],e[1]-e[0]]}function v0(e,t){const n=t.linePos(e[0]),r=t.linePos(e[1]),i=[e[0],e[1]-e[0]];return n.line!==r.line&&(t.lineStarts.length!==r.line||r.col===1)&&i[1]--,i}function zb(e){let t=Number.MAX_SAFE_INTEGER,n=0;for(const r of e.items)dr(r)&&(yr(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),yr(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Qb(e,t){let n;if(wr(e,(r,i,s)=>{if(i===t)return n=s[s.length-1],wr.BREAK}),!xo(n))return n}function Xb(e){if(e.items.length>1)return!1;const t=e.items[0];return qn(t.key)&&qn(t.value)&&t.key.value===""&&!t.value.value}function Kb(e,t){for(const[n,r]of e.items.entries())if(t===r)return n}function Zb(e,t){let n=!1;for(const r of e){if(r.type==="document")bf([],r,i=>{var s;if(E0(i)&&((s=i.value)==null?void 0:s.type)==="comment"){if(r.offset<=t&&i.value.source.length+i.value.offset>=t)return n=!0,wr.BREAK}else if(i.type==="comment"&&i.offset<=t&&i.offset+i.source.length>=t)return n=!0,wr.BREAK});else if(r.type==="comment"&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function E0(e){return e.start!==void 0}function bf(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const s of["key","value"]){const a=t[s];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){const u=bf(Object.freeze(e.concat([[s,o]])),a.items[o],n);if(typeof u=="number")o=u-1;else{if(u===wr.BREAK)return wr.BREAK;u===wr.REMOVE&&(a.items.splice(o,1),o-=1)}}typeof r=="function"&&s==="key"&&(r=r(t,e))}}const i=t.sep;if(i)for(let s=0;s<i.length;++s){const a=bf(Object.freeze(e),i[s],n);if(typeof a=="number")s=a-1;else{if(a===wr.BREAK)return wr.BREAK;a===wr.REMOVE&&(i.items.splice(s,1),s-=1)}}return typeof r=="function"?r(t,e):r}var A0=class Dg extends qb{constructor(t){super(null,[]),this.lineCounter=t}clone(){const t=new Dg(this.lineCounter);return t.isKubernetes=this.isKubernetes,t.disableAdditionalProperties=this.disableAdditionalProperties,t.uri=this.uri,t.currentDocIndex=this.currentDocIndex,t._lineComments=this.lineComments.slice(),t.internalDocument=this._internalDocument.clone(),t}collectLineComments(){this._lineComments=[],this._internalDocument.commentBefore&&this._internalDocument.commentBefore.split(`
|
|
413
|
+
`}};g._defineProperty(Z,"defaults",et),Y.Document=Z,Y.defaultOptions=ke,Y.scalarOptions=Pe}}),dl=c({"node_modules/yaml/dist/index.js"(Y){I();var g=Za(),W=ti(),Se=na(),ke=Gr(),Pe=ta();es();function et(Lt){let Gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Wt=arguments.length>2?arguments[2]:void 0;Wt===void 0&&typeof Gt=="string"&&(Wt=Gt,Gt=!0);let Xt=Object.assign({},W.Document.defaults[W.defaultOptions.version],W.defaultOptions);return new Se.Schema(Xt).createNode(Lt,Gt,Wt)}var gt=class extends W.Document{constructor(Lt){super(Object.assign({},W.defaultOptions,Lt))}};function jt(Lt,Gt){let Wt=[],Xt;for(let Dn of g.parse(Lt)){let De=new gt(Gt);De.parse(Dn,Xt),Wt.push(De),Xt=De}return Wt}function at(Lt,Gt){let Wt=g.parse(Lt),Xt=new gt(Gt).parse(Wt[0]);if(Wt.length>1){let Dn="Source contains multiple documents; please use YAML.parseAllDocuments()";Xt.errors.unshift(new ke.YAMLSemanticError(Wt[1],Dn))}return Xt}function bt(Lt,Gt){let Wt=at(Lt,Gt);if(Wt.warnings.forEach(Xt=>Pe.warn(Xt)),Wt.errors.length>0)throw Wt.errors[0];return Wt.toJSON()}function Tt(Lt,Gt){let Wt=new gt(Gt);return Wt.contents=Lt,String(Wt)}var It={createNode:et,defaultOptions:W.defaultOptions,Document:gt,parse:bt,parseAllDocuments:jt,parseCST:g.parse,parseDocument:at,scalarOptions:W.scalarOptions,stringify:Tt};Y.YAML=It}}),hl=c({"node_modules/yaml/index.js"(Y,g){I(),g.exports=dl().YAML}}),ml=c({"node_modules/yaml/dist/util.js"(Y){I();var g=es(),W=Gr();Y.findPair=g.findPair,Y.parseMap=g.resolveMap,Y.parseSeq=g.resolveSeq,Y.stringifyNumber=g.stringifyNumber,Y.stringifyString=g.stringifyString,Y.toJSON=g.toJSON,Y.Type=W.Type,Y.YAMLError=W.YAMLError,Y.YAMLReferenceError=W.YAMLReferenceError,Y.YAMLSemanticError=W.YAMLSemanticError,Y.YAMLSyntaxError=W.YAMLSyntaxError,Y.YAMLWarning=W.YAMLWarning}}),qf=c({"node_modules/yaml/util.js"(Y){I();var g=ml();Y.findPair=g.findPair,Y.toJSON=g.toJSON,Y.parseMap=g.parseMap,Y.parseSeq=g.parseSeq,Y.stringifyNumber=g.stringifyNumber,Y.stringifyString=g.stringifyString,Y.Type=g.Type,Y.YAMLError=g.YAMLError,Y.YAMLReferenceError=g.YAMLReferenceError,Y.YAMLSemanticError=g.YAMLSemanticError,Y.YAMLSyntaxError=g.YAMLSyntaxError,Y.YAMLWarning=g.YAMLWarning}}),gl=c({"node_modules/yaml-unist-parser/lib/yaml.js"(Y){I(),Y.__esModule=!0;var g=hl();Y.Document=g.Document;var W=hl();Y.parseCST=W.parseCST;var Se=qf();Y.YAMLError=Se.YAMLError,Y.YAMLSyntaxError=Se.YAMLSyntaxError,Y.YAMLSemanticError=Se.YAMLSemanticError}}),ra=c({"node_modules/yaml-unist-parser/lib/parse.js"(Y){I(),Y.__esModule=!0;var g=Ku(),W=xf(),Se=Zu(),ke=Sf(),Pe=Yn(),et=tl(),gt=Re(),jt=ms(),at=Ms(),bt=pi(),Tt=Zi(),It=Ka(),Lt=gl();function Gt(Wt){var Xt=Lt.parseCST(Wt);bt.addOrigRange(Xt);for(var Dn=Xt.map(function(Ot){return new Lt.Document({merge:!1,keepCstNodes:!0}).parse(Ot)}),De=new g.default(Wt),Z=[],O={text:Wt,locator:De,comments:Z,transformOffset:function(Ot){return jt.transformOffset(Ot,O)},transformRange:function(Ot){return at.transformRange(Ot,O)},transformNode:function(Ot){return Pe.transformNode(Ot,O)},transformContent:function(Ot){return et.transformContent(Ot,O)}},H=0,le=Dn;H<le.length;H++)for(var Ne=le[H],Me=0,Ce=Ne.errors;Me<Ce.length;Me++){var je=Ce[Me];if(!(je instanceof Lt.YAMLSemanticError&&je.message==='Map keys must be unique; "<<" is repeated'))throw gt.transformError(je,O)}Dn.forEach(function(Ot){return ke.removeCstBlankLine(Ot.cstNode)});var xt=Se.createRoot(O.transformRange({origStart:0,origEnd:O.text.length}),Dn.map(O.transformNode),Z);return W.attachComments(xt),It.updatePositions(xt),Tt.removeFakeNodes(xt),xt}Y.parse=Gt}}),Uf=c({"node_modules/yaml-unist-parser/lib/index.js"(Y){I(),Y.__esModule=!0;var g=(tr(),ne(Be));g.__exportStar(ra(),Y)}});I();var Wf=he(),{hasPragma:wn}=Ee(),{locStart:yl,locEnd:Gf}=Fe();function Jf(Y){let{parse:g}=Uf();try{let W=g(Y);return delete W.comments,W}catch(W){throw W!=null&&W.position?Wf(W.message,W.position):W}}var Dl={astFormat:"yaml",parse:Jf,hasPragma:wn,locStart:yl,locEnd:Gf};s.exports={parsers:{yaml:Dl}}});return r()})})(t0);var n0=t0.exports,eb=XD(n0),tb=Os({__proto__:null,default:eb},[n0]);function r0(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function ff(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:n===0?e===t:!1}function nb(e){return r0(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}function Ra(e){return typeof e=="boolean"}var $i;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})($i||($i={}));var i0;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[is.Markdown,is.PlainText],commitCharactersSupport:!0}}}}})(i0||(i0={}));function rb(e,t){return t.length===0?e:e.replace(/{(\d+)}/g,(n,[r])=>r in t?t[r]:n)}var ib=(e,t,...n)=>rb(t,n);function Hs(){return ib}var zs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(r[s]=i[s])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bo=Hs();Bo("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),Bo("dateTimeFormatWarning","String is not a RFC3339 date-time."),Bo("dateFormatWarning","String is not a RFC3339 date."),Bo("timeFormatWarning","String is not a RFC3339 time."),Bo("emailFormatWarning","String is not an e-mail address.");var Qs=function(){function e(t,n,r){r===void 0&&(r=0),this.offset=n,this.length=r,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}();(function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="null",i.value=null,i}return t})(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,i)||this;return s.type="boolean",s.value=r,s}return t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,r,i)||this;return s.type="string",s.value="",s}return t}(Qs),function(e){zs(t,e);function t(n,r,i){var s=e.call(this,n,r)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}(Qs),function(e){zs(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}(Qs);function sb(e){return Ra(e)?e?{}:{not:{}}:e}var s0;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(s0||(s0={})),function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}();function Bu(e){return Ry(e)}function ab(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var n=String(e),r="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",u,l=0,b=n.length;l<b;l++)switch(u=n[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":r+="\\"+u;break;case"?":if(i){r+=".";break}case"[":case"]":if(i){r+=u;break}case"{":if(i){a=!0,r+="(";break}case"}":if(i){a=!1,r+=")";break}case",":if(a){r+="|";break}r+="\\"+u;break;case"*":for(var c=n[l-1],N=1;n[l+1]==="*";)N++,l++;var B=n[l+1];if(!s)r+=".*";else{var ne=N>1&&(c==="/"||c===void 0||c==="{"||c===",")&&(B==="/"||B===void 0||B===","||B==="}");ne?(B==="/"?l++:c==="/"&&r.endsWith("\\/")&&(r=r.substr(0,r.length-2)),r+="((?:[^/]*(?:/|$))*)"):r+="([^/]*)"}break;default:r+=u}return(!o||!~o.indexOf("g"))&&(r="^"+r+"$"),new RegExp(r,o)}var Ts=Hs(),ob="!",ub="/",lb=function(){function e(t,n){this.globWrappers=[];try{for(var r=0,i=t;r<i.length;r++){var s=i[r],a=s[0]!==ob;a||(s=s.substring(1)),s.length>0&&(s[0]===ub&&(s=s.substring(1)),this.globWrappers.push({regexp:ab("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=n}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var n=!1,r=0,i=this.globWrappers;r<i.length;r++){var s=i[r],a=s.regexp,o=s.include;a.test(t)&&(n=o)}return n},e.prototype.getURIs=function(){return this.uris},e}(),cb=function(){function e(t,n,r){this.service=t,this.url=n,this.dependencies={},r&&(this.unresolvedSchema=this.service.promise.resolve(new Vi(r)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(n){return t.service.resolveSchemaContent(n,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),Vi=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e}(),Mo=function(){function e(t,n){n===void 0&&(n=[]),this.schema=t,this.errors=n}return e.prototype.getSection=function(t){var n=this.getSectionRecursive(t,this.schema);if(n)return sb(n)},e.prototype.getSectionRecursive=function(t,n){if(!n||typeof n=="boolean"||t.length===0)return n;var r=t.shift();if(n.properties&&typeof n.properties[r])return this.getSectionRecursive(t,n.properties[r]);if(n.patternProperties)for(var i=0,s=Object.keys(n.patternProperties);i<s.length;i++){var a=s[i],o=nb(a);if(o.test(r))return this.getSectionRecursive(t,n.patternProperties[a])}else{if(typeof n.additionalProperties=="object")return this.getSectionRecursive(t,n.additionalProperties);if(r.match("[0-9]+")){if(Array.isArray(n.items)){var u=parseInt(r,10);if(!isNaN(u)&&n.items[u])return this.getSectionRecursive(t,n.items[u])}else if(n.items)return this.getSectionRecursive(t,n.items)}}},e}(),fb=function(){function e(t,n,r){this.contextService=n,this.requestService=t,this.promiseConstructor=r||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(n){var r=yi.parse(n).scheme;return r!=="schemaservice"&&(!t||t(r))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var n=this;this.cachedSchemaForResource=void 0;var r=!1;t=_s(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return n.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o<s.length;o++){var u=s[o];u&&(u.url===a||u.dependencies[a])&&(u.url!==a&&i.push(u.url),u.clearSchema(),s[o]=void 0,r=!0)}return r},e.prototype.setSchemaContributions=function(t){if(t.schemas){var n=t.schemas;for(var r in n){var i=_s(r);this.contributionSchemas[i]=this.addSchemaHandle(i,n[r])}}if(Array.isArray(t.schemaAssociations))for(var s=t.schemaAssociations,a=0,o=s;a<o.length;a++){var u=o[a],l=u.uris.map(_s),b=this.addFilePatternAssociation(u.pattern,l);this.contributionAssociations.push(b)}},e.prototype.addSchemaHandle=function(t,n){var r=new cb(this,t,n);return this.schemasById[t]=r,r},e.prototype.getOrAddSchemaHandle=function(t,n){return this.schemasById[t]||this.addSchemaHandle(t,n)},e.prototype.addFilePatternAssociation=function(t,n){var r=new lb(t,n);return this.filePatternAssociations.push(r),r},e.prototype.registerExternalSchema=function(t,n,r){var i=_s(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,n&&this.addFilePatternAssociation(n,[t]),r?this.addSchemaHandle(i,r):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var n=0,r=this.contributionAssociations;n<r.length;n++){var i=r[n];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var n=_s(t),r=this.schemasById[n];return r?r.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var n=Ts("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Mu(t));return this.promise.resolve(new Vi({},[n]))}return this.requestService(t).then(function(r){if(!r){var i=Ts("json.schema.nocontent","Unable to load schema from '{0}': No content.",Mu(t));return new Vi({},[i])}var s={},a=[];s=jy(r,a);var o=a.length?[Ts("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Mu(t),a[0].offset)]:[];return new Vi(s,o)},function(r){var i=r.toString(),s=r.toString().split("Error: ");return s.length>1&&(i=s[1]),ff(i,".")&&(i=i.substr(0,i.length-1)),new Vi({},[Ts("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Mu(t),i)])})},e.prototype.resolveSchemaContent=function(t,n,r){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=_s(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Mo({},[Ts("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Ts("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(B,ne){if(!ne)return B;var Q=B;return ne[0]==="/"&&(ne=ne.substr(1)),ne.split("/").some(function(I){return I=I.replace(/~1/g,"/").replace(/~0/g,"~"),Q=Q[I],!Q}),Q},b=function(B,ne,Q,I){var he=I?decodeURIComponent(I):void 0,Ee=l(ne,he);if(Ee)for(var Fe in Ee)Ee.hasOwnProperty(Fe)&&!B.hasOwnProperty(Fe)&&(B[Fe]=Ee[Fe]);else s.push(Ts("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",he,Q))},c=function(B,ne,Q,I,he){u&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(ne)&&(ne=u.resolveRelativePath(ne,I)),ne=_s(ne);var Ee=i.getOrAddSchemaHandle(ne);return Ee.getUnresolvedSchema().then(function(Fe){if(he[ne]=!0,Fe.errors.length){var Be=Q?ne+"#"+Q:ne;s.push(Ts("json.schema.problemloadingref","Problems loading reference '{0}': {1}",Be,Fe.errors[0]))}return b(B,Fe.schema,ne,Q),N(B,Fe.schema,ne,Ee.dependencies)})},N=function(B,ne,Q,I){if(!B||typeof B!="object")return Promise.resolve(null);for(var he=[B],Ee=[],Fe=[],Be=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];typeof He=="object"&&he.push(He)}},ue=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];if(typeof He=="object")for(var Ct in He){var Rt=Ct,Vt=He[Rt];typeof Vt=="object"&&he.push(Vt)}}},Ae=function(){for(var Ve=[],Xe=0;Xe<arguments.length;Xe++)Ve[Xe]=arguments[Xe];for(var ze=0,me=Ve;ze<me.length;ze++){var He=me[ze];if(Array.isArray(He))for(var Ct=0,Rt=He;Ct<Rt.length;Ct++){var Vt=Rt[Ct];typeof Vt=="object"&&he.push(Vt)}}},Qe=function(Ve){for(var Xe=[];Ve.$ref;){var ze=Ve.$ref,me=ze.split("#",2);if(delete Ve.$ref,me[0].length>0){Fe.push(c(Ve,me[0],me[1],Q,I));return}else Xe.indexOf(ze)===-1&&(b(Ve,ne,Q,me[1]),Xe.push(ze))}Be(Ve.items,Ve.additionalItems,Ve.additionalProperties,Ve.not,Ve.contains,Ve.propertyNames,Ve.if,Ve.then,Ve.else),ue(Ve.definitions,Ve.properties,Ve.patternProperties,Ve.dependencies),Ae(Ve.anyOf,Ve.allOf,Ve.oneOf,Ve.items)};he.length;){var Dt=he.pop();Ee.indexOf(Dt)>=0||(Ee.push(Dt),Qe(Dt))}return i.promise.all(Fe)};return N(a,a,n,r).then(function(B){return new Mo(a,s)})},e.prototype.getSchemaForResource=function(t,n){if(n&&n.root&&n.root.type==="object"){var r=n.root.properties.filter(function(he){return he.keyNode.value==="$schema"&&he.valueNode&&he.valueNode.type==="string"});if(r.length>0){var i=r[0].valueNode;if(i&&i.type==="string"){var s=Bu(i);if(s&&r0(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=_s(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=db(t),b=0,c=this.filePatternAssociations;b<c.length;b++){var N=c[b];if(N.matchesPattern(l))for(var B=0,ne=N.getURIs();B<ne.length;B++){var Q=ne[B];o[Q]||(u.push(Q),o[Q]=!0)}}var I=u.length>0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:I},I},e.prototype.createCombinedSchema=function(t,n){if(n.length===1)return this.getOrAddSchemaHandle(n[0]);var r="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:n.map(function(s){return{$ref:s}})};return this.addSchemaHandle(r,i)},e.prototype.getMatchingSchemas=function(t,n,r){if(r){var i=r.id||"schemaservice://untitled/matchingSchemas/"+pb++;return this.resolveSchemaContent(new Vi(r),i,{}).then(function(s){return n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,n).then(function(s){return s?n.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),pb=0;function _s(e){try{return yi.parse(e).toString()}catch{return e}}function db(e){try{return yi.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Mu(e){try{var t=yi.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}function hb(e){return e.replace(/[-\\{}+?|^$.,[\]()#\s]/g,"\\$&").replace(/[*]/g,".*")}function mb(e,t){if(e.length<t)return 0;for(let n=0;n<t;n++){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return t}function a0(e){try{return new RegExp(e,"u")}catch{return new RegExp(e)}}function gb(e,t){t++;for(let n=t;n<e.length;n++){const r=e.charAt(n);if(r===" "||r===" ")t++;else return t}return t}function Io(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!Io(e[n],t[n]))return!1}else{const i=[];for(r in e)i.push(r);i.sort();const s=[];for(r in t)s.push(r);if(s.sort(),!Io(i,s))return!1;for(n=0;n<i.length;n++)if(!Io(e[i[n]],t[i[n]]))return!1}return!0}function _i(e){return typeof e=="number"}function Xs(e){return typeof e<"u"}function $a(e){return typeof e=="boolean"}function Va(e){return typeof e=="string"}function yb(e){return Symbol.iterator in Object(e)}function us(e){var t;return e?e instanceof Error&&(t=e.stack)!=null?t:e.toString():"null"}function pf(e){const t=e.type&&e.closestTitle;return e.title?e.title:e.$id?o0(e.$id):e.$ref||e._$ref?o0(e.$ref||e._$ref):Array.isArray(e.type)?e.type.join(" | "):t?e.type.concat("(",e.closestTitle,")"):e.type||e.closestTitle}function o0(e){const t=e.match(/^(?:.*\/)?(.*?)(?:\.schema\.json)?$/);let n=!!t&&t[1];return n||(n="typeNotFound",console.error(`$ref (${e}) not parsed properly`)),n}function u0(e,t){const n=yi.parse(t);let r=Ys.basename(n.fsPath);return Ys.extname(n.fsPath)||(r+=".json"),Object.getOwnPropertyDescriptor(e,"name")?Object.getOwnPropertyDescriptor(e,"name").value+` (${r})`:e.title?e.description?e.title+" - "+e.description+` (${r})`:e.title+` (${r})`:r}function Db(e){return e.type!=="object"&&!df(e)}function df(e){return!!(e.anyOf||e.allOf||e.oneOf)}var bb=Hs(),vb=function(){function e(t,n){this.jsonSchemaService=t,this.promise=n,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:Hn.Error)},e.prototype.doValidation=function(t,n,r,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(c){var N=c.range.start.line+" "+c.range.start.character+" "+c.message;o[N]||(o[N]=!0,a.push(c))},l=function(c){var N=r?.trailingCommas?Iu(r.trailingCommas):Hn.Error,B=r?.comments?Iu(r.comments):s.commentSeverity,ne=r?.schemaValidation?Iu(r.schemaValidation):Hn.Warning,Q=r?.schemaRequest?Iu(r.schemaRequest):Hn.Warning;if(c){if(c.errors.length&&n.root&&Q){var I=n.root,he=I.type==="object"?I.properties[0]:void 0;if(he&&he.keyNode.value==="$schema"){var Ee=he.valueNode||he,Fe=In.create(t.positionAt(Ee.offset),t.positionAt(Ee.offset+Ee.length));u(Di.create(Fe,c.errors[0],Q,$i.SchemaResolveError))}else{var Fe=In.create(t.positionAt(I.offset),t.positionAt(I.offset+1));u(Di.create(Fe,c.errors[0],Q,$i.SchemaResolveError))}}else if(ne){var Be=n.validate(t,c.schema,ne);Be&&Be.forEach(u)}l0(c.schema)&&(B=void 0),c0(c.schema)&&(N=void 0)}for(var ue=0,Ae=n.syntaxErrors;ue<Ae.length;ue++){var Qe=Ae[ue];if(Qe.code===$i.TrailingComma){if(typeof N!="number")continue;Qe.severity=N}u(Qe)}if(typeof B=="number"){var Dt=bb("InvalidCommentToken","Comments are not permitted in JSON.");n.comments.forEach(function(Ve){u(Di.create(Ve,Dt,B,$i.CommentNotPermitted))})}return a};if(i){var b=i.id||"schemaservice://untitled/"+Eb++;return this.jsonSchemaService.resolveSchemaContent(new Vi(i),b,{}).then(function(c){return l(c)})}return this.jsonSchemaService.getSchemaForResource(t.uri,n).then(function(c){return l(c)})},e}(),Eb=0;function l0(e){if(e&&typeof e=="object"){if(Ra(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,n=e.allOf;t<n.length;t++){var r=n[t],i=l0(r);if(Ra(i))return i}}}function c0(e){if(e&&typeof e=="object"){if(Ra(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Ra(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var n=0,r=e.allOf;n<r.length;n++){var i=r[n],s=c0(i);if(Ra(s))return s}}}function Iu(e){switch(e){case"error":return Hn.Error;case"warning":return Hn.Warning;case"ignore":return}}var f0=48,Ab=57,Cb=65,Ou=97,xb=102;function Mr(e){return e<f0?0:e<=Ab?e-f0:(e<Ou&&(e+=Ou-Cb),e>=Ou&&e<=xb?e-Ou+10:0)}function Sb(e){if(e[0]==="#")switch(e.length){case 4:return{red:Mr(e.charCodeAt(1))*17/255,green:Mr(e.charCodeAt(2))*17/255,blue:Mr(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Mr(e.charCodeAt(1))*17/255,green:Mr(e.charCodeAt(2))*17/255,blue:Mr(e.charCodeAt(3))*17/255,alpha:Mr(e.charCodeAt(4))*17/255};case 7:return{red:(Mr(e.charCodeAt(1))*16+Mr(e.charCodeAt(2)))/255,green:(Mr(e.charCodeAt(3))*16+Mr(e.charCodeAt(4)))/255,blue:(Mr(e.charCodeAt(5))*16+Mr(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Mr(e.charCodeAt(1))*16+Mr(e.charCodeAt(2)))/255,green:(Mr(e.charCodeAt(3))*16+Mr(e.charCodeAt(4)))/255,blue:(Mr(e.charCodeAt(5))*16+Mr(e.charCodeAt(6)))/255,alpha:(Mr(e.charCodeAt(7))*16+Mr(e.charCodeAt(8)))/255}}}var wb=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ff(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,b=s.items;l<b.length;l++){var c=b[l];if(c.type==="object")for(var N=0,B=c.properties;N<B.length;N++){var ne=B[N];if(ne.keyNode.value==="key"&&ne.valueNode){var Q=xa.create(t.uri,Ls(t,c));if(u.push({name:Bu(ne.valueNode),kind:Qi.Function,location:Q}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),u}}}return u}for(var I=[{node:s,containerName:""}],he=0,Ee=!1,Fe=[],Be=function(Ae,Qe){Ae.type==="array"?Ae.items.forEach(function(Dt){Dt&&I.push({node:Dt,containerName:Qe})}):Ae.type==="object"&&Ae.properties.forEach(function(Dt){var Ve=Dt.valueNode;if(Ve)if(a>0){a--;var Xe=xa.create(t.uri,Ls(t,Dt)),ze=Qe?Qe+"."+Dt.keyNode.value:Dt.keyNode.value;Fe.push({name:i.getKeyLabel(Dt),kind:i.getSymbolKind(Ve.type),location:Xe,containerName:Qe}),I.push({node:Ve,containerName:ze})}else Ee=!0})};he<I.length;){var ue=I[he++];Be(ue.node,ue.containerName)}return Ee&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),Fe},e.prototype.findDocumentSymbols2=function(t,n,r){var i=this;r===void 0&&(r={resultLimit:Number.MAX_VALUE});var s=n.root;if(!s)return[];var a=r.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||ff(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,b=s.items;l<b.length;l++){var c=b[l];if(c.type==="object")for(var N=0,B=c.properties;N<B.length;N++){var ne=B[N];if(ne.keyNode.value==="key"&&ne.valueNode){var Q=Ls(t,c),I=Ls(t,ne.keyNode);if(u.push({name:Bu(ne.valueNode),kind:Qi.Function,range:Q,selectionRange:I}),a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),u}}}return u}for(var he=[],Ee=[{node:s,result:he}],Fe=0,Be=!1,ue=function(Qe,Dt){Qe.type==="array"?Qe.items.forEach(function(Ve,Xe){if(Ve)if(a>0){a--;var ze=Ls(t,Ve),me=ze,He=String(Xe),Ct={name:He,kind:i.getSymbolKind(Ve.type),range:ze,selectionRange:me,children:[]};Dt.push(Ct),Ee.push({result:Ct.children,node:Ve})}else Be=!0}):Qe.type==="object"&&Qe.properties.forEach(function(Ve){var Xe=Ve.valueNode;if(Xe)if(a>0){a--;var ze=Ls(t,Ve),me=Ls(t,Ve.keyNode),He=[],Ct={name:i.getKeyLabel(Ve),kind:i.getSymbolKind(Xe.type),range:ze,selectionRange:me,children:He,detail:i.getDetail(Xe)};Dt.push(Ct),Ee.push({result:He,node:Xe})}else Be=!0})};Fe<Ee.length;){var Ae=Ee[Fe++];ue(Ae.node,Ae.result)}return Be&&r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(o),he},e.prototype.getSymbolKind=function(t){switch(t){case"object":return Qi.Module;case"string":return Qi.String;case"number":return Qi.Number;case"array":return Qi.Array;case"boolean":return Qi.Boolean;default:return Qi.Variable}},e.prototype.getKeyLabel=function(t){var n=t.keyNode.value;return n&&(n=n.replace(/[\n]/g,"↵")),n&&n.trim()?n:'"'+n+'"'},e.prototype.getDetail=function(t){if(t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,n,r){return this.schemaService.getSchemaForResource(t.uri,n).then(function(i){var s=[];if(i)for(var a=r&&typeof r.resultLimit=="number"?r.resultLimit:Number.MAX_VALUE,o=n.getMatchingSchemas(i.schema),u={},l=0,b=o;l<b.length;l++){var c=b[l];if(!c.inverted&&c.schema&&(c.schema.format==="color"||c.schema.format==="color-hex")&&c.node&&c.node.type==="string"){var N=String(c.node.offset);if(!u[N]){var B=Sb(Bu(c.node));if(B){var ne=Ls(t,c.node);s.push({color:B,range:ne})}if(u[N]=!0,a--,a<=0)return r&&r.onResultLimitExceeded&&r.onResultLimitExceeded(t.uri),s}}}return s})},e.prototype.getColorPresentations=function(t,n,r,i){var s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),u=Math.round(r.blue*255);function l(c){var N=c.toString(16);return N.length!==2?"0"+N:N}var b;return r.alpha===1?b="#"+l(a)+l(o)+l(u):b="#"+l(a)+l(o)+l(u)+l(Math.round(r.alpha*255)),s.push({label:b,textEdit:Nr.replace(i,JSON.stringify(b))}),s},e}();function Ls(e,t){return In.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var On=Hs(),p0={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Fb={id:On("schema.json.id","A unique identifier for the schema."),$schema:On("schema.json.$schema","The schema to verify this document against."),title:On("schema.json.title","A descriptive title of the element."),description:On("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:On("schema.json.default","A default value. Used by suggestions."),multipleOf:On("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:On("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:On("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:On("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:On("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:On("schema.json.maxLength","The maximum length of a string."),minLength:On("schema.json.minLength","The minimum length of a string."),pattern:On("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:On("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:On("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:On("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:On("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:On("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:On("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:On("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:On("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:On("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:On("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:On("schema.json.properties","A map of property names to schemas for each property."),patternProperties:On("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:On("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:On("schema.json.enum","The set of literal values that are valid."),type:On("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:On("schema.json.format","Describes the format expected for the value."),allOf:On("schema.json.allOf","An array of schemas, all of which must match."),anyOf:On("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:On("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:On("schema.json.not","A schema which must not match."),$id:On("schema.json.$id","A unique identifier for the schema."),$ref:On("schema.json.$ref","Reference a definition hosted on any location."),$comment:On("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:On("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:On("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:On("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:On("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:On("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:On("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:On("schema.json.contentEncoding","Describes the content encoding of a string property."),if:On("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:On("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:On("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(d0 in p0.schemas){ju=p0.schemas[d0];for(qa in ju.properties)Ru=ju.properties[qa],typeof Ru=="boolean"&&(Ru=ju.properties[qa]={}),hf=Fb[qa],hf?Ru.description=hf:console.log(qa+": localize('schema.json."+qa+`', "")`)}var ju,Ru,hf,qa,d0;function Nb(e,t){var n=[];return t.visit(function(r){var i;if(r.type==="property"&&r.keyNode.value==="$ref"&&((i=r.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=r.valueNode.value,a=_b(t,s);if(a){var o=e.positionAt(a.offset);n.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:Tb(e,r.valueNode)})}}return!0}),Promise.resolve(n)}function Tb(e,t){return In.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function _b(e,t){var n=Lb(t);return n?mf(n,e.root):null}function mf(e,t){if(!t)return null;if(e.length===0)return t;var n=e.shift();if(t&&t.type==="object"){var r=t.properties.find(function(a){return a.keyNode.value===n});return r?mf(e,r.valueNode):null}else if(t&&t.type==="array"&&n.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(n),s=t.items[i];return s?mf(e,s):null}return null}function Lb(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(kb)}function kb(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function $u(e,t){for(const n of t.documents)if(n.internalDocument&&n.internalDocument.range[0]<=e&&n.internalDocument.range[2]>=e)return n;return t.documents.length===1?t.documents[0]:null}function h0(e){const t=["mapping","scalar","sequence"];return e?e.filter(n=>{if(typeof n=="string"){const r=n.split(" "),i=r[1]&&r[1].toLowerCase()||"scalar";return i==="map"?!1:t.indexOf(i)!==-1}return!1}):[]}function m0(e,t){if(!t||!e||t.length!==e.length)return!1;for(let n=e.length-1;n>=0;n--)if(e[n]!==t[n])return!1;return!0}var nr=Hs(),gf="Property {0} is not allowed.",Pb={"color-hex":{errorMessage:nr("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:nr("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:nr("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:nr("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:nr("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/},ipv4:{errorMessage:nr("ipv4FormatWarning","String does not match IPv4 format."),pattern:/^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/},ipv6:{errorMessage:nr("ipv6FormatWarning","String does not match IPv6 format."),pattern:/^([0-9a-f]|:){1,4}(:([0-9a-f]{0,4})*){1,7}$/i}},Vu="YAML",g0="yaml-schema: ",ai;(function(e){e.missingRequiredPropWarning="missingRequiredPropWarning",e.typeMismatchWarning="typeMismatchWarning",e.constWarning="constWarning"})(ai||(ai={}));var Bb={[ai.missingRequiredPropWarning]:'Missing property "{0}".',[ai.typeMismatchWarning]:'Incorrect type. Expected "{0}".',[ai.constWarning]:"Value must be {0}."},Ks=class{constructor(e,t,n,r){this.offset=n,this.length=r,this.parent=e,this.internalNode=t}getNodeFromOffsetEndInclusive(e){const t=[],n=a=>{if(e>=a.offset&&e<=a.offset+a.length){const o=a.children;for(let u=0;u<o.length&&o[u].offset<=e;u++){const l=n(o[u]);l&&t.push(l)}return a}return null},r=n(this);let i=Number.MAX_VALUE,s=null;for(const a of t){const o=a.length+a.offset-e+(e-a.offset);o<i&&(s=a,i=o)}return s||r}get children(){return[]}toString(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")}},Mb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="null",this.value=null}},Ib=class extends Ks{constructor(e,t,n,r,i){super(e,t,r,i),this.type="boolean",this.value=n}},Ob=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="array",this.items=[]}get children(){return this.items}},jb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="number",this.isInteger=!0,this.value=Number.NaN}},qu=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="string",this.value=""}},Rb=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="property",this.colonOffset=-1}get children(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]}},$b=class extends Ks{constructor(e,t,n,r){super(e,t,n,r),this.type="object",this.properties=[]}get children(){return this.properties}};function oi(e){if(e!==void 0)return $a(e)?e?{}:{not:{}}:(typeof e!="object"&&(console.warn(`Wrong schema: ${JSON.stringify(e)}, it MUST be an Object or Boolean`),e={type:e}),e)}var y0;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(y0||(y0={}));var Vb=class yg{constructor(t=-1,n=null){this.focusOffset=t,this.exclude=n,this.schemas=[]}add(t){this.schemas.push(t)}merge(t){this.schemas.push(...t.schemas)}include(t){return(this.focusOffset===-1||D0(t,this.focusOffset))&&t!==this.exclude}newSub(){return new yg(-1,this.exclude)}},Oo=class{constructor(){}get schemas(){return[]}add(e){}merge(e){}include(e){return!0}newSub(){return this}};Oo.instance=new Oo;var fi=class{constructor(e){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,e?this.enumValues=[]:this.enumValues=null}hasProblems(){return!!this.problems.length}mergeAll(e){for(const t of e)this.merge(t)}merge(e){this.problems=this.problems.concat(e.problems)}mergeEnumValues(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(const t of this.problems)t.code===$i.EnumValueMismatch&&(t.message=nr("enumWarning","Value is not accepted. Valid values: {0}.",[...new Set(this.enumValues)].map(n=>JSON.stringify(n)).join(", ")))}}mergeWarningGeneric(e,t){var n,r;if((n=this.problems)!=null&&n.length)for(const i of t){const s=this.problems.filter(a=>a.problemType===i);for(const a of s){const o=(r=e.problems)==null?void 0:r.find(u=>u.problemType===i&&a.location.offset===u.location.offset&&(i!==ai.missingRequiredPropWarning||m0(u.problemArgs,a.problemArgs)));o&&(o.problemArgs.length&&(o.problemArgs.filter(u=>!a.problemArgs.includes(u)).forEach(u=>a.problemArgs.push(u)),a.message=Uu(a.problemType,a.problemArgs)),this.mergeSources(o,a))}}}mergePropertyMatch(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&this.primaryValueMatches++}mergeSources(e,t){const n=e.source.replace(g0,"");t.source.includes(n)||(t.source=t.source+" | "+n),t.schemaUri.includes(e.schemaUri[0])||(t.schemaUri=t.schemaUri.concat(e.schemaUri))}compareGeneric(e){const t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesMatches-e.propertiesMatches}compareKubernetes(e){const t=this.hasProblems();return this.propertiesMatches!==e.propertiesMatches?this.propertiesMatches-e.propertiesMatches:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:t!==e.hasProblems()?t?-1:1:this.propertiesMatches-e.propertiesMatches}};function Ua(e){switch(e.type){case"array":return e.children.map(Ua);case"object":{const t=Object.create(null);for(let n=0,r=e.children;n<r.length;n++){const i=r[n],s=i.children[1];s&&(t[i.children[0].value]=Ua(s))}return t}case"null":case"string":case"number":case"boolean":return e.value;default:return}}function D0(e,t,n=!1){return t>=e.offset&&t<=e.offset+e.length||n&&t===e.offset+e.length}function b0(e,t,n){if(n===void 0&&(n=!1),D0(e,t,n)){const r=e.children;if(Array.isArray(r))for(let i=0;i<r.length&&r[i].offset<=t;i++){const s=b0(r[i],t,n);if(s)return s}return e}}var qb=class{constructor(e,t=[],n=[]){this.root=e,this.syntaxErrors=t,this.comments=n}getNodeFromOffset(e,t=!1){if(this.root)return b0(this.root,e,t)}getNodeFromOffsetEndInclusive(e){return this.root&&this.root.getNodeFromOffsetEndInclusive(e)}visit(e){if(this.root){const t=n=>{let r=e(n);const i=n.children;if(Array.isArray(i))for(let s=0;s<i.length&&r;s++)r=t(i[s]);return r};t(this.root)}}validate(e,t){if(this.root&&t){const n=new fi(this.isKubernetes);return zr(this.root,t,t,n,Oo.instance,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri}),n.problems.map(r=>{const i=In.create(e.positionAt(r.location.offset),e.positionAt(r.location.offset+r.location.length)),s=Di.create(i,r.message,r.severity,r.code?r.code:$i.Undefined,r.source);return s.data={schemaUri:r.schemaUri,...r.data},s})}return null}getMatchingSchemas(e,t=-1,n=null,r){const i=new Vb(t,n);return this.root&&e&&zr(this.root,e,e,new fi(this.isKubernetes),i,{isKubernetes:this.isKubernetes,disableAdditionalProperties:this.disableAdditionalProperties,uri:this.uri,callFromAutoComplete:r}),i.schemas}};function zr(e,t,n,r,i,s){const{isKubernetes:a,callFromAutoComplete:o}=s;if(!e||typeof t!="object")return;switch(t.url||(t.url=n.url),t.closestTitle=t.title||n.closestTitle,e.type){case"object":N(e,t,r,i);break;case"array":c(e,t,r,i);break;case"string":b(e,t,r);break;case"number":l(e,t,r);break;case"property":return zr(e.valueNode,t,t,r,i,s)}u(),i.add({node:e,schema:t});function u(){function Q(ue){return e.type===ue||ue==="integer"&&e.type==="number"&&e.isInteger}if(Array.isArray(t.type))t.type.some(Q)||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:t.errorMessage||nr("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", ")),source:mr(t,n),schemaUri:gr(t,n)});else if(t.type&&!Q(t.type)){const ue=t.type==="object"?pf(t):t.type;r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:t.errorMessage||Uu(ai.typeMismatchWarning,[ue]),source:mr(t,n),schemaUri:gr(t,n),problemType:ai.typeMismatchWarning,problemArgs:[ue]})}if(Array.isArray(t.allOf))for(const ue of t.allOf)zr(e,oi(ue),t,r,i,s);const I=oi(t.not);if(I){const ue=new fi(a),Ae=i.newSub();zr(e,I,t,ue,Ae,s),ue.hasProblems()||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:nr("notSchemaWarning","Matches a schema that is not allowed."),source:mr(t,n),schemaUri:gr(t,n)});for(const Qe of Ae.schemas)Qe.inverted=!Qe.inverted,i.add(Qe)}const he=(ue,Ae)=>{var Qe;const Dt=[],Ve=[],Xe=[];let ze=null;for(const me of ue){const He={...oi(me)},Ct=new fi(a),Rt=i.newSub();zr(e,He,t,Ct,Rt,s),(!Ct.hasProblems()||o)&&(Dt.push(He),Ve.push(He),Ct.propertiesMatches===0&&Xe.push(He),He.format&&Ve.pop()),ze?a?ze=B(Ct,ze,He,Rt):ze=ne(e,Ae,Ct,ze,He,Rt):ze={schema:He,validationResult:Ct,matchingSchemas:Rt}}return Ve.length>1&&(Ve.length>1||Xe.length===0)&&Ae&&r.problems.push({location:{offset:e.offset,length:1},severity:Hn.Warning,message:nr("oneOfWarning","Matches multiple schemas when only one must validate."),source:mr(t,n),schemaUri:gr(t,n)}),ze!==null&&(r.merge(ze.validationResult),r.propertiesMatches+=ze.validationResult.propertiesMatches,r.propertiesValueMatches+=ze.validationResult.propertiesValueMatches,r.enumValueMatch=r.enumValueMatch||ze.validationResult.enumValueMatch,(Qe=ze.validationResult.enumValues)!=null&&Qe.length&&(r.enumValues=(r.enumValues||[]).concat(ze.validationResult.enumValues)),i.merge(ze.matchingSchemas)),Dt.length};Array.isArray(t.anyOf)&&he(t.anyOf,!1),Array.isArray(t.oneOf)&&he(t.oneOf,!0);const Ee=(ue,Ae)=>{const Qe=new fi(a),Dt=i.newSub();zr(e,oi(ue),Ae,Qe,Dt,s),r.merge(Qe),r.propertiesMatches+=Qe.propertiesMatches,r.propertiesValueMatches+=Qe.propertiesValueMatches,i.merge(Dt)},Fe=(ue,Ae,Qe,Dt)=>{const Ve=oi(ue),Xe=new fi(a),ze=i.newSub();zr(e,Ve,Ae,Xe,ze,s),i.merge(ze);const{filePatternAssociation:me}=Ve;me&&(new cv(me).matchesPattern(s.uri)||Xe.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,message:nr("ifFilePatternAssociation",`filePatternAssociation '${me}' does not match with doc uri '${s.uri}'.`),source:mr(t,Ae),schemaUri:gr(t,Ae)})),Xe.hasProblems()?Dt&&Ee(Dt,Ae):Qe&&Ee(Qe,Ae)},Be=oi(t.if);if(Be&&Fe(Be,t,oi(t.then),oi(t.else)),Array.isArray(t.enum)){const ue=Ua(e);let Ae=!1;for(const Qe of t.enum)if(Io(ue,Qe)||o&&Va(ue)&&Va(Qe)&&ue&&Qe.startsWith(ue)){Ae=!0;break}r.enumValues=t.enum,r.enumValueMatch=Ae,Ae||r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,code:$i.EnumValueMismatch,message:t.errorMessage||nr("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(Qe=>JSON.stringify(Qe)).join(", ")),source:mr(t,n),schemaUri:gr(t,n)})}if(Xs(t.const)){const ue=Ua(e);!Io(ue,t.const)&&!(o&&Va(ue)&&Va(t.const)&&t.const.startsWith(ue))?(r.problems.push({location:{offset:e.offset,length:e.length},severity:Hn.Warning,code:$i.EnumValueMismatch,problemType:ai.constWarning,message:t.errorMessage||Uu(ai.constWarning,[JSON.stringify(t.const)]),source:mr(t,n),schemaUri:gr(t,n),problemArgs:[JSON.stringify(t.const)]}),r.enumValueMatch=!1):r.enumValueMatch=!0,r.enumValues=[t.const]}t.deprecationMessage&&e.parent&&r.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Hn.Warning,message:t.deprecationMessage,source:mr(t,n),schemaUri:gr(t,n)})}function l(Q,I,he){const Ee=Q.value;_i(I.multipleOf)&&Ee%I.multipleOf!==0&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("multipleOfWarning","Value is not divisible by {0}.",I.multipleOf),source:mr(I,n),schemaUri:gr(I,n)});function Fe(Ve,Xe){if(_i(Xe))return Xe;if($a(Xe)&&Xe)return Ve}function Be(Ve,Xe){if(!$a(Xe)||!Xe)return Ve}const ue=Fe(I.minimum,I.exclusiveMinimum);_i(ue)&&Ee<=ue&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",ue),source:mr(I,n),schemaUri:gr(I,n)});const Ae=Fe(I.maximum,I.exclusiveMaximum);_i(Ae)&&Ee>=Ae&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",Ae),source:mr(I,n),schemaUri:gr(I,n)});const Qe=Be(I.minimum,I.exclusiveMinimum);_i(Qe)&&Ee<Qe&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minimumWarning","Value is below the minimum of {0}.",Qe),source:mr(I,n),schemaUri:gr(I,n)});const Dt=Be(I.maximum,I.exclusiveMaximum);_i(Dt)&&Ee>Dt&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maximumWarning","Value is above the maximum of {0}.",Dt),source:mr(I,n),schemaUri:gr(I,n)})}function b(Q,I,he){if(_i(I.minLength)&&Q.value.length<I.minLength&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minLengthWarning","String is shorter than the minimum length of {0}.",I.minLength),source:mr(I,n),schemaUri:gr(I,n)}),_i(I.maxLength)&&Q.value.length>I.maxLength&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maxLengthWarning","String is longer than the maximum length of {0}.",I.maxLength),source:mr(I,n),schemaUri:gr(I,n)}),Va(I.pattern)&&(a0(I.pattern).test(Q.value)||he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||nr("patternWarning",'String does not match the pattern of "{0}".',I.pattern),source:mr(I,n),schemaUri:gr(I,n)})),I.format)switch(I.format){case"uri":case"uri-reference":{let Ee;if(!Q.value)Ee=nr("uriEmpty","URI expected.");else try{!yi.parse(Q.value).scheme&&I.format==="uri"&&(Ee=nr("uriSchemeMissing","URI with a scheme is expected."))}catch(Fe){Ee=Fe.message}Ee&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||nr("uriFormatWarning","String is not a URI: {0}",Ee),source:mr(I,n),schemaUri:gr(I,n)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":case"ipv4":case"ipv6":{const Ee=Pb[I.format];(!Q.value||!Ee.pattern.test(Q.value))&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.patternErrorMessage||I.errorMessage||Ee.errorMessage,source:mr(I,n),schemaUri:gr(I,n)})}break}}function c(Q,I,he,Ee){if(Array.isArray(I.items)){const Be=I.items;for(let ue=0;ue<Be.length;ue++){const Ae=Be[ue],Qe=oi(Ae),Dt=new fi(a),Ve=Q.items[ue];Ve?(zr(Ve,Qe,I,Dt,Ee,s),he.mergePropertyMatch(Dt),he.mergeEnumValues(Dt)):Q.items.length>=Be.length&&he.propertiesValueMatches++}if(Q.items.length>Be.length)if(typeof I.additionalItems=="object")for(let ue=Be.length;ue<Q.items.length;ue++){const Ae=new fi(a);zr(Q.items[ue],I.additionalItems,I,Ae,Ee,s),he.mergePropertyMatch(Ae),he.mergeEnumValues(Ae)}else I.additionalItems===!1&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",Be.length),source:mr(I,n),schemaUri:gr(I,n)})}else{const Be=oi(I.items);if(Be){const ue=new fi(a);Q.items.forEach(Ae=>{if(Be.oneOf&&Be.oneOf.length===1){const Qe=Be.oneOf[0],Dt={...oi(Qe)};Dt.title=I.title,Dt.closestTitle=I.closestTitle,zr(Ae,Dt,I,ue,Ee,s),he.mergePropertyMatch(ue),he.mergeEnumValues(ue)}else zr(Ae,Be,I,ue,Ee,s),he.mergePropertyMatch(ue),he.mergeEnumValues(ue)})}}const Fe=oi(I.contains);if(Fe&&(Q.items.some(ue=>{const Ae=new fi(a);return zr(ue,Fe,I,Ae,Oo.instance,s),!Ae.hasProblems()})||he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:I.errorMessage||nr("requiredItemMissingWarning","Array does not contain required item."),source:mr(I,n),schemaUri:gr(I,n)})),_i(I.minItems)&&Q.items.length<I.minItems&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("minItemsWarning","Array has too few items. Expected {0} or more.",I.minItems),source:mr(I,n),schemaUri:gr(I,n)}),_i(I.maxItems)&&Q.items.length>I.maxItems&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("maxItemsWarning","Array has too many items. Expected {0} or fewer.",I.maxItems),source:mr(I,n),schemaUri:gr(I,n)}),I.uniqueItems===!0){const Be=Ua(Q);Be.some((Ae,Qe)=>Qe!==Be.lastIndexOf(Ae))&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("uniqueItemsWarning","Array has duplicate items."),source:mr(I,n),schemaUri:gr(I,n)})}}function N(Q,I,he,Ee){var Fe;const Be=Object.create(null),ue=[],Ae=[...Q.properties];for(;Ae.length>0;){const Ve=Ae.pop(),Xe=Ve.keyNode.value;if(Xe==="<<"&&Ve.valueNode)switch(Ve.valueNode.type){case"object":{Ae.push(...Ve.valueNode.properties);break}case"array":{Ve.valueNode.items.forEach(ze=>{ze&&yb(ze.properties)&&Ae.push(...ze.properties)});break}}else Be[Xe]=Ve.valueNode,ue.push(Xe)}if(Array.isArray(I.required)){for(const Ve of I.required)if(Be[Ve]===void 0){const Xe=Q.parent&&Q.parent.type==="property"&&Q.parent.keyNode,ze=Xe?{offset:Xe.offset,length:Xe.length}:{offset:Q.offset,length:1};he.problems.push({location:ze,severity:Hn.Warning,message:Uu(ai.missingRequiredPropWarning,[Ve]),source:mr(I,n),schemaUri:gr(I,n),problemArgs:[Ve],problemType:ai.missingRequiredPropWarning})}}const Qe=Ve=>{let Xe=ue.indexOf(Ve);for(;Xe>=0;)ue.splice(Xe,1),Xe=ue.indexOf(Ve)};if(I.properties)for(const Ve of Object.keys(I.properties)){Qe(Ve);const Xe=I.properties[Ve],ze=Be[Ve];if(ze)if($a(Xe))if(Xe)he.propertiesMatches++,he.propertiesValueMatches++;else{const me=ze.parent;he.problems.push({location:{offset:me.keyNode.offset,length:me.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,Ve),source:mr(I,n),schemaUri:gr(I,n)})}else{Xe.url=(Fe=I.url)!=null?Fe:n.url;const me=new fi(a);zr(ze,Xe,I,me,Ee,s),he.mergePropertyMatch(me),he.mergeEnumValues(me)}}if(I.patternProperties)for(const Ve of Object.keys(I.patternProperties)){const Xe=a0(Ve);for(const ze of ue.slice(0))if(Xe.test(ze)){Qe(ze);const me=Be[ze];if(me){const He=I.patternProperties[Ve];if($a(He))if(He)he.propertiesMatches++,he.propertiesValueMatches++;else{const Ct=me.parent;he.problems.push({location:{offset:Ct.keyNode.offset,length:Ct.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,ze),source:mr(I,n),schemaUri:gr(I,n)})}else{const Ct=new fi(a);zr(me,He,I,Ct,Ee,s),he.mergePropertyMatch(Ct),he.mergeEnumValues(Ct)}}}}if(typeof I.additionalProperties=="object")for(const Ve of ue){const Xe=Be[Ve];if(Xe){const ze=new fi(a);zr(Xe,I.additionalProperties,I,ze,Ee,s),he.mergePropertyMatch(ze),he.mergeEnumValues(ze)}}else if((I.additionalProperties===!1||I.type==="object"&&I.additionalProperties===void 0&&s.disableAdditionalProperties===!0)&&ue.length>0){const Ve=I.properties&&Object.keys(I.properties).filter(Xe=>!Be[Xe]);for(const Xe of ue){const ze=Be[Xe];if(ze){let me=null;ze.type!=="property"?(me=ze.parent,me.type==="object"&&(me=me.properties[0])):me=ze;const He={location:{offset:me.keyNode.offset,length:me.keyNode.length},severity:Hn.Warning,message:I.errorMessage||nr("DisallowedExtraPropWarning",gf,Xe),source:mr(I,n),schemaUri:gr(I,n)};Ve?.length&&(He.data={properties:Ve}),he.problems.push(He)}}}if(_i(I.maxProperties)&&Q.properties.length>I.maxProperties&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("MaxPropWarning","Object has more properties than limit of {0}.",I.maxProperties),source:mr(I,n),schemaUri:gr(I,n)}),_i(I.minProperties)&&Q.properties.length<I.minProperties&&he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("MinPropWarning","Object has fewer properties than the required number of {0}",I.minProperties),source:mr(I,n),schemaUri:gr(I,n)}),I.dependencies){for(const Ve of Object.keys(I.dependencies))if(Be[Ve]){const ze=I.dependencies[Ve];if(Array.isArray(ze))for(const me of ze)Be[me]?he.propertiesValueMatches++:he.problems.push({location:{offset:Q.offset,length:Q.length},severity:Hn.Warning,message:nr("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",me,Ve),source:mr(I,n),schemaUri:gr(I,n)});else{const me=oi(ze);if(me){const He=new fi(a);zr(Q,me,I,He,Ee,s),he.mergePropertyMatch(He),he.mergeEnumValues(He)}}}}const Dt=oi(I.propertyNames);if(Dt)for(const Ve of Q.properties){const Xe=Ve.keyNode;Xe&&zr(Xe,Dt,I,he,Oo.instance,s)}}function B(Q,I,he,Ee){const Fe=Q.compareKubernetes(I.validationResult);return Fe>0?I={schema:he,validationResult:Q,matchingSchemas:Ee}:Fe===0&&(I.matchingSchemas.merge(Ee),I.validationResult.mergeEnumValues(Q)),I}function ne(Q,I,he,Ee,Fe,Be){if(!I&&!he.hasProblems()&&(!Ee.validationResult.hasProblems()||o))Ee.matchingSchemas.merge(Be),Ee.validationResult.propertiesMatches+=he.propertiesMatches,Ee.validationResult.propertiesValueMatches+=he.propertiesValueMatches;else{const ue=he.compareGeneric(Ee.validationResult);ue>0||ue===0&&I&&Ee.schema.type==="object"&&Q.type!=="null"&&Q.type!==Ee.schema.type?Ee={schema:Fe,validationResult:he,matchingSchemas:Be}:ue===0&&(Ee.matchingSchemas.merge(Be),Ee.validationResult.mergeEnumValues(he),Ee.validationResult.mergeWarningGeneric(he,[ai.missingRequiredPropWarning,ai.typeMismatchWarning,ai.constWarning]))}return Ee}}function mr(e,t){var n;if(e){let r;if(e.title)r=e.title;else if(e.closestTitle)r=e.closestTitle;else if(t.closestTitle)r=t.closestTitle;else{const i=(n=e.url)!=null?n:t.url;if(i){const s=yi.parse(i);s.scheme==="file"&&(r=s.fsPath),r=s.toString()}}if(r)return`${g0}${r}`}return Vu}function gr(e,t){var n;const r=(n=e.url)!=null?n:t.url;return r?[r]:[]}function Uu(e,t){return nr(e,Bb[e],t.join(" | "))}var Ub=1e3,yf=0,Df=new Set;function Wa(e,t,n,r){if(e||(yf=0),!t)return null;if(Pr(t))return Wb(t,e,n,r);if(dr(t))return Gb(t,e,n,r);if(Br(t))return Jb(t,e,n,r);if(qn(t))return Yb(t,e);if(Xi(t)&&!Df.has(t)&&yf<Ub){Df.add(t);const i=Hb(t,e,n,r);return Df.delete(t),i}else return}function Wb(e,t,n,r){let i;e.flow&&!e.range?i=zb(e):i=e.range;const s=new $b(t,e,...v0(i,r));for(const a of e.items)dr(a)&&s.properties.push(Wa(s,a,n,r));return s}function Gb(e,t,n,r){const i=e.key,s=e.value,a=i.range[0];let o=i.range[1],u=i.range[2];s&&(o=s.range[1],u=s.range[2]);const l=new Rb(t,e,...v0([a,o,u],r));if(Xi(i)){const b=new qu(t,i,...ks(i.range));b.value=i.source,l.keyNode=b}else l.keyNode=Wa(l,i,n,r);return l.valueNode=Wa(l,s,n,r),l}function Jb(e,t,n,r){const i=new Ob(t,e,...ks(e.range));for(const s of e.items)if(hr(s)){const a=Wa(i,s,n,r);a&&i.children.push(a)}return i}function Yb(e,t){if(e.value===null)return new Mb(t,e,...ks(e.range));switch(typeof e.value){case"string":{const n=new qu(t,e,...ks(e.range));return n.value=e.value,n}case"boolean":return new Ib(t,e,e.value,...ks(e.range));case"number":{const n=new jb(t,e,...ks(e.range));return n.value=e.value,n.isInteger=Number.isInteger(n.value),n}default:{const n=new qu(t,e,...ks(e.range));return n.value=e.source,n}}}function Hb(e,t,n,r){yf++;const i=e.resolve(n);if(i)return Wa(t,i,n,r);{const s=new qu(t,e,...ks(e.range));return s.value=e.source,s}}function ks(e){return[e[0],e[1]-e[0]]}function v0(e,t){const n=t.linePos(e[0]),r=t.linePos(e[1]),i=[e[0],e[1]-e[0]];return n.line!==r.line&&(t.lineStarts.length!==r.line||r.col===1)&&i[1]--,i}function zb(e){let t=Number.MAX_SAFE_INTEGER,n=0;for(const r of e.items)dr(r)&&(hr(r.key)&&r.key.range&&r.key.range[0]<=t&&(t=r.key.range[0]),hr(r.value)&&r.value.range&&r.value.range[2]>=n&&(n=r.value.range[2]));return[t,n,n]}function Qb(e,t){let n;if(wr(e,(r,i,s)=>{if(i===t)return n=s[s.length-1],wr.BREAK}),!xo(n))return n}function Xb(e){if(e.items.length>1)return!1;const t=e.items[0];return qn(t.key)&&qn(t.value)&&t.key.value===""&&!t.value.value}function Kb(e,t){for(const[n,r]of e.items.entries())if(t===r)return n}function Zb(e,t){let n=!1;for(const r of e){if(r.type==="document")bf([],r,i=>{var s;if(E0(i)&&((s=i.value)==null?void 0:s.type)==="comment"){if(r.offset<=t&&i.value.source.length+i.value.offset>=t)return n=!0,wr.BREAK}else if(i.type==="comment"&&i.offset<=t&&i.offset+i.source.length>=t)return n=!0,wr.BREAK});else if(r.type==="comment"&&r.offset<=t&&r.source.length+r.offset>=t)return!0;if(n)break}return n}function E0(e){return e.start!==void 0}function bf(e,t,n){let r=n(t,e);if(typeof r=="symbol")return r;for(const s of["key","value"]){const a=t[s];if(a&&"items"in a){for(let o=0;o<a.items.length;++o){const u=bf(Object.freeze(e.concat([[s,o]])),a.items[o],n);if(typeof u=="number")o=u-1;else{if(u===wr.BREAK)return wr.BREAK;u===wr.REMOVE&&(a.items.splice(o,1),o-=1)}}typeof r=="function"&&s==="key"&&(r=r(t,e))}}const i=t.sep;if(i)for(let s=0;s<i.length;++s){const a=bf(Object.freeze(e),i[s],n);if(typeof a=="number")s=a-1;else{if(a===wr.BREAK)return wr.BREAK;a===wr.REMOVE&&(i.items.splice(s,1),s-=1)}}return typeof r=="function"?r(t,e):r}var A0=class Dg extends qb{constructor(t){super(null,[]),this.lineCounter=t}clone(){const t=new Dg(this.lineCounter);return t.isKubernetes=this.isKubernetes,t.disableAdditionalProperties=this.disableAdditionalProperties,t.uri=this.uri,t.currentDocIndex=this.currentDocIndex,t._lineComments=this.lineComments.slice(),t.internalDocument=this._internalDocument.clone(),t}collectLineComments(){this._lineComments=[],this._internalDocument.commentBefore&&this._internalDocument.commentBefore.split(`
|
|
414
414
|
`).forEach(n=>this._lineComments.push(`#${n}`)),wr(this.internalDocument,(t,n)=>{n?.commentBefore&&(n?.commentBefore.split(`
|
|
415
|
-
`)).forEach(i=>this._lineComments.push(`#${i}`)),n?.comment&&this._lineComments.push(`#${n.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=Wa(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(t){this._internalDocument=t,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(t){this._lineComments=t}get errors(){return this.internalDocument.errors.map(x0)}get warnings(){return this.internalDocument.warnings.map(x0)}getNodeFromPosition(t,n,r){const i=n.getPosition(t),s=n.getLineContent(i.line);if(s.trim().length===0)return[this.findClosestNode(t,n,r),!0];const o=s.substring(i.character).match(/^([ ]+)\n?$/),u=!!o,l=o?.[1].length;let b;return wr(this.internalDocument,(c,N)=>{if(!N)return;const B=N.range;if(!B)return;const ne=()=>u&&t+l===B[2]&&qn(N)&&N.value===null;if(B[0]<=t&&B[1]>=t||ne())b=N;else return wr.SKIP}),[b,!1]}findClosestNode(t,n,r){let i=this.internalDocument.range[2],s=this.internalDocument.range[0],a;wr(this.internalDocument,(b,c)=>{if(!c)return;const N=c.range;if(!N)return;const B=N[1]-t;s<=N[0]&&B<=0&&Math.abs(B)<=i&&(i=Math.abs(B),s=N[0],a=c)});const o=n.getPosition(t),u=n.getLineContent(o.line),l=mb(u,o.character);return qn(a)&&a.value===null||l===o.character&&(a=this.getProperParentByIndentation(l,a,n,"",r)),a}getProperParentByIndentation(t,n,r,i,s,a){if(!n)return this.internalDocument.contents;if(s=s||2,
|
|
415
|
+
`)).forEach(i=>this._lineComments.push(`#${i}`)),n?.comment&&this._lineComments.push(`#${n.comment}`)}),this._internalDocument.comment&&this._lineComments.push(`#${this._internalDocument.comment}`)}updateFromInternalDocument(){this.root=Wa(null,this._internalDocument.contents,this._internalDocument,this.lineCounter)}set internalDocument(t){this._internalDocument=t,this.updateFromInternalDocument()}get internalDocument(){return this._internalDocument}get lineComments(){return this._lineComments||this.collectLineComments(),this._lineComments}set lineComments(t){this._lineComments=t}get errors(){return this.internalDocument.errors.map(x0)}get warnings(){return this.internalDocument.warnings.map(x0)}getNodeFromPosition(t,n,r){const i=n.getPosition(t),s=n.getLineContent(i.line);if(s.trim().length===0)return[this.findClosestNode(t,n,r),!0];const o=s.substring(i.character).match(/^([ ]+)\n?$/),u=!!o,l=o?.[1].length;let b;return wr(this.internalDocument,(c,N)=>{if(!N)return;const B=N.range;if(!B)return;const ne=()=>u&&t+l===B[2]&&qn(N)&&N.value===null;if(B[0]<=t&&B[1]>=t||ne())b=N;else return wr.SKIP}),[b,!1]}findClosestNode(t,n,r){let i=this.internalDocument.range[2],s=this.internalDocument.range[0],a;wr(this.internalDocument,(b,c)=>{if(!c)return;const N=c.range;if(!N)return;const B=N[1]-t;s<=N[0]&&B<=0&&Math.abs(B)<=i&&(i=Math.abs(B),s=N[0],a=c)});const o=n.getPosition(t),u=n.getLineContent(o.line),l=mb(u,o.character);return qn(a)&&a.value===null||l===o.character&&(a=this.getProperParentByIndentation(l,a,n,"",r)),a}getProperParentByIndentation(t,n,r,i,s,a){if(!n)return this.internalDocument.contents;if(s=s||2,hr(n)&&n.range){const o=r.getPosition(n.range[0]),u=r.getLineContent(o.line);if(i=i===""?u.trim():i,i.startsWith("-")&&t===s&&i===u.trim()&&(o.character+=t),o.character>t&&o.character>0){const l=this.getParent(n);if(l)return this.getProperParentByIndentation(t,l,r,i,s,a)}else if(o.character<t){const l=this.getParent(n);if(dr(l)&&hr(l.value))return l.value;if(dr(a)&&hr(a.value))return a.value}else return n}else if(dr(n)){a=n;const o=this.getParent(n);return this.getProperParentByIndentation(t,o,r,i,s,a)}return n}getParent(t){return Qb(this.internalDocument,t)}},C0=class{constructor(e,t){this.documents=e,this.tokens=t,this.errors=[],this.warnings=[]}},ev=class{constructor(){this.cache=new Map}getYamlDocument(e,t,n=!1){return this.ensureCache(e,t??Wu,n),this.cache.get(e.uri).document}clear(){this.cache.clear()}ensureCache(e,t,n){const r=e.uri;this.cache.has(r)||this.cache.set(r,{version:-1,document:new C0([],[]),parserOptions:Wu});const i=this.cache.get(r);if(i.version!==e.version||t.customTags&&!m0(i.parserOptions.customTags,t.customTags)){let s=e.getText();n&&!/\S/.test(s)&&(s=`{${s}}`);const a=iv(s,t,e);i.document=a,i.version=e.version,i.parserOptions=t}}},qi=new ev;function x0(e){return{message:e.message,location:{start:e.pos[0],end:e.pos[1],toLineEnd:!0},severity:1,code:$i.Undefined}}var tv=class{constructor(e,t){this.tag=e,this.type=t}get collection(){if(this.type==="mapping")return"map";if(this.type==="sequence")return"seq"}resolve(e){if(Pr(e)&&this.type==="mapping"||Br(e)&&this.type==="sequence"||typeof e=="string"&&this.type==="scalar")return e}},nv=class{constructor(){this.tag="!include",this.type="scalar"}resolve(e,t){if(e&&e.length>0&&e.trim())return e;t("!include without value")}};function rv(e){const t=[],n=h0(e);for(const r of n){const i=r.split(" "),s=i[0],a=i[1]&&i[1].toLowerCase()||"scalar";t.push(new tv(s,a))}return t.push(new nv),t}var Zs=class{constructor(e){this.doc=e}getLineCount(){return this.doc.lineCount}getLineLength(e){const t=this.doc.getLineOffsets();return e>=t.length?this.doc.getText().length:e<0?0:(e+1<t.length?t[e+1]:this.doc.getText().length)-t[e]}getLineContent(e){const t=this.doc.getLineOffsets();if(e>=t.length)return this.doc.getText();if(e<0)return"";const n=e+1<t.length?t[e+1]:this.doc.getText().length;return this.doc.getText().substring(t[e],n)}getLineCharCode(e,t){return this.doc.getText(In.create(e-1,t,e-1,t+1)).charCodeAt(0)}getText(e){return this.doc.getText(e)}getPosition(e){return this.doc.positionAt(e)}},Wu={customTags:[],yamlVersion:"1.2"};function iv(e,t=Wu,n){var r;const i={strict:!1,customTags:rv(t.customTags),version:(r=t.yamlVersion)!=null?r:Wu.yamlVersion,keepSourceTokens:!0},s=new $m(i),a=new Hm;let o=!1;if(n){const B=new Zs(n),ne=B.getPosition(e.length);o=B.getLineContent(ne.line).trim().length===0}const l=(o?new cf:new cf(a.addNewLine)).parse(e),b=Array.from(l),c=s.compose(b,!0,e.length),N=Array.from(c,B=>sv(B,a));return new C0(N,b)}function sv(e,t){const n=new A0(t);return n.internalDocument=e,n}function av(e){if(e instanceof A0){const t=e.lineComments.find(n=>vf(n));if(t!=null){const n=t.match(/\$schema=\S+/g);if(n!==null&&n.length>=1)return n.length>=2&&console.log("Several $schema attributes have been found on the yaml-language-server modeline. The first one will be picked."),n[0].substring(8)}}}function vf(e){const t=e.match(/^#\s+yaml-language-server\s*:/g);return t!==null&&t.length===1}var ov=class{compile(){return()=>!0}},Gu=Hs(),uv=new ov,lv=void 0,S0=uv.compile(lv),w0;(function(e){e[e.delete=0]="delete",e[e.add=1]="add",e[e.deleteAll=2]="deleteAll"})(w0||(w0={}));var cv=class{constructor(e){try{this.patternRegExp=new RegExp(hb(e)+"$")}catch{this.patternRegExp=null}this.schemas=[]}addSchema(e){this.schemas.push(e)}matchesPattern(e){return this.patternRegExp&&this.patternRegExp.test(e)}getSchemas(){return this.schemas}},fv=class extends fb{constructor(e,t,n){super(e,t,n),this.schemaUriToNameAndDescription=new Map,this.customSchemaProvider=void 0,this.requestService=e,this.schemaPriorityMapping=new Map}registerCustomSchemaProvider(e){this.customSchemaProvider=e}getAllSchemas(){const e=[],t=new Set;for(const n of this.filePatternAssociations){const r=n.uris[0];if(t.has(r))continue;t.add(r);const i={uri:r,fromStore:!1,usedForCurrentFile:!1};if(this.schemaUriToNameAndDescription.has(r)){const{name:s,description:a,versions:o}=this.schemaUriToNameAndDescription.get(r);i.name=s,i.description=a,i.fromStore=!0,i.versions=o}e.push(i)}return e}async resolveSchemaContent(e,t,n){const r=e.errors.slice(0);let i=e.schema;const s=this.contextService;if(!S0(i)){const b=[];for(const c of S0.errors)b.push(`${c.instancePath} : ${c.message}`);r.push(`Schema '${u0(e.schema,t)}' is not valid:
|
|
416
416
|
${b.join(`
|
|
417
417
|
`)}`)}const a=(b,c)=>{if(!c)return b;let N=b;return c[0]==="/"&&(c=c.substr(1)),c.split("/").some(B=>(N=N[B],!N)),N},o=(b,c,N,B)=>{const ne=a(c,B);if(ne)for(const Q in ne)Object.prototype.hasOwnProperty.call(ne,Q)&&!Object.prototype.hasOwnProperty.call(b,Q)&&(b[Q]=ne[Q]);else r.push(Gu("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",B,N))},u=(b,c,N,B,ne)=>{s&&!/^\w+:\/\/.*/.test(c)&&(c=s.resolveRelativePath(c,B)),c=this.normalizeId(c);const Q=this.getOrAddSchemaHandle(c);return Q.getUnresolvedSchema().then(I=>{if(ne[c]=!0,I.errors.length){const he=N?c+"#"+N:c;r.push(Gu("json.schema.problemloadingref","Problems loading reference '{0}': {1}",he,I.errors[0]))}return o(b,I.schema,c,N),b.url=c,l(b,I.schema,c,Q.dependencies)})},l=async(b,c,N,B)=>{if(!b||typeof b!="object")return null;const ne=[b],Q=[],I=[],he=(...ue)=>{for(const Ae of ue)typeof Ae=="object"&&ne.push(Ae)},Ee=(...ue)=>{for(const Ae of ue)if(typeof Ae=="object")for(const Qe in Ae){const Dt=Ae[Qe];typeof Dt=="object"&&ne.push(Dt)}},Fe=(...ue)=>{for(const Ae of ue)if(Array.isArray(Ae))for(const Qe of Ae)typeof Qe=="object"&&ne.push(Qe)},Be=ue=>{const Ae=[];for(;ue.$ref;){const Qe=ue.$ref,Dt=Qe.split("#",2);if(ue._$ref=ue.$ref,delete ue.$ref,Dt[0].length>0){I.push(u(ue,Dt[0],Dt[1],N,B));return}else Ae.indexOf(Qe)===-1&&(o(ue,c,N,Dt[1]),Ae.push(Qe))}he(ue.items,ue.additionalItems,ue.additionalProperties,ue.not,ue.contains,ue.propertyNames,ue.if,ue.then,ue.else),Ee(ue.definitions,ue.properties,ue.patternProperties,ue.dependencies),Fe(ue.anyOf,ue.allOf,ue.oneOf,ue.items,ue.schemaSequence)};if(N.indexOf("#")>0){const ue=N.split("#",2);if(ue[0].length>0&&ue[1].length>0){const Ae={};await u(Ae,ue[0],ue[1],N,B);for(const Qe in i)Qe!=="required"&&Object.prototype.hasOwnProperty.call(i,Qe)&&!Object.prototype.hasOwnProperty.call(Ae,Qe)&&(Ae[Qe]=i[Qe]);i=Ae}}for(;ne.length;){const ue=ne.pop();Q.indexOf(ue)>=0||(Q.push(ue),Be(ue))}return Promise.all(I)};return await l(i,i,t,n),new Mo(i,r)}getSchemaForResource(e,t){const n=()=>{let a=av(t);if(a!==void 0){if(!a.startsWith("file:")&&!a.startsWith("http")){let o="";if(a.indexOf("#")>0){const u=a.split("#",2);a=u[0],o=u[1]}if(Ys.isAbsolute(a))a=yi.file(a).toString();else{const u=yi.parse(e);a=yi.file(Ys.resolve(Ys.parse(u.fsPath).dir,a)).toString()}o.length>0&&(a+="#"+o)}return a}},r=a=>{const o=super.createCombinedSchema(e,a);return o.getResolvedSchema().then(u=>(u.schema&&typeof u.schema=="object"&&(u.schema.url=o.url),u.schema&&u.schema.schemaSequence&&u.schema.schemaSequence[t.currentDocIndex]?new Mo(u.schema.schemaSequence[t.currentDocIndex]):u))},i=()=>{const a=Object.create(null),o=[];for(const u of this.filePatternAssociations)if(u.matchesPattern(e))for(const l of u.getURIs())a[l]||(o.push(l),a[l]=!0);if(o.length>0){const u=this.highestPrioritySchemas(o);return r(u)}return Promise.resolve(null)},s=n();return s?r([s]):this.customSchemaProvider?this.customSchemaProvider(e).then(a=>Array.isArray(a)?a.length===0?i():Promise.all(a.map(o=>this.resolveCustomSchema(o,t))).then(o=>({errors:[],schema:{allOf:o.map(u=>u.schema)}}),()=>i()):a?this.resolveCustomSchema(a,t):i()).then(a=>a,()=>i()):i()}addSchemaPriority(e,t){let n=this.schemaPriorityMapping.get(e);n?(n=n.add(t),this.schemaPriorityMapping.set(e,n)):this.schemaPriorityMapping.set(e,new Set().add(t))}highestPrioritySchemas(e){let t=0;const n=new Map;return e.forEach(r=>{(this.schemaPriorityMapping.get(r)||[0]).forEach(s=>{s>t&&(t=s);let a=n.get(s);a?(a=a.concat(r),n.set(s,a)):n.set(s,[r])})}),n.get(t)||[]}async resolveCustomSchema(e,t){const n=await this.loadSchema(e),r=await this.resolveSchemaContent(n,e,[]);return r.schema&&typeof r.schema=="object"&&(r.schema.url=e),r.schema&&r.schema.schemaSequence&&r.schema.schemaSequence[t.currentDocIndex]?new Mo(r.schema.schemaSequence[t.currentDocIndex],r.errors):r}async saveSchema(e,t){const n=this.normalizeId(e);return this.getOrAddSchemaHandle(n,t),this.schemaPriorityMapping.set(n,new Set().add(Af.Settings)),Promise.resolve(void 0)}async deleteSchemas(e){return e.schemas.forEach(t=>{this.deleteSchema(t)}),Promise.resolve(void 0)}async deleteSchema(e){const t=this.normalizeId(e);return this.schemasById[t]&&delete this.schemasById[t],this.schemaPriorityMapping.delete(t),Promise.resolve(void 0)}async addContent(e){const t=await this.getResolvedSchema(e.schema);if(t){const n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n=="object"&&(n[e.key]=e.content),await this.saveSchema(e.schema,t.schema)}}async deleteContent(e){const t=await this.getResolvedSchema(e.schema);if(t){const n=this.resolveJSONSchemaToSection(t.schema,e.path);typeof n=="object"&&delete n[e.key],await this.saveSchema(e.schema,t.schema)}}resolveJSONSchemaToSection(e,t){const n=t.split("/");let r=e;for(const i of n)i!==""&&(this.resolveNext(r,i),r=r[i]);return r}resolveNext(e,t){if(Array.isArray(e)&&isNaN(t))throw new Error("Expected a number after the array object");if(typeof e=="object"&&typeof t!="string")throw new Error("Expected a string after the object")}normalizeId(e){try{return yi.parse(e).toString()}catch{return e}}getOrAddSchemaHandle(e,t){return super.getOrAddSchemaHandle(e,t)}loadSchema(e){const t=this.requestService;return super.loadSchema(e).then(n=>{if(n.errors&&n.schema===void 0)return t(e).then(r=>{if(!r){const i=Gu("json.schema.nocontent","Unable to load schema from '{0}': No content. {1}",F0(e),n.errors);return new Vi({},[i])}try{const i=QD(r);return new Vi(i,[])}catch(i){const s=Gu("json.schema.invalidFormat","Unable to parse content from '{0}': {1}.",F0(e),i);return new Vi({},[s])}},r=>{let i=r.toString();const s=r.toString().split("Error: ");return s.length>1&&(i=s[1]),new Vi({},[i])});if(n.uri=e,this.schemaUriToNameAndDescription.has(e)){const{name:r,description:i,versions:s}=this.schemaUriToNameAndDescription.get(e);n.schema.title=r??n.schema.title,n.schema.description=i??n.schema.description,n.schema.versions=s??n.schema.versions}return n})}registerExternalSchema(e,t,n,r,i,s){return(r||i)&&this.schemaUriToNameAndDescription.set(e,{name:r,description:i,versions:s}),super.registerExternalSchema(e,t,n)}clearExternalSchemas(){super.clearExternalSchemas()}setSchemaContributions(e){super.setSchemaContributions(e)}getRegisteredSchemaIds(e){return super.getRegisteredSchemaIds(e)}getResolvedSchema(e){return super.getResolvedSchema(e)}onResourceChange(e){return super.onResourceChange(e)}};function F0(e){try{const t=yi.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var pv=class{constructor(e,t){this.telemetry=t,this.jsonDocumentSymbols=new wb(e),this.jsonDocumentSymbols.getKeyLabel=n=>{const r=n.keyNode.internalNode;let i="";return Pr(r)?i="{}":Br(r)?i="[]":i=r.source,i}}findDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){var n;let r=[];try{const i=qi.getYamlDocument(e);if(!i||i.documents.length===0)return null;for(const s of i.documents)s.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols(e,s,t)))}catch(i){(n=this.telemetry)==null||n.sendError("yaml.documentSymbols.error",{error:us(i)})}return r}findHierarchicalDocumentSymbols(e,t={resultLimit:Number.MAX_VALUE}){var n;let r=[];try{const i=qi.getYamlDocument(e);if(!i||i.documents.length===0)return null;for(const s of i.documents)s.root&&(r=r.concat(this.jsonDocumentSymbols.findDocumentSymbols2(e,s,t)))}catch(i){(n=this.telemetry)==null||n.sendError("yaml.hierarchicalDocumentSymbols.error",{error:us(i)})}return r}};function N0(e,t){for(const n of e)n.isKubernetes=t}var dv=class{constructor(e,t){this.telemetry=t,this.shouldHover=!0,this.schemaService=e}configure(e){e&&(this.shouldHover=e.hover,this.indentation=e.indentation)}doHover(e,t,n=!1){var r;try{if(!this.shouldHover||!e)return Promise.resolve(void 0);const i=qi.getYamlDocument(e),s=e.offsetAt(t),a=$u(s,i);if(a===null)return Promise.resolve(void 0);N0(i.documents,n);const o=i.documents.indexOf(a);return a.currentDocIndex=o,this.getHover(e,t,a)}catch(i){(r=this.telemetry)==null||r.sendError("yaml.hover.error",{error:us(i)})}}getHover(e,t,n){const r=e.offsetAt(t);let i=n.getNodeFromOffset(r);if(!i||(i.type==="object"||i.type==="array")&&r>i.offset+1&&r<i.offset+i.length-1)return Promise.resolve(null);const s=i;if(i.type==="string"){const l=i.parent;if(l&&l.type==="property"&&l.keyNode===i&&(i=l.valueNode,!i))return Promise.resolve(null)}const a=In.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length)),o=l=>{if(this.indentation!==void 0){const N=new RegExp(` {${this.indentation.length}}`,"g");l=l.replace(N," ")}return{contents:{kind:is.Markdown,value:l},range:a}},u=l=>l.replace(/\|\|\s*$/,"");return this.schemaService.getSchemaForResource(e.uri,n).then(l=>{if(l&&i&&!l.errors.length){const b=n.getMatchingSchemas(l.schema,i.offset);let c,N,B,ne;const Q=[];b.every(he=>{if((he.node===i||i.type==="property"&&i.valueNode===he.node)&&!he.inverted&&he.schema){if(c=c||he.schema.title||he.schema.closestTitle,N=N||he.schema.markdownDescription||Ju(he.schema.description),he.schema.enum){const Ee=he.schema.enum.indexOf(Ua(i));he.schema.markdownEnumDescriptions?B=he.schema.markdownEnumDescriptions[Ee]:he.schema.enumDescriptions&&(B=Ju(he.schema.enumDescriptions[Ee])),B&&(ne=he.schema.enum[Ee],typeof ne!="string"&&(ne=JSON.stringify(ne)))}he.schema.anyOf&&gv(i,b,he.schema)&&(c="",N="",he.schema.anyOf.forEach((Ee,Fe)=>{c+=Ee.title||he.schema.closestTitle||"",N+=Ee.markdownDescription||Ju(Ee.description)||"",Fe!==he.schema.anyOf.length-1&&(c+=" || ",N+=" || ")}),c=u(c),N=u(N)),he.schema.examples&&he.schema.examples.forEach(Ee=>{Q.push(JSON.stringify(Ee,null,2))})}return!0});let I="";return c&&(I="#### "+Ju(c)),N&&(I.length>0&&(I+=`
|
|
418
418
|
|
|
@@ -426,7 +426,7 @@ ${b.join(`
|
|
|
426
426
|
|
|
427
427
|
Source: [${hv(l.schema)}](${l.schema.url})`),o(I)}return null})}};function hv(e){let t="JSON Schema";const n=e.url;if(n){const r=yi.parse(n);t=Ys.basename(r.fsPath)}else e.title&&(t=e.title);return t}function Ju(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
|
|
428
428
|
|
|
429
|
-
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function mv(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}function gv(e,t,n){let r=0;for(const i of t)e===i.node&&i.schema!==n&&n.anyOf.forEach(s=>{i.schema.title===s.title&&i.schema.description===s.description&&i.schema.properties===s.properties&&r++});return r===n.anyOf.length}var yv=class{validate(e,t){const n=[],r=new Set,i=new Set,s=new Map;wr(t.internalDocument,(a,o,u)=>{
|
|
429
|
+
$3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function mv(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}function gv(e,t,n){let r=0;for(const i of t)e===i.node&&i.schema!==n&&n.anyOf.forEach(s=>{i.schema.title===s.title&&i.schema.description===s.description&&i.schema.properties===s.properties&&r++});return r===n.anyOf.length}var yv=class{validate(e,t){const n=[],r=new Set,i=new Set,s=new Map;wr(t.internalDocument,(a,o,u)=>{hr(o)&&((Lr(o)||qn(o))&&o.anchor&&(r.add(o),s.set(o,u[u.length-1])),Xi(o)&&i.add(o.resolve(t.internalDocument)))});for(const a of r)if(!i.has(a)){const o=this.getAnchorNode(s.get(a),a);if(o){const u=In.create(e.positionAt(o.offset),e.positionAt(o.offset+o.source.length)),l=Di.create(u,`Unused anchor "${o.source}"`,Hn.Hint,0);l.tags=[Dc.Unnecessary],n.push(l)}}return n}getAnchorNode(e,t){if(e&&e.srcToken){const n=e.srcToken;if(E0(n))return T0(n);if(UD(n))for(const r of n.items){if(t.srcToken!==r.value)continue;const i=T0(r);if(i)return i}}}};function T0(e){for(const t of e.start)if(t.type==="anchor")return t;if(e.sep&&Array.isArray(e.sep)){for(const t of e.sep)if(t.type==="anchor")return t}}var Dv=class{constructor(e){this.forbidMapping=e.flowMapping==="forbid",this.forbidSequence=e.flowSequence==="forbid"}validate(e,t){const n=[];return wr(t.internalDocument,(r,i)=>{var s,a;this.forbidMapping&&Pr(i)&&((s=i.srcToken)==null?void 0:s.type)==="flow-collection"&&n.push(Di.create(this.getRangeOf(e,i.srcToken),"Flow style mapping is forbidden",Hn.Error,"flowMap")),this.forbidSequence&&Br(i)&&((a=i.srcToken)==null?void 0:a.type)==="flow-collection"&&n.push(Di.create(this.getRangeOf(e,i.srcToken),"Flow style sequence is forbidden",Hn.Error,"flowSeq"))}),n}getRangeOf(e,t){return In.create(e.positionAt(t.start.offset),e.positionAt(t.end.pop().offset))}},bv=class{validate(e,t){const n=[];return wr(t.internalDocument,(r,i)=>{if(Pr(i)){for(let s=1;s<i.items.length;s++)if(Ev(i.items[s-1],i.items[s])>0){const a=vv(e,i.items[s-1]);n.push(Di.create(a,`Wrong ordering of key "${i.items[s-1].key}" in mapping`,Hn.Error,"mapKeyOrder"))}}}),n}};function vv(e,t){var n,r,i,s,a,o,u,l,b,c,N;const B=(o=(i=(n=t?.srcToken.start[0])==null?void 0:n.offset)!=null?i:(r=t?.srcToken)==null?void 0:r.key.offset)!=null?o:(a=(s=t?.srcToken)==null?void 0:s.sep[0])==null?void 0:a.offset,ne=((u=t?.srcToken)==null?void 0:u.value.offset)||((b=(l=t?.srcToken)==null?void 0:l.sep[0])==null?void 0:b.offset)||((c=t?.srcToken)==null?void 0:c.key.offset)||((N=t?.srcToken.start[t.srcToken.start.length-1])==null?void 0:N.offset);return In.create(e.positionAt(B),e.positionAt(ne))}function Ev(e,t){const n=String(t.key);return String(e.key).localeCompare(n)}var Av=(e,t)=>{const n=t.positionAt(e.location.start),r={start:n,end:e.location.toLineEnd?Hr.create(n.line,new Zs(t).getLineLength(n.line)):t.positionAt(e.location.end)};return Di.create(r,e.message,e.severity,e.code,Vu)},Cv=class{constructor(e,t){this.telemetry=t,this.validators=[],this.MATCHES_MULTIPLE="Matches multiple schemas when only one must validate.",this.validationEnabled=!0,this.jsonValidation=new vb(e,Promise)}configure(e){this.validators=[],e&&(this.validationEnabled=e.validate,this.customTags=e.customTags,this.disableAdditionalProperties=e.disableAdditionalProperties,this.yamlVersion=e.yamlVersion,(e.flowMapping==="forbid"||e.flowSequence==="forbid")&&this.validators.push(new Dv(e)),e.keyOrdering&&this.validators.push(new bv)),this.validators.push(new yv)}async doValidation(e,t=!1){var n;if(!this.validationEnabled)return Promise.resolve([]);const r=[];try{const o=qi.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0);let u=0;for(const l of o.documents){l.isKubernetes=t,l.currentDocIndex=u,l.disableAdditionalProperties=this.disableAdditionalProperties,l.uri=e.uri;const b=await this.jsonValidation.doValidation(e,l),c=l;c.errors.length>0&&r.push(...c.errors),c.warnings.length>0&&r.push(...c.warnings),r.push(...b),r.push(...this.runAdditionalValidators(e,l)),u++}}catch(o){(n=this.telemetry)==null||n.sendError("yaml.validation.error",{error:us(o)})}let i;const s=new Set,a=[];for(let o of r){if(t&&o.message===this.MATCHES_MULTIPLE)continue;if(Object.prototype.hasOwnProperty.call(o,"location")&&(o=Av(o,e)),o.source||(o.source=Vu),i&&i.message===o.message&&i.range.end.line===o.range.start.line&&Math.abs(i.range.end.character-o.range.end.character)>=1){i.range.end=o.range.end;continue}else i=o;const u=o.range.start.line+" "+o.range.start.character+" "+o.message;s.has(u)||(a.push(o),s.add(u))}return a}runAdditionalValidators(e,t){const n=[];for(const r of this.validators)n.push(...r.validate(e,t));return n}},xv=class{constructor(){this.formatterEnabled=!0}configure(e){e&&(this.formatterEnabled=e.format)}format(e,t){if(!this.formatterEnabled)return[];try{const n=e.getText(),r={parser:"yaml",plugins:[tb],tabWidth:t.tabWidth||t.tabSize,singleQuote:t.singleQuote,bracketSpacing:t.bracketSpacing,proseWrap:t.proseWrap==="always"?"always":t.proseWrap==="never"?"never":"preserve",printWidth:t.printWidth},i=ZD.format(n,r);return[Nr.replace(In.create(Hr.create(0,0),e.positionAt(n.length)),i)]}catch{return[]}}},Sv=class{constructor(e){this.telemetry=e}findLinks(e){var t;try{const n=qi.getYamlDocument(e),r=[];for(const i of n.documents)r.push(Nb(e,i));return Promise.all(r).then(i=>[].concat(...i))}catch(n){(t=this.telemetry)==null||t.sendError("yaml.documentLink.error",{error:us(n)})}}};function wv(e,t){if(!e)return;const n=[],r=qi.getYamlDocument(e);for(const s of r.documents)r.documents.length>1&&n.push(Yu(e,s.root)),s.visit(a=>{var o;if(a.type==="object"&&((o=a.parent)==null?void 0:o.type)==="array"&&n.push(Yu(e,a)),a.type==="property"&&a.valueNode)switch(a.valueNode.type){case"array":case"object":n.push(Yu(e,a));break;case"string":{const u=e.positionAt(a.offset),l=e.positionAt(a.valueNode.offset+a.valueNode.length);u.line!==l.line&&n.push(Yu(e,a));break}default:return!0}return!0});const i=t&&t.rangeLimit;return typeof i!="number"||n.length<=i?n:(t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri),n.slice(0,t.rangeLimit))}function Yu(e,t){const n=e.positionAt(t.offset);let r=e.positionAt(t.offset+t.length);const i=e.getText(In.create(n,r)),s=i.length-i.trimRight().length;return s>0&&(r=e.positionAt(t.offset+t.length-s)),gc.create(n.line,r.line,n.character,r.character)}var Hu;(function(e){e.JUMP_TO_SCHEMA="jumpToSchema"})(Hu||(Hu={}));var Fv=class{constructor(e){this.indentation=e}write(e){if(e.internalNode.srcToken.type!=="flow-collection")return null;const t=e.internalNode.srcToken,n=t.start.type==="flow-map-start"?"block-map":"block-seq",r=e.parent.type,i={type:n,offset:t.offset,indent:t.indent,items:[]};for(const s of t.items)Js(s,({key:a,sep:o,value:u})=>{if(n==="block-map"){const l=[{type:"space",indent:0,offset:a.offset,source:this.indentation}];r==="property"&&l.unshift({type:"newline",indent:0,offset:a.offset,source:`
|
|
430
430
|
`}),i.items.push({start:l,key:a,sep:o,value:u})}else n==="block-seq"&&i.items.push({start:[{type:"newline",indent:0,offset:u.offset,source:`
|
|
431
431
|
`},{type:"space",indent:0,offset:u.offset,source:this.indentation},{type:"seq-item-ind",indent:0,offset:u.offset,source:"-"},{type:"space",indent:0,offset:u.offset,source:" "}],value:u});if(u.type==="flow-collection")return wr.SKIP});return Vm(i)}},Nv=structuredClone,Tv=class{constructor(e){this.clientCapabilities=e,this.indentation=" "}configure(e){this.indentation=e.indentation}getCodeAction(e,t){if(!t.context.diagnostics)return;const n=[];return n.push(...this.getConvertToBooleanActions(t.context.diagnostics,e)),n.push(...this.getJumpToSchemaActions(t.context.diagnostics)),n.push(...this.getTabToSpaceConverting(t.context.diagnostics,e)),n.push(...this.getUnusedAnchorsDelete(t.context.diagnostics,e)),n.push(...this.getConvertToBlockStyleActions(t.context.diagnostics,e)),n.push(...this.getKeyOrderActions(t.context.diagnostics,e)),n}getJumpToSchemaActions(e){var t,n,r,i,s;if(!((i=(r=(n=(t=this.clientCapabilities)==null?void 0:t.window)==null?void 0:n.showDocument)==null?void 0:r.support)!=null?i:!1))return[];const o=new Map;for(const l of e){const b=((s=l.data)==null?void 0:s.schemaUri)||[];for(const c of b)c&&(o.has(c)||o.set(c,[]),o.get(c).push(l))}const u=[];for(const l of o.keys()){const b=ss.create(`Jump to schema location (${Ys.basename(l)})`,Vs.create("JumpToSchema",Hu.JUMP_TO_SCHEMA,l));b.diagnostics=o.get(l),u.push(b)}return u}getTabToSpaceConverting(e,t){const n=[],r=new Zs(t),i=[];for(const s of e)if(s.message==="Using tabs can lead to unpredictable results"){if(i.includes(s.range.start.line))continue;const a=r.getLineContent(s.range.start.line);let o=0,u="";for(let b=s.range.start.character;b<=s.range.end.character&&a.charAt(b)===" ";b++)o++,u+=this.indentation;i.push(s.range.start.line);let l=s.range;o!==s.range.end.character-s.range.start.character&&(l=In.create(s.range.start,Hr.create(s.range.end.line,s.range.start.character+o))),n.push(ss.create("Convert Tab to Spaces",Ga(t.uri,[Nr.replace(l,u)]),Fs.QuickFix))}if(n.length!==0){const s=[];for(let a=0;a<=r.getLineCount();a++){const o=r.getLineContent(a);let u=0,l="";for(let b=0;b<o.length;b++){const c=o.charAt(b);if(c!==" "&&c!==" "){u!==0&&(s.push(Nr.replace(In.create(a,b-u,a,b),l)),u=0,l="");break}if(c===" "&&u!==0){s.push(Nr.replace(In.create(a,b-u,a,b),l)),u=0,l="";continue}c===" "&&(l+=this.indentation,u++)}u!==0&&s.push(Nr.replace(In.create(a,0,a,r.getLineLength(a)),l))}s.length>0&&n.push(ss.create("Convert all Tabs to Spaces",Ga(t.uri,s),Fs.QuickFix))}return n}getUnusedAnchorsDelete(e,t){const n=[],r=new Zs(t);for(const i of e)if(i.message.startsWith("Unused anchor")&&i.source===Vu){const s=In.create(i.range.start,i.range.end),a=r.getText(s),o=r.getLineContent(s.end.line),u=gb(o,s.end.character);s.end.character=u;const l=ss.create(`Delete unused anchor: ${a}`,Ga(t.uri,[Nr.del(s)]),Fs.QuickFix);l.diagnostics=[i],n.push(l)}return n}getConvertToBooleanActions(e,t){const n=[];for(const r of e)if(r.message==='Incorrect type. Expected "boolean".'){const i=t.getText(r.range).toLocaleLowerCase();if(i==='"true"'||i==='"false"'||i==="'true'"||i==="'false'"){const s=i.includes("true")?"true":"false";n.push(ss.create("Convert to boolean",Ga(t.uri,[Nr.replace(r.range,s)]),Fs.QuickFix))}}return n}getConvertToBlockStyleActions(e,t){const n=[];for(const r of e)if(r.code==="flowMap"||r.code==="flowSeq"){const i=_0(t,r);if(Pr(i.internalNode)||Br(i.internalNode)){const s=Pr(i.internalNode)?"map":"sequence",a=new Fv(this.indentation);n.push(ss.create(`Convert to block style ${s}`,Ga(t.uri,[Nr.replace(r.range,a.write(i))]),Fs.QuickFix))}}return n}getKeyOrderActions(e,t){var n,r,i,s,a,o,u,l,b,c,N,B,ne,Q;const I=[];for(const he of e)if(he?.code==="mapKeyOrder"){let Ee=_0(t,he);for(;Ee&&Ee.type!=="object";)Ee=Ee.parent;if(Ee&&Pr(Ee.internalNode)){const Fe=Nv(Ee.internalNode);if((Fe.srcToken.type==="block-map"||Fe.srcToken.type==="flow-collection")&&(Ee.internalNode.srcToken.type==="block-map"||Ee.internalNode.srcToken.type==="flow-collection")){Fe.srcToken.items.sort((ue,Ae)=>{if(ue.key&&Ae.key&&of(ue.key)&&of(Ae.key))return ue.key.source.localeCompare(Ae.key.source);if(!ue.key&&Ae.key)return-1;if(ue.key&&!Ae.key)return 1;if(!ue.key&&!Ae.key)return 0});for(let ue=0;ue<Fe.srcToken.items.length;ue++){const Ae=Fe.srcToken.items[ue],Qe=Ee.internalNode.srcToken.items[ue];if(Ae.start=Qe.start,((n=Ae.value)==null?void 0:n.type)==="alias"||((r=Ae.value)==null?void 0:r.type)==="scalar"||((i=Ae.value)==null?void 0:i.type)==="single-quoted-scalar"||((s=Ae.value)==null?void 0:s.type)==="double-quoted-scalar"){const Dt=(u=(o=(a=Ae.value)==null?void 0:a.end)==null?void 0:o.findIndex(Xe=>Xe.type==="newline"))!=null?u:-1;let Ve=null;((l=Qe.value)==null?void 0:l.type)==="block-scalar"?Ve=(c=(b=Qe.value)==null?void 0:b.props)==null?void 0:c.find(Xe=>Xe.type==="newline"):of(Qe.value)&&(Ve=(B=(N=Qe.value)==null?void 0:N.end)==null?void 0:B.find(Xe=>Xe.type==="newline")),Ve&&Dt<0&&(Ae.value.end=(ne=Ae.value.end)!=null?ne:[],Ae.value.end.push(Ve)),!Ve&&Dt>-1&&Ae.value.end.splice(Dt,1)}else((Q=Ae.value)==null?void 0:Q.type)==="block-scalar"&&(Ae.value.props.find(Ve=>Ve.type==="newline")||Ae.value.props.push({type:"newline",indent:0,offset:Ae.value.offset,source:`
|
|
432
432
|
`}))}}const Be=In.create(t.positionAt(Ee.offset),t.positionAt(Ee.offset+Ee.length));I.push(ss.create("Fix key order for this map",Ga(t.uri,[Nr.replace(Be,Vm(Fe.srcToken))]),Fs.QuickFix))}}return I}};function _0(e,t){const n=qi.getYamlDocument(e),r=e.offsetAt(t.range.start);return $u(r,n).getNodeFromOffset(r)}function Ga(e,t){const n={};return n[e]=t,{changes:n}}function _v(e,t){const{position:n}=t,r=new Zs(e);if(t.ch===`
|
|
@@ -434,7 +434,7 @@ $3`).replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function mv(e){return e.indexOf("`"
|
|
|
434
434
|
`+a+"- "+n(e[u]);continue}Array.isArray(e[u])||(l=Iv(e[u],s)),o+=zu(l,t,n,r,i+=1,s)}return o}else{const o=Object.keys(e);if(o.length===0)return"";let u=i===0&&r.newLineFirst||i>0?`
|
|
435
435
|
`:"",l=!0;for(let b=0;b<o.length;b++){const c=o[b];if(i===0&&r.existingProps.includes(c))continue;const N=typeof e[c]=="object",B=N?":":": ",ne=N&&/^\s|-/.test(c)?r.indentation:"",Q=a+ne,I=l?"":`
|
|
436
436
|
`;if(i===0&&l&&!r.indentFirstObject){const he=zu(e[c],Q,n,r,i+1,0);u+=I+t+c+B+he}else{const he=zu(e[c],Q,n,r,i+1,0);u+=I+a+c+B+he}l=!1}return u}}return n(e)}function Iv(e,t){const n={};for(let r=0;r<Object.keys(e).length;r++){const i=Object.keys(e)[r];r===0?n["- ".repeat(t)+i]=e[i]:n[" ".repeat(t)+i]=e[i]}return n}var Ov=Hs(),k0=/[\\]+"/g,P0=bi.Class,Qu="__",jv=class{constructor(e,t={},n,r){this.schemaService=e,this.clientCapabilities=t,this.yamlDocument=n,this.telemetry=r,this.completionEnabled=!0,this.arrayPrefixIndentation=""}configure(e){e&&(this.completionEnabled=e.completion),this.customTags=e.customTags,this.yamlVersion=e.yamlVersion,this.configuredIndentation=e.indentation,this.disableDefaultProperties=e.disableDefaultProperties,this.parentSkeletonSelectedFirst=e.parentSkeletonSelectedFirst}async doComplete(e,t,n=!1,r=!0){var i;const s=Nc.create([],!1);if(!this.completionEnabled)return s;const a=this.yamlDocument.getYamlDocument(e,{customTags:this.customTags,yamlVersion:this.yamlVersion},!0),o=new Zs(e);if(this.configuredIndentation)this.indentation=this.configuredIndentation;else{const ue=Mv(o,2,!0);this.indentation=ue.insertSpaces?" ".repeat(ue.tabSize):" "}N0(a.documents,n);for(const ue of a.documents)ue.uri=e.uri;const u=e.offsetAt(t),l=e.getText();if(l.charAt(u-1)===":")return Promise.resolve(s);let b=$u(u,a);if(b===null)return Promise.resolve(s);b=b.clone();let[c,N]=b.getNodeFromPosition(u,o,this.indentation.length);const B=this.getCurrentWord(e,u);let ne=o.getLineContent(t.line);const Q=ne.substring(t.character),I=/^[ ]+\n?$/.test(Q);this.arrayPrefixIndentation="";let he=null;if(I){he=In.create(t,Hr.create(t.line,ne.length));const ue=ne.trim().length===0,Ae=ne.match(/^\s*(-)\s*$/);if(c&&qn(c)&&!ue&&!Ae){const Qe=ne.substring(0,t.character),Dt=Qe.match(/^[\s-]*([^:]+)?$/)||Qe.match(/:[ \t]((?!:[ \t]).*)$/);Dt?.[1]&&(he=In.create(Hr.create(t.line,t.character-Dt[1].length),Hr.create(t.line,ne.length)))}}else if(c&&qn(c)&&c.value==="null"){const ue=e.positionAt(c.range[0]);ue.character+=1;const Ae=e.positionAt(c.range[2]);Ae.character+=1,he=In.create(ue,Ae)}else if(c&&qn(c)&&c.value){const ue=e.positionAt(c.range[0]);he=In.create(ue,e.positionAt(c.range[1]))}else if(c&&qn(c)&&c.value===null&&B==="-")he=In.create(t,t),this.arrayPrefixIndentation=" ";else{let ue=u-B.length;ue>0&&l[ue-1]==='"'&&ue--,he=In.create(e.positionAt(ue),t)}const Ee={},Fe={add:(ue,Ae)=>{const Qe=function(me){var He;if(((He=Ee[me.label])==null?void 0:He.label)===Qu)return;const Rt=me.parent.schema,Vt=pf(Rt),sn=Rt.markdownDescription||Rt.description;let Cn=s.items.find(Zn=>{var Un;return((Un=Zn.parent)==null?void 0:Un.schema)===Rt&&Zn.kind===P0});Cn&&Cn.parent.insertTexts.includes(me.insertText)||(Cn?Cn.parent.insertTexts.push(me.insertText):(Cn={...me,label:Vt,documentation:sn,sortText:"_"+Vt,kind:P0},Cn.label=Cn.label||me.label,Cn.parent.insertTexts=[me.insertText],s.items.push(Cn)))},Dt=!!ue.parent;let Ve=ue.label;if(!Ve){console.warn(`Ignoring CompletionItem without label: ${JSON.stringify(ue)}`);return}if(Va(Ve)||(Ve=String(Ve)),Ve=Ve.replace(/[\n]/g,"↵"),Ve.length>60){const me=Ve.substr(0,57).trim()+"...";Ee[me]||(Ve=me)}if(ue.insertText.endsWith("$1")&&!Dt&&(ue.insertText=ue.insertText.substr(0,ue.insertText.length-2)),he&&he.start.line===he.end.line&&(ue.textEdit=Nr.replace(he,ue.insertText)),ue.label=Ve,Dt){Qe(ue);return}this.arrayPrefixIndentation&&this.updateCompletionText(ue,this.arrayPrefixIndentation+ue.insertText);const Xe=Ee[Ve],ze=Xe?.label!==Qu&&Xe?.insertText!==ue.insertText;if(!Xe)Ee[Ve]=ue,s.items.push(ue);else if(ze){const me=this.mergeSimpleInsertTexts(Ve,Xe.insertText,ue.insertText,Ae);me?this.updateCompletionText(Xe,me):(Ee[Ve]=ue,s.items.push(ue))}Xe&&!Xe.documentation&&ue.documentation&&(Xe.documentation=ue.documentation)},error:ue=>{var Ae;(Ae=this.telemetry)==null||Ae.sendError("yaml.completion.error",{error:us(ue)})},log:ue=>{console.log(ue)},getNumberOfProposals:()=>s.items.length,result:s,proposed:Ee};this.customTags.length>0&&this.getCustomTagValueCompletions(Fe),ne.endsWith(`
|
|
437
|
-
`)&&(ne=ne.substr(0,ne.length-1));try{const ue=await this.schemaService.getSchemaForResource(e.uri,b);if((!ue||ue.errors.length)&&t.line===0&&t.character===0&&!vf(ne)){const Ve={kind:bi.Text,label:"Inline schema",insertText:"# yaml-language-server: $schema=",insertTextFormat:Kr.PlainText};s.items.push(Ve)}if(vf(ne)||Zb(a.tokens,u)){const Ve=ne.indexOf("$schema=");return Ve!==-1&&Ve+8<=t.character&&this.schemaService.getAllSchemas().forEach(Xe=>{var ze;const me={kind:bi.Constant,label:(ze=Xe.name)!=null?ze:Xe.uri,detail:Xe.description,insertText:Xe.uri,insertTextFormat:Kr.PlainText,insertTextMode:wc.asIs};s.items.push(me)}),s}if(!ue||ue.errors.length)return s;let Ae=null;if(!c)if(!b.internalDocument.contents||qn(b.internalDocument.contents)){const Ve=b.internalDocument.createNode({});Ve.range=[u,u+1,u+1],b.internalDocument.contents=Ve,b.updateFromInternalDocument(),c=Ve}else c=b.findClosestNode(u,o),N=!0;const Qe=c;if(c)if(ne.length===0)c=b.internalDocument.contents;else{const Ve=b.getParent(c);if(Ve){if(qn(c)){if(c.value){if(dr(Ve)){if(Ve.value===c){if(ne.trim().length>0&&ne.indexOf(":")<0){const Xe=this.createTempObjNode(B,c,b),ze=b.getParent(Ve);if(Br(b.internalDocument.contents)){const me=Kb(b.internalDocument.contents,Ve);typeof me=="number"&&(b.internalDocument.set(me,Xe),b.updateFromInternalDocument())}else ze&&(Pr(ze)||Br(ze))?(ze.set(Ve.key,Xe),b.updateFromInternalDocument()):(b.internalDocument.set(Ve.key,Xe),b.updateFromInternalDocument());Ae=Xe.items[0],c=Xe}else if(ne.trim().length===0){const Xe=b.getParent(Ve);Xe&&(c=Xe)}}else if(Ve.key===c){const Xe=b.getParent(Ve);Ae=Ve,Xe&&(c=Xe)}}else if(Br(Ve))if(ne.trim().length>0){const Xe=this.createTempObjNode(B,c,b);Ve.delete(c),Ve.add(Xe),b.updateFromInternalDocument(),c=Xe}else c=Ve}else if(c.value===null){if(dr(Ve)){if(Ve.key===c)c=Ve;else if(
|
|
437
|
+
`)&&(ne=ne.substr(0,ne.length-1));try{const ue=await this.schemaService.getSchemaForResource(e.uri,b);if((!ue||ue.errors.length)&&t.line===0&&t.character===0&&!vf(ne)){const Ve={kind:bi.Text,label:"Inline schema",insertText:"# yaml-language-server: $schema=",insertTextFormat:Kr.PlainText};s.items.push(Ve)}if(vf(ne)||Zb(a.tokens,u)){const Ve=ne.indexOf("$schema=");return Ve!==-1&&Ve+8<=t.character&&this.schemaService.getAllSchemas().forEach(Xe=>{var ze;const me={kind:bi.Constant,label:(ze=Xe.name)!=null?ze:Xe.uri,detail:Xe.description,insertText:Xe.uri,insertTextFormat:Kr.PlainText,insertTextMode:wc.asIs};s.items.push(me)}),s}if(!ue||ue.errors.length)return s;let Ae=null;if(!c)if(!b.internalDocument.contents||qn(b.internalDocument.contents)){const Ve=b.internalDocument.createNode({});Ve.range=[u,u+1,u+1],b.internalDocument.contents=Ve,b.updateFromInternalDocument(),c=Ve}else c=b.findClosestNode(u,o),N=!0;const Qe=c;if(c)if(ne.length===0)c=b.internalDocument.contents;else{const Ve=b.getParent(c);if(Ve){if(qn(c)){if(c.value){if(dr(Ve)){if(Ve.value===c){if(ne.trim().length>0&&ne.indexOf(":")<0){const Xe=this.createTempObjNode(B,c,b),ze=b.getParent(Ve);if(Br(b.internalDocument.contents)){const me=Kb(b.internalDocument.contents,Ve);typeof me=="number"&&(b.internalDocument.set(me,Xe),b.updateFromInternalDocument())}else ze&&(Pr(ze)||Br(ze))?(ze.set(Ve.key,Xe),b.updateFromInternalDocument()):(b.internalDocument.set(Ve.key,Xe),b.updateFromInternalDocument());Ae=Xe.items[0],c=Xe}else if(ne.trim().length===0){const Xe=b.getParent(Ve);Xe&&(c=Xe)}}else if(Ve.key===c){const Xe=b.getParent(Ve);Ae=Ve,Xe&&(c=Xe)}}else if(Br(Ve))if(ne.trim().length>0){const Xe=this.createTempObjNode(B,c,b);Ve.delete(c),Ve.add(Xe),b.updateFromInternalDocument(),c=Xe}else c=Ve}else if(c.value===null){if(dr(Ve)){if(Ve.key===c)c=Ve;else if(hr(Ve.key)&&Ve.key.range){const Xe=b.getParent(Ve);if(N&&Xe&&Pr(Xe)&&Xb(Xe))c=Xe;else{const ze=e.positionAt(Ve.key.range[0]);if(t.character>ze.character&&t.line!==ze.line){const me=this.createTempObjNode(B,c,b);Xe&&(Pr(Xe)||Br(Xe))?(Xe.set(Ve.key,me),b.updateFromInternalDocument()):(b.internalDocument.set(Ve.key,me),b.updateFromInternalDocument()),Ae=me.items[0],c=me}else ze.character===t.character&&Xe&&(c=Xe)}}}else if(Br(Ve))if(ne.charAt(t.character-1)!=="-"){const Xe=this.createTempObjNode(B,c,b);Ve.delete(c),Ve.add(Xe),b.updateFromInternalDocument(),c=Xe}else if(ne.charAt(t.character-1)==="-"){const Xe=this.createTempObjNode("",c,b);Ve.delete(c),Ve.add(Xe),b.updateFromInternalDocument(),c=Xe}else c=Ve}}else if(Pr(c)&&!N&&ne.trim().length===0&&Br(Ve)){const Xe=o.getLineContent(t.line+1);(o.getLineCount()===t.line+1||Xe.trim().length===0)&&(c=Ve)}}else if(qn(c)){const Xe=this.createTempObjNode(B,c,b);b.internalDocument.contents=Xe,b.updateFromInternalDocument(),Ae=Xe.items[0],c=Xe}else if(Pr(c))for(const Xe of c.items)hr(Xe.value)&&Xe.value.range&&Xe.value.range[0]===u+1&&(c=Xe.value);else if(Br(c)&&ne.charAt(t.character-1)!=="-"){const Xe=this.createTempObjNode(B,c,b);Xe.items=[],b.updateFromInternalDocument();for(const ze of c.items)Pr(ze)&&ze.items.forEach(me=>{Xe.items.push(me)});c=Xe}}if(c&&Pr(c)){const Ve=c.items;for(const Xe of Ve)(!Ae||Ae!==Xe)&&qn(Xe.key)&&(Ee[Xe.key.value+""]=Fc.create(Qu));this.addPropertyCompletions(ue,b,c,Qe,"",Fe,o,he,r),!ue&&B.length>0&&l.charAt(u-B.length-1)!=='"'&&Fe.add({kind:bi.Property,label:B,insertText:this.getInsertTextForProperty(B,null,""),insertTextFormat:Kr.Snippet})}const Dt={};this.getValueCompletions(ue,b,c,u,e,Fe,Dt,r)}catch(ue){(i=this.telemetry)==null||i.sendError("yaml.completion.error",{error:us(ue)})}this.finalizeParentCompletion(s);const Be=s.items.filter((ue,Ae,Qe)=>Ae===Qe.findIndex(Dt=>Dt.label===ue.label&&Dt.insertText===ue.insertText&&Dt.kind===ue.kind));return Be?.length>0&&(s.items=Be),s}updateCompletionText(e,t){e.insertText=t,e.textEdit&&(e.textEdit.newText=t)}mergeSimpleInsertTexts(e,t,n,r){const i=b=>b.includes(`
|
|
438
438
|
`),s=b=>b.startsWith(`
|
|
439
439
|
`),a=b=>{const c=b.indexOf(`
|
|
440
440
|
`);return c>0&&b.substring(c,b.length).trim().length===0};if(i(t)||i(n))return r&&a(t)&&!a(n)&&!s(n)?n:void 0;const o=this.getValuesFromInsertText(t),u=this.getValuesFromInsertText(n),l=Array.prototype.concat(o,u);if(l.length)return l.length===1?`${e}: \${1:${l[0]}}`:`${e}: \${1|${l.join(",")}|}`}getValuesFromInsertText(e){const t=e.substring(e.indexOf(":")+1).trim();if(!t)return[];const n=t.match(/^\${1[|:]([^|]*)+\|?}$/);return n?n[1].split(","):[t]}finalizeParentCompletion(e){const t=n=>{let r=0;return n.map(i=>{const s=i.match(/\$([0-9]+)|\${[0-9]+:/g);if(!s)return i;const a=s.map(u=>+u.replace(/\${([0-9]+)[:|]/g,"$1").replace("$","")).reduce((u,l)=>l>u?l:u,0),o=i.replace(/\$([0-9]+)/g,(u,l)=>"$"+(+l+r)).replace(/\${([0-9]+)[:|]/g,(u,l)=>"${"+(+l+r)+":");return r+=a,o})};e.items.forEach(n=>{if(Vv(n)){const r=n.parent.indent||"";let s=t(n.parent.insertTexts).join(`
|
|
@@ -468,4 +468,4 @@ ${u.insertText}
|
|
|
468
468
|
\`\`\`
|
|
469
469
|
${t}
|
|
470
470
|
\`\`\``)),n}getSuggestionKind(e){if(Array.isArray(e)){const t=e;e=t.length>0?t[0]:null}if(!e)return bi.Value;switch(e){case"string":return bi.Value;case"object":return bi.Module;case"property":return bi.Property;default:return bi.Value}}getCurrentWord(e,t){let n=t-1;const r=e.getText();for(;n>=0&&`
|
|
471
|
-
\r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:is.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(is.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,t,n){for(let r=e.items.length-1;r>=0;r--){const i=e.items[r];if(
|
|
471
|
+
\r\v":{[,]}`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,t)}fromMarkup(e){if(e&&this.doesSupportMarkdown())return{kind:is.Markdown,value:e}}doesSupportMarkdown(){if(this.supportsMarkdown===void 0){const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&e.completionItem.documentationFormat.indexOf(is.Markdown)!==-1}return this.supportsMarkdown}findItemAtOffset(e,t,n){for(let r=e.items.length-1;r>=0;r--){const i=e.items[r];if(hr(i)&&i.range){if(n>i.range[1])return r;if(n>=i.range[0])return r}}return 0}},Rv=/^\d+$/;function Xu(e){let t;if(typeof e=="string"?t=e:t=""+e,t.length===0)return t;if(t==="true"||t==="false"||t==="null"||Rv.test(t))return`"${t}"`;t.indexOf('"')!==-1&&(t=t.replace(k0,'"'));let n=!isNaN(parseInt(t))||t.charAt(0)==="@";if(!n){let r=t.indexOf(":",0);for(;r>0&&r<t.length;r=t.indexOf(":",r+1)){if(r===t.length-1){n=!0;break}const i=t.charAt(r+1);if(i===" "||i===" "){n=!0;break}}}return n&&(t=`"${t}"`),t}function $v(e){return e.replace(/\$\{1:(.*)\}/,"$1")}function Vv(e){return"parent"in e}function qv(){}var Uv=class{constructor(e){this.telemetry=e}getDefinition(e,t){var n;try{const r=qi.getYamlDocument(e),i=e.offsetAt(t.position),s=$u(i,r);if(s){const[a]=s.getNodeFromPosition(i,new Zs(e));if(a&&Xi(a)){const o=a.resolve(s.internalDocument);if(o&&o.range){const u=In.create(e.positionAt(o.range[0]),e.positionAt(o.range[2])),l=In.create(e.positionAt(o.range[0]),e.positionAt(o.range[1]));return[hc.create(e.uri,u,l)]}}}}catch(r){(n=this.telemetry)==null||n.sendError("yaml.definition.error",{error:us(r)})}}};function Wv(e,t){if(!e)return;const n=qi.getYamlDocument(e);return t.map(i=>{const s=r(i);let a;for(const o of s)a=hu.create(o,a);return a||(a=hu.create({start:i,end:i})),a});function r(i){const s=e.offsetAt(i),a=[];for(const o of n.documents){let u,l,b=!0;for(o.visit(c=>{if(c.offset+c.length<s)return!0;let B=c.offset;if(B>s){const ne=e.positionAt(B);if(ne.line!==i.line)return!0;const Q={line:ne.line,character:0};if(e.getText({start:Q,end:ne}).trim().length!==0||(B=e.offsetAt(Q),B>s))return!0}return(!u||B>=u.offset)&&(u=c,l=B),!0});u;){const c=b?l:u.offset,N=u.offset+u.length,B={start:e.positionAt(c),end:e.positionAt(N)},ne=e.getText(B),Q=ne.trimEnd(),I=ne.length-Q.length;I>0&&(B.end=e.positionAt(N-I));const he=(Ee,Fe)=>Q.startsWith(Ee)&&Q.endsWith(Fe||Ee);(u.type==="string"&&(he("'")||he('"'))||u.type==="object"&&he("{","}")||u.type==="array"&&he("[","]"))&&a.push({start:e.positionAt(c+1),end:e.positionAt(N-1)}),a.push(B),u=u.parent,b=!1}if(a.length>0)break}return a.reverse()}}var Af;(function(e){e[e.SchemaStore=1]="SchemaStore",e[e.SchemaAssociation=2]="SchemaAssociation",e[e.Settings=3]="Settings"})(Af||(Af={}));function Gv(e){const t=new fv(e.schemaRequestService,e.workspaceContext),n=new jv(t,e.clientCapabilities,qi,e.telemetry),r=new dv(t,e.telemetry),i=new pv(t,e.telemetry),s=new Cv(t,e.telemetry),a=new xv,o=new Tv(e.clientCapabilities),u=new kv(t,e.telemetry),l=new Sv(e.telemetry),b=new Uv(e.telemetry);return new qv(t,e.yamlSettings,e.connection),{configure:c=>{t.clearExternalSchemas(),c.schemas&&(t.schemaPriorityMapping=new Map,c.schemas.forEach(N=>{const B=N.priority?N.priority:0;t.addSchemaPriority(N.uri,B),t.registerExternalSchema(N.uri,N.fileMatch,N.schema,N.name,N.description,N.versions)})),s.configure(c),r.configure(c),n.configure(c),a.configure(c),o.configure(c)},registerCustomSchemaProvider:c=>{t.registerCustomSchemaProvider(c)},findLinks:l.findLinks.bind(l),doComplete:n.doComplete.bind(n),doValidation:s.doValidation.bind(s),doHover:r.doHover.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findHierarchicalDocumentSymbols.bind(i),doDefinition:b.getDefinition.bind(b),resetSchema:c=>t.onResourceChange(c),doFormat:a.format.bind(a),doDocumentOnTypeFormatting:_v,addSchema:(c,N)=>t.saveSchema(c,N),deleteSchema:c=>t.deleteSchema(c),modifySchemaContent:c=>t.addContent(c),deleteSchemaContent:c=>t.deleteContent(c),deleteSchemasWhole:c=>t.deleteSchemas(c),getFoldingRanges:wv,getSelectionRanges:Wv,getCodeAction:(c,N)=>o.getCodeAction(c,N),getCodeLens:c=>u.getCodeLens(c),resolveCodeLens:c=>u.resolveCodeLens(c)}}async function Jv(e){const t=await fetch(e);if(t.ok)return t.text();throw new Error(`Schema request failed for ${e}`)}var Yv={send(){},sendError(e,t){console.error("monaco-yaml",e,t)},sendTrack(){}},Hv={resolveRelativePath(e,t){return String(new URL(e,t))}};Py((e,{enableSchemaRequest:t,...n})=>{const r=Gv({schemaRequestService:t?Jv:null,telemetry:Yv,workspaceContext:Hv}),i=s=>(a,...o)=>{const u=e.getMirrorModels();for(const l of u)if(String(l.uri)===a)return s(lc.create(a,"yaml",l.version,l.getValue()),...o)};return r.configure(n),{doValidation:i(s=>r.doValidation(s,!!n.isKubernetes)),doComplete:i((s,a)=>r.doComplete(s,a,!!n.isKubernetes)),doDefinition:i((s,a)=>r.doDefinition(s,{position:a,textDocument:s})),doHover:i((s,a)=>r.doHover(s,a)),format:i(s=>r.doFormat(s,{})),resetSchema:s=>r.resetSchema(s),findDocumentSymbols:i(s=>r.findDocumentSymbols2(s,{})),findLinks:i(s=>r.findLinks(s)),getCodeAction:i((s,a,o)=>r.getCodeAction(s,{range:a,textDocument:s,context:o})),getFoldingRanges:i(s=>r.getFoldingRanges(s,{lineFoldingOnly:!0}))}})})();
|