mirror of
https://codeberg.org/Kankys/NewLukasBlog.git
synced 2026-11-11 06:14:36 +01:00
OpravyPoAI
This commit is contained in:
1 parent
99aa797101
commit
24fd53c94c
4746 files changed
+700320
-12
No files matched your search
+6
@@ -0,0 +1,6 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
acorn: Parser;
|
||||
espree: Parser;
|
||||
};
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.acorn=e()}})(function(){"use strict";var Bi=Object.create;var me=Object.defineProperty;var Fi=Object.getOwnPropertyDescriptor;var ji=Object.getOwnPropertyNames;var Ui=Object.getPrototypeOf,Gi=Object.prototype.hasOwnProperty;var ct=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}},Be=(e,t)=>{for(var i in t)me(e,i,{get:t[i],enumerable:!0})},pt=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ji(t))!Gi.call(e,s)&&s!==i&&me(e,s,{get:()=>t[s],enumerable:!(r=Fi(t,s))||r.enumerable});return e};var lt=(e,t,i)=>(i=e!=null?Bi(Ui(e)):{},pt(t||!e||!e.__esModule?me(i,"default",{value:e,enumerable:!0}):i,e)),Wi=e=>pt(me({},"__esModule",{value:!0}),e);var ii=ct((Ns,ti)=>{ti.exports={}});var et=ct((Ls,$e)=>{"use strict";var wr=ii(),Ir=/^[\da-fA-F]+$/,Pr=/^\d+$/,ri=new WeakMap;function si(e){e=e.Parser.acorn||e;let t=ri.get(e);if(!t){let i=e.tokTypes,r=e.TokContext,s=e.TokenType,n=new r("<tag",!1),o=new r("</tag",!1),h=new r("<tag>...</tag>",!0,!0),c={tc_oTag:n,tc_cTag:o,tc_expr:h},l={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(h),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(m){let S=this.context.pop();S===n&&m===i.slash||S===o?(this.context.pop(),this.exprAllowed=this.curContext()===h):this.exprAllowed=!0},t={tokContexts:c,tokTypes:l},ri.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}$e.exports=function(e){return e=e||{},function(t){return Nr({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty($e.exports,"tokTypes",{get:function(){return si(void 0).tokTypes},configurable:!0,enumerable:!0});function Nr(e,t){let i=t.acorn||void 0,r=si(i),s=i.tokTypes,n=r.tokTypes,o=i.tokContexts,h=r.tokContexts.tc_oTag,c=r.tokContexts.tc_cTag,l=r.tokContexts.tc_expr,m=i.isNewLine,S=i.isIdentifierStart,E=i.isIdentifierChar;return class extends t{static get acornJsx(){return r}jsx_readToken(){let p="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:return this.pos===this.start?y===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(y):(p+=this.input.slice(x,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(x,this.pos),p+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(y===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(y)?(p+=this.input.slice(x,this.pos),p+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(p){let x=this.input.charCodeAt(this.pos),y;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,y=p?`
|
||||
`:`\r
|
||||
`):y=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),y}jsx_readString(p){let x="",y=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let v=this.input.charCodeAt(this.pos);if(v===p)break;v===38?(x+=this.input.slice(y,this.pos),x+=this.jsx_readEntity(),y=this.pos):m(v)?(x+=this.input.slice(y,this.pos),x+=this.jsx_readNewLine(!1),y=this.pos):++this.pos}return x+=this.input.slice(y,this.pos++),this.finishToken(s.string,x)}jsx_readEntity(){let p="",x=0,y,v=this.input[this.pos];v!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(v=this.input[this.pos++],v===";"){p[0]==="#"?p[1]==="x"?(p=p.substr(2),Ir.test(p)&&(y=String.fromCharCode(parseInt(p,16)))):(p=p.substr(1),Pr.test(p)&&(y=String.fromCharCode(parseInt(p,10)))):y=wr[p];break}p+=v}return y||(this.pos=N,"&")}jsx_readWord(){let p,x=this.pos;do p=this.input.charCodeAt(++this.pos);while(E(p)||p===45);return this.finishToken(n.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let p=this.startNode();return this.type===n.jsxName?p.name=this.value:this.type.keyword?p.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(p,"JSXIdentifier")}jsx_parseNamespacedName(){let p=this.start,x=this.startLoc,y=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(s.colon))return y;var v=this.startNodeAt(p,x);return v.namespace=y,v.name=this.jsx_parseIdentifier(),this.finishNode(v,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let p=this.start,x=this.startLoc,y=this.jsx_parseNamespacedName();for(this.type===s.dot&&y.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(s.dot);){let v=this.startNodeAt(p,x);v.object=y,v.property=this.jsx_parseIdentifier(),y=this.finishNode(v,"JSXMemberExpression")}return y}jsx_parseAttributeValue(){switch(this.type){case s.braceL:let p=this.jsx_parseExpressionContainer();return p.expression.type==="JSXEmptyExpression"&&this.raise(p.start,"JSX attributes must only be assigned a non-empty expression"),p;case n.jsxTagStart:case s.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let p=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(p,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let p=this.startNode();return this.next(),p.expression=this.type===s.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(s.braceR),this.finishNode(p,"JSXExpressionContainer")}jsx_parseAttribute(){let p=this.startNode();return this.eat(s.braceL)?(this.expect(s.ellipsis),p.argument=this.parseMaybeAssign(),this.expect(s.braceR),this.finishNode(p,"JSXSpreadAttribute")):(p.name=this.jsx_parseNamespacedName(),p.value=this.eat(s.eq)?this.jsx_parseAttributeValue():null,this.finishNode(p,"JSXAttribute"))}jsx_parseOpeningElementAt(p,x){let y=this.startNodeAt(p,x);y.attributes=[];let v=this.jsx_parseElementName();for(v&&(y.name=v);this.type!==s.slash&&this.type!==n.jsxTagEnd;)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(s.slash),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(p,x){let y=this.startNodeAt(p,x),v=this.jsx_parseElementName();return v&&(y.name=v),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(p,x){let y=this.startNodeAt(p,x),v=[],N=this.jsx_parseOpeningElementAt(p,x),de=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(p=this.start,x=this.startLoc,this.next(),this.eat(s.slash)){de=this.jsx_parseClosingElementAt(p,x);break e}v.push(this.jsx_parseElementAt(p,x));break;case n.jsxText:v.push(this.parseExprAtom());break;case s.braceL:v.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(de.name)!==pe(N.name)&&this.raise(de.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let Me=N.name?"Element":"Fragment";return y["opening"+Me]=N,y["closing"+Me]=de,y.children=v,this.type===s.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(y,"JSX"+Me)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(p,x)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let x=this.curContext();if(x===l)return this.jsx_readToken();if(x===h||x===c){if(S(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&x==h)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ft(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}if(ft(t.onComment)&&(t.onComment=er(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function er(e,t){return function(i,r,s,n,o,h){var c={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(c.loc=new Se(this,o,h)),e.ranges&&(c.range=[s,n]),t.push(c)}}var X=1,z=2,Je=4,kt=8,Xe=16,At=32,Ce=64,Tt=128,Q=256,he=512,wt=1024,_e=X|z|Q;function ze(e,t){return z|(e?Je:0)|(t?kt:0)}var ye=0,Qe=1,q=2,It=3,Pt=4,Nt=5,A=function(t,i,r){this.options=t=$i(t),this.sourceFile=t.sourceFile,this.keywords=H(Ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Fe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=H(s);var n=(s?s+" ":"")+Fe.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Fe.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
|
||||
`,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?z:X),this.regexpState=null,this.privateNameStack=[]},M={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};A.prototype.parse=function(){var t=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(i)})};M.inFunction.get=function(){return(this.currentVarScope().flags&z)>0};M.inGenerator.get=function(){return(this.currentVarScope().flags&kt)>0};M.inAsync.get=function(){return(this.currentVarScope().flags&Je)>0};M.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he))return!1;if(i&z)return(i&Je)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};M.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&X)};M.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Ce)>0||this.options.allowSuperOutsideMethod};M.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Tt)>0};M.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};M.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he)||i&z&&!(i&Xe))return!0}return!1};M.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&wt||!this.inModule&&t&X)};M.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Q)>0};A.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};A.parse=function(t,i){return new this(i,t).parse()};A.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};A.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(A.prototype,M);var P=A.prototype,tr=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=tr.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){T.lastIndex=e+t[0].length;var i=T.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,T.lastIndex=e,e+=T.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Ee=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingCoLine truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(r)r=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),r,s,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(r=this.eat(a.star)));var h=this.containsEsc;return this.parsePropertyName(i),!e&&!h&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,n,o,t,h),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,r,s,n,o,h){(i||r)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,r),e.kind="init"):!t&&!h&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ze(t,r.generator)|Ce|(i?Tt:0)),this.expect(a.parenL),r.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(ze(i,!1)|Xe),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return ee(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(K(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?j:K)(o,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Ke[e]),this.finishToken(t,e)};var Ar="8.17.0";A.acorn={Parser:A,version:Ar,defaultOptions:We,Position:ue,SourceLocation:Se,getLineInfo:Et,Node:ke,TokenType:_,tokTypes:a,keywordTypes:Ke,TokContext:F,tokContexts:k,isIdentifierChar:K,isIdentifierStart:j,Token:Ze,isNewLine:ee,lineBreak:R,lineBreakG:zi,nonASCIIwhitespace:Ct};var Ri=lt(et(),1);function Lr(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Te=Lr;function we(e){let t=[];for(let i of e)try{return i()}catch(r){t.push(r)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var re=(e,t)=>(i,r,...s)=>i|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,s);var Rr=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let i=this[t];if(e(i,t,this))return i}},Vr=re("findLast",function(){if(Array.isArray(this))return Rr}),ai=Vr;var Ie=Symbol.for("comments");function Or(e){return this[e<0?this.length+e:e]}var Dr=re("at",function(){if(Array.isArray(this)||typeof this=="string")return Or}),Pe=Dr;function Y(e){let t=new Set(e);return i=>t.has(i?.type)}function se(e){return e.range?.[1]??e.end}function w(e){let t=e.range?.[0]??e.start,i=(e.declaration?.decorators??e.decorators)?.[0];return i?Math.min(w(i),t):t}var Mr=5,Br=8,Fr=8,ni=e=>t=>t.label?I(t.label):w(t)+e,jr=e=>e.__contentEnd??se(e),oi=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",ni(Mr)],["ContinueStatement",ni(Br)],["DebuggerStatement",e=>w(e)+Fr],["VariableDeclaration",e=>I(Pe(0,e.declarations,-1))],...oi.map(e=>[e,jr])]),tt=Y(oi);function I(e){let{type:t}=e;return t==="IfStatement"?I(e.alternate??e.consequent):t==="ForInStatement"||t==="ForOfStatement"||t==="ForStatement"||t==="LabeledStatement"||t==="WithStatement"||t==="WhileStatement"?I(e.body):Ur.get(t)?.(e)??se(e)}var ae=Y(["Block","CommentBlock","MultiLine"]),ui=Y(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function ne(e,t,i){if(!e.has(t)){let r=i(t);e.set(t,r)}return e.get(t)}var Gr=new WeakMap;function hi(e){return ne(Gr,e,t=>ae(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/.test(t.value))}var Wr=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},qr=re("replaceAll",function(){if(typeof this=="string")return Wr}),Z=qr;function Hr(e){return Z(0,e,/[^\n]/g," ")}var ci=Hr;function Kr(e,t){for(let i of t){let r=w(i),s=I(i);e=e.slice(0,r)+ci(e.slice(r,s))+e.slice(s)}return e}var Jr=new WeakMap;function pi(e){let t=e[Ie];return ne(Jr,t,i=>Kr(e.originalText,i))}function Xr(e){if(!ae(e))return[];if(!e.value.includes(`
|
||||
`))return[];let t=[];for(let i of`*${e.value}*`.split(`
|
||||
`)){if(i=i.trimStart(),!i.startsWith("*"))return[];t.push(i)}return t}var li=new WeakMap;function zr(e){return ne(li,e,Xr)}function fi(e){li.delete(e)}function it(e){return zr(e).length>0}function di(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let r=e[i];if(t&&I(r)===w(t)&&it(r)&&it(t)&&(e.splice(i+1,1),r.value+="*//*"+t.value,r.range=[w(r),I(t)],fi(r)),!ui(r)&&!ae(r))throw new TypeError(`Unknown comment type: "${r.type}".`);t=r}}function Qr(e){return e!==null&&typeof e=="object"}var mi=Qr;var le=null;function fe(e){if(le!==null&&typeof le.property){let t=le;return le=fe.prototype=null,t}return le=fe.prototype=e??Object.create(null),new fe}var Yr=10;for(let e=0;e<=Yr;e++)fe();function rt(e){return fe(e)}function Zr(e,t="type"){rt(e);function i(r){let s=r[t],n=e[s];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return n}return i}var xi=Zr;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],yi={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(Si,"").trimEnd();let r=Object.create(null),s=Z(0,e,Ci,"").replace(Si,"").trimEnd(),n;for(;n=Ci.exec(e);){let o=Z(0,n[2],ns,"");if(typeof r[n[1]]=="string"||Array.isArray(r[n[1]])){let h=r[n[1]];r[n[1]]=[...hs,...Array.isArray(h)?h:[h],o]}else r[n[1]]=o}return{comments:s,pragmas:r}}var ki=["noformat","noprettier"],Ai=["format","prettier"];function cs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Ti=cs;function wi(e){let t=Ti(e);t&&(e=e.slice(t.length+1));let i=_i(e),{pragmas:r,comments:s}=Ei(i);return{shebang:t,text:e,pragmas:r,comments:s}}function Ii(e){let{pragmas:t}=wi(e);return Ai.some(i=>at(t,i))}function Pi(e){let{pragmas:t}=wi(e);return ki.some(i=>at(t,i))}function ps(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:Ii,hasIgnorePragma:Pi,locStart:w,locEnd:I,...e}}var Re=ps;var Ve="module",Ni="commonjs",Oe=[Ve,Ni];function De(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return Ve;if(/\.(?:cjs|cts)$/i.test(e))return Ni}}var ls={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function fs(e){let{message:t,loc:i}=e;if(!i)return e;let{line:r,column:s}=i;return Te(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:r,column:s+1}},cause:e})}var Li,ds=()=>(Li??(Li=A.extend((0,Ri.default)())),Li);function ms(e,t){let i=ds(),r=[],s=i.parse(e,{...ls,sourceType:t,allowImportExportEverywhere:t===Ve,onComment:r});return s.comments=r,s}function xs(e,t){let i=De(t?.filepath),r=(i?[i]:Oe).map(n=>()=>ms(e,n)),s;try{s=we(r)}catch({errors:[n]}){throw fs(n)}return Le(s,{text:e})}var ys=Re(xs);var ht={};Be(ht,{espree:()=>Ts});var Di=lt(et(),1);var Vi=[3,5,6,7,8,9,10,11,12,13,14,15,16,17],gs=Pe(0,Vi,-1);function vs(){return gs}function bs(e=5){let t=e==="latest"?vs():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Vi.includes(t))throw new Error("Invalid ecmaVersion.");return t}function Ss(e="script"){if(e==="script"||e==="module"||e==="commonjs")return e;throw new Error("Invalid sourceType.")}function Oi(e){let t=bs(e.ecmaVersion),i=Ss(e.sourceType),r=e.range===!0,s=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},h=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:r,locations:s,allowReserved:n,allowReturnOutsideFunction:h})}var $=Symbol("espree's internal state"),ot=Symbol("espree's esprimaFinishNode");function Cs(e,t,i,r,s,n,o){let h;e?h="Block":o.slice(i,i+2)==="#!"?h="Hashbang":h="Line";let c={type:h,value:t};return typeof i=="number"&&(c.start=i,c.end=r,c.range=[i,r]),typeof s=="object"&&(c.loc={start:s,end:n}),c}var ut=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(r,s){(typeof r!="object"||r===null)&&(r={}),typeof s!="string"&&!(s instanceof String)&&(s=String(s));let n=r.sourceType,o=Oi(r),h=o.ecmaFeatures||{},c=null,l={originalSourceType:n||o.sourceType,tokens:c?[]:null,comments:o.comment===!0?[]:null,impliedStrict:h.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(m){c&&c.onToken(m,l),m.type!==t.eof&&(l.lastToken=m)},onComment(m,S,E,p,x,y){if(l.comments){let v=Cs(m,S,E,p,x,y,s);l.comments.push(v)}}},s),this[$]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let r=this[$],s=r.tokens;return r.comments&&(s.comments=r.comments),s}finishNode(r,s){let n=super.finishNode(r,s);return this[ot](n)}finishNodeAt(r,s,n,o){let h=super.finishNodeAt(r,s,n,o);return this[ot](h)}parse(){let r=this[$],n=super.parse();return n.sourceType=r.originalSourceType,r.comments&&(n.comments=r.comments),r.tokens&&(n.tokens=r.tokens),this[$].templateElements.forEach(o=>{let c=o.tail?1:2;o.start+=-1,o.end+=c,o.range&&(o.range[0]+=-1,o.range[1]+=c),o.loc&&(o.loc.start.column+=-1,o.loc.end.column+=c)}),n}parseTopLevel(r){return this[$].impliedStrict&&(this.strict=!0),super.parseTopLevel(r)}raise(r,s){let n=e.acorn.getLineInfo(this.input,r),o=new SyntaxError(s);throw o.index=r,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(r,s){this.raise(r,s)}unexpected(r){let s="Unexpected token";if(r!=null){if(this.pos=r,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(s+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,s)}jsx_readString(r){let s=super.jsx_readString(r);return this.type===t.string&&(this[$].jsxAttrValueToken=!0),s}[ot](r){return r.type==="TemplateElement"&&this[$].templateElements.push(r),r.type.includes("Function")&&!("generator"in r)&&(r.generator=!1),r}}};var _s={_regular:null,_jsx:null,get regular(){if(this._regular===null){let e=ut();this._regular=A.extend(e)}return this._regular},get jsx(){if(this._jsx===null){let e=ut(),t=(0,Di.default)();this._jsx=A.extend(t,e)}return this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function Mi(e,t){let i=_s.get(t);return new i(t,e).parse()}var Es={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,impliedStrict:!1}};function ks(e){let{message:t,lineNumber:i,column:r}=e;return typeof i!="number"?e:Te(t,{loc:{start:{line:i,column:r}},cause:e})}function As(e,t){let i=De(t?.filepath),r=(i?[i]:Oe).map(n=>()=>Mi(e,{...Es,sourceType:n})),s;try{s=we(r)}catch({errors:[n]}){throw ks(n)}return Le(s,{text:e,astType:"espree"})}var Ts=Re(As);var ws={...nt,...ht};return Wi(Is);});
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
var Bi=Object.create;var Me=Object.defineProperty;var Fi=Object.getOwnPropertyDescriptor;var ji=Object.getOwnPropertyNames;var Ui=Object.getPrototypeOf,Gi=Object.prototype.hasOwnProperty;var ct=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}},Be=(e,t)=>{for(var i in t)Me(e,i,{get:t[i],enumerable:!0})},Wi=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ji(t))!Gi.call(e,s)&&s!==i&&Me(e,s,{get:()=>t[s],enumerable:!(r=Fi(t,s))||r.enumerable});return e};var pt=(e,t,i)=>(i=e!=null?Bi(Ui(e)):{},Wi(t||!e||!e.__esModule?Me(i,"default",{value:e,enumerable:!0}):i,e));var ti=ct((Ps,ei)=>{ei.exports={}});var et=ct((Ns,$e)=>{"use strict";var wr=ti(),Ir=/^[\da-fA-F]+$/,Pr=/^\d+$/,ii=new WeakMap;function ri(e){e=e.Parser.acorn||e;let t=ii.get(e);if(!t){let i=e.tokTypes,r=e.TokContext,s=e.TokenType,n=new r("<tag",!1),o=new r("</tag",!1),h=new r("<tag>...</tag>",!0,!0),c={tc_oTag:n,tc_cTag:o,tc_expr:h},l={jsxName:new s("jsxName"),jsxText:new s("jsxText",{beforeExpr:!0}),jsxTagStart:new s("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new s("jsxTagEnd")};l.jsxTagStart.updateContext=function(){this.context.push(h),this.context.push(n),this.exprAllowed=!1},l.jsxTagEnd.updateContext=function(m){let S=this.context.pop();S===n&&m===i.slash||S===o?(this.context.pop(),this.exprAllowed=this.curContext()===h):this.exprAllowed=!0},t={tokContexts:c,tokTypes:l},ii.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}$e.exports=function(e){return e=e||{},function(t){return Nr({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty($e.exports,"tokTypes",{get:function(){return ri(void 0).tokTypes},configurable:!0,enumerable:!0});function Nr(e,t){let i=t.acorn||void 0,r=ri(i),s=i.tokTypes,n=r.tokTypes,o=i.tokContexts,h=r.tokContexts.tc_oTag,c=r.tokContexts.tc_cTag,l=r.tokContexts.tc_expr,m=i.isNewLine,S=i.isIdentifierStart,E=i.isIdentifierChar;return class extends t{static get acornJsx(){return r}jsx_readToken(){let p="",x=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let y=this.input.charCodeAt(this.pos);switch(y){case 60:case 123:return this.pos===this.start?y===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(y):(p+=this.input.slice(x,this.pos),this.finishToken(n.jsxText,p));case 38:p+=this.input.slice(x,this.pos),p+=this.jsx_readEntity(),x=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(y===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(y)?(p+=this.input.slice(x,this.pos),p+=this.jsx_readNewLine(!0),x=this.pos):++this.pos}}}jsx_readNewLine(p){let x=this.input.charCodeAt(this.pos),y;return++this.pos,x===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,y=p?`
|
||||
`:`\r
|
||||
`):y=String.fromCharCode(x),this.options.locations&&(++this.curLine,this.lineStart=this.pos),y}jsx_readString(p){let x="",y=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let v=this.input.charCodeAt(this.pos);if(v===p)break;v===38?(x+=this.input.slice(y,this.pos),x+=this.jsx_readEntity(),y=this.pos):m(v)?(x+=this.input.slice(y,this.pos),x+=this.jsx_readNewLine(!1),y=this.pos):++this.pos}return x+=this.input.slice(y,this.pos++),this.finishToken(s.string,x)}jsx_readEntity(){let p="",x=0,y,v=this.input[this.pos];v!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&x++<10;){if(v=this.input[this.pos++],v===";"){p[0]==="#"?p[1]==="x"?(p=p.substr(2),Ir.test(p)&&(y=String.fromCharCode(parseInt(p,16)))):(p=p.substr(1),Pr.test(p)&&(y=String.fromCharCode(parseInt(p,10)))):y=wr[p];break}p+=v}return y||(this.pos=N,"&")}jsx_readWord(){let p,x=this.pos;do p=this.input.charCodeAt(++this.pos);while(E(p)||p===45);return this.finishToken(n.jsxName,this.input.slice(x,this.pos))}jsx_parseIdentifier(){let p=this.startNode();return this.type===n.jsxName?p.name=this.value:this.type.keyword?p.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(p,"JSXIdentifier")}jsx_parseNamespacedName(){let p=this.start,x=this.startLoc,y=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(s.colon))return y;var v=this.startNodeAt(p,x);return v.namespace=y,v.name=this.jsx_parseIdentifier(),this.finishNode(v,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let p=this.start,x=this.startLoc,y=this.jsx_parseNamespacedName();for(this.type===s.dot&&y.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(s.dot);){let v=this.startNodeAt(p,x);v.object=y,v.property=this.jsx_parseIdentifier(),y=this.finishNode(v,"JSXMemberExpression")}return y}jsx_parseAttributeValue(){switch(this.type){case s.braceL:let p=this.jsx_parseExpressionContainer();return p.expression.type==="JSXEmptyExpression"&&this.raise(p.start,"JSX attributes must only be assigned a non-empty expression"),p;case n.jsxTagStart:case s.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let p=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(p,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let p=this.startNode();return this.next(),p.expression=this.type===s.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(s.braceR),this.finishNode(p,"JSXExpressionContainer")}jsx_parseAttribute(){let p=this.startNode();return this.eat(s.braceL)?(this.expect(s.ellipsis),p.argument=this.parseMaybeAssign(),this.expect(s.braceR),this.finishNode(p,"JSXSpreadAttribute")):(p.name=this.jsx_parseNamespacedName(),p.value=this.eat(s.eq)?this.jsx_parseAttributeValue():null,this.finishNode(p,"JSXAttribute"))}jsx_parseOpeningElementAt(p,x){let y=this.startNodeAt(p,x);y.attributes=[];let v=this.jsx_parseElementName();for(v&&(y.name=v);this.type!==s.slash&&this.type!==n.jsxTagEnd;)y.attributes.push(this.jsx_parseAttribute());return y.selfClosing=this.eat(s.slash),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(p,x){let y=this.startNodeAt(p,x),v=this.jsx_parseElementName();return v&&(y.name=v),this.expect(n.jsxTagEnd),this.finishNode(y,v?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(p,x){let y=this.startNodeAt(p,x),v=[],N=this.jsx_parseOpeningElementAt(p,x),de=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(p=this.start,x=this.startLoc,this.next(),this.eat(s.slash)){de=this.jsx_parseClosingElementAt(p,x);break e}v.push(this.jsx_parseElementAt(p,x));break;case n.jsxText:v.push(this.parseExprAtom());break;case s.braceL:v.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(de.name)!==pe(N.name)&&this.raise(de.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let De=N.name?"Element":"Fragment";return y["opening"+De]=N,y["closing"+De]=de,y.children=v,this.type===s.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(y,"JSX"+De)}jsx_parseText(){let p=this.parseLiteral(this.value);return p.type="JSXText",p}jsx_parseElement(){let p=this.start,x=this.startLoc;return this.next(),this.jsx_parseElementAt(p,x)}parseExprAtom(p){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(p)}readToken(p){let x=this.curContext();if(x===l)return this.jsx_readToken();if(x===h||x===c){if(S(p))return this.jsx_readWord();if(p==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((p===34||p===39)&&x==h)return this.jsx_readString(p)}return p===60&&this.exprAllowed&&this.input.charCodeAt(th
Line truncated
|
||||
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),lt(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)}}if(lt(t.onComment)&&(t.onComment=er(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function er(e,t){return function(i,r,s,n,o,h){var c={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(c.loc=new be(this,o,h)),e.ranges&&(c.range=[s,n]),t.push(c)}}var X=1,z=2,Je=4,Et=8,Xe=16,kt=32,Se=64,At=128,Q=256,he=512,Tt=1024,Ce=X|z|Q;function ze(e,t){return z|(e?Je:0)|(t?Et:0)}var xe=0,Qe=1,q=2,wt=3,It=4,Pt=5,A=function(t,i,r){this.options=t=$i(t),this.sourceFile=t.sourceFile,this.keywords=H(Ki[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==!0&&(s=Fe[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=H(s);var n=(s?s+" ":"")+Fe.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Fe.strictBind),this.input=String(i),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
|
||||
`,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(R).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||t.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?z:X),this.regexpState=null,this.privateNameStack=[]},M={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};A.prototype.parse=function(){var t=this,i=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(i)})};M.inFunction.get=function(){return(this.currentVarScope().flags&z)>0};M.inGenerator.get=function(){return(this.currentVarScope().flags&Et)>0};M.inAsync.get=function(){return(this.currentVarScope().flags&Je)>0};M.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he))return!1;if(i&z)return(i&Je)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};M.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&X)};M.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&Se)>0||this.options.allowSuperOutsideMethod};M.allowDirectSuper.get=function(){return(this.currentThisScope().flags&At)>0};M.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};M.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(Q|he)||i&z&&!(i&Xe))return!0}return!1};M.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return!(t&Tt||!this.inModule&&t&X)};M.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Q)>0};A.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};A.parse=function(t,i){return new this(i,t).parse()};A.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};A.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(A.prototype,M);var P=A.prototype,tr=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=tr.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){T.lastIndex=e+t[0].length;var i=T.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||R.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,T.lastIndex=e,e+=T.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||R.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var _e=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingCoLine truncated
|
||||
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
||||
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};g.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};g.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!R.test(this.input.slice(this.lastTokEnd,this.start))};g.parseObj=function(e,t){var i=this.startNode(),r=!0,s={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(r)r=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};g.parseProperty=function(e,t){var i=this.startNode(),r,s,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(r=this.eat(a.star)));var h=this.containsEsc;return this.parsePropertyName(i),!e&&!h&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):s=!1,this.parsePropertyValue(i,e,r,s,n,o,t,h),this.finishNode(i,"Property")};g.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};g.parsePropertyValue=function(e,t,i,r,s,n,o,h){(i||r)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,r),e.kind="init"):!t&&!h&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};g.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};g.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};g.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ze(t,r.generator)|Se|(i?At:0)),this.expect(a.parenL),r.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")};g.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(ze(i,!1)|Xe),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=
Line truncated
|
||||
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
|
||||
`&&++this.pos;case`
|
||||
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
||||
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return ee(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if(K(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?j:K)(o,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=Ke[e]),this.finishToken(t,e)};var Ar="8.17.0";A.acorn={Parser:A,version:Ar,defaultOptions:We,Position:ue,SourceLocation:be,getLineInfo:_t,Node:Ee,TokenType:_,tokTypes:a,keywordTypes:Ke,TokContext:F,tokContexts:k,isIdentifierChar:K,isIdentifierStart:j,Token:Ze,isNewLine:ee,lineBreak:R,lineBreakG:zi,nonASCIIwhitespace:St};var Li=pt(et(),1);function Lr(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ae=Lr;function Te(e){let t=[];for(let i of e)try{return i()}catch(r){t.push(r)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var re=(e,t)=>(i,r,...s)=>i|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,s);var Rr=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let i=this[t];if(e(i,t,this))return i}},Vr=re("findLast",function(){if(Array.isArray(this))return Rr}),si=Vr;var we=Symbol.for("comments");function Or(e){return this[e<0?this.length+e:e]}var Dr=re("at",function(){if(Array.isArray(this)||typeof this=="string")return Or}),Ie=Dr;function Y(e){let t=new Set(e);return i=>t.has(i?.type)}function se(e){return e.range?.[1]??e.end}function w(e){let t=e.range?.[0]??e.start,i=(e.declaration?.decorators??e.decorators)?.[0];return i?Math.min(w(i),t):t}var Mr=5,Br=8,Fr=8,ai=e=>t=>t.label?I(t.label):w(t)+e,jr=e=>e.__contentEnd??se(e),ni=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",ai(Mr)],["ContinueStatement",ai(Br)],["DebuggerStatement",e=>w(e)+Fr],["VariableDeclaration",e=>I(Ie(0,e.declarations,-1))],...ni.map(e=>[e,jr])]),tt=Y(ni);function I(e){let{type:t}=e;return t==="IfStatement"?I(e.alternate??e.consequent):t==="ForInStatement"||t==="ForOfStatement"||t==="ForStatement"||t==="LabeledStatement"||t==="WithStatement"||t==="WhileStatement"?I(e.body):Ur.get(t)?.(e)??se(e)}var ae=Y(["Block","CommentBlock","MultiLine"]),oi=Y(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function ne(e,t,i){if(!e.has(t)){let r=i(t);e.set(t,r)}return e.get(t)}var Gr=new WeakMap;function ui(e){return ne(Gr,e,t=>ae(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/.test(t.value))}var Wr=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},qr=re("replaceAll",function(){if(typeof this=="string")return Wr}),Z=qr;function Hr(e){return Z(0,e,/[^\n]/g," ")}var hi=Hr;function Kr(e,t){for(let i of t){let r=w(i),s=I(i);e=e.slice(0,r)+hi(e.slice(r,s))+e.slice(s)}return e}var Jr=new WeakMap;function ci(e){let t=e[we];return ne(Jr,t,i=>Kr(e.originalText,i))}function Xr(e){if(!ae(e))return[];if(!e.value.includes(`
|
||||
`))return[];let t=[];for(let i of`*${e.value}*`.split(`
|
||||
`)){if(i=i.trimStart(),!i.startsWith("*"))return[];t.push(i)}return t}var pi=new WeakMap;function zr(e){return ne(pi,e,Xr)}function li(e){pi.delete(e)}function it(e){return zr(e).length>0}function fi(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let r=e[i];if(t&&I(r)===w(t)&&it(r)&&it(t)&&(e.splice(i+1,1),r.value+="*//*"+t.value,r.range=[w(r),I(t)],li(r)),!oi(r)&&!ae(r))throw new TypeError(`Unknown comment type: "${r.type}".`);t=r}}function Qr(e){return e!==null&&typeof e=="object"}var di=Qr;var le=null;function fe(e){if(le!==null&&typeof le.property){let t=le;return le=fe.prototype=null,t}return le=fe.prototype=e??Object.create(null),new fe}var Yr=10;for(let e=0;e<=Yr;e++)fe();function rt(e){return fe(e)}function Zr(e,t="type"){rt(e);function i(r){let s=r[t],n=e[s];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:r});return n}return i}var mi=Zr;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],xi={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(bi,"").trimEnd();let r=Object.create(null),s=Z(0,e,Si,"").replace(bi,"").trimEnd(),n;for(;n=Si.exec(e);){let o=Z(0,n[2],ns,"");if(typeof r[n[1]]=="string"||Array.isArray(r[n[1]])){let h=r[n[1]];r[n[1]]=[...hs,...Array.isArray(h)?h:[h],o]}else r[n[1]]=o}return{comments:s,pragmas:r}}var Ei=["noformat","noprettier"],ki=["format","prettier"];function cs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var Ai=cs;function Ti(e){let t=Ai(e);t&&(e=e.slice(t.length+1));let i=Ci(e),{pragmas:r,comments:s}=_i(i);return{shebang:t,text:e,pragmas:r,comments:s}}function wi(e){let{pragmas:t}=Ti(e);return ki.some(i=>at(t,i))}function Ii(e){let{pragmas:t}=Ti(e);return Ei.some(i=>at(t,i))}function ps(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:wi,hasIgnorePragma:Ii,locStart:w,locEnd:I,...e}}var Le=ps;var Re="module",Pi="commonjs",Ve=[Re,Pi];function Oe(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return Re;if(/\.(?:cjs|cts)$/i.test(e))return Pi}}var ls={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function fs(e){let{message:t,loc:i}=e;if(!i)return e;let{line:r,column:s}=i;return Ae(t.replace(/ \(\d+:\d+\)$/,""),{loc:{start:{line:r,column:s+1}},cause:e})}var Ni,ds=()=>(Ni??(Ni=A.extend((0,Li.default)())),Ni);function ms(e,t){let i=ds(),r=[],s=i.parse(e,{...ls,sourceType:t,allowImportExportEverywhere:t===Re,onComment:r});return s.comments=r,s}function xs(e,t){let i=Oe(t?.filepath),r=(i?[i]:Ve).map(n=>()=>ms(e,n)),s;try{s=Te(r)}catch({errors:[n]}){throw fs(n)}return Ne(s,{text:e})}var ys=Le(xs);var ht={};Be(ht,{espree:()=>Ts});var Oi=pt(et(),1);var Ri=[3,5,6,7,8,9,10,11,12,13,14,15,16,17],gs=Ie(0,Ri,-1);function vs(){return gs}function bs(e=5){let t=e==="latest"?vs():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ri.includes(t))throw new Error("Invalid ecmaVersion.");return t}function Ss(e="script"){if(e==="script"||e==="module"||e==="commonjs")return e;throw new Error("Invalid sourceType.")}function Vi(e){let t=bs(e.ecmaVersion),i=Ss(e.sourceType),r=e.range===!0,s=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},h=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");return Object.assign({},e,{ecmaVersion:t,sourceType:i,ranges:r,locations:s,allowReserved:n,allowReturnOutsideFunction:h})}var $=Symbol("espree's internal state"),ot=Symbol("espree's esprimaFinishNode");function Cs(e,t,i,r,s,n,o){let h;e?h="Block":o.slice(i,i+2)==="#!"?h="Hashbang":h="Line";let c={type:h,value:t};return typeof i=="number"&&(c.start=i,c.end=r,c.range=[i,r]),typeof s=="object"&&(c.loc={start:s,end:n}),c}var ut=()=>e=>{let t=Object.assign({},e.acorn.tokTypes);return e.acornJsx&&Object.assign(t,e.acornJsx.tokTypes),class extends e{constructor(r,s){(typeof r!="object"||r===null)&&(r={}),typeof s!="string"&&!(s instanceof String)&&(s=String(s));let n=r.sourceType,o=Vi(r),h=o.ecmaFeatures||{},c=null,l={originalSourceType:n||o.sourceType,tokens:c?[]:null,comments:o.comment===!0?[]:null,impliedStrict:h.impliedStrict===!0&&o.ecmaVersion>=5,ecmaVersion:o.ecmaVersion,jsxAttrValueToken:!1,lastToken:null,templateElements:[]};super({ecmaVersion:o.ecmaVersion,sourceType:o.sourceType,ranges:o.ranges,locations:o.locations,allowReserved:o.allowReserved,allowReturnOutsideFunction:o.allowReturnOutsideFunction,onToken(m){c&&c.onToken(m,l),m.type!==t.eof&&(l.lastToken=m)},onComment(m,S,E,p,x,y){if(l.comments){let v=Cs(m,S,E,p,x,y,s);l.comments.push(v)}}},s),this[$]=l}tokenize(){do this.next();while(this.type!==t.eof);this.next();let r=this[$],s=r.tokens;return r.comments&&(s.comments=r.comments),s}finishNode(r,s){let n=super.finishNode(r,s);return this[ot](n)}finishNodeAt(r,s,n,o){let h=super.finishNodeAt(r,s,n,o);return this[ot](h)}parse(){let r=this[$],n=super.parse();return n.sourceType=r.originalSourceType,r.comments&&(n.comments=r.comments),r.tokens&&(n.tokens=r.tokens),this[$].templateElements.forEach(o=>{let c=o.tail?1:2;o.start+=-1,o.end+=c,o.range&&(o.range[0]+=-1,o.range[1]+=c),o.loc&&(o.loc.start.column+=-1,o.loc.end.column+=c)}),n}parseTopLevel(r){return this[$].impliedStrict&&(this.strict=!0),super.parseTopLevel(r)}raise(r,s){let n=e.acorn.getLineInfo(this.input,r),o=new SyntaxError(s);throw o.index=r,o.lineNumber=n.line,o.column=n.column+1,o}raiseRecoverable(r,s){this.raise(r,s)}unexpected(r){let s="Unexpected token";if(r!=null){if(this.pos=r,this.options.locations)for(;this.pos<this.lineStart;)this.lineStart=this.input.lastIndexOf(`
|
||||
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(s+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,s)}jsx_readString(r){let s=super.jsx_readString(r);return this.type===t.string&&(this[$].jsxAttrValueToken=!0),s}[ot](r){return r.type==="TemplateElement"&&this[$].templateElements.push(r),r.type.includes("Function")&&!("generator"in r)&&(r.generator=!1),r}}};var _s={_regular:null,_jsx:null,get regular(){if(this._regular===null){let e=ut();this._regular=A.extend(e)}return this._regular},get jsx(){if(this._jsx===null){let e=ut(),t=(0,Oi.default)();this._jsx=A.extend(t,e)}return this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function Di(e,t){let i=_s.get(t);return new i(t,e).parse()}var Es={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,impliedStrict:!1}};function ks(e){let{message:t,lineNumber:i,column:r}=e;return typeof i!="number"?e:Ae(t,{loc:{start:{line:i,column:r}},cause:e})}function As(e,t){let i=Oe(t?.filepath),r=(i?[i]:Ve).map(n=>()=>Di(e,{...Es,sourceType:n})),s;try{s=Te(r)}catch({errors:[n]}){throw ks(n)}return Ne(s,{text:e,astType:"espree"})}var Ts=Le(As);var ws={...nt,...ht};export{Mi as default,ws as parsers};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__ng_action: Parser;
|
||||
__ng_binding: Parser;
|
||||
__ng_directive: Parser;
|
||||
__ng_interpolation: Parser;
|
||||
};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var vt=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var ur=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty;var hr=Reflect.get;var _n=t=>{throw TypeError(t)};var In=(t,e)=>{for(var n in e)vt(t,n,{get:e[n],enumerable:!0})},fr=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cr(e))!pr.call(t,i)&&i!==n&&vt(t,i,{get:()=>e[i],enumerable:!(s=lr(e,i))||s.enumerable});return t};var dr=t=>fr(vt({},"__esModule",{value:!0}),t);var wt=(t,e,n)=>e.has(t)||_n("Cannot "+n);var z=(t,e,n)=>(wt(t,e,"read from private field"),n?n.call(t):e.get(t)),De=(t,e,n)=>e.has(t)?_n("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),St=(t,e,n,s)=>(wt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),w=(t,e,n)=>(wt(t,e,"access private method"),n);var Nn=(t,e,n)=>hr(ur(t),n,e);var oa={};In(oa,{parsers:()=>bn});var bn={};In(bn,{__ng_action:()=>na,__ng_binding:()=>sa,__ng_directive:()=>ra,__ng_interpolation:()=>ia});function mr(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function Pn(t,e,n){let s=mr(e);for(let i=n;i<t.length;i++){let r=t[i];if(s(r))return i}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function Ln(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function Be(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function An(t){return!!t.extra?.parenthesized}function ye(t){return t.type==="TSNonNullExpression"&&!An(t)?ye(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!An(t)}var ua=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var x;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(x||(x={}));var K,$n="svg",gr="math",Fs="",Mn="*",Et=()=>Object.create(null);function vr(){return K||(K=Et(),B(x.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),B(x.STYLE,void 0,[["*",["style"]]]),B(x.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),B(x.URL,gr,[["*",["href","xlink:href"]]]),B(x.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),B(x.URL,$n,[["a",["href","xlink:href"]]]),B(x.ATTRIBUTE_NO_BINDING,$n,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),B(x.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]]]),K)}function B(t,e,n){let s=e??Fs;for(let[i,r]of n){let a=i.toLowerCase();for(let u of r){let h=u.toLowerCase(),d=K[h]??(K[h]=Et()),g=d[s]??(d[s]=Et());g[a]=t}}}function wr(t,e,n){let i=vr()[e.toLowerCase()];if(!i)return x.NONE;let r=t.toLowerCase(),a;if(n){let u=i[n];u&&(a=u[r]??u[Mn])}if(a===void 0){let u=i[Fs];u&&(a=u[r]??u[Mn])}return a??x.NONE}var Rn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Rn||(Rn={}));var On;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t[t.Eager=1]="Eager"})(On||(On={}));var Dn;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(Dn||(Dn={}));var Bn={name:"custom-elements"},Fn={name:"no-errors-schema"};var Vn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Vn||(Vn={}));var Hn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule",t[t.Service=5]="Service"})(Hn||(Hn={}));var Un;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Un||(Un={}));var Wn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Wn||(Wn={}));var qn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(qn||(qn={}));var jn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(jn||(jn={}));var zn;(function(t){t[t.Dynamic=0]="Dynamic"Line truncated
|
||||
`&&++u==n)););for(a=0,u=0;a<e&&r<s.length-1&&(r++,a++,!(s[r]==`
|
||||
`&&++u==n)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,r+1)}}return null}},et=class{content;url;constructor(e,n){this.content=e,this.url=n}},tt=class{start;end;fullStart;details;constructor(e,n,s=e,i=null){this.start=e,this.end=n,this.fullStart=s,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},nt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(nt||(nt={}));var Re=class extends Error{span;msg;level;relatedError;constructor(e,n,s=nt.ERROR,i){super(n),this.span=e,this.msg=n,this.level=s,this.relatedError=i,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${nt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var as;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})(as||(as={}));var ls;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local",t[t.Isolated=2]="Isolated"})(ls||(ls={}));var cs;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(cs||(cs={}));var qr="(:(where|is)\\()?";var Qs="-shadowcsshost",jr="-shadowcsscontext",nn="[^)(]*",zr=`(?:\\(${nn}\\)|${nn})+?`,Gr=`(?:\\(${zr}\\)|${nn})+?`,dn=`(?:\\((${Gr})\\))`,da=new RegExp("(:nth-[-\\w]+)"+dn,"g"),ma=new RegExp(Qs+dn+"?([^,{]*)","gim"),Xr=jr+dn+"([^{]*)",ga=new RegExp(`${qr}(${Xr})`,"gim"),Qr=Qs+"-no-combinator",va=new RegExp(`${Qr}(?![^(]*\\))`,"g");var Js="%COMMENT%",wa=new RegExp(Js,"g");var Sa=new RegExp(`(\\s*(?:${Js}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var Jr="%COMMA_IN_PLACEHOLDER%",Yr="%SEMI_IN_PLACEHOLDER%",Kr="%COLON_IN_PLACEHOLDER%",xa=new RegExp(Jr,"g"),ya=new RegExp(Yr,"g"),Ea=new RegExp(Kr,"g");var l;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.EnableIncrementalHydrationRuntime=35]="EnableIncrementalHydrationRuntime",t[t.Projection=36]="Projection",t[t.RepeaterCreate=37]="RepeaterCreate",t[t.Repeater=38]="Repeater",t[t.TwoWayProperty=39]="TwoWayProperty",t[t.TwoWayListener=40]="TwoWayListener",t[t.DeclareLet=41]="DeclareLet",t[t.StoreLet=42]="StoreLet",t[t.I18nStart=43]="I18nStart",t[t.I18n=44]="I18n",t[t.I18nEnd=45]="I18nEnd",t[t.I18nExpression=46]="I18nExpression",t[t.I18nApply=47]="I18nApply",t[t.IcuStart=48]="IcuStart",t[t.IcuEnd=49]="IcuEnd",t[t.IcuPlaceholder=50]="IcuPlaceholder",t[t.I18nContext=51]="I18nContext",t[t.I18nAttributes=52]="I18nAttributes",t[t.SourceLocation=53]="SourceLocation",t[t.Animation=54]="Animation",t[t.AnimationString=55]="AnimationString",t[t.AnimationBinding=56]="AnimationBinding",t[t.AnimationListener=57]="AnimationListener",t[t.Control=58]="Control",t[t.ControlCreate=59]="ControlCreate"})(l||(l={}));var te;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeNavigationMigration=17]="SafeNavigationMigration",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSe
Line truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Ma=new RegExp(`[^${Ks}]`),Ra=new RegExp(`[${Ks}]{2,}`,"g");var f;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(f||(f={}));var W;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(W||(W={}));var ro=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],Oe=class{tokenize(e){return new on(e).scan()}},I=class{index;end;type;numValue;strValue;constructor(e,n,s,i,r){this.index=e,this.end=n,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===f.Character&&this.numValue===e}isNumber(){return this.type===f.Number}isString(){return this.type===f.String}isOperator(e){return this.type===f.Operator&&this.strValue===e}isIdentifier(){return this.type===f.Identifier}isPrivateIdentifier(){return this.type===f.PrivateIdentifier}isKeyword(){return this.type===f.Keyword}isKeywordLet(){return this.type===f.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===f.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===f.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===f.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===f.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===f.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===f.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===f.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===f.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===f.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===f.Keyword&&this.strValue==="instanceof"}isError(){return this.type===f.Error}isRegExpBody(){return this.type===f.RegExpBody}isRegExpFlags(){return this.type===f.RegExpFlags}toNumber(){return this.type===f.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===W.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===W.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:case f.RegExpBody:case f.RegExpFlags:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}},Ae=class extends I{kind;constructor(e,n,s,i){super(e,n,f.String,0,s),this.kind=i}};function Ce(t,e,n){return new I(t,e,f.Character,n,String.fromCharCode(n))}function oo(t,e,n){return new I(t,e,f.Identifier,0,n)}function ao(t,e,n){return new I(t,e,f.PrivateIdentifier,0,n)}function lo(t,e,n){return new I(t,e,f.Keyword,0,n)}function F(t,e,n){return new I(t,e,f.Operator,0,n)}function co(t,e,n){return new I(t,e,f.Number,n,"")}function uo(t,e,n){return new I(t,e,f.Error,0,n)}function po(t,e,n){return new I(t,e,f.RegExpBody,0,n)}function ho(t,e,n){return new I(t,e,f.RegExpFlags,0,n)}var be=new I(-1,-1,f.Character,0,""),on=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Ee:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,i=this.index;for(;s<=Hs;)if(++i>=n){s=Ee;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=n)return null;if(ks(s))return this.scanIdentifier();if(X(s))return this.scanNumber(i);let r=i;switch(s){case G:return this.advance(),X(this.peek)?this.scanNumber(r):this.peek!==G?Ce(r,this.index,G):(this.advance(),this.peek===G?(this.advance(),F(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(s)}]`,0));case Q:case L:case ce:case Z:case V:case J:case Te:return this.scanCharacter(r,s);case Ne:return this.scanOpenBrace(r,s);case oe:return this.scanCloseBrace(r,s);case Ws:case Us:return this.scanString();case en:return this.advance(),this.scanTemplateLiteralPart(r);case Nr:return this.scanPrivateIdentifier();case qs:return this.scanComplexOperator(r,"+",C,"=");case js:return this.scanComplexOperator(r,"-",C,"=");case Ke:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",C,"=");case Ar:return this.scanComplexOperator(r,"%",C,"=");case Rr:return this.scanOperator(r,"^");case ns:return this.scanStar(r);case is:return this.scanQuestion(r);case Pr:case ss:return this.scanComplexOperator(r,String.fromCharCode(s),C,"=");case Ir:return this.scanComplexOperator(r,"!",C,"=",C,"=");case C:return this.scanEquals(r);case ts:return this.scanCoLine truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let n=Fe(e),s=this._schema.get(n)||this._schema.get("unknown");return Array.from(s.keys()).map(i=>ko.get(i)??i)}allKnownEventsOfElement(e){let n=Fe(e);return Array.from(this._eventSchema.get(n)??[])}normalizeAnimationStyleProperty(e){return Er(e)}normalizeAnimationStyleValue(e,n,s){let i="",r=s.toString().trim(),a=null;if(_o(e)&&s!==0&&s!=="0")if(typeof s=="number")i="px";else{let u=s.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&(a=`Please provide a CSS unit value for ${n}:${s}`)}return{error:a,value:r+i}}};function _o(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Oa=new ge(new Oe);function $(t){return e=>e.kind===t}function Pe(t,e){return n=>n.kind===t&&e===n.expression instanceof me}function Io(t){return(t.kind===l.Property||t.kind===l.TwoWayProperty)&&!(t.expression instanceof me)}var Da=[{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)},{test:Pe(l.Attribute,!0)},{test:Pe(l.Property,!0)},{test:Io},{test:Pe(l.Attribute,!1)},{test:$(l.Control)}],Ba=[{test:Pe(l.DomProperty,!0)},{test:Pe(l.DomProperty,!1)},{test:$(l.Attribute)},{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)}],Fa=new Set([l.Listener,l.TwoWayListener,l.AnimationListener,l.StyleMap,l.ClassMap,l.StyleProp,l.ClassProp,l.Property,l.TwoWayProperty,l.DomProperty,l.Attribute,l.Animation,l.Control]);function rt(t){return t.slice(t.length-1)}var Va=new Map([[O.Idle,{none:c.deferOnIdle,prefetch:c.deferPrefetchOnIdle,hydrate:c.deferHydrateOnIdle}],[O.Immediate,{none:c.deferOnImmediate,prefetch:c.deferPrefetchOnImmediate,hydrate:c.deferHydrateOnImmediate}],[O.Timer,{none:c.deferOnTimer,prefetch:c.deferPrefetchOnTimer,hydrate:c.deferHydrateOnTimer}],[O.Hover,{none:c.deferOnHover,prefetch:c.deferPrefetchOnHover,hydrate:c.deferHydrateOnHover}],[O.Interaction,{none:c.deferOnInteraction,prefetch:c.deferPrefetchOnInteraction,hydrate:c.deferHydrateOnInteraction}],[O.Viewport,{none:c.deferOnViewport,prefetch:c.deferPrefetchOnViewport,hydrate:c.deferHydrateOnViewport}],[O.Never,{none:c.deferHydrateNever,prefetch:c.deferHydrateNever,hydrate:c.deferHydrateNever}]]);var Ha=[c.pipeBind1,c.pipeBind2,c.pipeBind3,c.pipeBind4];var Ua={constant:[c.interpolate,c.interpolate1,c.interpolate2,c.interpolate3,c.interpolate4,c.interpolate5,c.interpolate6,c.interpolate7,c.interpolate8],variable:c.interpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}};var Wa=new Map([["window",c.resolveWindow],["document",c.resolveDocument],["body",c.resolveBody]]);var qa=new Map([[x.HTML,c.sanitizeHtml],[x.RESOURCE_URL,c.sanitizeResourceUrl],[x.SCRIPT,c.sanitizeScript],[x.STYLE,c.sanitizeStyle],[x.URL,c.sanitizeUrl],[x.ATTRIBUTE_NO_BINDING,c.validateAttribute]]),ja=new Map([[x.HTML,c.trustConstantHtml],[x.RESOURCE_URL,c.trustConstantResourceUrl]]);var Ns;(function(t){t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful"})(Ns||(Ns={}));var za=new Map([[M.Property,R.Property],[M.TwoWay,R.TwoWayProperty],[M.Attribute,R.Attribute],[M.Class,R.ClassName],[M.Style,R.StyleProperty],[M.LegacyAnimation,R.LegacyAnimation],[M.Animation,R.Animation]]);var As;(function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"})(As||(As={}));var Ps;(function(t){t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport",t.NEVER="never"})(Ps||(Ps={}));var ei="%COMP%",Ga=`_nghost-${ei}`,Xa=`_ngcontent-${ei}`;var Ls;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(Ls||(Ls={}));var $s;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})($s||($s={}));var Qa=new Bt("22.0.6");var Ms;(function(t){t.DIAGNOSTIC="D",t.EXPRESSION_TYPE_IDENTIFIER="T"})(Ms||(Ms={}));var Rs;(function(t){t.DIRECTIVE="DIR",t.HOST_DIRECTIVE="HOSTDIR",t.COMPONENT_COMPLETION="COMPCOMP",t.EVENT_PARAMETER="EP",t.VARIABLE_AS_EXPRESSION="VAE"})(Rs||(Rs={}));var Os;(function(t){t[
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
var lr=Object.defineProperty;var cr=Object.getPrototypeOf;var ur=Reflect.get;var kn=t=>{throw TypeError(t)};var _n=(t,e)=>{for(var n in e)lr(t,n,{get:e[n],enumerable:!0})};var vt=(t,e,n)=>e.has(t)||kn("Cannot "+n);var z=(t,e,n)=>(vt(t,e,"read from private field"),n?n.call(t):e.get(t)),De=(t,e,n)=>e.has(t)?kn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),wt=(t,e,n,s)=>(vt(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),w=(t,e,n)=>(vt(t,e,"access private method"),n);var In=(t,e,n)=>ur(cr(t),n,e);var or={};_n(or,{parsers:()=>Cn});var Cn={};_n(Cn,{__ng_action:()=>Ko,__ng_binding:()=>Zo,__ng_directive:()=>ta,__ng_interpolation:()=>ea});function pr(t){return typeof t=="string"?e=>e===t:e=>t.test(e)}function An(t,e,n){let s=pr(e);for(let i=n;i<t.length;i++){let r=t[i];if(s(r))return i}throw new Error(`Cannot find character ${e} from index ${n} in ${JSON.stringify(t)}`)}function Pn(t){return t.slice(0,1).toLowerCase()+t.slice(1)}function Be(t){let{start:e,end:n}=t;return{start:e,end:n,range:[e,n]}}function Nn(t){return!!t.extra?.parenthesized}function ye(t){return t.type==="TSNonNullExpression"&&!Nn(t)?ye(t.expression):(t.type==="OptionalCallExpression"||t.type==="OptionalMemberExpression")&&!Nn(t)}var ra=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var x;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING"})(x||(x={}));var K,Ln="svg",hr="math",Bs="",$n="*",yt=()=>Object.create(null);function fr(){return K||(K=yt(),B(x.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),B(x.STYLE,void 0,[["*",["style"]]]),B(x.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),B(x.URL,hr,[["*",["href","xlink:href"]]]),B(x.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),B(x.URL,Ln,[["a",["href","xlink:href"]]]),B(x.ATTRIBUTE_NO_BINDING,Ln,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),B(x.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority","credentialless"]]]),K)}function B(t,e,n){let s=e??Bs;for(let[i,r]of n){let a=i.toLowerCase();for(let u of r){let h=u.toLowerCase(),d=K[h]??(K[h]=yt()),g=d[s]??(d[s]=yt());g[a]=t}}}function dr(t,e,n){let i=fr()[e.toLowerCase()];if(!i)return x.NONE;let r=t.toLowerCase(),a;if(n){let u=i[n];u&&(a=u[r]??u[$n])}if(a===void 0){let u=i[Bs];u&&(a=u[r]??u[$n])}return a??x.NONE}var Mn;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Mn||(Mn={}));var Rn;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t[t.Eager=1]="Eager"})(Rn||(Rn={}));var On;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(On||(On={}));var Dn={name:"custom-elements"},Bn={name:"no-errors-schema"};var Fn;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Fn||(Fn={}));var Vn;(function(t){t[t.Directive=0]="Directive",t[t.Component=1]="Component",t[t.Injectable=2]="Injectable",t[t.Pipe=3]="Pipe",t[t.NgModule=4]="NgModule",t[t.Service=5]="Service"})(Vn||(Vn={}));var Hn;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(Hn||(Hn={}));var Un;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t[t.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom"})(Un||(Un={}));var Wn;(function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"})(Wn||(Wn={}));var qn;(function(t){t[t.None=0]="None",t[t.Const=1]="Const"})(qn||(qn={}));var jn;(function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function",t[t.Inferred=6]="Inferred",t[t.None=7]="None"})(jn||(jn={}));var zn;(function(t){t[t.Minus=0]="Minus",t[t.Plus=1]="Plus"})(zn||(zn={}));var p;(function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Assign=2]="Assign",t[t.Identical=3]="Identical",t[t.NotIdentical=4]="NotIdentical",t[t.Minus=5]="Minus",t[t.Plus=6]="Plus",t[t.Divide=7]="Divide",t[t.Multiply=8]="Multiply",t[t.Modulo=9]="Modulo",t[t.And=10]="And",t[t.Or=11]="Or",t[t.BitwiseOr=12]="BitwiseOr",t[t.BitwiseAnd=13]="BitwiseAnd",t[t.Lower=14]="Lower",t[t.LowerEquals=15]="LowerEquals",t[t.Bigger=16]="Bigger",t[t.BiggerEqualsLine truncated
|
||||
`&&++u==n)););for(a=0,u=0;a<e&&r<s.length-1&&(r++,a++,!(s[r]==`
|
||||
`&&++u==n)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,r+1)}}return null}},et=class{content;url;constructor(e,n){this.content=e,this.url=n}},tt=class{start;end;fullStart;details;constructor(e,n,s=e,i=null){this.start=e,this.end=n,this.fullStart=s,this.details=i}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},nt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(nt||(nt={}));var Re=class extends Error{span;msg;level;relatedError;constructor(e,n,s=nt.ERROR,i){super(n),this.span=e,this.msg=n,this.level=s,this.relatedError=i,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${nt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var os;(function(t){t[t.Inline=0]="Inline",t[t.SideEffect=1]="SideEffect",t[t.Omit=2]="Omit"})(os||(os={}));var as;(function(t){t[t.Global=0]="Global",t[t.Local=1]="Local",t[t.Isolated=2]="Isolated"})(as||(as={}));var ls;(function(t){t[t.Directive=0]="Directive",t[t.Pipe=1]="Pipe",t[t.NgModule=2]="NgModule"})(ls||(ls={}));var Vr="(:(where|is)\\()?";var Xs="-shadowcsshost",Hr="-shadowcsscontext",tn="[^)(]*",Ur=`(?:\\(${tn}\\)|${tn})+?`,Wr=`(?:\\(${Ur}\\)|${tn})+?`,fn=`(?:\\((${Wr})\\))`,ca=new RegExp("(:nth-[-\\w]+)"+fn,"g"),ua=new RegExp(Xs+fn+"?([^,{]*)","gim"),qr=Hr+fn+"([^{]*)",pa=new RegExp(`${Vr}(${qr})`,"gim"),jr=Xs+"-no-combinator",ha=new RegExp(`${jr}(?![^(]*\\))`,"g");var Qs="%COMMENT%",fa=new RegExp(Qs,"g");var da=new RegExp(`(\\s*(?:${Qs}\\s*)*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))`,"g");var zr="%COMMA_IN_PLACEHOLDER%",Gr="%SEMI_IN_PLACEHOLDER%",Xr="%COLON_IN_PLACEHOLDER%",ma=new RegExp(zr,"g"),ga=new RegExp(Gr,"g"),va=new RegExp(Xr,"g");var l;(function(t){t[t.ListEnd=0]="ListEnd",t[t.Statement=1]="Statement",t[t.Variable=2]="Variable",t[t.ElementStart=3]="ElementStart",t[t.Element=4]="Element",t[t.Template=5]="Template",t[t.ElementEnd=6]="ElementEnd",t[t.ContainerStart=7]="ContainerStart",t[t.Container=8]="Container",t[t.ContainerEnd=9]="ContainerEnd",t[t.DisableBindings=10]="DisableBindings",t[t.ConditionalCreate=11]="ConditionalCreate",t[t.ConditionalBranchCreate=12]="ConditionalBranchCreate",t[t.Conditional=13]="Conditional",t[t.EnableBindings=14]="EnableBindings",t[t.Text=15]="Text",t[t.Listener=16]="Listener",t[t.InterpolateText=17]="InterpolateText",t[t.Binding=18]="Binding",t[t.Property=19]="Property",t[t.StyleProp=20]="StyleProp",t[t.ClassProp=21]="ClassProp",t[t.StyleMap=22]="StyleMap",t[t.ClassMap=23]="ClassMap",t[t.Advance=24]="Advance",t[t.Pipe=25]="Pipe",t[t.Attribute=26]="Attribute",t[t.ExtractedAttribute=27]="ExtractedAttribute",t[t.Defer=28]="Defer",t[t.DeferOn=29]="DeferOn",t[t.DeferWhen=30]="DeferWhen",t[t.I18nMessage=31]="I18nMessage",t[t.DomProperty=32]="DomProperty",t[t.Namespace=33]="Namespace",t[t.ProjectionDef=34]="ProjectionDef",t[t.EnableIncrementalHydrationRuntime=35]="EnableIncrementalHydrationRuntime",t[t.Projection=36]="Projection",t[t.RepeaterCreate=37]="RepeaterCreate",t[t.Repeater=38]="Repeater",t[t.TwoWayProperty=39]="TwoWayProperty",t[t.TwoWayListener=40]="TwoWayListener",t[t.DeclareLet=41]="DeclareLet",t[t.StoreLet=42]="StoreLet",t[t.I18nStart=43]="I18nStart",t[t.I18n=44]="I18n",t[t.I18nEnd=45]="I18nEnd",t[t.I18nExpression=46]="I18nExpression",t[t.I18nApply=47]="I18nApply",t[t.IcuStart=48]="IcuStart",t[t.IcuEnd=49]="IcuEnd",t[t.IcuPlaceholder=50]="IcuPlaceholder",t[t.I18nContext=51]="I18nContext",t[t.I18nAttributes=52]="I18nAttributes",t[t.SourceLocation=53]="SourceLocation",t[t.Animation=54]="Animation",t[t.AnimationString=55]="AnimationString",t[t.AnimationBinding=56]="AnimationBinding",t[t.AnimationListener=57]="AnimationListener",t[t.Control=58]="Control",t[t.ControlCreate=59]="ControlCreate"})(l||(l={}));var te;(function(t){t[t.LexicalRead=0]="LexicalRead",t[t.Context=1]="Context",t[t.TrackContext=2]="TrackContext",t[t.ReadVariable=3]="ReadVariable",t[t.NextContext=4]="NextContext",t[t.Reference=5]="Reference",t[t.StoreLet=6]="StoreLet",t[t.ContextLetReference=7]="ContextLetReference",t[t.GetCurrentView=8]="GetCurrentView",t[t.RestoreView=9]="RestoreView",t[t.ResetView=10]="ResetView",t[t.PureFunctionExpr=11]="PureFunctionExpr",t[t.PureFunctionParameterExpr=12]="PureFunctionParameterExpr",t[t.PipeBinding=13]="PipeBinding",t[t.PipeBindingVariadic=14]="PipeBindingVariadic",t[t.SafePropertyRead=15]="SafePropertyRead",t[t.SafeKeyedRead=16]="SafeKeyedRead",t[t.SafeNavigationMigration=17]="SafeNavigationMigration",t[t.SafeTernaryExpr=18]="SafeTernaryExpr",t[t.EmptyExpr=19]="EmptyExpr",t[t.AssignTemporaryExpr=20]="AssignTemporaryExpr",t[t.ReadTemporaryExpr=21]="ReadTemporaryExpr",t[t.SlotLiteralExpr=22]="SlotLiteralExpr",t[t.ConditionalCase=23]="ConditionalCase",t[t.ConstCollected=24]="ConstCollected",t[t.TwoWayBindingSet=25]="TwoWayBindingSe
Line truncated
|
||||
\r \v\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`,Na=new RegExp(`[^${Ys}]`),Aa=new RegExp(`[${Ys}]{2,}`,"g");var f;(function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.PrivateIdentifier=2]="PrivateIdentifier",t[t.Keyword=3]="Keyword",t[t.String=4]="String",t[t.Operator=5]="Operator",t[t.Number=6]="Number",t[t.RegExpBody=7]="RegExpBody",t[t.RegExpFlags=8]="RegExpFlags",t[t.Error=9]="Error"})(f||(f={}));var W;(function(t){t[t.Plain=0]="Plain",t[t.TemplateLiteralPart=1]="TemplateLiteralPart",t[t.TemplateLiteralEnd=2]="TemplateLiteralEnd"})(W||(W={}));var to=["var","let","as","null","undefined","true","false","if","else","this","typeof","void","in","instanceof"],Oe=class{tokenize(e){return new rn(e).scan()}},I=class{index;end;type;numValue;strValue;constructor(e,n,s,i,r){this.index=e,this.end=n,this.type=s,this.numValue=i,this.strValue=r}isCharacter(e){return this.type===f.Character&&this.numValue===e}isNumber(){return this.type===f.Number}isString(){return this.type===f.String}isOperator(e){return this.type===f.Operator&&this.strValue===e}isIdentifier(){return this.type===f.Identifier}isPrivateIdentifier(){return this.type===f.PrivateIdentifier}isKeyword(){return this.type===f.Keyword}isKeywordLet(){return this.type===f.Keyword&&this.strValue==="let"}isKeywordAs(){return this.type===f.Keyword&&this.strValue==="as"}isKeywordNull(){return this.type===f.Keyword&&this.strValue==="null"}isKeywordUndefined(){return this.type===f.Keyword&&this.strValue==="undefined"}isKeywordTrue(){return this.type===f.Keyword&&this.strValue==="true"}isKeywordFalse(){return this.type===f.Keyword&&this.strValue==="false"}isKeywordThis(){return this.type===f.Keyword&&this.strValue==="this"}isKeywordTypeof(){return this.type===f.Keyword&&this.strValue==="typeof"}isKeywordVoid(){return this.type===f.Keyword&&this.strValue==="void"}isKeywordIn(){return this.type===f.Keyword&&this.strValue==="in"}isKeywordInstanceOf(){return this.type===f.Keyword&&this.strValue==="instanceof"}isError(){return this.type===f.Error}isRegExpBody(){return this.type===f.RegExpBody}isRegExpFlags(){return this.type===f.RegExpFlags}toNumber(){return this.type===f.Number?this.numValue:-1}isTemplateLiteralPart(){return this.isString()&&this.kind===W.TemplateLiteralPart}isTemplateLiteralEnd(){return this.isString()&&this.kind===W.TemplateLiteralEnd}isTemplateLiteralInterpolationStart(){return this.isOperator("${")}toString(){switch(this.type){case f.Character:case f.Identifier:case f.Keyword:case f.Operator:case f.PrivateIdentifier:case f.String:case f.Error:case f.RegExpBody:case f.RegExpFlags:return this.strValue;case f.Number:return this.numValue.toString();default:return null}}},Ae=class extends I{kind;constructor(e,n,s,i){super(e,n,f.String,0,s),this.kind=i}};function Ce(t,e,n){return new I(t,e,f.Character,n,String.fromCharCode(n))}function no(t,e,n){return new I(t,e,f.Identifier,0,n)}function so(t,e,n){return new I(t,e,f.PrivateIdentifier,0,n)}function io(t,e,n){return new I(t,e,f.Keyword,0,n)}function F(t,e,n){return new I(t,e,f.Operator,0,n)}function ro(t,e,n){return new I(t,e,f.Number,n,"")}function oo(t,e,n){return new I(t,e,f.Error,0,n)}function ao(t,e,n){return new I(t,e,f.RegExpBody,0,n)}function lo(t,e,n){return new I(t,e,f.RegExpFlags,0,n)}var be=new I(-1,-1,f.Character,0,""),rn=class{input;tokens=[];length;peek=0;index=-1;braceStack=[];constructor(e){this.input=e,this.length=e.length,this.advance()}scan(){let e=this.scanToken();for(;e!==null;)this.tokens.push(e),e=this.scanToken();return this.tokens}advance(){this.peek=++this.index>=this.length?Ee:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,n=this.length,s=this.peek,i=this.index;for(;s<=Vs;)if(++i>=n){s=Ee;break}else s=e.charCodeAt(i);if(this.peek=s,this.index=i,i>=n)return null;if(Ts(s))return this.scanIdentifier();if(X(s))return this.scanNumber(i);let r=i;switch(s){case G:return this.advance(),X(this.peek)?this.scanNumber(r):this.peek!==G?Ce(r,this.index,G):(this.advance(),this.peek===G?(this.advance(),F(r,this.index,"...")):this.error(`Unexpected character [${String.fromCharCode(s)}]`,0));case Q:case L:case ce:case Z:case V:case J:case Te:return this.scanCharacter(r,s);case Ne:return this.scanOpenBrace(r,s);case oe:return this.scanCloseBrace(r,s);case Us:case Hs:return this.scanString();case Zt:return this.advance(),this.scanTemplateLiteralPart(r);case Tr:return this.scanPrivateIdentifier();case Ws:return this.scanComplexOperator(r,"+",C,"=");case qs:return this.scanComplexOperator(r,"-",C,"=");case Ke:return this.isStartOfRegex()?this.scanRegex(i):this.scanComplexOperator(r,"/",C,"=");case kr:return this.scanComplexOperator(r,"%",C,"=");case Pr:return this.scanOperator(r,"^");case ts:return this.scanStar(r);case ss:return this.scanQuestion(r);case _r:case ns:return this.scanComplexOperator(r,String.fromCharCode(s),C,"=");case br:return this.scanComplexOperator(r,"!",C,"=",C,"=");case C:return this.scanEquals(r);case es:return this.scanCoLine truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let n=Fe(e),s=this._schema.get(n)||this._schema.get("unknown");return Array.from(s.keys()).map(i=>Eo.get(i)??i)}allKnownEventsOfElement(e){let n=Fe(e);return Array.from(this._eventSchema.get(n)??[])}normalizeAnimationStyleProperty(e){return wr(e)}normalizeAnimationStyleValue(e,n,s){let i="",r=s.toString().trim(),a=null;if(Co(e)&&s!==0&&s!=="0")if(typeof s=="number")i="px";else{let u=s.match(/^[+-]?[\d\.]+([a-z]*)$/);u&&u[1].length==0&&(a=`Please provide a CSS unit value for ${n}:${s}`)}return{error:a,value:r+i}}};function Co(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Pa=new ge(new Oe);function $(t){return e=>e.kind===t}function Pe(t,e){return n=>n.kind===t&&e===n.expression instanceof me}function bo(t){return(t.kind===l.Property||t.kind===l.TwoWayProperty)&&!(t.expression instanceof me)}var La=[{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)},{test:Pe(l.Attribute,!0)},{test:Pe(l.Property,!0)},{test:bo},{test:Pe(l.Attribute,!1)},{test:$(l.Control)}],$a=[{test:Pe(l.DomProperty,!0)},{test:Pe(l.DomProperty,!1)},{test:$(l.Attribute)},{test:$(l.StyleMap),transform:rt},{test:$(l.ClassMap),transform:rt},{test:$(l.StyleProp)},{test:$(l.ClassProp)}],Ma=new Set([l.Listener,l.TwoWayListener,l.AnimationListener,l.StyleMap,l.ClassMap,l.StyleProp,l.ClassProp,l.Property,l.TwoWayProperty,l.DomProperty,l.Attribute,l.Animation,l.Control]);function rt(t){return t.slice(t.length-1)}var Ra=new Map([[O.Idle,{none:c.deferOnIdle,prefetch:c.deferPrefetchOnIdle,hydrate:c.deferHydrateOnIdle}],[O.Immediate,{none:c.deferOnImmediate,prefetch:c.deferPrefetchOnImmediate,hydrate:c.deferHydrateOnImmediate}],[O.Timer,{none:c.deferOnTimer,prefetch:c.deferPrefetchOnTimer,hydrate:c.deferHydrateOnTimer}],[O.Hover,{none:c.deferOnHover,prefetch:c.deferPrefetchOnHover,hydrate:c.deferHydrateOnHover}],[O.Interaction,{none:c.deferOnInteraction,prefetch:c.deferPrefetchOnInteraction,hydrate:c.deferHydrateOnInteraction}],[O.Viewport,{none:c.deferOnViewport,prefetch:c.deferPrefetchOnViewport,hydrate:c.deferHydrateOnViewport}],[O.Never,{none:c.deferHydrateNever,prefetch:c.deferHydrateNever,hydrate:c.deferHydrateNever}]]);var Oa=[c.pipeBind1,c.pipeBind2,c.pipeBind3,c.pipeBind4];var Da={constant:[c.interpolate,c.interpolate1,c.interpolate2,c.interpolate3,c.interpolate4,c.interpolate5,c.interpolate6,c.interpolate7,c.interpolate8],variable:c.interpolateV,mapping:t=>{if(t%2===0)throw new Error("Expected odd number of arguments");return(t-1)/2}};var Ba=new Map([["window",c.resolveWindow],["document",c.resolveDocument],["body",c.resolveBody]]);var Fa=new Map([[x.HTML,c.sanitizeHtml],[x.RESOURCE_URL,c.sanitizeResourceUrl],[x.SCRIPT,c.sanitizeScript],[x.STYLE,c.sanitizeStyle],[x.URL,c.sanitizeUrl],[x.ATTRIBUTE_NO_BINDING,c.validateAttribute]]),Va=new Map([[x.HTML,c.trustConstantHtml],[x.RESOURCE_URL,c.trustConstantResourceUrl]]);var Is;(function(t){t[t.None=0]="None",t[t.ViewContextRead=1]="ViewContextRead",t[t.ViewContextWrite=2]="ViewContextWrite",t[t.SideEffectful=4]="SideEffectful"})(Is||(Is={}));var Ha=new Map([[M.Property,R.Property],[M.TwoWay,R.TwoWayProperty],[M.Attribute,R.Attribute],[M.Class,R.ClassName],[M.Style,R.StyleProperty],[M.LegacyAnimation,R.LegacyAnimation],[M.Animation,R.Animation]]);var Ns;(function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"})(Ns||(Ns={}));var As;(function(t){t.IDLE="idle",t.TIMER="timer",t.INTERACTION="interaction",t.IMMEDIATE="immediate",t.HOVER="hover",t.VIEWPORT="viewport",t.NEVER="never"})(As||(As={}));var Zs="%COMP%",Ua=`_nghost-${Zs}`,Wa=`_ngcontent-${Zs}`;var Ps;(function(t){t[t.Selector=0]="Selector",t[t.HostDirective=1]="HostDirective"})(Ps||(Ps={}));var Ls;(function(t){t[t.Extract=0]="Extract",t[t.Merge=1]="Merge"})(Ls||(Ls={}));var qa=new Dt("22.0.6");var $s;(function(t){t.DIAGNOSTIC="D",t.EXPRESSION_TYPE_IDENTIFIER="T"})($s||($s={}));var Ms;(function(t){t.DIRECTIVE="DIR",t.HOST_DIRECTIVE="HOSTDIR",t.COMPONENT_COMPLETION="COMPCOMP",t.EVENT_PARAMETER="EP",t.VARIABLE_AS_EXPRESSION="VAE"})(Ms||(Ms={}));var Rs;(function(t){t[
Line truncated
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
__babel_estree: Parser;
|
||||
__js_expression: Parser;
|
||||
__ts_expression: Parser;
|
||||
__vue_event_binding: Parser;
|
||||
__vue_expression: Parser;
|
||||
__vue_ts_event_binding: Parser;
|
||||
__vue_ts_expression: Parser;
|
||||
babel: Parser;
|
||||
"babel-flow": Parser;
|
||||
"babel-ts": Parser;
|
||||
json: Parser;
|
||||
"json-stringify": Parser;
|
||||
json5: Parser;
|
||||
jsonc: Parser;
|
||||
};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.babel=e()}})(function(){"use strict";var qt=Object.defineProperty;var si=Object.getOwnPropertyDescriptor;var ii=Object.getOwnPropertyNames;var ri=Object.prototype.hasOwnProperty;var $t=(a,e)=>{for(var t in e)qt(a,t,{get:e[t],enumerable:!0})},ai=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ii(e))!ri.call(a,i)&&i!==t&&qt(a,i,{get:()=>e[i],enumerable:!(s=si(e,i))||s.enumerable});return a};var ni=a=>ai(qt({},"__esModule",{value:!0}),a);var Ia={};$t(Ia,{parsers:()=>wa});var Me={};$t(Me,{__babel_estree:()=>ga,__js_expression:()=>xa,__ts_expression:()=>Pa,__vue_event_binding:()=>ma,__vue_expression:()=>xa,__vue_ts_event_binding:()=>ya,__vue_ts_expression:()=>Pa,babel:()=>ma,"babel-flow":()=>ti,"babel-ts":()=>ya});var X=(a,e)=>(t,s,...i)=>t|1&&s==null?void 0:(e.call(s)??s[a]).apply(s,i);var oi=String.prototype.replaceAll??function(a,e){return a.global?this.replace(a,e):this.split(a).join(e)},hi=X("replaceAll",function(){if(typeof this=="string")return oi}),U=hi;var ci=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lt=ci;var L=class{constructor(e,t,s){this.line=void 0,this.column=void 0,s!==void 0&&(this.index=void 0),this.line=e,this.column=t,s!==void 0&&(this.index=s)}},st=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function O(a,e){let{line:t,column:s,index:i}=a;return new L(t,s+e,i+e)}var Be="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",li={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Be},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Be}},Re={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},wt=a=>a.type==="UpdateExpression"?Re.UpdateExpression[`${a.prefix}`]:Re[a.type],pi={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is noLine truncated
|
||||
- Did you mean \`export { '${a}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:({phase:a})=>`\`import${a?`.${a}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:a})=>`Cannot use new with import${a?`.${a}`:""}().`,ImportCallSpreadArgument:({phase:a})=>`\`...\` is not allowed in \`import${a?`.${a}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${wt(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${wt(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${wt(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class eLine truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(l.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===t)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):tt(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(130,s)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(t,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,s=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(W(t)||t===45);this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:we(this.state.type)?t.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(10))return s;let i=this.startNodeAt(t);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(12);){let i=this.startNodeAt(t);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(_.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(_.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,s){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(_.UnexpectedSequenceExpression,i.expressions[1]),t.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let s=this.startNode();return this.setContext(w.brace),this.next(),this.expect(17),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(s,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXOpeningFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s)}jsxParseOpeningElementAfterName(t){let s=[];for(;!this.match(52)&&!this.match(139);)s.push(this.jsxParseAttribute());return t.attributes=s,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXClosingFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.expect(139),this.finishNode(s,"JSXClosingElement")}jsxParseElementAt(t){let s=this.startNodeAt(t),i=[],r=this.jsxParseOpeningElementAt(t),n=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 138:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),n=this.jsxParseClosingElementAt(t);break t}i.push(this.jsxParseElementAt(t));break;case 137:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(w.brace),this.next(),this.match(17)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,w.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(_.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)}):!q(r)&&!q(n)&&Z(n.name)!==Z(r.name)&&this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)})}if(q(r)?(s.openingFr
Line truncated
|
||||
`,++t,x===13&&e.charCodeAt(t)===10&&++t,++i,f=s=t):r.unterminated(n,o,h):++t}return{pos:t,str:c,firstInvalidLoc:p,lineStart:s,curLine:i}}function sr(a,e,t,s){return a==="template"?e===96||e===36&&t.charCodeAt(s+1)===123:e===(a==="double"?34:39)}function ir(a,e,t,s,i,r){let n=!i;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:s}),h=a.charCodeAt(e++);switch(h){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=ae(a,e,t,s,2,!1,n,r),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=hs(a,e,t,s,n,r),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(e)===10&&++e;case 10:t=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(e-1,t,s);default:if(h>=48&&h<=55){let c=e-1,f=/^[0-7]+/.exec(a.slice(c,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let x=a.charCodeAt(e);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(c,t,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function ae(a,e,t,s,i,r,n,o){let h=e,c;return{n:c,pos:e}=os(a,e,t,s,16,i,r,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(h,t,s):e=h-1),{code:c,pos:e}}function os(a,e,t,s,i,r,n,o,h,c){let p=e,f=i===16?$e.hex:$e.decBinOct,d=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,x=!1,T=0;for(let D=0,v=r??1/0;D<v;++D){let E=a.charCodeAt(e),I;if(E===95&&o!=="bail"){let At=a.charCodeAt(e-1),ct=a.charCodeAt(e+1);if(o){if(Number.isNaN(ct)||!d(ct)||f.has(At)||f.has(ct)){if(c)return{n:null,pos:e};h.unexpectedNumericSeparator(e,t,s)}}else{if(c)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,t,s)}++e;continue}if(E>=97?I=E-97+10:E>=65?I=E-65+10:er(E)?I=E-48:I=1/0,I>=i){if(I<=9&&c)return{n:null,pos:e};if(I<=9&&h.invalidDigit(e,t,s,i))I=0;else if(n)I=0,x=!0;else break}++e,T=T*i+I}return e===p||r!=null&&e-p!==r||x?{n:null,pos:e}:{n:T,pos:e}}function hs(a,e,t,s,i,r){let n=a.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=ae(a,e,t,s,a.indexOf("}",e)-e,!0,i,r),++e,o!==null&&o>1114111)if(i)r.invalidCodePoint(e,t,s);else return{code:null,pos:e}}else({code:o,pos:e}=ae(a,e,t,s,4,!1,i,r));return{code:o,pos:e}}function ut(a,e,t){return new L(t,a-e,a)}var rr=new Set([103,109,115,105,121,117,100,118]),ne=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new st(e.startLoc,e.endLoc)}},Et,oe=class extends ie{isLookahead;tokens=[];constructor(e,t){super(),this.state=new re,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Et||Et.length<(this.length+1)*2)&&(Et=new Uint32Array((this.length+1)*2)),this.locData=Et}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new L(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new ne(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ht.lastIndex=e,Ht.test(this.input)?Ht.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Kt.lastIndex=e,Kt.test(this.input)?Kt.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(t=65536+((t&1023)<<10)+(s&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,s])=>this.raise(t,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(l.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,St.lastIndex=s+2;St.test(this.input)&&St.lastIndex<=i;)++this.state.curLine,this.state.lineStart=St.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:t
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,c)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,O(this.state.lastTokEndLoc,c)),f}parseTemplate(e){let t=this.startNode(),s=this.parseTemplateElement(e),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=r,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,r=!0,n=this.startNode();for(n.properties=[],this.next();!this.match(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(n);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),i=this.checkProto(h,i,s)),n.properties.push(h)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(n,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(l.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(51),this.parsePropertyName(s)),(p==="get"||p==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(c),s.kind=p,this.match(51)&&(o=!0,this.raise(l.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise(e.kind==="get"?l.BadGetterArity:l.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(l.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,r){if(r){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(l.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,s,i,r,n,o){let h=this.parseObjectMethod(e,s,i,r,n)||this.parseObjectProperty(e,t,r,o);return h||this.unexpected(),h}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:s,value:i}=this.state,r;if(B(s))r=this.parseIdentifier(!0);else switch(s){case 131:r=this.parseNumericLiteral(i);break;case 130:r=this.parseStringLiteral(i);break;case 132:r=this.parseBigIntLiteral(i);break;case 134:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(l.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,s!==134&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,r,n,o=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Nt(s,e.generator)),this.parseFunctionParams(e,i);let h=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(e,t){let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let r=Nt(s,!1);return this.match(2)||(r|=this.prodParam.currentFlags()&24),this.prodParam.enter(r),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpress
Line truncated
|
||||
`||a==="\r"||a==="\u2028"||a==="\u2029";function wr(a,e,t){if(e===!1)return!1;let s=!!t?.backwards,i=a.charAt(e);if(s){if(a.charAt(e-1)==="\r"&&i===`
|
||||
`)return e-2;if(xs(i))return e-1}else{if(i==="\r"&&a.charAt(e+1)===`
|
||||
`)return e+2;if(xs(i))return e+1}return e}var Ps=wr;function Ir(a,e){return e===!1?!1:a.charAt(e)==="/"&&a.charAt(e+1)==="/"?ms(a,e):e}var gs=Ir;function Nr(a,e){let t=null,s=e;for(;s!==t;)t=s,s=ds(a,s),s=ys(a,s),s=gs(a,s),s=Ps(a,s);return s}var Ts=Nr;function bs(a){let e=[];for(let t of a)try{return t()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function kr(a){if(!a.startsWith("#!"))return"";let e=a.indexOf(`
|
||||
`);return e===-1?a:a.slice(0,e)}var Ft=kr;var vr=Array.prototype.findLast??function(a){for(let e=this.length-1;e>=0;e--){let t=this[e];if(a(t,e,this))return t}},Lr=X("findLast",function(){if(Array.isArray(this))return vr}),As=Lr;var Bt=Symbol.for("comments");function Dr(a){return this[a<0?this.length+a:a]}var Mr=X("at",function(){if(Array.isArray(this)||typeof this=="string")return Dr}),Ss=Mr;function J(a){let e=new Set(a);return t=>e.has(t?.type)}function rt(a){return a.range?.[1]??a.end}function N(a){let e=a.range?.[0]??a.start,t=(a.declaration?.decorators??a.decorators)?.[0];return t?Math.min(N(t),e):e}var Or=5,Fr=8,Br=8,Cs=a=>e=>e.label?k(e.label):N(e)+a,Rr=a=>a.__contentEnd??rt(a),Es=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ur=new Map([["BreakStatement",Cs(Or)],["ContinueStatement",Cs(Fr)],["DebuggerStatement",a=>N(a)+Br],["VariableDeclaration",a=>k(Ss(0,a.declarations,-1))],...Es.map(a=>[a,Rr])]),Ne=J(Es);function k(a){let{type:e}=a;return e==="IfStatement"?k(a.alternate??a.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?k(a.body):Ur.get(e)?.(a)??rt(a)}var at=J(["Block","CommentBlock","MultiLine"]),ws=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function nt(a,e,t){if(!a.has(e)){let s=t(e);a.set(e,s)}return a.get(e)}var _r=new WeakMap;function Is(a){return nt(_r,a,e=>at(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function jr(a){return U(0,a,/[^\n]/g," ")}var Ns=jr;function Vr(a,e){for(let t of e){let s=N(t),i=k(t);a=a.slice(0,s)+Ns(a.slice(s,i))+a.slice(i)}return a}var qr=new WeakMap;function ks(a){let e=a[Bt];return nt(qr,e,t=>Vr(a.originalText,t))}function $r(a){if(!at(a))return[];if(!a.value.includes(`
|
||||
`))return[];let e=[];for(let t of`*${a.value}*`.split(`
|
||||
`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}var vs=new WeakMap;function zr(a){return nt(vs,a,$r)}function Ls(a){vs.delete(a)}function ke(a){return zr(a).length>0}function Ds(a){if(a.length<2)return;let e;for(let t=a.length-1;t>=0;t--){let s=a[t];if(e&&k(s)===N(e)&&ke(s)&&ke(e)&&(a.splice(t+1,1),s.value+="*//*"+e.value,s.range=[N(s),k(e)],Ls(s)),!ws(s)&&!at(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}function Hr(a){return a!==null&&typeof a=="object"}var Ms=Hr;var gt=null;function Tt(a){if(gt!==null&&typeof gt.property){let e=gt;return gt=Tt.prototype=null,e}return gt=Tt.prototype=a??Object.create(null),new Tt}var Kr=10;for(let a=0;a<=Kr;a++)Tt();function ve(a){return Tt(a)}function Wr(a,e="type"){ve(a);function t(s){let i=s[e],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return t}var Os=Wr;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],Fs={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);a=a.replace(Vs,"").trimEnd();let s=Object.create(null),i=U(0,a,qs,"").replace(Vs,"").trimEnd(),r;for(;r=qs.exec(a);){let n=U(0,r[2],sa,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...aa,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var Hs=["noformat","noprettier"],Ks=["format","prettier"];function Ws(a){let e=Ft(a);e&&(a=a.slice(e.length+1));let t=$s(a),{pragmas:s,comments:i}=zs(t);return{shebang:e,text:a,pragmas:s,comments:i}}function Js(a){let{pragmas:e}=Ws(a);return Ks.some(t=>lt(e,t))}function Gs(a){let{pragmas:e}=Ws(a);return Hs.some(t=>lt(e,t))}function na(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Js,hasIgnorePragma:Gs,locStart:N,locEnd:k,...a}}var G=na;var jt="module",De="commonjs";function Xs(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/i.test(a))return jt;if(/\.(?:cjs|cts)$/i.test(a))return De}}function oa(a){let{type:e="JsExpressionRoot",expression:t,comments:s=t?.comments??[],text:i,rootMarker:r}=a,n={type:e,comments:s,range:[0,i.length],rootMarker:r};return t&&(delete t.comments,n.node=t),n}var Vt=oa;var ot=a=>G(ua(a)),ha={sourceType:jt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Ys="v8intrinsic",Qs=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,e=ha)=>({...e,plugins:[...e.plugins,...a]}),ca=/@(?:no)?flow\b/;function la(a,e){if(e?.endsWith(".js.flow"))return!0;let t=Ft(a);t&&(a=a.slice(t.length));let s=Ts(a,0);return s!==!1&&(a=a.slice(0,s)),ca.test(a)}function pa(a,e,t){let s=a(e,t),i=s.errors.find(r=>!da.has(r.reasonCode));if(i)throw i;return s}function ua({isExpression:a=!1,optionsCombinations:e}){return(t,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&la(t,i))return s.parser="babel-flow",ti.parse(t,s);let r=e,n=s.__babelSourceType??Xs(i);n&&n!==jt&&(r=r.map(p=>({...p,sourceType:n,...n===De?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/.test(t);t.includes("|>")?r=(o?[...Qs,Ys]:Qs).flatMap(f=>r.map(d=>j([f],d))):o&&(r=r.map(p=>j([Ys],p)));let h=a?Mt:Dt,c;try{c=bs(r.map(p=>()=>pa(h,t,p)))}catch({errors:[p]}){throw _t(p)}return a&&(c=Vt({expression:c,text:t,rootMarker:s.rootMarker})),_s(c,{text:t})}}var fa=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],da=new Set(fa),Zs=[j(["jsx"])],ma=ot({optionsCombinations:Zs}),ya=ot({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),xa=ot({isExpression:!0,optionsCombinations:[j(["jsx"])]}),Pa=ot({isExpression:!0,optionsCombinations:[j(["typescript"])]}),ti=ot({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),ga=ot({optionsCombinations:Zs.map(a=>j(["estree"],a))});var Fe={};$t(Fe,{json:()=>Aa,"json-stringify":()=>Ea,json5:()=>Sa,jsonc:()=>Ca});function Ta(a){return Array.isArray(a)&&a.length>0}var Oe=Ta;var ei={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function ba(a){let e=Dt(a,ei),{program:t}=e;if(t.body.length===0&&t.directives.length===0&&!t.interpreter)return{comments:e.comments}}function bt(a,e={}){let{allowComments:t=!0,allowEmpty:s=!1}=e,i,r;try{i=Mt(a,ei),r=i.comments}catch(n){if(s&&n.code==="BABEL_PARSER_SYNTAX_ERROR"&&n.reasonCode==="ParseExpressionEmptyInput")try{({comments:r}=ba(a))}catch{}if(!r)throw _t(n)}if(!t&&Oe(r))throw H(r[0],"Comment");return(!s||i)&&ht(i),i=Vt({type:"JsonRoot",expression:i,comments:r,text:a}),i}function H(a,e){let[t,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Ut(`${e} is not allowed in JSON.`,{loc:{start:t,end:s}})}function ht(a){switch(a.type){case"ArrayExpression":for(let e of a.elements)e!==null&&ht(e);return;case"ObjectExpression":for(let e of a.properties)ht(e);return;case"ObjectProperty":if(a.computed)throw H(a.key,"Computed key");if(a.shorthand)throw H(a.key,"Shorthand property");a.key.type!=="Identifier"&&
Line truncated
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
var si=Object.defineProperty;var qt=(a,e)=>{for(var t in e)si(a,t,{get:e[t],enumerable:!0})};var ei={};qt(ei,{parsers:()=>Aa});var De={};qt(De,{__babel_estree:()=>ma,__js_expression:()=>fa,__ts_expression:()=>da,__vue_event_binding:()=>pa,__vue_expression:()=>fa,__vue_ts_event_binding:()=>ua,__vue_ts_expression:()=>da,babel:()=>pa,"babel-flow":()=>Zs,"babel-ts":()=>ua});var X=(a,e)=>(t,s,...i)=>t|1&&s==null?void 0:(e.call(s)??s[a]).apply(s,i);var ii=String.prototype.replaceAll??function(a,e){return a.global?this.replace(a,e):this.split(a).join(e)},ri=X("replaceAll",function(){if(typeof this=="string")return ii}),U=ri;var ai=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lt=ai;var L=class{constructor(e,t,s){this.line=void 0,this.column=void 0,s!==void 0&&(this.index=void 0),this.line=e,this.column=t,s!==void 0&&(this.index=s)}},st=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function O(a,e){let{line:t,column:s,index:i}=a;return new L(t,s+e,i+e)}var Fe="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ni={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Fe},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Fe}},Be={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},wt=a=>a.type==="UpdateExpression"?Be.UpdateExpression[`${a.prefix}`]:Be[a.type],oi={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:e})=>`A string literal cannot be used as an exported binding without
Line truncated
|
||||
- Did you mean \`export { '${a}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
|
||||
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:({phase:a})=>`\`import${a?`.${a}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:a})=>`Cannot use new with import${a?`.${a}`:""}().`,ImportCallSpreadArgument:({phase:a})=>`\`...\` is not allowed in \`import${a?`.${a}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${wt(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${wt(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${wt(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class eLine truncated
|
||||
`:`\r
|
||||
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(l.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===t)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):tt(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(130,s)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(t,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,s=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(W(t)||t===45);this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:Ee(this.state.type)?t.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(10))return s;let i=this.startNodeAt(t);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(12);){let i=this.startNodeAt(t);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(_.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(_.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,s){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(_.UnexpectedSequenceExpression,i.expressions[1]),t.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let s=this.startNode();return this.setContext(w.brace),this.next(),this.expect(17),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(s,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXOpeningFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s)}jsxParseOpeningElementAfterName(t){let s=[];for(;!this.match(52)&&!this.match(139);)s.push(this.jsxParseAttribute());return t.attributes=s,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXClosingFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.expect(139),this.finishNode(s,"JSXClosingElement")}jsxParseElementAt(t){let s=this.startNodeAt(t),i=[],r=this.jsxParseOpeningElementAt(t),n=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 138:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),n=this.jsxParseClosingElementAt(t);break t}i.push(this.jsxParseElementAt(t));break;case 137:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(w.brace),this.next(),this.match(17)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,w.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(_.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)}):!q(r)&&!q(n)&&Z(n.name)!==Z(r.name)&&this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)})}if(q(r)?(s.openingFr
Line truncated
|
||||
`,++t,x===13&&e.charCodeAt(t)===10&&++t,++i,f=s=t):r.unterminated(n,o,h):++t}return{pos:t,str:c,firstInvalidLoc:p,lineStart:s,curLine:i}}function Qi(a,e,t,s){return a==="template"?e===96||e===36&&t.charCodeAt(s+1)===123:e===(a==="double"?34:39)}function Zi(a,e,t,s,i,r){let n=!i;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:s}),h=a.charCodeAt(e++);switch(h){case 110:return o(`
|
||||
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=re(a,e,t,s,2,!1,n,r),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=os(a,e,t,s,n,r),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(e)===10&&++e;case 10:t=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(e-1,t,s);default:if(h>=48&&h<=55){let c=e-1,f=/^[0-7]+/.exec(a.slice(c,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let x=a.charCodeAt(e);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(c,t,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function re(a,e,t,s,i,r,n,o){let h=e,c;return{n:c,pos:e}=ns(a,e,t,s,16,i,r,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(h,t,s):e=h-1),{code:c,pos:e}}function ns(a,e,t,s,i,r,n,o,h,c){let p=e,f=i===16?qe.hex:qe.decBinOct,d=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,x=!1,T=0;for(let D=0,v=r??1/0;D<v;++D){let E=a.charCodeAt(e),I;if(E===95&&o!=="bail"){let At=a.charCodeAt(e-1),ct=a.charCodeAt(e+1);if(o){if(Number.isNaN(ct)||!d(ct)||f.has(At)||f.has(ct)){if(c)return{n:null,pos:e};h.unexpectedNumericSeparator(e,t,s)}}else{if(c)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,t,s)}++e;continue}if(E>=97?I=E-97+10:E>=65?I=E-65+10:Yi(E)?I=E-48:I=1/0,I>=i){if(I<=9&&c)return{n:null,pos:e};if(I<=9&&h.invalidDigit(e,t,s,i))I=0;else if(n)I=0,x=!0;else break}++e,T=T*i+I}return e===p||r!=null&&e-p!==r||x?{n:null,pos:e}:{n:T,pos:e}}function os(a,e,t,s,i,r){let n=a.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=re(a,e,t,s,a.indexOf("}",e)-e,!0,i,r),++e,o!==null&&o>1114111)if(i)r.invalidCodePoint(e,t,s);else return{code:null,pos:e}}else({code:o,pos:e}=re(a,e,t,s,4,!1,i,r));return{code:o,pos:e}}function ut(a,e,t){return new L(t,a-e,a)}var tr=new Set([103,109,115,105,121,117,100,118]),ae=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new st(e.startLoc,e.endLoc)}},Et,ne=class extends se{isLookahead;tokens=[];constructor(e,t){super(),this.state=new ie,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Et||Et.length<(this.length+1)*2)&&(Et=new Uint32Array((this.length+1)*2)),this.locData=Et}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new L(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new ae(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return zt.lastIndex=e,zt.test(this.input)?zt.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Ht.lastIndex=e,Ht.test(this.input)?Ht.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(t=65536+((t&1023)<<10)+(s&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,s])=>this.raise(t,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(l.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,St.lastIndex=s+2;St.test(this.input)&&St.lastIndex<=i;)++this.state.curLine,this.state.lineStart=St.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:t
Line truncated
|
||||
`),cooked:r===null?null:r.slice(1,c)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,O(this.state.lastTokEndLoc,c)),f}parseTemplate(e){let t=this.startNode(),s=this.parseTemplateElement(e),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=r,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,r=!0,n=this.startNode();for(n.properties=[],this.next();!this.match(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(n);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),i=this.checkProto(h,i,s)),n.properties.push(h)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(n,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(l.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(51),this.parsePropertyName(s)),(p==="get"||p==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(c),s.kind=p,this.match(51)&&(o=!0,this.raise(l.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise(e.kind==="get"?l.BadGetterArity:l.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(l.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,r){if(r){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(l.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,s,i,r,n,o){let h=this.parseObjectMethod(e,s,i,r,n)||this.parseObjectProperty(e,t,r,o);return h||this.unexpected(),h}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:s,value:i}=this.state,r;if(B(s))r=this.parseIdentifier(!0);else switch(s){case 131:r=this.parseNumericLiteral(i);break;case 130:r=this.parseStringLiteral(i);break;case 132:r=this.parseBigIntLiteral(i);break;case 134:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(l.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,s!==134&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,r,n,o=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Nt(s,e.generator)),this.parseFunctionParams(e,i);let h=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(e,t){let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let r=Nt(s,!1);return this.match(2)||(r|=this.prodParam.currentFlags()&24),this.prodParam.enter(r),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpress
Line truncated
|
||||
`||a==="\r"||a==="\u2028"||a==="\u2029";function Ar(a,e,t){if(e===!1)return!1;let s=!!t?.backwards,i=a.charAt(e);if(s){if(a.charAt(e-1)==="\r"&&i===`
|
||||
`)return e-2;if(ys(i))return e-1}else{if(i==="\r"&&a.charAt(e+1)===`
|
||||
`)return e+2;if(ys(i))return e+1}return e}var xs=Ar;function Sr(a,e){return e===!1?!1:a.charAt(e)==="/"&&a.charAt(e+1)==="/"?ds(a,e):e}var Ps=Sr;function Cr(a,e){let t=null,s=e;for(;s!==t;)t=s,s=fs(a,s),s=ms(a,s),s=Ps(a,s),s=xs(a,s);return s}var gs=Cr;function Ts(a){let e=[];for(let t of a)try{return t()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function Er(a){if(!a.startsWith("#!"))return"";let e=a.indexOf(`
|
||||
`);return e===-1?a:a.slice(0,e)}var Ft=Er;var wr=Array.prototype.findLast??function(a){for(let e=this.length-1;e>=0;e--){let t=this[e];if(a(t,e,this))return t}},Ir=X("findLast",function(){if(Array.isArray(this))return wr}),bs=Ir;var Bt=Symbol.for("comments");function Nr(a){return this[a<0?this.length+a:a]}var kr=X("at",function(){if(Array.isArray(this)||typeof this=="string")return Nr}),As=kr;function J(a){let e=new Set(a);return t=>e.has(t?.type)}function rt(a){return a.range?.[1]??a.end}function N(a){let e=a.range?.[0]??a.start,t=(a.declaration?.decorators??a.decorators)?.[0];return t?Math.min(N(t),e):e}var vr=5,Lr=8,Dr=8,Ss=a=>e=>e.label?k(e.label):N(e)+a,Mr=a=>a.__contentEnd??rt(a),Cs=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Or=new Map([["BreakStatement",Ss(vr)],["ContinueStatement",Ss(Lr)],["DebuggerStatement",a=>N(a)+Dr],["VariableDeclaration",a=>k(As(0,a.declarations,-1))],...Cs.map(a=>[a,Mr])]),Ie=J(Cs);function k(a){let{type:e}=a;return e==="IfStatement"?k(a.alternate??a.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?k(a.body):Or.get(e)?.(a)??rt(a)}var at=J(["Block","CommentBlock","MultiLine"]),Es=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function nt(a,e,t){if(!a.has(e)){let s=t(e);a.set(e,s)}return a.get(e)}var Fr=new WeakMap;function ws(a){return nt(Fr,a,e=>at(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function Br(a){return U(0,a,/[^\n]/g," ")}var Is=Br;function Rr(a,e){for(let t of e){let s=N(t),i=k(t);a=a.slice(0,s)+Is(a.slice(s,i))+a.slice(i)}return a}var Ur=new WeakMap;function Ns(a){let e=a[Bt];return nt(Ur,e,t=>Rr(a.originalText,t))}function _r(a){if(!at(a))return[];if(!a.value.includes(`
|
||||
`))return[];let e=[];for(let t of`*${a.value}*`.split(`
|
||||
`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}var ks=new WeakMap;function jr(a){return nt(ks,a,_r)}function vs(a){ks.delete(a)}function Ne(a){return jr(a).length>0}function Ls(a){if(a.length<2)return;let e;for(let t=a.length-1;t>=0;t--){let s=a[t];if(e&&k(s)===N(e)&&Ne(s)&&Ne(e)&&(a.splice(t+1,1),s.value+="*//*"+e.value,s.range=[N(s),k(e)],vs(s)),!Es(s)&&!at(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}function Vr(a){return a!==null&&typeof a=="object"}var Ds=Vr;var gt=null;function Tt(a){if(gt!==null&&typeof gt.property){let e=gt;return gt=Tt.prototype=null,e}return gt=Tt.prototype=a??Object.create(null),new Tt}var qr=10;for(let a=0;a<=qr;a++)Tt();function ke(a){return Tt(a)}function $r(a,e="type"){ke(a);function t(s){let i=s[e],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return t}var Ms=$r;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],Os={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);a=a.replace(js,"").trimEnd();let s=Object.create(null),i=U(0,a,Vs,"").replace(js,"").trimEnd(),r;for(;r=Vs.exec(a);){let n=U(0,r[2],Qr,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...ea,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var zs=["noformat","noprettier"],Hs=["format","prettier"];function Ks(a){let e=Ft(a);e&&(a=a.slice(e.length+1));let t=qs(a),{pragmas:s,comments:i}=$s(t);return{shebang:e,text:a,pragmas:s,comments:i}}function Ws(a){let{pragmas:e}=Ks(a);return Hs.some(t=>lt(e,t))}function Js(a){let{pragmas:e}=Ks(a);return zs.some(t=>lt(e,t))}function sa(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Ws,hasIgnorePragma:Js,locStart:N,locEnd:k,...a}}var G=sa;var jt="module",Le="commonjs";function Gs(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/i.test(a))return jt;if(/\.(?:cjs|cts)$/i.test(a))return Le}}function ia(a){let{type:e="JsExpressionRoot",expression:t,comments:s=t?.comments??[],text:i,rootMarker:r}=a,n={type:e,comments:s,range:[0,i.length],rootMarker:r};return t&&(delete t.comments,n.node=t),n}var Vt=ia;var ot=a=>G(ha(a)),ra={sourceType:jt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Xs="v8intrinsic",Ys=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,e=ra)=>({...e,plugins:[...e.plugins,...a]}),aa=/@(?:no)?flow\b/;function na(a,e){if(e?.endsWith(".js.flow"))return!0;let t=Ft(a);t&&(a=a.slice(t.length));let s=gs(a,0);return s!==!1&&(a=a.slice(0,s)),aa.test(a)}function oa(a,e,t){let s=a(e,t),i=s.errors.find(r=>!la.has(r.reasonCode));if(i)throw i;return s}function ha({isExpression:a=!1,optionsCombinations:e}){return(t,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&na(t,i))return s.parser="babel-flow",Zs.parse(t,s);let r=e,n=s.__babelSourceType??Gs(i);n&&n!==jt&&(r=r.map(p=>({...p,sourceType:n,...n===Le?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/.test(t);t.includes("|>")?r=(o?[...Ys,Xs]:Ys).flatMap(f=>r.map(d=>j([f],d))):o&&(r=r.map(p=>j([Xs],p)));let h=a?Mt:Dt,c;try{c=Ts(r.map(p=>()=>oa(h,t,p)))}catch({errors:[p]}){throw _t(p)}return a&&(c=Vt({expression:c,text:t,rootMarker:s.rootMarker})),Us(c,{text:t})}}var ca=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],la=new Set(ca),Qs=[j(["jsx"])],pa=ot({optionsCombinations:Qs}),ua=ot({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),fa=ot({isExpression:!0,optionsCombinations:[j(["jsx"])]}),da=ot({isExpression:!0,optionsCombinations:[j(["typescript"])]}),Zs=ot({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),ma=ot({optionsCombinations:Qs.map(a=>j(["estree"],a))});var Oe={};qt(Oe,{json:()=>Pa,"json-stringify":()=>ba,json5:()=>ga,jsonc:()=>Ta});function ya(a){return Array.isArray(a)&&a.length>0}var Me=ya;var ti={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function xa(a){let e=Dt(a,ti),{program:t}=e;if(t.body.length===0&&t.directives.length===0&&!t.interpreter)return{comments:e.comments}}function bt(a,e={}){let{allowComments:t=!0,allowEmpty:s=!1}=e,i,r;try{i=Mt(a,ti),r=i.comments}catch(n){if(s&&n.code==="BABEL_PARSER_SYNTAX_ERROR"&&n.reasonCode==="ParseExpressionEmptyInput")try{({comments:r}=xa(a))}catch{}if(!r)throw _t(n)}if(!t&&Me(r))throw H(r[0],"Comment");return(!s||i)&&ht(i),i=Vt({type:"JsonRoot",expression:i,comments:r,text:a}),i}function H(a,e){let[t,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Ut(`${e} is not allowed in JSON.`,{loc:{start:t,end:s}})}function ht(a){switch(a.type){case"ArrayExpression":for(let e of a.elements)e!==null&&ht(e);return;case"ObjectExpression":for(let e of a.properties)ht(e);return;case"ObjectProperty":if(a.computed)throw H(a.key,"Computed key");if(a.shorthand)throw H(a.key,"Shorthand property");a.key.type!=="Identifier"&&
Line truncated
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Printer } from "../index.js";
|
||||
|
||||
export declare const printers: {
|
||||
estree: Printer;
|
||||
"estree-json": Printer;
|
||||
};
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var Co=Object.defineProperty;var Zp=Object.getOwnPropertyDescriptor;var ec=Object.getOwnPropertyNames;var tc=Object.prototype.hasOwnProperty;var Fo=(e,t)=>{for(var r in t)Co(e,r,{get:t[r],enumerable:!0})},rc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ec(t))!tc.call(e,o)&&o!==r&&Co(e,o,{get:()=>t[o],enumerable:!(n=Zp(t,o))||n.enumerable});return e};var nc=e=>rc(Co({},"__esModule",{value:!0}),e);var Ey={};Fo(Ey,{languages:()=>yy,options:()=>Vp,printers:()=>Dy});var _i=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",aliases:["typescriptreact"],codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var bi={};Fo(bi,{estree:()=>Bi});function oc(e){return Array.isArray(e)&&e.length>0}var j=oc;var ic=()=>{},Re=ic;function B(e){let t=new Set(e);return r=>t.has(r?.type)}var Qt=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o);function sc(e){return this[e<0?this.length+e:e]}var uc=Qt("at",function(){if(Array.isArray(this)||typeof this=="string")return sc}),w=uc;function Z(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function ac(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var pc=new WeakMap;function ee(e){return Z(pc,e,ac)}function Ni(e,t){let{node:r}=e,n=0,o=()=>t(e,n++);r.this&&e.call(o,"this"),e.each(o,"params"),r.rest&&e.call(o,"rest")}function ji(e){if(e.rest)return!0;let t=ee(e);return w(0,t,-1)?.type==="RestElement"}var vi=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const";function zt({node:e,parent:t}){return e?.type!=="EmptyStatement"?!1:t.type==="IfStatement"?t.consequent===e||t.alternate===e:t.type==="DoWhileStatement"||t.type==="ForInStatement"||t.type==="ForOfStatement"||t.type==="ForStatement"||t.type==="LabeledStatement"||t.type==="WithStatement"||t.type==="WhileStatement"?t.body===e:!1}function $e(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}var Ao=e=>Number.isSafeInteger(e)&&e>=0;function It(e){return e.range?.[1]??e.end}function b(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(b(r),t):t}var cc=5,lc=8,mc=8,Ri=e=>t=>t.label?S(t.label):b(t)+e,fc=e=>e.__contentEnd??It(e),Wi=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Dc=new Map([["BreakStatement",Ri(cc)],["ContinueStatement",Ri(lc)],["DebuggerStatement",e=>b(e)+mc],["VariableDeclaration",e=>S(w(0,e.declarations,-1))],...Wi.map(e=>[e,fc])]),Ji=B(Wi),Pr=e=>{if(Ji(e)&&eLine truncated
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function gc(e,t,r){if(t===!1)return!1;let n=!!r?.backwards,o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===`
|
||||
`)return t-2;if(zi(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(zi(o))return t+1}return t}var pt=gc;function hc(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Qi(e,t):t}var rr=hc;function Sc(e,t){let r=null,n=t;for(;n!==r;)r=n,n=at(e,n),n=tr(e,n),n=rr(e,n),n=pt(e,n);return n}var Wt=Sc;function Bc(e,t){let r=Wt(e,t);return r===!1?"":e.charAt(r)}var Je=Bc;function bc(e,t,r={}){let n=at(e,r.backwards?t-1:t,r),o=pt(e,n,r);return n!==o}var J=bc;function Pc(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var te=Pc;var Ic=new WeakMap;function kc(e){let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,t}function se(e){return Z(Ic,e,kc)}function kr(e,t){let{node:r}=e;r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function ho(e,t){if(e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return["source"];if(e.options&&(t===1||t===-1))return["options"];throw new RangeError("Invalid argument index")}if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return["expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return["arguments",t];throw new RangeError("Invalid argument index")}var Zi=Symbol.for("comments");var wc=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Lc=Qt("replaceAll",function(){if(typeof this=="string")return wc}),V=Lc;function Oc(e){return V(0,e,/[^\n]/g," ")}var es=Oc;function Mc(e,t){for(let r of t){let n=b(r),o=S(r);e=e.slice(0,n)+es(e.slice(n,o))+e.slice(o)}return e}var _c=new WeakMap;function ce(e){let t=e[Zi];return Z(_c,t,r=>Mc(e.originalText,r))}function ts(e,t){let r=S(e)-1;if(t.originalText[r]===")")return r}function Nc(e,t){if(ts(e,t)===void 0)return;let n=ce(t),o=S(e.typeArguments??e.callee),i=n.indexOf("(",o);if(i!==-1)return i}function rs(e,t,r){let n=ts(e,r);if(n===void 0||S(t)>n)return!1;let o=Nc(e,r);return o===void 0?!1:b(t)>o}var le=B(["Block","CommentBlock","MultiLine"]),Le=B(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function Ge(e){return e?.type==="ObjectProperty"||e?.type==="Property"&&!$e(e)}function yt(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}var jc=new WeakMap;function nr(e){return Z(jc,e,t=>le(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/.test(t.value))}function $r({comment:e,enclosingNode:t,followingNode:r,options:n}){if((t?.type==="ForInStatement"||t?.type==="ForOfStatement"||t?.type==="ForStatement")&&r&&r===t.body){let o=ce(n).lastIndexOf(")",b(r));if(b(e)>o)return K(r,e),!0}return!1}var So=(e,t)=>le(e)&&!te(t,b(e),S(e)),wr=(e,t)=>Le(e)||So(e,t);function Qr(e,t){e.type==="BlockStatement"?or(e,t):K(e,t)}function or(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?K(r,t):Te(e,t)}function zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){return r?.type!=="IfStatement"||!n?!1:Je(o,S(e))===")"?(X(t,e),!0):n===r.consequent?(K(n,e),!0):t===r.consequent&&n===r.alternate?vc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}):!1}function vc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=ce(i).indexOf("else",S(r.consequent));return b(e)>=s?(K(n,e),!0):!(t.type==="BlockStatement")&&wr(e,o)&&!te(o,S(t),b(e))?(X(t,e),!0):(Te(r,e),!0)}function Zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return r?.type==="SwitchStatement"&&r.cases.length===0&&!n&&t===r.discriminant&&Je(o,S(e))==="}"?(Te(r,e),!0):!1}function en({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return(r?.type==="WhileStatement"||r?.type==="WithStatement")&&n?Je(o,S(e))===")"?(X(t,e),!0):r.body===n?(K(n,e),!0):!1:!1}function Bo(e,{comment:t,text:r,options:n}){if(pe(e)&&So(t,r)&&!yt(t)){let i=ce(n).slice(S(t),b(e));return/^[ \t]*$/.test(i)}return!1}function bo(e,t){return K(Bo(e,t)?e.types[0]:e,t.comment),!0}function Rc(e){return[Po,Ds,ss,cs,Uc,zr,en,Zr,is,us,$r,$c,Qc,Io,ms,Zc,as,ls,qc,sl,ko,wo,Es].some(t=>t(e))}function Wc(e){return[Po,Gc,cs,ss,ms,zr,en,Zr,is,us,$r,ls,Kc,zc,Io,fs,ol,il,ul,ko,cl,ys,al,wo].some(t=>t(e))}function Jc(e){return[Po,Ds,zr,en,Zr,$r,as,Io,fs,ko,Xc,Hc,rl,ys,wo,Es].some(t=>t(e))}function Gc({comment:e,followingNode:t}){return t&&nr(e)?(K(t,e),!0):!1}function is({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(X(t,e),!0):n.type==="BlockStatement"?(or(n,e),!0):n.type==="TryStatement"?(Qr(n.finalizer,e),!0):n.type==="CatchClause"?(Qr(n.body,e),!0):!1}function Uc({comment:e,enclosingNode:t,followingNode:r}){return N(t)&&r?.type==="Identifier"?(K(t,e),!0):!1}function qc({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!(t?.type==="ConditionalExpression"||Qe(t))?!1:r?.type==="ConditionalExpression"||Qe(r)?(Te(t,e),!0):!1}function ss({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=t&&!te(o,S(t),b(e));return(!t||!s)&&(r?.type==="ConditionalExpression"||Qe(r))&&n?i.experimentalTernaries&&r.alternate===n&&!(le(e)&&!te(i.originalText,b(e),S(e)))?(Te(r,e),!0):(K(n,e),!0):
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(Xe(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ll([...cn].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Mo=class extends Error{name="InvalidDocError";constructor(t){super(Ol(t)),this.doc=t}},Ot=Mo;var Os={};function Ml(e,t,r,n){let o=[e];for(;o.length>0;){let i=o.pop();if(i===Os){r(o.pop());continue}r&&o.push(i,Os);let s=Xe(i);if(!s)throw new Ot(i);if(t?.(i)!==!1)switch(s){case Me:case Ue:{let u=s===Me?i:i.parts;for(let a=u.length,c=a-1;c>=0;--c)o.push(u[c]);break}case _e:o.push(i.flatContents,i.breakContents);break;case ge:if(n&&i.expandedStates)for(let u=i.expandedStates.length,a=u-1;a>=0;--a)o.push(i.expandedStates[a]);else o.push(i.contents);break;case et:case Ze:case tt:case Ne:case rt:o.push(i.contents);break;case ze:case ct:case lt:case He:case Fe:case qe:break;default:throw new Ot(i)}}}var ln=Ml;function gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){return Z(r,i,o)}function o(i){switch(Xe(i)){case Me:return t(i.map(n));case Ue:return t({...i,parts:i.parts.map(n)});case _e:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case ge:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case et:case Ze:case tt:case Ne:case rt:return t({...i,contents:n(i.contents)});case ze:case ct:case lt:case He:case Fe:case qe:return t(i);default:throw new Ot(i)}}}function _s(e,t,r){let n=r,o=!1;function i(s){if(o)return!1;let u=t(s);u!==void 0&&(o=!0,n=u)}return ln(e,i),n}function _l(e){if(e.type===ge&&e.break||e.type===Fe&&e.hard||e.type===qe)return!0}function ue(e){return _s(e,_l,!1)}function Ms(e){if(e.length>0){let t=w(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ns(e){let t=new Set,r=[];function n(i){if(i.type===qe&&Ms(r),i.type===ge){if(r.push(i),t.has(i))return!1;t.add(i)}}function o(i){i.type===ge&&r.pop().break&&Ms(r)}ln(e,n,o,!0)}function Nl(e){return e.type===Fe&&!e.hard?e.soft?"":" ":e.type===_e?e.flatContents:e}function Jt(e){return gt(e,Nl)}function jl(e){switch(Xe(e)){case Ue:{let{parts:t}=e;if(t.every(r=>r===""))return"";if(t.length===1)return t[0];break}case ge:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ge&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case et:case Ze:case tt:case rt:if(!e.contents)return"";break;case _e:if(!e.flatContents&&!e.breakContents)return"";break;case Me:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof w(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case ze:case ct:case lt:case He:case Fe:case Ne:case qe:break;default:throw new Ot(e)}return e}function ur(e){return gt(e,t=>jl(t))}function Ve(e,t=ar){return gt(e,r=>typeof r=="string"?L(t,r.split(`
|
||||
`)):r)}function vl(e){if(e.type===Fe)return!0}function js(e){return _s(e,vl,!1)}function mn(e,t){return e.type===Ne?{...e,contents:t(e.contents)}:t(e)}function vs(e){let t=!0;return ln(e,r=>{switch(Xe(r)){case ze:if(r==="")break;case lt:case He:case Fe:case qe:return t=!1,!1}}),t}var he=Re,fn=Re,Rs=Re,Ws=Re;function m(e){return he(e),{type:Ze,contents:e}}function Se(e,t){return Ws(e),he(t),{type:et,contents:t,n:e}}function Js(e){return Se(Number.NEGATIVE_INFINITY,e)}function Gs(e){return Se({type:"root"},e)}function Dn(e){return Se(-1,e)}function Us(e,t,r){he(e);let n=e;if(t>0){for(let o=0;o<Math.floor(t/r);++o)n=m(n);n=Se(t%r,n),n=Se(Number.NEGATIVE_INFINITY,n)}return n}var je={type:qe};var jr={type:ct};function yn(e){return Rs(e),{type:Ue,parts:e}}function p(e,t={}){return he(e),fn(t.expandedStates,!0),{type:ge,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function mt(e,t){return p(e[0],{...t,expandedStates:e})}function O(e,t="",r={}){return he(e),t!==""&&he(t),{type:_e,breakContents:e,flatContents:t,groupId:r.groupId}}function ht(e,t){return he(e),{type:tt,contents:e,groupId:t.groupId,negate:t.negate}}function L(e,t){he(e),fn(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Et(e,t){return he(t),e?{type:Ne,label:e,contents:t}:t}var T={type:Fe},D={type:Fe,soft:!0},_o={type:Fe,hard:!0},d=[_o,je],Rl={type:Fe,hard:!0,literal:!0},ar=[Rl,je];function No(e){return he(e),{type:rt,contents:e}}var Be={type:He};var Wl="cr",Jl="crlf";var Gl="\r",Ul=`\r
|
||||
`,ql=`
|
||||
`,Yl=ql;function qs(e){return e===Wl?Gl:e===Jl?Ul:Yl}var Ys=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?V(0,C,`
|
||||
`,o):C;I&&(c.write(I),s.length>0&&(i+=dt(I)));break}case Me:for(let I=C.length-1;I>=0;I--)s.push({indent:E,mode:P,doc:C[I]});break;case ct:c.markPosition();break;case Ze:s.push({indent:tu(E,t),mode:P,doc:C.contents});break;case et:s.push({indent:eu(E,C.n,t),mode:P,doc:C.contents});break;case lt:i-=c.trim();break;case ge:{let I=(function(){if(P===Ct&&!u)return{indent:E,mode:C.break?nt:Ct,doc:C.contents};u=!1;let h=n-i,v=a.length>0,U={indent:E,mode:Ct,doc:C.contents};if(!C.break&&dn(U,s,h,v,r))return U;if(!C.expandedStates)return{indent:E,mode:nt,doc:C.contents};if(!C.break)for(let ae=1;ae<C.expandedStates.length-1;ae++){let fe={indent:E,mode:Ct,doc:C.expandedStates[ae]};if(dn(fe,s,h,v,r))return fe}return{indent:E,mode:nt,doc:w(0,C.expandedStates,-1)}})();s.push(I),C.id&&(r[C.id]=I.mode);break}case Ue:{let I=n-i,k=C[Uo]??0,{parts:h}=C,v=h.length-k;if(v===0)break;let U=h[k+0],ae=h[k+1],fe={indent:E,mode:Ct,doc:U},z={indent:E,mode:nt,doc:U},xe=dn(fe,[],I,a.length>0,r,!0);if(v===1){xe?s.push(fe):s.push(z);break}let De={indent:E,mode:Ct,doc:ae},xt={indent:E,mode:nt,doc:ae};if(v===2){xe?s.push(De,fe):s.push(xt,z);break}let bt=h[k+2],_={indent:E,mode:P,doc:{...C,[Uo]:k+2}},we=dn({indent:E,mode:Ct,doc:[U,ae,bt]},[],I,a.length>0,r,!0);s.push(_),we?s.push(De,fe):xe?s.push(xt,fe):s.push(xt,z);break}case _e:case tt:{let I=C.groupId?r[C.groupId]:P;if(I===nt){let k=C.type===_e?C.breakContents:C.negate?C.contents:m(C.contents);k&&s.push({indent:E,mode:P,doc:k})}if(I===Ct){let k=C.type===_e?C.flatContents:C.negate?m(C.contents):C.contents;k&&s.push({indent:E,mode:P,doc:k})}break}case rt:a.push({indent:E,mode:P,doc:C.contents});break;case He:a.length>0&&s.push({indent:E,mode:P,doc:_o});break;case Fe:switch(P){case Ct:if(!C.hard){C.soft||(c.write(" "),i+=1);break}u=!0;case nt:if(a.length>0){s.push({indent:E,mode:P,doc:C},...a.reverse()),a.length=0;break}C.literal?(c.write(o),i=0,E.root&&(E.root.value&&c.write(E.root.value),i=E.root.length)):(c.trim(),c.write(o+E.value),i=E.length);break}break;case Ne:s.push({indent:E,mode:P,doc:C.contents});break;case qe:break;default:throw new Ot(C)}s.length===0&&a.length>0&&(s.push(...a.reverse()),a.length=0)}let{text:f,positions:y}=c.finish();if(y.length!==2)return{formatted:f};let[F,A]=y;return{formatted:f,cursorNodeStart:F,cursorNodeText:f.slice(F,A)}}var St=class extends Error{name="ArgExpansionBailout"};function pr(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function tm(e,t){let r=null,n=t;for(;n!==r;)r=n,n=$i(e,n),n=tr(e,n),n=at(e,n);return n=rr(e,n),n=pt(e,n),n!==!1&&J(e,n)}var Gt=tm;var me=(e,{originalText:t})=>{let r=S(e);if(Gt(t,r))return!0;let n=It(e);return n===r?!1:Gt(t,n)};var rm=B(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Cn=rm;var nu=B(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function nm({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Fn=nm;function cr(e){return Fn(e)||Cn(e)||nu(e)||e.type==="GenericTypeAnnotation"&&!e.typeParameters||e.type==="TSTypeReference"&&!e.typeArguments}function ou(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!kt(e,e.typeAnnotation)}function om(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let o=r[n];if(n===0)return e.type==="Identifier"&&e.name===o;if(n===1&&e.type==="MetaProperty"&&e.property.type==="Identifier"&&e.property.name===o){e=e.meta;continue}if(e.type==="MemberExpression"&&!e.optional&&!e.computed&&e.property.type==="Identifier"&&e.property.name===o){e=e.object;continue}return!1}}function lr(e,t){return t.some(r=>om(e,r))}var im=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function sm(e){return lr(e,im)}function um(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}function Yo(e){return M(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}function am(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function Ut(e,t){if(e?.type!=="CallExpression"||e.optional)return!1;let r=se(e);if(r.length===1){if(
Line truncated
|
||||
`);return r===-1?0:hu(e.slice(r+1).match(/^[\t ]*/)[0],t)}var Su=Jm;function On(e,t,r){if(Hm(e)){let i=Gm(e,t,r);if(i)return i}let n=Nt(e,t,r),o=e.map(({isLast:i,index:s})=>[r(),i?"":n[s]],"quasis");return[Be,"`",...o,"`"]}function bu(e,t,r){let n=r("quasi"),{node:o}=e,i="",s=re(o.quasi,g.Leading)[0];return s&&(te(t.originalText,S(o.typeArguments??o.tag),b(s))?i=D:i=" "),Et(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,Be,n])}function Gm(e,t,r){let{node:n}=e,o=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(o.length>1||o.some(i=>i.length>0)){t.__inJestEach=!0;let i=Nt(e,t,r);t.__inJestEach=!1;let s=i.map(y=>qo(y,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted),u=[{hasLineBreak:!1,cells:[]}];for(let y=1;y<n.quasis.length;y++){let F=w(0,u,-1),A=s[y-1];F.cells.push(A),A.includes(`
|
||||
`)&&(F.hasLineBreak=!0),n.quasis[y].value.raw.includes(`
|
||||
`)&&u.push({hasLineBreak:!1,cells:[]})}let a=Math.max(o.length,...u.map(y=>y.cells.length)),c=Array.from({length:a},()=>0),f=[{cells:o},...u.filter(y=>y.cells.length>0)];for(let y of f)if(!y.hasLineBreak)for(let[F,A]of y.cells.entries())c[F]=Math.max(c[F],dt(A));return[Be,"`",m([d,L(d,f.map(y=>L(" | ",y.cells.map((F,A)=>y.hasLineBreak?F:F+" ".repeat(c[A]-dt(F))))))]),d,"`"]}}var Um=new WeakMap;function qm(e,t){let{parent:r,index:n}=e;return Z(Um,r,i=>{let{tabWidth:s}=t,u=0;return i.quasis.map(c=>{let f=c.value.raw,y=f.includes(`
|
||||
`)?Su(f,s):u;return u=y,{indentSize:y,previousQuasiText:f}})})[n]}function Ym(e,t,r){let{node:n,index:o}=e,i=r(),s=e.parent,{quasis:u}=s,a=S(u[o]),c=b(u[o+1]),f=te(t.originalText,a,c);if(!f){let A=qo(i,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;A.includes(`
|
||||
`)?f=!0:i=A}f&&(x(n)||n.type==="Identifier"||N(Pe(n))||n.type==="ConditionalExpression"||n.type==="SequenceExpression"||de(n)||be(n))&&(i=[m([D,i]),D]);let{indentSize:y,previousQuasiText:F}=qm(e,t);return t.__inJestEach&&(y=Math.max(y,t.tabWidth)),i=y===0&&F.endsWith(`
|
||||
`)?Se(Number.NEGATIVE_INFINITY,i):Us(i,y,t.tabWidth),p(["${",i,Be,"}"])}function Nt(e,t,r){return e.map(()=>Ym(e,t,r),e.node.type==="TSTemplateLiteralType"?"types":"expressions")}function Mn(e,t){return gt(e,r=>typeof r=="string"?t?V(0,r,/(\\*)`/g,"$1$1\\`"):ei(r):r)}function ei(e){return V(0,e,/([\\`]|\$\{)/g,"\\$1")}var Bu=/^[fx]?(?:describe|it|test)$/;function Hm({node:e,parent:t}){return e.type==="TemplateLiteral"&&t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&Bu.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&Bu.test(t.tag.object.object.name))}var ri=[(e,t)=>t==="properties"&&e.type==="ObjectExpression",(e,t)=>t==="arguments"&&e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component",(e,t)=>t==="expression"&&e.type==="Decorator"];function Pu(e){let t=n=>n.type==="TemplateLiteral",r=(n,o)=>Ge(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&o==="value";return e.match(t,(n,o)=>Y(n)&&o==="elements",r,...ri)||e.match(t,r,...ri)}function ni(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ge(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ri)}function ti(e,t){return x(e,g.Block|g.Leading,({value:r})=>r===` ${t} `)}function _n({node:e,parent:t},r){return ti(e,r)||Xm(t)&&ti(t,r)||t.type==="ExpressionStatement"&&ti(t,r)}function Xm(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function ku(e,t,r,n){let{node:o}=r,i="";for(let[c,f]of o.quasis.entries()){let{raw:y}=f.value;c>0&&(i+="@prettier-placeholder-"+(c-1)+"-id"),i+=y}let s=await e(i,{parser:"scss"}),u=Nt(r,n,t),a=Vm(s,u);if(!a)throw new Error("Couldn't insert all the expressions");return["`",m([d,a]),D,"`"]}function Vm(e,t){if(!j(t))return e;let r=0,n=gt(ur(e),o=>typeof o!="string"||!o.includes("@prettier-placeholder")?o:o.split(/@prettier-placeholder-(\d+)-id/).map((i,s)=>s%2===0?Ve(i):(r++,t[i])));return t.length===r?n:null}function Km(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&lr(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function Nn(e){return e.type==="Identifier"&&e.name==="styled"}function Iu(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function $m({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Nn(t.object)||Iu(t);case"CallExpression":return Nn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Nn(t.callee.object.object)||Iu(t.callee.object))||t.callee.object.type==="CallExpression"&&Nn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Qm({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var wu=e=>Km(e)||$m(e)||Qm(e)||Pu(e);async function Lu(e,t,r,n){let{node:o}=r,i=o.quasis.length,s=Nt(r,n,t),u=[];for(let a=0;a<i;a++){let c=o.quasis[a],f=a===0,y=a===i-1,F=c.value.cooked,A=F.split(`
|
||||
`),E=A.length;if(!y&&/#[^\n\r]*$/.test(A[E-1]))return null;let P=E>2&&A[0].trim()===""&&A[1].trim()==="",C=E>2&&A[E-1].trim()===""&&A[E-2].trim()==="",I=A.every(h=>/^\s*(?:#[^\n\r]*)?$/.test(h)),k;I?k=zm(A):k=await e(F,{parser:"graphql"}),k?(k=Mn(k,!1),!f&&P&&u.push(""),u.push(k),!y&&C&&u.push("")):!f&&!y&&P&&u.push(""),y||u.push(s[a])}return["`",m([d,L(d,u)]),d,"`"]}function zm(e){let t=[],r=!1,n=e.map(o=>o.trim());for(let[o,i]of n.entries())i!==""&&(n[o-1]===""&&r?t.push([d,i]):t.push(i),r=!0);return t.length===0?null:L(d,t)}function Ou({node:e,parent:t}){return _n({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var oi=0;async function Mu(e,t,r,n,o){let{node:i}=n,s=oi;oi=oi+1>>>0;let u=I=>`PRETTIER_HTML_PLACEHOLDER_${I}_${s}_IN_JS`,a=i.quasis.map((I,k,h)=>k===h.length-1?I.value.cooked:I.value.cooked+u(k)).join(""),c=Nt(n,o,r),f=new RegExp(u("(\\d+)"),"g"),y=0,F=await t(a,{parser:e,__onHtmlRoot(I){y=I.children.length}}),A=gt(F,I=>{if(typeof I!="string")return I;let k=[],h=I.split(f);for(let v=0;v<h.length;v++){let U=h[v];if(v%2===0){U&&(U=ei(U),o.__embeddedInHtml&&(U=V(0,U,/<\/(?=script\b)/gi,"<\\/")),k.push(U));continue}let ae=Number(U);k.push(c[ae])}return k}),E=/^\s/.test(a)?" ":"",P=/\s$/.test(a)?" ":"",C=o.htmlWhitespaceSensitivity==="ignore"?d:E&&P?T:null;return C?p(["`",m([C,p(A)]),C,"`"]):Et({hug:!1},p(["`",E,y>1?m(p(A)):p(A),P,"`"]))}function _u(e){return _n(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var Nu=Mu.bind(void 0,"html"),ju=Mu.bind(void 0,"angular");async function vu(e,t,r){let{node:n}=r,o=V(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(a,c)=>"\\".repeat(c.length/2)+"`"),i=Zm(o),s=i!=="";s&&(o=V(0,o,new RegExp(`^${i}`,"gm"),""));let u=Mn(await e(o,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",s?m([D,u]):[ar,Js(u)],D,"`"]}function Zm(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Ru({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var ef=[{test:wu,print:ku},{test:Ou,print:Lu},{test:_u,print:Nu},{test:ni,print:ju},{test:Ru,print:vu}].map(({test:e,print:t})=>({test:e,print:rf(t)}));function tf(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||nf(t))return;let r=ef.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function rf(e){return async(...t)=>{let r=await e(...t);return r&&Et({embed:!0,...r.label},r)}}function nf({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Wu=tf;function Ju(e,t){e.type==="ChainExpression"?of(t):(e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression")&&sf(t)}function Gu(e){if(N(e))return"object";if(M(e))return"callee";if(We(e))return"expression"}function jn(e){let t=Gu(e);if(t)return e[t]}function of(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression"||e.type==="TSNonNullExpression";e=jn(e)){let t=Gu(e),r=e[t];r.type==="ChainExpression"&&(e[t]=r.expression)}}function sf(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression";e=jn(e))e.type=`Optional${e.type}`}function Uu(e,t,r){let n=t[r];(q(n)||Ee(n))&&(e[r]=String(n.value)),n.type==="Identifier"&&(e[r]=n.name)}function qu(e,t){(e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="TSMethodSignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute"||e.type==="RecordDeclarationProperty"||e.type==="RecordDeclarationStaticProperty")&&!e.computed&&Uu(t,e,"key"),e.type==="TSEnumMember"&&Uu(t,e,"id")}function Yu(e,t){e.type==="RegExpLiteral"&&(t.flags=[...e.flags].sort().join("")),e.type==="Literal"&&"regex"in e&&(t.regex.flags=[...e.regex.flags].sort().join(""))}var uf=new Set(["range","raw","comments","extra","start","end","loc","errors","tokens","trailingComma","docblock","__contentEnd"]),Er=e=>{for(let t of e.quasis)delete t.value};function ii(e,t,r){if(e.type==="Program"&&delete t.sourceType,Ju(e,t),qu(e,t),Yu(e,t),(Gi(e)||e.type==="BigIntLiteralTypeAnnotation")&&"bigint"in e&&(t.bigint=e.bigint.toLowerCase()),e.type==="EmptyStatement"&&!zt({node:e,parent:r})||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if(e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(Hu,"").trimEnd();let n=Object.create(null),o=V(0,e,Xu,"").replace(Hu,"").trimEnd(),i;for(;i=Xu.exec(e);){let s=V(0,i[2],cf,"");if(typeof n[i[1]]=="string"||Array.isArray(n[i[1]])){let u=n[i[1]];n[i[1]]=[...$u,...Array.isArray(u)?u:[u],s]}else n[i[1]]=s}return{comments:o,pragmas:n}}function ea({comments:e="",pragmas:t={}}){let s=Object.keys(t),u=s.flatMap(c=>Vu(c,t[c])).map(c=>` * ${c}
|
||||
`).join("");if(!e){if(s.length===0)return"";if(s.length===1&&!Array.isArray(t[s[0]])){let c=t[s[0]];return`/** ${Vu(s[0],c)[0]} */`}}let a=e.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(e?a:"")+(e&&s.length>0?` *
|
||||
`:"")+u+" */"}function Vu(e,t){return[...$u,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var ta="format";function ff(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var ra=ff;function Df(e){let t=ra(e);t&&(e=e.slice(t.length+1));let r=Qu(e),{pragmas:n,comments:o}=Zu(r);return{shebang:t,text:e,pragmas:n,comments:o}}function na(e){let{shebang:t,text:r,pragmas:n,comments:o}=Df(e),i=zu(r),s=ea({pragmas:{[ta]:"",...n},comments:o.trimStart()});return(t?`${t}
|
||||
`:"")+s+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}function yf(e){if(!le(e))return[];if(!e.value.includes(`
|
||||
`))return[];let t=[];for(let r of`*${e.value}*`.split(`
|
||||
`)){if(r=r.trimStart(),!r.startsWith("*"))return[];t.push(r)}return t}var Ef=new WeakMap;function si(e){return Z(Ef,e,yf)}function vn(e){return si(e).length>0}function oa(e,t){let r=e.node;if(Le(r))return t.originalText.slice(b(r),S(r)).trimEnd();if(vn(r))return df(r);if(le(r))return["/*",Ve(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function df(e){let t=si(e),r=e.value[0]==="*"&&e.value[1]!=="*";return["/",t.map((n,o)=>{if(o===0)return[n.trimEnd(),d];if(o===t.length-1)return[" ",n];let i=n.trimEnd(),s=[" ",i];return r&&i!=="*"&&n.endsWith(" ")?[s," ",Gs(ar)]:[s,d]}),"/"]}function ui(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ai=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let o=0;o<t.length&&r.has(t.charAt(o));o++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let o=t.length-1;o>=0&&r.has(t.charAt(o));o--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(w(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ui([...this.#e].join(""))}]+`,o=new RegExp(r?`(${n})`:n);return t.split(o)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let o=this.getLeadingWhitespaceCount(n);if(o===0)return 0;n.length!==o&&o<r&&(r=o)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},ia=ai;var dr=new ia(`
|
||||
\r `);function Xt(e){return e.type==="JSXText"&&(dr.hasNonWhitespaceCharacter(ye(e))||!/\n/.test(ye(e)))}function sa(e){let{node:t,parent:r}=e;if(!H(t)||!H(r))return!1;let{index:n,siblings:o}=e,i;for(let s=n;s>0;s--){let u=o[s-1];if(!(u.type==="JSXText"&&!Xt(u))){i=u;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&Lt(i.expression)}function Cf(e){return Lt(e.node)||sa(e)}var Cr=Cf;var pi=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},it=pi;function ua(e){return e.type==="CallExpression"&&!e.optional&&e.arguments.length===1&&e.callee.type==="Identifier"&&e.callee.name==="Boolean"}var Ff=0;function Rn(e,t,r){let{node:n,parent:o,grandparent:i,key:s}=e,u=s!=="body"&&(o.type==="IfStatement"||o.type==="WhileStatement"||o.type==="SwitchStatement"||o.type==="DoWhileStatement"),a=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,c=ci(e,t,r,!1,u);if(u)return c;if(a)return p(c);if(s==="callee"&&Tt(o)||o.type==="UnaryExpression"&&!x(n)||N(o)&&!o.computed)return p([m([D,...c]),D]);let f=ut(o)||o.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&o.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(o.type==="NGRoot"&&t.parser==="__ng_binding"||o.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===o.body&&o.type==="ArrowFunctionExpression"||n!==o.body&&o.type==="ForStatement"||o.type==="ConditionalExpression"&&!ut(i)&&!Tt(i)||o.type==="TemplateLiteral"||s==="argument"&&o.type==="UnaryExpression"||s==="arguments"&&ua(o),y=o.type==="AssignmentExpression"||o.type==="VariableDeclarator"||o.type==="ClassProperty"||o.type==="PropertyDefinition"||o.type==="TSAbstractPropertyDefinition"||o.type==="ClassPrivateProperty"||Ge(o),F=be(n.left)&&Lr(n.operator,n.left.operator);if(f||Fr(n)&&!F||!Fr(n)&&y)return p(c);if(c.length===0)return"";let A=H(n.right),E=c.findIndex(v=>typeof v!="string"&&!Array.isArray(v)&&v.type===ge),P=c.slice(0,E===-1?1:E+1),C=c.slice(P.length,A?-1:void 0),I=Symbol("logicalChain-"+ ++Ff),k=p([...P,m(C)],{id:I});if(!A)return k;let h=w(0,c,-1);return p([k,ht(h,{groupId:I})])}function ci(e,t,r,n,o){let{node:i}=e;if(!be(i))return[p(r())];let s=[];Lr(i.operator,i.left.operator)?s=e.call(()=>ci(e,t,r,!0,o),"left"):s.push(p(r("left")));let u=Fr(i),a=i.right.type==="ChainExpression"?i.right.expression:i.right,c=(i.type==="NGPipeExpression"||i.operator==="|>"||xf(e,t))&&!Oe(t.originalText,a),y=!x(a,g.Leading,nr)&&Oe(t.originalText,a),F=i.type==="NGPipeExpression"?"|":i.operator,A=i.type==="NGPipeExpression"&&i.arguments.length>0?p(m([D,": ",L([T,": "],e.map(()=>Se(2,p(r())),"arguments"))])):"",E;if(u)E=[F,Oe(t.originalText,a)?m([T,r("right"),A]):[" ",r("right"),A]];else{let h=F==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>ci(e,t,r,!0,o),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let v="";if(y)switch(Xe(h)){case Me:v=h[0],h.shift();break;case Ne:v=h.contents[0],h.contents.shift();break}E=[T,v,F," ",h,A]}else E=[c?T:"",F,c?" ":T,h,A]}let{parent:P}=e,C=x(i.left,g.Trailing|g.Line);if((C||!(o&&i.type==="LogicalExpression")&&P.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(E=p(E,{shouldBreak:C})),t.experimentalOperatorPosition==="start"?s.push(u||y?" ":"",E):s.push(c?"":" ",E),n&&x(i)){let k=ur(Q(e,s,t));return k.type===Ue?k.parts:Array.isArray(k)?k:[k]}return s}function Fr(e){return e.type!=="LogicalExpression"?!1:!!(ie(e.right)&&e.right.properties.length>0||Y(e.right)&&e.right.elements.length>0||H(e.right))}var aa=e=>e.type==="BinaryExpression"&&e.operator==="|";function xf(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&aa(e.node)&&!e.hasAncestor(r=>!aa(r)&&r.type!=="JsExpressionRoot")}function ca(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return Rn(e,t,r);case"NGChainedExpression":return p(L([";",T],e.map(()=>gf(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":pa(e)?" ":[";",T],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:o,parent:i}=e,s=pa(e)||Af(e)||(o===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||o===2&&(n.key.name==="else"&&i.body[o-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[o-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new it(n,"Angular")}}function pa({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpressio
Line truncated
|
||||
`))}function Gn(e,t){return(e.type==="TemplateLiteral"&&fi(e)||e.type==="TaggedTemplateExpression"&&fi(e.quasi))&&!J(t,b(e),{backwards:!0})}var Bf=new WeakMap;function ya(e){return Z(Bf,e,t=>t.type==="ConditionalExpression"&&!Ce(t,r=>r.type==="ObjectExpression"))}var bf=e=>e.type==="SequenceExpression";function Ea(e,t,r,n={}){let o=[],i,s=[],u=!1,a=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function I(){let{node:k}=e,h=Pf(e,t,r,n);if(o.length===0)o.push(h);else{let{leading:v,trailing:U}=Tn(e,t);o.push([v,h]),s.unshift(U)}a&&(u||(u=k.returnType&&ee(k).length>0||k.typeParameters||ee(k).some(v=>v.type!=="Identifier"))),!a||k.body.type!=="ArrowFunctionExpression"?(i=r("body",n),c=k.body):e.call(I,"body")})();let f=!Oe(t.originalText,c)&&(bf(c)||If(c,i,t)||!u&&ya(c)),y=e.key==="callee"&&Dt(e.parent),F=Symbol("arrow-chain"),A=kf(e,n,{signatureDocs:o,shouldBreak:u}),E=!1,P=!1,C=!1;return a&&(y||n.assignmentLayout)&&(P=!0,C=!x(e.node,g.Leading&g.Line),E=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!f),i=wf(e,t,n,{bodyDoc:i,bodyComments:s,functionBody:c,shouldPutBodyOnSameLine:f}),p([p(P?m([C?D:"",A]):A,{shouldBreak:E,id:F})," =>",a?ht(i,{groupId:F}):p(i),a&&y?O(D,"",{groupId:F}):""])}function Pf(e,t,r,n){let{node:o}=e,i=[];if(o.async&&i.push("async "),kn(e,t))i.push(r(["params",0]));else{let u=n.expandLastArg||n.expandFirstArg,a=wn(e,r);if(u){if(ue(a))throw new St;a=p(Jt(a))}i.push(p([Ke(e,t,r,u,!0),a]))}let s=W(e,t,{marker:"commentBeforeArrow"});return s&&i.push(" ",s),i}function If(e,t,r){return Y(e)||ie(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||H(e)||t.label?.hug!==!1&&(t.label?.embed||Gn(e,r.originalText))}function kf(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:o,key:i}=e;return i!=="callee"&&Dt(o)||be(o)?p([r[0]," =>",m([T,L([" =>",T],r.slice(1))])],{shouldBreak:n}):i==="callee"&&Dt(o)||t.assignmentLayout?p(L([" =>",T],r),{shouldBreak:n}):p(m(L([" =>",T],r)),{shouldBreak:n})}function wf(e,t,r,{bodyDoc:n,bodyComments:o,functionBody:i,shouldPutBodyOnSameLine:s}){let{node:u,parent:a}=e,c=r.expandLastArg?Ie(t,"all"):"",f=(r.expandLastArg||a.type==="JSXExpressionContainer")&&!x(u)?D:"";return s&&ya(i)?[" ",p([O("","("),m([D,n]),O("",")"),c,f]),o]:s?[" ",n,o]:[m([T,n,o]),c,f]}var Lf=.25;function Wr(e,t){let{printWidth:r}=t;if(x(e))return!1;let n=r*Lf;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Jn(e)&&!x(e.argument))return!0;let o=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return o?o.length<=n:q(e)?ot(ye(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(`
|
||||
`):e.type==="UnaryExpression"?Wr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:er(e)}function jt(e){return N(e)||e.type==="BindExpression"&&!!e.object}function da(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(wt(r)){if(t+=1,t>1)return!0}else if(r=Pe(r),M(r)){for(let n of se(r))if(wt(n))return!0}return!1}function Un(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&M(t)&&M(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Of=new Set(["!","-","+","~"]),Mf=B(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]);function st(e,t=2){if(t<=0)return!1;let r=n=>st(n,t-1);if(e=Pe(e),Xr(e))return dt(e.pattern??e.regex.pattern)<=5;if(er(e)||Mf(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(ie(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(Y(e))return e.elements.every(n=>n===null||r(n));if(Dt(e)){if(e.type==="ImportExpression"||st(e.callee,t)){let n=se(e);return n.length<=t&&n.every(r)}return!1}return N(e)?st(e.object,t)&&st(e.property,t):e.type==="UnaryExpression"&&Of.has(e.operator)||e.type==="UpdateExpression"?st(e.argument,t):!1}function _f(e,t,r){let{node:n}=e,o=se(n);if(o.length===0)return p(["(",Mt(e,t),")"]);let i=o.length-1;if(vf(o)){let y=["("];return kr(e,(F,A)=>{y.push(r()),A!==i&&y.push(", ")}),y.push(")"),y}let s=!1,u=[];kr(e,({node:y},F)=>{let A=r();F===i||(me(y,t)?(s=!0,A=[A,",",d,d]):A=[A,",",T]),u.push(A)});let a=e.root.type!=="NGRoot"&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"?Ie(t,"all"):"";function c(){return p(["(",m([T,...u]),a,T,")"],{shouldBreak:!0})}if(s||e.parent.type!=="Decorator"&&da(o))return c();if(jf(o)){let y=u.slice(1);if(y.some(ue))return c();let F;try{F=r(ho(n,0),{expandFirstArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(F)?[je,mt([["(",p(F,{shouldBreak:!0}),", ",...y,")"],c()])]:mt([["(",F,", ",...y,")"],["(",p(F,{shouldBreak:!0}),", ",...y,")"],c()])}if(Nf(o,u,t)){let y=u.slice(0,-1);if(y.some(ue))return c();let F;try{F=r(ho(n,-1),{expandLastArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(F)?[je,mt([["(",...y,p(F,{shouldBreak:!0}),")"],c()])]:mt([["(",...y,F,")"],["(",...y,p(F,{shouldBreak:!0}),")"],c()])}let f=["(",m([D,...u]),a,D,")"];return Un(e)?f:p(f,{shouldBreak:u.some(ue)||s})}function qn(e,t=!1){if(ie(e)&&(e.properties.length>0||x(e))||Y(e)&&(e.elements.length>0||x(e))||(de(e)||e.type==="TSTypeAssertion")&&qn(e.expression)||e.type==="FunctionExpression"||e.type==="DoExpression"||e.type==="ModuleExpression")return!0;if(e.type==="ArrowFunctionExpression"){let{body:r}=e;if(r.type==="BlockStatement"||H(r)||ie(r)||Y(r)||r.type==="ArrowFunctionExpression"&&qn(r,!0)||!t&&(r.type==="ConditionalExpression"||M(Pe(r))))return!0}return!1}function Nf(e,t,r){if(e.length===1){let i=w(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let n=w(0,e,-1),o=w(0,e,-2);return!x(n,g.Leading)&&!x(n,g.Trailing)&&qn(n)&&(!o||o.type!==n.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!Y(n))&&!(e.length>1&&mi(n,r))}function jf(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Rf(r)?!0:!x(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Fa(r)&&!qn(r)}function Fa(e){if(e.type==="ParenthesizedExpression")return Fa(e.expression);if(de(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return cr(t)&&st(e.expression,1)}return Dt(e)&&se(e).length>1?!1:be(e)?st(e.left,1)&&st(e.right,1):Xr(e)||st(e)}function vf(e){return e.length===2?Ca(e,0):e.length===3?e[0].type==="Identifier"&&Ca(e,1):!1}function Ca(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&ee(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&e.every(o=>!x(o))}function Rf(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Ge(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||q(t.key)&&t.key.value==="type")&&q(t.value)&&t.value.value==="module":!1}var Jr=_f;function xa(e,t,r){return[r("object"),p(m([D,Di(e,t,r)]))]}function Di(e,t,r){return["::",r("callee")]}var Wf=e=>M(e)&&se(e).length>0;function Jf(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(N(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function Aa(e,t,r){let n=r("object"),o=yi(e,t,r),{node:i}=e,s=e.findAncestor(c=>!(N(c)||c.type==="TSNonNullExpression")),u=e.findAncestor(c=>!We(c)),a=s.type==="BindExpression"||s.type==="AssignmentExpression"&&s.left.type!=="Identifier"||Jf(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!N(u)||(u.type==="AssignmentExpression"||u.type==="VariableDeclarator")&&(Wf(Pe(i.object))||n.label?.memberChain);return Et(n.label,[n,Be,a?o:p(m([D,o]))])}function yi(e,t,r){let n=r("property"),{node:o}=e,i=$(e);return o.computed?!o.property||Ee(o.property)?[i,"[",n,"]"]:p([i,"[",m([D,n]),D,"]"]):[i,".",n]}function Gf(e,t,r){let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",o=[];function i(_){let{originalText:Ae}=t,we=Wt(Ae,S(_));return Ae.charAt(we)===")"?we!==!1&&Gt(Ae,we+1):me(_,t)}function s(){let{node:_}=e;if(M(_)&&(jt(_.callee)||M(_.cal
Line truncated
|
||||
`)&&!o&&!x(n.attributes[0]))return p(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(u=>q(u.value)&&u.value.value.includes(`
|
||||
`)),s=t.singleAttributePerLine&&n.attributes.length>1?d:T;return p(["<",r("name"),r("typeArguments"),m(e.map(({isFirst:u,previous:a})=>[u?s:me(a,t)?[d,d]:s,r()],"attributes")),...QD(n,t,o)],{shouldBreak:i})}function QD(e,t,r){return e.selfClosing?[T,"/>"]:zD(e,t,r)?[">"]:[D,">"]}function zD(e,t,r){let n=e.attributes.length>0&&x(w(0,e.attributes,-1),g.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function ZD(e,t,r){let{node:n}=e,o=["</"],i=r("name");return x(n.name,g.Leading|g.Line)?o.push(m([d,i]),d):x(n.name,g.Leading|g.Block)?o.push(" ",i):o.push(i),o.push(">"),o}function ey(e,t){let{node:r}=e,n=x(r),o=x(r,g.Line),i=r.type==="JSXOpeningFragment";return[i?"<":"</",m([o?d:n&&!i?" ":"",W(e,t)]),o?d:"",">"]}function ty(e,t,r){let n=Q(e,UD(e,t,r),t);return HD(e,n,t)}function ry(e,t){let{node:r}=e,n=x(r,g.Line);return[W(e,t,{indent:n}),n?d:""]}function ny(e,t,r){let{node:n}=e;return["{",e.call(({node:o})=>{let i=["...",r()];return x(o)?[m([D,Q(e,i,t)]),D]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Rp(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return VD(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return L(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return L(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return ny(e,t,r);case"JSXExpressionContainer":return KD(e,t,r);case"JSXFragment":case"JSXElement":return ty(e,t,r);case"JSXOpeningElement":return $D(e,t,r);case"JSXClosingElement":return ZD(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return ey(e,t);case"JSXEmptyExpression":return ry(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new it(n,"JSX")}}function oy(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Xt(t)}function iy(e){return e.type==="JSXExpressionContainer"&&q(e.expression)&&e.expression.value===" "&&!x(e.expression)}function Wp(e,t,r){let{node:n}=e,o=n.parameters.length>1?Ie(t):"",i=p([m([D,L([", ",D],e.map(r,"parameters"))]),o,D]);return[e.key==="body"&&e.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?i:"","]",G(e,r),ke(e,t)]}function hi(e,t,r){let{node:n}=e;return[n.postfix?"":r,G(e,t),n.postfix?r:""]}function Jp(e,t,r){let{node:n}=e,o=[],i=n.kind&&n.kind!=="method"?`${n.kind} `:"";o.push(qt(n),i,ve(e,t,r),$(e));let s=Ke(e,t,r,!1,!0),u=G(e,r,"returnType"),a=Bt(n,u);return o.push(a?p(s):s),n.returnType&&o.push(p(u)),[p(o),ke(e,t)]}function Gp(e,t,r){let{node:n}=e;return[ne(e),n.kind==="global"?"":`${n.kind} `,r("id"),n.body?[" ",p(r("body"))]:R(t)]}function Up(e,t,r){let{node:n}=e,o=!(Y(n.expression)||ie(n.expression)),i=p(["<",m([D,r("typeAnnotation")]),D,">"]),s=[O("("),m([D,r("expression")]),D,O(")")];return o?mt([[i,r("expression")],[i,p(s,{shouldBreak:!0})],[i,r("expression")]]):p([i,r("expression")])}function qp(e,t,r,n){let{node:o}=e;if(o.type.startsWith("TS")){if(Fn(o))return o.type.slice(2,-7).toLowerCase();switch(o.type){case"TSThisType":return"this";case"TSTypeAssertion":return Up(e,t,r);case"TSDeclareFunction":return Dr(e,t,r);case"TSExportAssignment":return["export = ",r("expression"),R(t)];case"TSModuleBlock":return Hn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Kt(e,t,r);case"TSTypeAliasDeclaration":return lo(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Xn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Vn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[r("expression"),r("typeArguments")];case"TSTemplateLiteralType":return On(e,t,r);case"TSNamedTupleMember":return co(e,t,r);case"TSRestType":return po(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Ar(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return $t(e,t,r,"params");case"TSTypeParameter":return mo(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return ro(e,t,r);case"TSArrayType":return to(r);case"TSPropertySignature":return[o.readonly?"readonly ":"",ve(e,t,r),$(e),G(e,r),ke(e,t)];case"TSParameterProperty":return[qt(o),o.static?"static ":"",o.override?"override ":"",o.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Do(e,r);case"TSIndexSignature":return Wp(e,t,r);case"TSTypePredicate":return fo(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[Vt(e,t,r),o.qualifier?[".",r("qualifier")]:"",$t(e,t,r,"typeArguments")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return so(e,t,r);case"TSTypeOperator":return[o.operator," ",r("typeAnnotation")];case"TSMappedType":return Ip(e,t,r);case"TSMethodSignature":return Jp(e,t,r);case"TSNamespaceExpo
Line truncated
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
var Zp=Object.defineProperty;var Co=(e,t)=>{for(var r in t)Zp(e,r,{get:t[r],enumerable:!0})};var Vp={};Co(Vp,{languages:()=>ly,options:()=>Xp,printers:()=>cy});var Mi=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",aliases:["typescriptreact"],codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var Bi={};Co(Bi,{estree:()=>Si});function ec(e){return Array.isArray(e)&&e.length>0}var j=ec;var tc=()=>{},Re=tc;function B(e){let t=new Set(e);return r=>t.has(r?.type)}var Qt=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o);function rc(e){return this[e<0?this.length+e:e]}var nc=Qt("at",function(){if(Array.isArray(this)||typeof this=="string")return rc}),w=nc;function Z(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function oc(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var ic=new WeakMap;function ee(e){return Z(ic,e,oc)}function _i(e,t){let{node:r}=e,n=0,o=()=>t(e,n++);r.this&&e.call(o,"this"),e.each(o,"params"),r.rest&&e.call(o,"rest")}function Ni(e){if(e.rest)return!0;let t=ee(e);return w(0,t,-1)?.type==="RestElement"}var ji=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const";function zt({node:e,parent:t}){return e?.type!=="EmptyStatement"?!1:t.type==="IfStatement"?t.consequent===e||t.alternate===e:t.type==="DoWhileStatement"||t.type==="ForInStatement"||t.type==="ForOfStatement"||t.type==="ForStatement"||t.type==="LabeledStatement"||t.type==="WithStatement"||t.type==="WhileStatement"?t.body===e:!1}function $e(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}var xo=e=>Number.isSafeInteger(e)&&e>=0;function It(e){return e.range?.[1]??e.end}function b(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(b(r),t):t}var sc=5,uc=8,ac=8,vi=e=>t=>t.label?S(t.label):b(t)+e,pc=e=>e.__contentEnd??It(e),Ri=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],cc=new Map([["BreakStatement",vi(sc)],["ContinueStatement",vi(uc)],["DebuggerStatement",e=>b(e)+ac],["VariableDeclaration",e=>S(w(0,e.declarations,-1))],...Ri.map(e=>[e,pc])]),Wi=B(Ri),Pr=e=>{if(Wi(e)&&e.__contentEnd)return!0;let{type:t}=e;return t==="BreakStatement"||t==="ContinueStatement"||t==="DebuggerStatement"||t==="VariableDeclaration"?!0:t==="IfStatement"?Pr(e.alternate??e.consequent):t==="ForInStatement"||t==="ForOfStatement"||t==="ForStatement"||t==="LabeledStatement"||t==="WithStatement"||t==="WhileStatement"?Pr(e.body):!1};function S(e){let{type:t}=e;return t==="IfStatement"?S(e.alternate??e.consequent):t==="ForInStatement"||t==="ForOfStatement"||t==="ForStatement"||t==="LabeledStatement"||t==="WithStatement"||t==="WhileStatement"?S(e.body):cc.get(t)?.(e)??It(e)}function kt(e,t){let r=b(e);return xo(r)&&r===b(t)}function lc(e,t){let r=S(e);return xo(r)&&r===S(t)}function Ao(e,t){return kt(eLine truncated
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function Fc(e,t,r){if(t===!1)return!1;let n=!!r?.backwards,o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===`
|
||||
`)return t-2;if(Qi(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(Qi(o))return t+1}return t}var pt=Fc;function xc(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?$i(e,t):t}var rr=xc;function Ac(e,t){let r=null,n=t;for(;n!==r;)r=n,n=at(e,n),n=tr(e,n),n=rr(e,n),n=pt(e,n);return n}var Wt=Ac;function Tc(e,t){let r=Wt(e,t);return r===!1?"":e.charAt(r)}var Je=Tc;function gc(e,t,r={}){let n=at(e,r.backwards?t-1:t,r),o=pt(e,n,r);return n!==o}var J=gc;function hc(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
|
||||
`)return!0;return!1}var te=hc;var Sc=new WeakMap;function Bc(e){let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,t}function se(e){return Z(Sc,e,Bc)}function kr(e,t){let{node:r}=e;r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function go(e,t){if(e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return["source"];if(e.options&&(t===1||t===-1))return["options"];throw new RangeError("Invalid argument index")}if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return["expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return["arguments",t];throw new RangeError("Invalid argument index")}var zi=Symbol.for("comments");var bc=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Pc=Qt("replaceAll",function(){if(typeof this=="string")return bc}),V=Pc;function Ic(e){return V(0,e,/[^\n]/g," ")}var Zi=Ic;function kc(e,t){for(let r of t){let n=b(r),o=S(r);e=e.slice(0,n)+Zi(e.slice(n,o))+e.slice(o)}return e}var wc=new WeakMap;function ce(e){let t=e[zi];return Z(wc,t,r=>kc(e.originalText,r))}function es(e,t){let r=S(e)-1;if(t.originalText[r]===")")return r}function Lc(e,t){if(es(e,t)===void 0)return;let n=ce(t),o=S(e.typeArguments??e.callee),i=n.indexOf("(",o);if(i!==-1)return i}function ts(e,t,r){let n=es(e,r);if(n===void 0||S(t)>n)return!1;let o=Lc(e,r);return o===void 0?!1:b(t)>o}var le=B(["Block","CommentBlock","MultiLine"]),Le=B(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function Ge(e){return e?.type==="ObjectProperty"||e?.type==="Property"&&!$e(e)}function yt(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}var Oc=new WeakMap;function nr(e){return Z(Oc,e,t=>le(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/.test(t.value))}function $r({comment:e,enclosingNode:t,followingNode:r,options:n}){if((t?.type==="ForInStatement"||t?.type==="ForOfStatement"||t?.type==="ForStatement")&&r&&r===t.body){let o=ce(n).lastIndexOf(")",b(r));if(b(e)>o)return K(r,e),!0}return!1}var ho=(e,t)=>le(e)&&!te(t,b(e),S(e)),wr=(e,t)=>Le(e)||ho(e,t);function Qr(e,t){e.type==="BlockStatement"?or(e,t):K(e,t)}function or(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?K(r,t):Te(e,t)}function zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){return r?.type!=="IfStatement"||!n?!1:Je(o,S(e))===")"?(X(t,e),!0):n===r.consequent?(K(n,e),!0):t===r.consequent&&n===r.alternate?Mc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}):!1}function Mc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=ce(i).indexOf("else",S(r.consequent));return b(e)>=s?(K(n,e),!0):!(t.type==="BlockStatement")&&wr(e,o)&&!te(o,S(t),b(e))?(X(t,e),!0):(Te(r,e),!0)}function Zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return r?.type==="SwitchStatement"&&r.cases.length===0&&!n&&t===r.discriminant&&Je(o,S(e))==="}"?(Te(r,e),!0):!1}function en({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return(r?.type==="WhileStatement"||r?.type==="WithStatement")&&n?Je(o,S(e))===")"?(X(t,e),!0):r.body===n?(K(n,e),!0):!1:!1}function So(e,{comment:t,text:r,options:n}){if(pe(e)&&ho(t,r)&&!yt(t)){let i=ce(n).slice(S(t),b(e));return/^[ \t]*$/.test(i)}return!1}function Bo(e,t){return K(So(e,t)?e.types[0]:e,t.comment),!0}function _c(e){return[bo,fs,is,ps,Rc,zr,en,Zr,os,ss,$r,Hc,Xc,Po,ls,Kc,us,cs,Wc,rl,Io,ko,ys].some(t=>t(e))}function Nc(e){return[bo,vc,ps,is,ls,zr,en,Zr,os,ss,$r,cs,Yc,Vc,Po,ms,el,tl,nl,Io,sl,Ds,ol,ko].some(t=>t(e))}function jc(e){return[bo,fs,zr,en,Zr,$r,us,Po,ms,Io,Uc,Gc,zc,Ds,ko,ys].some(t=>t(e))}function vc({comment:e,followingNode:t}){return t&&nr(e)?(K(t,e),!0):!1}function os({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(X(t,e),!0):n.type==="BlockStatement"?(or(n,e),!0):n.type==="TryStatement"?(Qr(n.finalizer,e),!0):n.type==="CatchClause"?(Qr(n.body,e),!0):!1}function Rc({comment:e,enclosingNode:t,followingNode:r}){return N(t)&&r?.type==="Identifier"?(K(t,e),!0):!1}function Wc({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!(t?.type==="ConditionalExpression"||Qe(t))?!1:r?.type==="ConditionalExpression"||Qe(r)?(Te(t,e),!0):!1}function is({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=t&&!te(o,S(t),b(e));return(!t||!s)&&(r?.type==="ConditionalExpression"||Qe(r))&&n?i.experimentalTernaries&&r.alternate===n&&!(le(e)&&!te(i.originalText,b(e),S(e)))?(Te(r,e),!0):(K(n,e),!0):
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(Xe(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Pl([...cn].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Oo=class extends Error{name="InvalidDocError";constructor(t){super(Il(t)),this.doc=t}},Ot=Oo;var Ls={};function kl(e,t,r,n){let o=[e];for(;o.length>0;){let i=o.pop();if(i===Ls){r(o.pop());continue}r&&o.push(i,Ls);let s=Xe(i);if(!s)throw new Ot(i);if(t?.(i)!==!1)switch(s){case Me:case Ue:{let u=s===Me?i:i.parts;for(let a=u.length,c=a-1;c>=0;--c)o.push(u[c]);break}case _e:o.push(i.flatContents,i.breakContents);break;case ge:if(n&&i.expandedStates)for(let u=i.expandedStates.length,a=u-1;a>=0;--a)o.push(i.expandedStates[a]);else o.push(i.contents);break;case et:case Ze:case tt:case Ne:case rt:o.push(i.contents);break;case ze:case ct:case lt:case He:case Fe:case qe:break;default:throw new Ot(i)}}}var ln=kl;function gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){return Z(r,i,o)}function o(i){switch(Xe(i)){case Me:return t(i.map(n));case Ue:return t({...i,parts:i.parts.map(n)});case _e:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case ge:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case et:case Ze:case tt:case Ne:case rt:return t({...i,contents:n(i.contents)});case ze:case ct:case lt:case He:case Fe:case qe:return t(i);default:throw new Ot(i)}}}function Ms(e,t,r){let n=r,o=!1;function i(s){if(o)return!1;let u=t(s);u!==void 0&&(o=!0,n=u)}return ln(e,i),n}function wl(e){if(e.type===ge&&e.break||e.type===Fe&&e.hard||e.type===qe)return!0}function ue(e){return Ms(e,wl,!1)}function Os(e){if(e.length>0){let t=w(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function _s(e){let t=new Set,r=[];function n(i){if(i.type===qe&&Os(r),i.type===ge){if(r.push(i),t.has(i))return!1;t.add(i)}}function o(i){i.type===ge&&r.pop().break&&Os(r)}ln(e,n,o,!0)}function Ll(e){return e.type===Fe&&!e.hard?e.soft?"":" ":e.type===_e?e.flatContents:e}function Jt(e){return gt(e,Ll)}function Ol(e){switch(Xe(e)){case Ue:{let{parts:t}=e;if(t.every(r=>r===""))return"";if(t.length===1)return t[0];break}case ge:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===ge&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case et:case Ze:case tt:case rt:if(!e.contents)return"";break;case _e:if(!e.flatContents&&!e.breakContents)return"";break;case Me:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof w(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case ze:case ct:case lt:case He:case Fe:case Ne:case qe:break;default:throw new Ot(e)}return e}function ur(e){return gt(e,t=>Ol(t))}function Ve(e,t=ar){return gt(e,r=>typeof r=="string"?L(t,r.split(`
|
||||
`)):r)}function Ml(e){if(e.type===Fe)return!0}function Ns(e){return Ms(e,Ml,!1)}function mn(e,t){return e.type===Ne?{...e,contents:t(e.contents)}:t(e)}function js(e){let t=!0;return ln(e,r=>{switch(Xe(r)){case ze:if(r==="")break;case lt:case He:case Fe:case qe:return t=!1,!1}}),t}var he=Re,fn=Re,vs=Re,Rs=Re;function m(e){return he(e),{type:Ze,contents:e}}function Se(e,t){return Rs(e),he(t),{type:et,contents:t,n:e}}function Ws(e){return Se(Number.NEGATIVE_INFINITY,e)}function Js(e){return Se({type:"root"},e)}function Dn(e){return Se(-1,e)}function Gs(e,t,r){he(e);let n=e;if(t>0){for(let o=0;o<Math.floor(t/r);++o)n=m(n);n=Se(t%r,n),n=Se(Number.NEGATIVE_INFINITY,n)}return n}var je={type:qe};var jr={type:ct};function yn(e){return vs(e),{type:Ue,parts:e}}function p(e,t={}){return he(e),fn(t.expandedStates,!0),{type:ge,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function mt(e,t){return p(e[0],{...t,expandedStates:e})}function O(e,t="",r={}){return he(e),t!==""&&he(t),{type:_e,breakContents:e,flatContents:t,groupId:r.groupId}}function ht(e,t){return he(e),{type:tt,contents:e,groupId:t.groupId,negate:t.negate}}function L(e,t){he(e),fn(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Et(e,t){return he(t),e?{type:Ne,label:e,contents:t}:t}var T={type:Fe},D={type:Fe,soft:!0},Mo={type:Fe,hard:!0},d=[Mo,je],_l={type:Fe,hard:!0,literal:!0},ar=[_l,je];function _o(e){return he(e),{type:rt,contents:e}}var Be={type:He};var Nl="cr",jl="crlf";var vl="\r",Rl=`\r
|
||||
`,Wl=`
|
||||
`,Jl=Wl;function Us(e){return e===Nl?vl:e===jl?Rl:Jl}var qs=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?V(0,C,`
|
||||
`,o):C;I&&(c.write(I),s.length>0&&(i+=dt(I)));break}case Me:for(let I=C.length-1;I>=0;I--)s.push({indent:E,mode:P,doc:C[I]});break;case ct:c.markPosition();break;case Ze:s.push({indent:eu(E,t),mode:P,doc:C.contents});break;case et:s.push({indent:Zs(E,C.n,t),mode:P,doc:C.contents});break;case lt:i-=c.trim();break;case ge:{let I=(function(){if(P===Ct&&!u)return{indent:E,mode:C.break?nt:Ct,doc:C.contents};u=!1;let h=n-i,v=a.length>0,U={indent:E,mode:Ct,doc:C.contents};if(!C.break&&dn(U,s,h,v,r))return U;if(!C.expandedStates)return{indent:E,mode:nt,doc:C.contents};if(!C.break)for(let ae=1;ae<C.expandedStates.length-1;ae++){let fe={indent:E,mode:Ct,doc:C.expandedStates[ae]};if(dn(fe,s,h,v,r))return fe}return{indent:E,mode:nt,doc:w(0,C.expandedStates,-1)}})();s.push(I),C.id&&(r[C.id]=I.mode);break}case Ue:{let I=n-i,k=C[Go]??0,{parts:h}=C,v=h.length-k;if(v===0)break;let U=h[k+0],ae=h[k+1],fe={indent:E,mode:Ct,doc:U},z={indent:E,mode:nt,doc:U},xe=dn(fe,[],I,a.length>0,r,!0);if(v===1){xe?s.push(fe):s.push(z);break}let De={indent:E,mode:Ct,doc:ae},xt={indent:E,mode:nt,doc:ae};if(v===2){xe?s.push(De,fe):s.push(xt,z);break}let bt=h[k+2],_={indent:E,mode:P,doc:{...C,[Go]:k+2}},we=dn({indent:E,mode:Ct,doc:[U,ae,bt]},[],I,a.length>0,r,!0);s.push(_),we?s.push(De,fe):xe?s.push(xt,fe):s.push(xt,z);break}case _e:case tt:{let I=C.groupId?r[C.groupId]:P;if(I===nt){let k=C.type===_e?C.breakContents:C.negate?C.contents:m(C.contents);k&&s.push({indent:E,mode:P,doc:k})}if(I===Ct){let k=C.type===_e?C.flatContents:C.negate?m(C.contents):C.contents;k&&s.push({indent:E,mode:P,doc:k})}break}case rt:a.push({indent:E,mode:P,doc:C.contents});break;case He:a.length>0&&s.push({indent:E,mode:P,doc:Mo});break;case Fe:switch(P){case Ct:if(!C.hard){C.soft||(c.write(" "),i+=1);break}u=!0;case nt:if(a.length>0){s.push({indent:E,mode:P,doc:C},...a.reverse()),a.length=0;break}C.literal?(c.write(o),i=0,E.root&&(E.root.value&&c.write(E.root.value),i=E.root.length)):(c.trim(),c.write(o+E.value),i=E.length);break}break;case Ne:s.push({indent:E,mode:P,doc:C.contents});break;case qe:break;default:throw new Ot(C)}s.length===0&&a.length>0&&(s.push(...a.reverse()),a.length=0)}let{text:f,positions:y}=c.finish();if(y.length!==2)return{formatted:f};let[F,A]=y;return{formatted:f,cursorNodeStart:F,cursorNodeText:f.slice(F,A)}}var St=class extends Error{name="ArgExpansionBailout"};function pr(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function Ql(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Ki(e,n),n=tr(e,n),n=at(e,n);return n=rr(e,n),n=pt(e,n),n!==!1&&J(e,n)}var Gt=Ql;var me=(e,{originalText:t})=>{let r=S(e);if(Gt(t,r))return!0;let n=It(e);return n===r?!1:Gt(t,n)};var zl=B(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Cn=zl;var ru=B(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Zl({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Fn=Zl;function cr(e){return Fn(e)||Cn(e)||ru(e)||e.type==="GenericTypeAnnotation"&&!e.typeParameters||e.type==="TSTypeReference"&&!e.typeArguments}function nu(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!kt(e,e.typeAnnotation)}function em(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let o=r[n];if(n===0)return e.type==="Identifier"&&e.name===o;if(n===1&&e.type==="MetaProperty"&&e.property.type==="Identifier"&&e.property.name===o){e=e.meta;continue}if(e.type==="MemberExpression"&&!e.optional&&!e.computed&&e.property.type==="Identifier"&&e.property.name===o){e=e.object;continue}return!1}}function lr(e,t){return t.some(r=>em(e,r))}var tm=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function rm(e){return lr(e,tm)}function nm(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}function qo(e){return M(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}function om(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function Ut(e,t){if(e?.type!=="CallExpression"||e.optional)return!1;let r=se(e);if(r.length===1){if(
Line truncated
|
||||
`);return r===-1?0:gu(e.slice(r+1).match(/^[\t ]*/)[0],t)}var hu=jm;function On(e,t,r){if(Gm(e)){let i=vm(e,t,r);if(i)return i}let n=Nt(e,t,r),o=e.map(({isLast:i,index:s})=>[r(),i?"":n[s]],"quasis");return[Be,"`",...o,"`"]}function Bu(e,t,r){let n=r("quasi"),{node:o}=e,i="",s=re(o.quasi,g.Leading)[0];return s&&(te(t.originalText,S(o.typeArguments??o.tag),b(s))?i=D:i=" "),Et(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,Be,n])}function vm(e,t,r){let{node:n}=e,o=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(o.length>1||o.some(i=>i.length>0)){t.__inJestEach=!0;let i=Nt(e,t,r);t.__inJestEach=!1;let s=i.map(y=>Uo(y,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted),u=[{hasLineBreak:!1,cells:[]}];for(let y=1;y<n.quasis.length;y++){let F=w(0,u,-1),A=s[y-1];F.cells.push(A),A.includes(`
|
||||
`)&&(F.hasLineBreak=!0),n.quasis[y].value.raw.includes(`
|
||||
`)&&u.push({hasLineBreak:!1,cells:[]})}let a=Math.max(o.length,...u.map(y=>y.cells.length)),c=Array.from({length:a},()=>0),f=[{cells:o},...u.filter(y=>y.cells.length>0)];for(let y of f)if(!y.hasLineBreak)for(let[F,A]of y.cells.entries())c[F]=Math.max(c[F],dt(A));return[Be,"`",m([d,L(d,f.map(y=>L(" | ",y.cells.map((F,A)=>y.hasLineBreak?F:F+" ".repeat(c[A]-dt(F))))))]),d,"`"]}}var Rm=new WeakMap;function Wm(e,t){let{parent:r,index:n}=e;return Z(Rm,r,i=>{let{tabWidth:s}=t,u=0;return i.quasis.map(c=>{let f=c.value.raw,y=f.includes(`
|
||||
`)?hu(f,s):u;return u=y,{indentSize:y,previousQuasiText:f}})})[n]}function Jm(e,t,r){let{node:n,index:o}=e,i=r(),s=e.parent,{quasis:u}=s,a=S(u[o]),c=b(u[o+1]),f=te(t.originalText,a,c);if(!f){let A=Uo(i,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;A.includes(`
|
||||
`)?f=!0:i=A}f&&(x(n)||n.type==="Identifier"||N(Pe(n))||n.type==="ConditionalExpression"||n.type==="SequenceExpression"||de(n)||be(n))&&(i=[m([D,i]),D]);let{indentSize:y,previousQuasiText:F}=Wm(e,t);return t.__inJestEach&&(y=Math.max(y,t.tabWidth)),i=y===0&&F.endsWith(`
|
||||
`)?Se(Number.NEGATIVE_INFINITY,i):Gs(i,y,t.tabWidth),p(["${",i,Be,"}"])}function Nt(e,t,r){return e.map(()=>Jm(e,t,r),e.node.type==="TSTemplateLiteralType"?"types":"expressions")}function Mn(e,t){return gt(e,r=>typeof r=="string"?t?V(0,r,/(\\*)`/g,"$1$1\\`"):Zo(r):r)}function Zo(e){return V(0,e,/([\\`]|\$\{)/g,"\\$1")}var Su=/^[fx]?(?:describe|it|test)$/;function Gm({node:e,parent:t}){return e.type==="TemplateLiteral"&&t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&Su.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&Su.test(t.tag.object.object.name))}var ti=[(e,t)=>t==="properties"&&e.type==="ObjectExpression",(e,t)=>t==="arguments"&&e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component",(e,t)=>t==="expression"&&e.type==="Decorator"];function bu(e){let t=n=>n.type==="TemplateLiteral",r=(n,o)=>Ge(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&o==="value";return e.match(t,(n,o)=>Y(n)&&o==="elements",r,...ti)||e.match(t,r,...ti)}function ri(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ge(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ti)}function ei(e,t){return x(e,g.Block|g.Leading,({value:r})=>r===` ${t} `)}function _n({node:e,parent:t},r){return ei(e,r)||Um(t)&&ei(t,r)||t.type==="ExpressionStatement"&&ei(t,r)}function Um(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Iu(e,t,r,n){let{node:o}=r,i="";for(let[c,f]of o.quasis.entries()){let{raw:y}=f.value;c>0&&(i+="@prettier-placeholder-"+(c-1)+"-id"),i+=y}let s=await e(i,{parser:"scss"}),u=Nt(r,n,t),a=qm(s,u);if(!a)throw new Error("Couldn't insert all the expressions");return["`",m([d,a]),D,"`"]}function qm(e,t){if(!j(t))return e;let r=0,n=gt(ur(e),o=>typeof o!="string"||!o.includes("@prettier-placeholder")?o:o.split(/@prettier-placeholder-(\d+)-id/).map((i,s)=>s%2===0?Ve(i):(r++,t[i])));return t.length===r?n:null}function Ym(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&lr(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function Nn(e){return e.type==="Identifier"&&e.name==="styled"}function Pu(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Hm({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Nn(t.object)||Pu(t);case"CallExpression":return Nn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Nn(t.callee.object.object)||Pu(t.callee.object))||t.callee.object.type==="CallExpression"&&Nn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function Xm({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var ku=e=>Ym(e)||Hm(e)||Xm(e)||bu(e);async function wu(e,t,r,n){let{node:o}=r,i=o.quasis.length,s=Nt(r,n,t),u=[];for(let a=0;a<i;a++){let c=o.quasis[a],f=a===0,y=a===i-1,F=c.value.cooked,A=F.split(`
|
||||
`),E=A.length;if(!y&&/#[^\n\r]*$/.test(A[E-1]))return null;let P=E>2&&A[0].trim()===""&&A[1].trim()==="",C=E>2&&A[E-1].trim()===""&&A[E-2].trim()==="",I=A.every(h=>/^\s*(?:#[^\n\r]*)?$/.test(h)),k;I?k=Vm(A):k=await e(F,{parser:"graphql"}),k?(k=Mn(k,!1),!f&&P&&u.push(""),u.push(k),!y&&C&&u.push("")):!f&&!y&&P&&u.push(""),y||u.push(s[a])}return["`",m([d,L(d,u)]),d,"`"]}function Vm(e){let t=[],r=!1,n=e.map(o=>o.trim());for(let[o,i]of n.entries())i!==""&&(n[o-1]===""&&r?t.push([d,i]):t.push(i),r=!0);return t.length===0?null:L(d,t)}function Lu({node:e,parent:t}){return _n({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var ni=0;async function Ou(e,t,r,n,o){let{node:i}=n,s=ni;ni=ni+1>>>0;let u=I=>`PRETTIER_HTML_PLACEHOLDER_${I}_${s}_IN_JS`,a=i.quasis.map((I,k,h)=>k===h.length-1?I.value.cooked:I.value.cooked+u(k)).join(""),c=Nt(n,o,r),f=new RegExp(u("(\\d+)"),"g"),y=0,F=await t(a,{parser:e,__onHtmlRoot(I){y=I.children.length}}),A=gt(F,I=>{if(typeof I!="string")return I;let k=[],h=I.split(f);for(let v=0;v<h.length;v++){let U=h[v];if(v%2===0){U&&(U=Zo(U),o.__embeddedInHtml&&(U=V(0,U,/<\/(?=script\b)/gi,"<\\/")),k.push(U));continue}let ae=Number(U);k.push(c[ae])}return k}),E=/^\s/.test(a)?" ":"",P=/\s$/.test(a)?" ":"",C=o.htmlWhitespaceSensitivity==="ignore"?d:E&&P?T:null;return C?p(["`",m([C,p(A)]),C,"`"]):Et({hug:!1},p(["`",E,y>1?m(p(A)):p(A),P,"`"]))}function Mu(e){return _n(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var _u=Ou.bind(void 0,"html"),Nu=Ou.bind(void 0,"angular");async function ju(e,t,r){let{node:n}=r,o=V(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(a,c)=>"\\".repeat(c.length/2)+"`"),i=Km(o),s=i!=="";s&&(o=V(0,o,new RegExp(`^${i}`,"gm"),""));let u=Mn(await e(o,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",s?m([D,u]):[ar,Ws(u)],D,"`"]}function Km(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function vu({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var $m=[{test:ku,print:Iu},{test:Lu,print:wu},{test:Mu,print:_u},{test:ri,print:Nu},{test:vu,print:ju}].map(({test:e,print:t})=>({test:e,print:zm(t)}));function Qm(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||Zm(t))return;let r=$m.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function zm(e){return async(...t)=>{let r=await e(...t);return r&&Et({embed:!0,...r.label},r)}}function Zm({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Ru=Qm;function Wu(e,t){e.type==="ChainExpression"?ef(t):(e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression")&&tf(t)}function Ju(e){if(N(e))return"object";if(M(e))return"callee";if(We(e))return"expression"}function jn(e){let t=Ju(e);if(t)return e[t]}function ef(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression"||e.type==="TSNonNullExpression";e=jn(e)){let t=Ju(e),r=e[t];r.type==="ChainExpression"&&(e[t]=r.expression)}}function tf(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression";e=jn(e))e.type=`Optional${e.type}`}function Gu(e,t,r){let n=t[r];(q(n)||Ee(n))&&(e[r]=String(n.value)),n.type==="Identifier"&&(e[r]=n.name)}function Uu(e,t){(e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="TSMethodSignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute"||e.type==="RecordDeclarationProperty"||e.type==="RecordDeclarationStaticProperty")&&!e.computed&&Gu(t,e,"key"),e.type==="TSEnumMember"&&Gu(t,e,"id")}function qu(e,t){e.type==="RegExpLiteral"&&(t.flags=[...e.flags].sort().join("")),e.type==="Literal"&&"regex"in e&&(t.regex.flags=[...e.regex.flags].sort().join(""))}var rf=new Set(["range","raw","comments","extra","start","end","loc","errors","tokens","trailingComma","docblock","__contentEnd"]),Er=e=>{for(let t of e.quasis)delete t.value};function oi(e,t,r){if(e.type==="Program"&&delete t.sourceType,Wu(e,t),Uu(e,t),qu(e,t),(Ji(e)||e.type==="BigIntLiteralTypeAnnotation")&&"bigint"in e&&(t.bigint=e.bigint.toLowerCase()),e.type==="EmptyStatement"&&!zt({node:e,parent:r})||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if(e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(Yu,"").trimEnd();let n=Object.create(null),o=V(0,e,Hu,"").replace(Yu,"").trimEnd(),i;for(;i=Hu.exec(e);){let s=V(0,i[2],sf,"");if(typeof n[i[1]]=="string"||Array.isArray(n[i[1]])){let u=n[i[1]];n[i[1]]=[...Ku,...Array.isArray(u)?u:[u],s]}else n[i[1]]=s}return{comments:o,pragmas:n}}function Zu({comments:e="",pragmas:t={}}){let s=Object.keys(t),u=s.flatMap(c=>Xu(c,t[c])).map(c=>` * ${c}
|
||||
`).join("");if(!e){if(s.length===0)return"";if(s.length===1&&!Array.isArray(t[s[0]])){let c=t[s[0]];return`/** ${Xu(s[0],c)[0]} */`}}let a=e.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(e?a:"")+(e&&s.length>0?` *
|
||||
`:"")+u+" */"}function Xu(e,t){return[...Ku,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var ea="format";function pf(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var ta=pf;function cf(e){let t=ta(e);t&&(e=e.slice(t.length+1));let r=$u(e),{pragmas:n,comments:o}=zu(r);return{shebang:t,text:e,pragmas:n,comments:o}}function ra(e){let{shebang:t,text:r,pragmas:n,comments:o}=cf(e),i=Qu(r),s=Zu({pragmas:{[ea]:"",...n},comments:o.trimStart()});return(t?`${t}
|
||||
`:"")+s+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}function lf(e){if(!le(e))return[];if(!e.value.includes(`
|
||||
`))return[];let t=[];for(let r of`*${e.value}*`.split(`
|
||||
`)){if(r=r.trimStart(),!r.startsWith("*"))return[];t.push(r)}return t}var mf=new WeakMap;function ii(e){return Z(mf,e,lf)}function vn(e){return ii(e).length>0}function na(e,t){let r=e.node;if(Le(r))return t.originalText.slice(b(r),S(r)).trimEnd();if(vn(r))return ff(r);if(le(r))return["/*",Ve(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function ff(e){let t=ii(e),r=e.value[0]==="*"&&e.value[1]!=="*";return["/",t.map((n,o)=>{if(o===0)return[n.trimEnd(),d];if(o===t.length-1)return[" ",n];let i=n.trimEnd(),s=[" ",i];return r&&i!=="*"&&n.endsWith(" ")?[s," ",Js(ar)]:[s,d]}),"/"]}function si(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ui=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let o=0;o<t.length&&r.has(t.charAt(o));o++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let o=t.length-1;o>=0&&r.has(t.charAt(o));o--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(w(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${si([...this.#e].join(""))}]+`,o=new RegExp(r?`(${n})`:n);return t.split(o)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let o=this.getLeadingWhitespaceCount(n);if(o===0)return 0;n.length!==o&&o<r&&(r=o)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},oa=ui;var dr=new oa(`
|
||||
\r `);function Xt(e){return e.type==="JSXText"&&(dr.hasNonWhitespaceCharacter(ye(e))||!/\n/.test(ye(e)))}function ia(e){let{node:t,parent:r}=e;if(!H(t)||!H(r))return!1;let{index:n,siblings:o}=e,i;for(let s=n;s>0;s--){let u=o[s-1];if(!(u.type==="JSXText"&&!Xt(u))){i=u;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&Lt(i.expression)}function Df(e){return Lt(e.node)||ia(e)}var Cr=Df;var ai=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},it=ai;function sa(e){return e.type==="CallExpression"&&!e.optional&&e.arguments.length===1&&e.callee.type==="Identifier"&&e.callee.name==="Boolean"}var yf=0;function Rn(e,t,r){let{node:n,parent:o,grandparent:i,key:s}=e,u=s!=="body"&&(o.type==="IfStatement"||o.type==="WhileStatement"||o.type==="SwitchStatement"||o.type==="DoWhileStatement"),a=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,c=pi(e,t,r,!1,u);if(u)return c;if(a)return p(c);if(s==="callee"&&Tt(o)||o.type==="UnaryExpression"&&!x(n)||N(o)&&!o.computed)return p([m([D,...c]),D]);let f=ut(o)||o.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&o.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(o.type==="NGRoot"&&t.parser==="__ng_binding"||o.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===o.body&&o.type==="ArrowFunctionExpression"||n!==o.body&&o.type==="ForStatement"||o.type==="ConditionalExpression"&&!ut(i)&&!Tt(i)||o.type==="TemplateLiteral"||s==="argument"&&o.type==="UnaryExpression"||s==="arguments"&&sa(o),y=o.type==="AssignmentExpression"||o.type==="VariableDeclarator"||o.type==="ClassProperty"||o.type==="PropertyDefinition"||o.type==="TSAbstractPropertyDefinition"||o.type==="ClassPrivateProperty"||Ge(o),F=be(n.left)&&Lr(n.operator,n.left.operator);if(f||Fr(n)&&!F||!Fr(n)&&y)return p(c);if(c.length===0)return"";let A=H(n.right),E=c.findIndex(v=>typeof v!="string"&&!Array.isArray(v)&&v.type===ge),P=c.slice(0,E===-1?1:E+1),C=c.slice(P.length,A?-1:void 0),I=Symbol("logicalChain-"+ ++yf),k=p([...P,m(C)],{id:I});if(!A)return k;let h=w(0,c,-1);return p([k,ht(h,{groupId:I})])}function pi(e,t,r,n,o){let{node:i}=e;if(!be(i))return[p(r())];let s=[];Lr(i.operator,i.left.operator)?s=e.call(()=>pi(e,t,r,!0,o),"left"):s.push(p(r("left")));let u=Fr(i),a=i.right.type==="ChainExpression"?i.right.expression:i.right,c=(i.type==="NGPipeExpression"||i.operator==="|>"||Ef(e,t))&&!Oe(t.originalText,a),y=!x(a,g.Leading,nr)&&Oe(t.originalText,a),F=i.type==="NGPipeExpression"?"|":i.operator,A=i.type==="NGPipeExpression"&&i.arguments.length>0?p(m([D,": ",L([T,": "],e.map(()=>Se(2,p(r())),"arguments"))])):"",E;if(u)E=[F,Oe(t.originalText,a)?m([T,r("right"),A]):[" ",r("right"),A]];else{let h=F==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>pi(e,t,r,!0,o),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let v="";if(y)switch(Xe(h)){case Me:v=h[0],h.shift();break;case Ne:v=h.contents[0],h.contents.shift();break}E=[T,v,F," ",h,A]}else E=[c?T:"",F,c?" ":T,h,A]}let{parent:P}=e,C=x(i.left,g.Trailing|g.Line);if((C||!(o&&i.type==="LogicalExpression")&&P.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(E=p(E,{shouldBreak:C})),t.experimentalOperatorPosition==="start"?s.push(u||y?" ":"",E):s.push(c?"":" ",E),n&&x(i)){let k=ur(Q(e,s,t));return k.type===Ue?k.parts:Array.isArray(k)?k:[k]}return s}function Fr(e){return e.type!=="LogicalExpression"?!1:!!(ie(e.right)&&e.right.properties.length>0||Y(e.right)&&e.right.elements.length>0||H(e.right))}var ua=e=>e.type==="BinaryExpression"&&e.operator==="|";function Ef(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&ua(e.node)&&!e.hasAncestor(r=>!ua(r)&&r.type!=="JsExpressionRoot")}function pa(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return Rn(e,t,r);case"NGChainedExpression":return p(L([";",T],e.map(()=>Ff(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":aa(e)?" ":[";",T],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:o,parent:i}=e,s=aa(e)||df(e)||(o===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||o===2&&(n.key.name==="else"&&i.body[o-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[o-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new it(n,"Angular")}}function aa({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpressio
Line truncated
|
||||
`))}function Gn(e,t){return(e.type==="TemplateLiteral"&&mi(e)||e.type==="TaggedTemplateExpression"&&mi(e.quasi))&&!J(t,b(e),{backwards:!0})}var Tf=new WeakMap;function Da(e){return Z(Tf,e,t=>t.type==="ConditionalExpression"&&!Ce(t,r=>r.type==="ObjectExpression"))}var gf=e=>e.type==="SequenceExpression";function ya(e,t,r,n={}){let o=[],i,s=[],u=!1,a=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function I(){let{node:k}=e,h=hf(e,t,r,n);if(o.length===0)o.push(h);else{let{leading:v,trailing:U}=Tn(e,t);o.push([v,h]),s.unshift(U)}a&&(u||(u=k.returnType&&ee(k).length>0||k.typeParameters||ee(k).some(v=>v.type!=="Identifier"))),!a||k.body.type!=="ArrowFunctionExpression"?(i=r("body",n),c=k.body):e.call(I,"body")})();let f=!Oe(t.originalText,c)&&(gf(c)||Sf(c,i,t)||!u&&Da(c)),y=e.key==="callee"&&Dt(e.parent),F=Symbol("arrow-chain"),A=Bf(e,n,{signatureDocs:o,shouldBreak:u}),E=!1,P=!1,C=!1;return a&&(y||n.assignmentLayout)&&(P=!0,C=!x(e.node,g.Leading&g.Line),E=n.assignmentLayout==="chain-tail-arrow-chain"||y&&!f),i=bf(e,t,n,{bodyDoc:i,bodyComments:s,functionBody:c,shouldPutBodyOnSameLine:f}),p([p(P?m([C?D:"",A]):A,{shouldBreak:E,id:F})," =>",a?ht(i,{groupId:F}):p(i),a&&y?O(D,"",{groupId:F}):""])}function hf(e,t,r,n){let{node:o}=e,i=[];if(o.async&&i.push("async "),kn(e,t))i.push(r(["params",0]));else{let u=n.expandLastArg||n.expandFirstArg,a=wn(e,r);if(u){if(ue(a))throw new St;a=p(Jt(a))}i.push(p([Ke(e,t,r,u,!0),a]))}let s=W(e,t,{marker:"commentBeforeArrow"});return s&&i.push(" ",s),i}function Sf(e,t,r){return Y(e)||ie(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||H(e)||t.label?.hug!==!1&&(t.label?.embed||Gn(e,r.originalText))}function Bf(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:o,key:i}=e;return i!=="callee"&&Dt(o)||be(o)?p([r[0]," =>",m([T,L([" =>",T],r.slice(1))])],{shouldBreak:n}):i==="callee"&&Dt(o)||t.assignmentLayout?p(L([" =>",T],r),{shouldBreak:n}):p(m(L([" =>",T],r)),{shouldBreak:n})}function bf(e,t,r,{bodyDoc:n,bodyComments:o,functionBody:i,shouldPutBodyOnSameLine:s}){let{node:u,parent:a}=e,c=r.expandLastArg?Ie(t,"all"):"",f=(r.expandLastArg||a.type==="JSXExpressionContainer")&&!x(u)?D:"";return s&&Da(i)?[" ",p([O("","("),m([D,n]),O("",")"),c,f]),o]:s?[" ",n,o]:[m([T,n,o]),c,f]}var Pf=.25;function Wr(e,t){let{printWidth:r}=t;if(x(e))return!1;let n=r*Pf;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Jn(e)&&!x(e.argument))return!0;let o=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return o?o.length<=n:q(e)?ot(ye(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(`
|
||||
`):e.type==="UnaryExpression"?Wr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:er(e)}function jt(e){return N(e)||e.type==="BindExpression"&&!!e.object}function Ea(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(wt(r)){if(t+=1,t>1)return!0}else if(r=Pe(r),M(r)){for(let n of se(r))if(wt(n))return!0}return!1}function Un(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&M(t)&&M(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var If=new Set(["!","-","+","~"]),kf=B(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]);function st(e,t=2){if(t<=0)return!1;let r=n=>st(n,t-1);if(e=Pe(e),Xr(e))return dt(e.pattern??e.regex.pattern)<=5;if(er(e)||kf(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
|
||||
`))&&e.expressions.every(r);if(ie(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(Y(e))return e.elements.every(n=>n===null||r(n));if(Dt(e)){if(e.type==="ImportExpression"||st(e.callee,t)){let n=se(e);return n.length<=t&&n.every(r)}return!1}return N(e)?st(e.object,t)&&st(e.property,t):e.type==="UnaryExpression"&&If.has(e.operator)||e.type==="UpdateExpression"?st(e.argument,t):!1}function wf(e,t,r){let{node:n}=e,o=se(n);if(o.length===0)return p(["(",Mt(e,t),")"]);let i=o.length-1;if(Mf(o)){let y=["("];return kr(e,(F,A)=>{y.push(r()),A!==i&&y.push(", ")}),y.push(")"),y}let s=!1,u=[];kr(e,({node:y},F)=>{let A=r();F===i||(me(y,t)?(s=!0,A=[A,",",d,d]):A=[A,",",T]),u.push(A)});let a=e.root.type!=="NGRoot"&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"?Ie(t,"all"):"";function c(){return p(["(",m([T,...u]),a,T,")"],{shouldBreak:!0})}if(s||e.parent.type!=="Decorator"&&Ea(o))return c();if(Of(o)){let y=u.slice(1);if(y.some(ue))return c();let F;try{F=r(go(n,0),{expandFirstArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(F)?[je,mt([["(",p(F,{shouldBreak:!0}),", ",...y,")"],c()])]:mt([["(",F,", ",...y,")"],["(",p(F,{shouldBreak:!0}),", ",...y,")"],c()])}if(Lf(o,u,t)){let y=u.slice(0,-1);if(y.some(ue))return c();let F;try{F=r(go(n,-1),{expandLastArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(F)?[je,mt([["(",...y,p(F,{shouldBreak:!0}),")"],c()])]:mt([["(",...y,F,")"],["(",...y,p(F,{shouldBreak:!0}),")"],c()])}let f=["(",m([D,...u]),a,D,")"];return Un(e)?f:p(f,{shouldBreak:u.some(ue)||s})}function qn(e,t=!1){if(ie(e)&&(e.properties.length>0||x(e))||Y(e)&&(e.elements.length>0||x(e))||(de(e)||e.type==="TSTypeAssertion")&&qn(e.expression)||e.type==="FunctionExpression"||e.type==="DoExpression"||e.type==="ModuleExpression")return!0;if(e.type==="ArrowFunctionExpression"){let{body:r}=e;if(r.type==="BlockStatement"||H(r)||ie(r)||Y(r)||r.type==="ArrowFunctionExpression"&&qn(r,!0)||!t&&(r.type==="ConditionalExpression"||M(Pe(r))))return!0}return!1}function Lf(e,t,r){if(e.length===1){let i=w(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let n=w(0,e,-1),o=w(0,e,-2);return!x(n,g.Leading)&&!x(n,g.Trailing)&&qn(n)&&(!o||o.type!==n.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!Y(n))&&!(e.length>1&&li(n,r))}function Of(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&_f(r)?!0:!x(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Ca(r)&&!qn(r)}function Ca(e){if(e.type==="ParenthesizedExpression")return Ca(e.expression);if(de(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return cr(t)&&st(e.expression,1)}return Dt(e)&&se(e).length>1?!1:be(e)?st(e.left,1)&&st(e.right,1):Xr(e)||st(e)}function Mf(e){return e.length===2?da(e,0):e.length===3?e[0].type==="Identifier"&&da(e,1):!1}function da(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&ee(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&e.every(o=>!x(o))}function _f(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Ge(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||q(t.key)&&t.key.value==="type")&&q(t.value)&&t.value.value==="module":!1}var Jr=wf;function Fa(e,t,r){return[r("object"),p(m([D,fi(e,t,r)]))]}function fi(e,t,r){return["::",r("callee")]}var Nf=e=>M(e)&&se(e).length>0;function jf(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(N(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function xa(e,t,r){let n=r("object"),o=Di(e,t,r),{node:i}=e,s=e.findAncestor(c=>!(N(c)||c.type==="TSNonNullExpression")),u=e.findAncestor(c=>!We(c)),a=s.type==="BindExpression"||s.type==="AssignmentExpression"&&s.left.type!=="Identifier"||jf(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!N(u)||(u.type==="AssignmentExpression"||u.type==="VariableDeclarator")&&(Nf(Pe(i.object))||n.label?.memberChain);return Et(n.label,[n,Be,a?o:p(m([D,o]))])}function Di(e,t,r){let n=r("property"),{node:o}=e,i=$(e);return o.computed?!o.property||Ee(o.property)?[i,"[",n,"]"]:p([i,"[",m([D,n]),D,"]"]):[i,".",n]}function vf(e,t,r){let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",o=[];function i(_){let{originalText:Ae}=t,we=Wt(Ae,S(_));return Ae.charAt(we)===")"?we!==!1&&Gt(Ae,we+1):me(_,t)}function s(){let{node:_}=e;if(M(_)&&(jt(_.callee)||M(_.cal
Line truncated
|
||||
`)&&!o&&!x(n.attributes[0]))return p(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(u=>q(u.value)&&u.value.value.includes(`
|
||||
`)),s=t.singleAttributePerLine&&n.attributes.length>1?d:T;return p(["<",r("name"),r("typeArguments"),m(e.map(({isFirst:u,previous:a})=>[u?s:me(a,t)?[d,d]:s,r()],"attributes")),...XD(n,t,o)],{shouldBreak:i})}function XD(e,t,r){return e.selfClosing?[T,"/>"]:VD(e,t,r)?[">"]:[D,">"]}function VD(e,t,r){let n=e.attributes.length>0&&x(w(0,e.attributes,-1),g.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function KD(e,t,r){let{node:n}=e,o=["</"],i=r("name");return x(n.name,g.Leading|g.Line)?o.push(m([d,i]),d):x(n.name,g.Leading|g.Block)?o.push(" ",i):o.push(i),o.push(">"),o}function $D(e,t){let{node:r}=e,n=x(r),o=x(r,g.Line),i=r.type==="JSXOpeningFragment";return[i?"<":"</",m([o?d:n&&!i?" ":"",W(e,t)]),o?d:"",">"]}function QD(e,t,r){let n=Q(e,RD(e,t,r),t);return GD(e,n,t)}function zD(e,t){let{node:r}=e,n=x(r,g.Line);return[W(e,t,{indent:n}),n?d:""]}function ZD(e,t,r){let{node:n}=e;return["{",e.call(({node:o})=>{let i=["...",r()];return x(o)?[m([D,Q(e,i,t)]),D]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function vp(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return qD(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return L(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return L(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return ZD(e,t,r);case"JSXExpressionContainer":return YD(e,t,r);case"JSXFragment":case"JSXElement":return QD(e,t,r);case"JSXOpeningElement":return HD(e,t,r);case"JSXClosingElement":return KD(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return $D(e,t);case"JSXEmptyExpression":return zD(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new it(n,"JSX")}}function ey(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Xt(t)}function ty(e){return e.type==="JSXExpressionContainer"&&q(e.expression)&&e.expression.value===" "&&!x(e.expression)}function Rp(e,t,r){let{node:n}=e,o=n.parameters.length>1?Ie(t):"",i=p([m([D,L([", ",D],e.map(r,"parameters"))]),o,D]);return[e.key==="body"&&e.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?i:"","]",G(e,r),ke(e,t)]}function gi(e,t,r){let{node:n}=e;return[n.postfix?"":r,G(e,t),n.postfix?r:""]}function Wp(e,t,r){let{node:n}=e,o=[],i=n.kind&&n.kind!=="method"?`${n.kind} `:"";o.push(qt(n),i,ve(e,t,r),$(e));let s=Ke(e,t,r,!1,!0),u=G(e,r,"returnType"),a=Bt(n,u);return o.push(a?p(s):s),n.returnType&&o.push(p(u)),[p(o),ke(e,t)]}function Jp(e,t,r){let{node:n}=e;return[ne(e),n.kind==="global"?"":`${n.kind} `,r("id"),n.body?[" ",p(r("body"))]:R(t)]}function Gp(e,t,r){let{node:n}=e,o=!(Y(n.expression)||ie(n.expression)),i=p(["<",m([D,r("typeAnnotation")]),D,">"]),s=[O("("),m([D,r("expression")]),D,O(")")];return o?mt([[i,r("expression")],[i,p(s,{shouldBreak:!0})],[i,r("expression")]]):p([i,r("expression")])}function Up(e,t,r,n){let{node:o}=e;if(o.type.startsWith("TS")){if(Fn(o))return o.type.slice(2,-7).toLowerCase();switch(o.type){case"TSThisType":return"this";case"TSTypeAssertion":return Gp(e,t,r);case"TSDeclareFunction":return Dr(e,t,r);case"TSExportAssignment":return["export = ",r("expression"),R(t)];case"TSModuleBlock":return Hn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Kt(e,t,r);case"TSTypeAliasDeclaration":return lo(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Xn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Vn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[r("expression"),r("typeArguments")];case"TSTemplateLiteralType":return On(e,t,r);case"TSNamedTupleMember":return co(e,t,r);case"TSRestType":return po(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Ar(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return $t(e,t,r,"params");case"TSTypeParameter":return mo(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return ro(e,t,r);case"TSArrayType":return to(r);case"TSPropertySignature":return[o.readonly?"readonly ":"",ve(e,t,r),$(e),G(e,r),ke(e,t)];case"TSParameterProperty":return[qt(o),o.static?"static ":"",o.override?"override ":"",o.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Do(e,r);case"TSIndexSignature":return Rp(e,t,r);case"TSTypePredicate":return fo(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[Vt(e,t,r),o.qualifier?[".",r("qualifier")]:"",$t(e,t,r,"typeArguments")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return so(e,t,r);case"TSTypeOperator":return[o.operator," ",r("typeAnnotation")];case"TSMappedType":return Pp(e,t,r);case"TSMethodSignature":return Wp(e,t,r);case"TSNamespaceExpo
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
flow: Parser;
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
(function(i){function e(){var f=i();return f.default||f}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.flow=e()}})(function(){"use strict";var DE=Object.create;var gg=Object.defineProperty;var eE=Object.getOwnPropertyDescriptor;var wE=Object.getOwnPropertyNames;var aE=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var h=(A,g)=>()=>{try{return g||A((g={exports:{}}).exports,g),g.exports}catch(I){throw g=0,I}},AB=(A,g)=>{for(var I in g)gg(A,I,{get:g[I],enumerable:!0})},gB=(A,g,I,B)=>{if(g&&typeof g=="object"||typeof g=="function")for(let C of wE(g))!tE.call(A,C)&&C!==I&&gg(A,C,{get:()=>g[C],enumerable:!(B=eE(g,C))||B.enumerable});return A};var sE=(A,g,I)=>(I=A!=null?DE(aE(A)):{},gB(g||!A||!A.__esModule?gg(I,"default",{value:A,enumerable:!0}):I,A)),yE=A=>gB(gg({},"__esModule",{value:!0}),A);var CB=h(Ig=>{"use strict";Ig.byteLength=NE;Ig.toByteArray=rE;Ig.fromByteArray=KE;var QA=[],$=[],GE=typeof Uint8Array<"u"?Uint8Array:Array,ng="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cA=0,IB=ng.length;cA<IB;++cA)QA[cA]=ng[cA],$[ng.charCodeAt(cA)]=cA;var cA,IB;$[45]=62;$[95]=63;function BB(A){var g=A.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=g);var B=I===g?0:4-I%4;return[I,B]}function NE(A){var g=BB(A),I=g[0],B=g[1];return(I+B)*3/4-B}function kE(A,g,I){return(g+I)*3/4-I}function rE(A){var g,I=BB(A),B=I[0],C=I[1],Q=new GE(kE(A,B,C)),i=0,o=C>0?B-4:B,e;for(e=0;e<o;e+=4)g=$[A.charCodeAt(e)]<<18|$[A.charCodeAt(e+1)]<<12|$[A.charCodeAt(e+2)]<<6|$[A.charCodeAt(e+3)],Q[i++]=g>>16&255,Q[i++]=g>>8&255,Q[i++]=g&255;return C===2&&(g=$[A.charCodeAt(e)]<<2|$[A.charCodeAt(e+1)]>>4,Q[i++]=g&255),C===1&&(g=$[A.charCodeAt(e)]<<10|$[A.charCodeAt(e+1)]<<4|$[A.charCodeAt(e+2)]>>2,Q[i++]=g>>8&255,Q[i++]=g&255),Q}function cE(A){return QA[A>>18&63]+QA[A>>12&63]+QA[A>>6&63]+QA[A&63]}function hE(A,g,I){for(var B,C=[],Q=g;Q<I;Q+=3)B=(A[Q]<<16&16711680)+(A[Q+1]<<8&65280)+(A[Q+2]&255),C.push(cE(B));return C.join("")}function KE(A){for(var g,I=A.length,B=I%3,C=[],Q=16383,i=0,o=I-B;i<o;i+=Q)C.push(hE(A,i,i+Q>o?o:i+Q));return B===1?(g=A[I-1],C.push(QA[g>>2]+QA[g<<4&63]+"==")):B===2&&(g=(A[I-2]<<8)+A[I-1],C.push(QA[g>>10]+QA[g>>4&63]+QA[g<<2&63]+"=")),C.join("")}});var QB=h(Yg=>{Yg.read=function(A,g,I,B,C){var Q,i,o=C*8-B-1,e=(1<<o)-1,t=e>>1,s=-7,G=I?C-1:0,r=I?-1:1,F=A[g+G];for(G+=r,Q=F&(1<<-s)-1,F>>=-s,s+=o;s>0;Q=Q*256+A[g+G],G+=r,s-=8);for(i=Q&(1<<-s)-1,Q>>=-s,s+=B;s>0;i=i*256+A[g+G],G+=r,s-=8);if(Q===0)Q=1-t;else{if(Q===e)return i?NaN:(F?-1:1)*(1/0);i=i+Math.pow(2,B),Q=Q-t}return(F?-1:1)*i*Math.pow(2,Q-B)};Yg.write=function(A,g,I,B,C,Q){var i,o,e,t=Q*8-C-1,s=(1<<t)-1,G=s>>1,r=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=B?0:Q-1,K=B?1:-1,R=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(o=isNaN(g)?1:0,i=s):(i=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-i))<1&&(i--,e*=2),i+G>=1?g+=r/e:g+=r*Math.pow(2,1-G),g*e>=2&&(i++,e/=2),i+G>=s?(o=0,i=s):i+G>=1?(o=(g*e-1)*Math.pow(2,C),i=i+G):(o=g*Math.pow(2,G-1)*Math.pow(2,C),i=0));C>=8;A[I+F]=o&255,F+=K,o/=256,C-=8);for(i=i<<C|o,t+=C;t>0;A[I+F]=i&255,F+=K,i/=256,t-=8);A[I+F-K]|=R*128}});var ug=h(RA=>{"use strict";var Ug=CB(),LA=QB(),EB=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;RA.Buffer=a;RA.SlowBuffer=UE;RA.INSPECT_MAX_BYTES=50;var Bg=2147483647;RA.kMaxLength=Bg;a.TYPED_ARRAY_SUPPORT=FE();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function FE(){try{let A=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(A,g),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function DA(A){if(A>Bg)throw new RangeError('The value "'+A+'" is invalid for option "size"');let g=new Uint8Array(A);return Object.setPrototypeOf(g,a.prototype),g}function a(A,g,I){if(typeof A=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Rg(A)}return eB(A,g,I)}a.poolSize=8192;function eB(A,g,I){if(typeof A=="string")return ME(A,g);if(ArrayBuffer.isView(A))return nE(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(EA(A,ArrayBuffer)||A&&EA(A.buffer,ArrayBuffer)||typeof SharedArrayBufLine truncated
|
||||
`).map(C=>C.trimStart().replace(/^\* ?/,"").trim()).filter(C=>C.startsWith("@")),I=Object.create(null);for(let C of g){var B;let Q=$E.exec(C);if(Q==null)continue;let i=Q[1],o=((B=Q[2])!=null?B:"").trim();I[i]?I[i].push(o):I[i]=[o]}return I}function Ai(A){let g=(()=>{if(A.type!=="Program")return null;let I=A;if(I.comments.length===0)return null;let B=(()=>{let C=I.comments[0];if(C.type==="Block")return C;if(I.comments.length===1)return null;let Q=I.comments[1];return C.type==="Line"&&C.range[0]===0&&Q.type==="Block"?Q:null})();return B==null||I.body.length>0&&I.body[0].range[0]<B.range[0]?null:B})();return g==null?null:{directives:pB(g.value),comment:g}}});var jB=h(Pg=>{var qB=globalThis.Buffer??ug().Buffer;Object.defineProperty(Pg,"__esModule",{value:!0});Pg.parse=Qi;var gi=lB(nB()),Ii=lB(LB()),Bi=RB();function lB(A){return A&&A.__esModule?A:{default:A}}var f,uB,dB,mB,fB,TB,PB,xB,OB,WB;function Ci(){f==null&&(f=(0,Ii.default)({quit(A,g){throw g}}),uB=f.cwrap("hermesParse","number",["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"]),dB=f.cwrap("hermesParseResult_free","void",["number"]),mB=f.cwrap("hermesParseResult_getError","string",["number"]),fB=f.cwrap("hermesParseResult_getErrorLine","number",["number"]),TB=f.cwrap("hermesParseResult_getErrorColumn","number",["number"]),PB=f.cwrap("hermesParseResult_getProgramBuffer","number",["number"]),xB=f.cwrap("hermesParseResult_getPositionBuffer","number",["number"]),OB=f.cwrap("hermesParseResult_getPositionBufferSize","number",["number"]),WB=f.cwrap("hermesParseResult_getStringBuffer","number",["number"]))}function HB(A,g){f.HEAP8.set(A,g),f.HEAP8[g+A.length]=0}function eA(A){return A===!0?1:0}function Qi(A,g){Ci();let I=qB.from(A,"utf8"),B=typeof g.sourceFilename=="string"?g.sourceFilename:"",C=B.length>0?qB.from(B,"utf8"):null,Q=0,i=0,o=0,e=0;try{let Z=function(q){if(q==null||typeof q!="object")return;let H=q;if(!U.has(H)){if(U.add(H),H.loc!=null){let j=H.loc,W=d.get(j);if(W==null){let _=j.rangeStart,oA=j.rangeEnd;if(_==null||oA==null)throw new Error("Expected serialized source range");j.source=R,W=[_,oA],d.set(j,W),delete j.rangeStart,delete j.rangeEnd}H.range=W}for(let j of Object.keys(H)){let W=H[j];if(Array.isArray(W))for(let _ of W)Z(_);else Z(W)}}};var t=Z;if(Q=f._malloc(I.length+1),!Q)throw new Error("Parser out of memory");if(C!=null){if(i=f._malloc(C.length+1),!i)throw new Error("Parser out of memory");HB(C,i),o=C.length+1}HB(I,Q);let s=g.enableTypes===!1?0:1,G=g.sourceType==="script"?1:g.sourceType==="module"?2:0;e=uB(Q,I.length+1,i,o,eA(g.enableExperimentalComponentSyntax),eA(g.enableExperimentalFlowMatchSyntax),eA(g.enableExperimentalDecorators),eA(g.tokens),eA(g.allowReturnOutsideFunction),eA(g.assertOperator),eA(g.enableEnums),eA(g.enableRecords),s,G,eA(g.enableTypesPragmaDetection),0);let r=PB(e);if(!r){let q=mB(e),H=new SyntaxError(q||"unknown parse error");throw H.loc={line:fB(e),column:TB(e)},H}let K=new gi.default(r,xB(e),OB(e),WB(e),f,g).deserialize();if(K.type!=="Program")throw new Error(`Expected Program, got ${K.type}`);let R=typeof g.sourceFilename=="string"?g.sourceFilename:null,U=new WeakSet,d=new WeakMap;if(Z(K),g.throwOnParseErrors!==!1){let q=K.errors;if(q!=null&&q.length>0){let H=q[0],j=H.loc.start;if(j==null)throw new Error("Expected serialized parser error start location");let W=j.line,_=j.column,oA=new SyntaxError(`${H.message} (${W}:${_})`);throw oA.loc={line:W,column:_},oA}}return g.sourceType==="script"||g.sourceType==="module"?K.sourceType=g.sourceType:K.sourceType=Ei(K),K.docblock=(0,Bi.getModuleDocblock)(K),K}finally{e!==0&&dB(e),Q!==0&&f._free(Q),i!==0&&f._free(i)}}function Ei(A){if(!Array.isArray(A.body))return"script";for(let g of A.body)if(g!=null)switch(g.type){case"ImportDeclaration":if(g.importKind==="value"||g.importKind==null)return"module";break;case"ExportDefaultDeclaration":return"module";case"ExportNamedDeclaration":case"ExportAllDeclaration":if(g.exportKind==="value"||g.exportKind==null)return"module";break}return"script"}});var ig=h((yG,bB)=>{"use strict";bB.exports={AbstractMethodDefinition:["key","value"],AbstractPropertyDefinition:["key","value","variance"],AnyTypeAnnotation:[],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrayTypeAnnotation:["elementType"],ArrowFunctionExpression:["params","body","typeParameters","returnType","predicate"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],BinaryExpression:["left","right"],BlockStatement:["body"],BooleanLiteralTypeAnnotation:[],BooleanTypeAnnotation:[],BreakStatement:["label"],CallExpression:["callee","typeArguments","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","typeParameters","super
Line truncated
|
||||
`))return[];let g=[];for(let I of`*${A.value}*`.split(`
|
||||
`)){if(I=I.trimStart(),!I.startsWith("*"))return[];g.push(I)}return g}var VC=new WeakMap;function cy(A){return TA(VC,A,ry)}function vC(A){VC.delete(A)}function UI(A){return cy(A).length>0}function XC(A){if(A.length<2)return;let g;for(let I=A.length-1;I>=0;I--){let B=A[I];if(g&&P(B)===T(g)&&UI(B)&&UI(g)&&(A.splice(I+1,1),B.value+="*//*"+g.value,B.range=[T(B),P(g)],vC(B)),!jC(B)&&!fA(B))throw new TypeError(`Unknown comment type: "${B.type}".`);g=B}}function hy(A){return A!==null&&typeof A=="object"}var _C=hy;var vA=null;function XA(A){if(vA!==null&&typeof vA.property){let g=vA;return vA=XA.prototype=null,g}return vA=XA.prototype=A??Object.create(null),new XA}var Ky=10;for(let A=0;A<=Ky;A++)XA();function JI(A){return XA(A)}function Fy(A,g="type"){JI(A);function I(B){let C=B[g],Q=A[C];if(!Array.isArray(Q))throw Object.assign(new Error(`Missing visitor keys for '${C}'.`),{node:B});return Q}return I}var $C=Fy;var D=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],AQ={ArrayExpression:D[0],AssignmentExpression:D[1],BinaryExpression:D[1],InterpreterDirective:[],Directive:D[2],DirectiveLiteral:[],BlockStatement:D[3],BreakStatement:D[4],CallExpression:D[5],CatchClause:["param","body"],ConditionalExpression:D[6],ContinueStatement:D[4],DebuggerStatement:[],DoWhileStatement:D[7],EmptyStatement:[],ExpressionStatement:D[8],File:["program"],ForInStatement:D[9],ForStatement:["init","test","update","body"],FunctionDeclaration:D[10],FunctionExpression:D[10],Identifier:["typeAnnotation","decorators"],IfStatement:D[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:D[1],MemberExpression:D[11],NewExpression:D[5],Program:D[3],ObjectExpression:D[12],ObjectMethod:D[13],ObjectProperty:D[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:D[15],SequenceExpression:D[16],ParenthesizedExpression:D[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:D[15],TryStatement:["block","handler","finalizer"],UnaryExpression:D[15],UpdateExpression:D[15],VariableDeclaration:["declarations"],VariableDeclarator:D[17],WhileStatement:D[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:D[18],ClassExpression:D[19],ClassDeclaration:D[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:D[20],ExportSpecifier:["local","exported"],ForOfStatement:D[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:D[21],ImportNamespaceSpecifier:D[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:D[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:D[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:D[15],AwaitExpression:D[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:D[22],OptionalMemberExpression:D[11],OptionalCallExpression:D[5],ClassProperty:D[23],ClassPrivateProperty:D[23],ClassPrivateMethod:D[13],PrivateName:D[24],StaticBlock:D[18],ImportAttribute:D[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:D[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:D[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);A=A.replace(QQ,"").trimEnd();let B=Object.create(null),C=nA(0,A,EQ,"").replace(QQ,"").trimEnd(),Q;for(;Q=EQ.exec(A);){let i=nA(0,Q[2],py,"");if(typeof B[Q[1]]=="string"||Array.isArray(B[Q[1]])){let o=B[Q[1]];B[Q[1]]=[...Hy,...Array.isArray(o)?o:[o],i]}else B[Q[1]]=i}return{comments:C,pragmas:B}}var DQ=["noformat","noprettier"],eQ=["format","prettier"];function ly(A){if(!A.startsWith("#!"))return"";let g=A.indexOf(`
|
||||
`);return g===-1?A:A.slice(0,g)}var wQ=ly;function aQ(A){let g=wQ(A);g&&(A=A.slice(g.length+1));let I=iQ(A),{pragmas:B,comments:C}=oQ(I);return{shebang:g,text:A,pragmas:B,comments:C}}function tQ(A){let{pragmas:g}=aQ(A);return eQ.some(I=>pI(g,I))}function sQ(A){let{pragmas:g}=aQ(A);return DQ.some(I=>pI(g,I))}function uy(A){return A=typeof A=="function"?{parse:A}:A,{astFormat:"estree",hasPragma:tQ,hasIgnorePragma:sQ,locStart:T,locEnd:P,...A}}var yQ=uy;var dy={flow:"all",babel:!1,tokens:!1,allowReturnOutsideFunction:!0,enableEnums:!0,enableExperimentalFlowMatchSyntax:!0,enableExperimentalComponentSyntax:!0,enableExperimentalDecorators:!0,enableExperimentalFlowRecordSyntax:!0};function my(A){let{message:g,loc:I}=A;if(!I)return A;let{line:B,column:C}=I,Q=` (${B}:${C})`;return g.endsWith(Q)&&(g=g.slice(0,-Q.length)),TC(g,{loc:{start:{line:B,column:C+1}},cause:A})}function fy(A,g){let I=g?.filepath,B=typeof I=="string"?I:"prettier.js.flow",C;try{C=(0,GQ.parse)(A,{sourceFilename:B,...dy})}catch(Q){throw my(Q)}return CQ(C,{text:A,astType:"flow"})}var Ty=yQ(fy);return yE(Py);});
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
var DE=Object.create;var Mg=Object.defineProperty;var eE=Object.getOwnPropertyDescriptor;var wE=Object.getOwnPropertyNames;var aE=Object.getPrototypeOf,tE=Object.prototype.hasOwnProperty;var h=(A,g)=>()=>{try{return g||A((g={exports:{}}).exports,g),g.exports}catch(I){throw g=0,I}},AB=(A,g)=>{for(var I in g)Mg(A,I,{get:g[I],enumerable:!0})},sE=(A,g,I,B)=>{if(g&&typeof g=="object"||typeof g=="function")for(let C of wE(g))!tE.call(A,C)&&C!==I&&Mg(A,C,{get:()=>g[C],enumerable:!(B=eE(g,C))||B.enumerable});return A};var yE=(A,g,I)=>(I=A!=null?DE(aE(A)):{},sE(g||!A||!A.__esModule?Mg(I,"default",{value:A,enumerable:!0}):I,A));var BB=h(gg=>{"use strict";gg.byteLength=NE;gg.toByteArray=rE;gg.fromByteArray=KE;var QA=[],$=[],GE=typeof Uint8Array<"u"?Uint8Array:Array,ng="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(cA=0,gB=ng.length;cA<gB;++cA)QA[cA]=ng[cA],$[ng.charCodeAt(cA)]=cA;var cA,gB;$[45]=62;$[95]=63;function IB(A){var g=A.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var I=A.indexOf("=");I===-1&&(I=g);var B=I===g?0:4-I%4;return[I,B]}function NE(A){var g=IB(A),I=g[0],B=g[1];return(I+B)*3/4-B}function kE(A,g,I){return(g+I)*3/4-I}function rE(A){var g,I=IB(A),B=I[0],C=I[1],Q=new GE(kE(A,B,C)),i=0,o=C>0?B-4:B,e;for(e=0;e<o;e+=4)g=$[A.charCodeAt(e)]<<18|$[A.charCodeAt(e+1)]<<12|$[A.charCodeAt(e+2)]<<6|$[A.charCodeAt(e+3)],Q[i++]=g>>16&255,Q[i++]=g>>8&255,Q[i++]=g&255;return C===2&&(g=$[A.charCodeAt(e)]<<2|$[A.charCodeAt(e+1)]>>4,Q[i++]=g&255),C===1&&(g=$[A.charCodeAt(e)]<<10|$[A.charCodeAt(e+1)]<<4|$[A.charCodeAt(e+2)]>>2,Q[i++]=g>>8&255,Q[i++]=g&255),Q}function cE(A){return QA[A>>18&63]+QA[A>>12&63]+QA[A>>6&63]+QA[A&63]}function hE(A,g,I){for(var B,C=[],Q=g;Q<I;Q+=3)B=(A[Q]<<16&16711680)+(A[Q+1]<<8&65280)+(A[Q+2]&255),C.push(cE(B));return C.join("")}function KE(A){for(var g,I=A.length,B=I%3,C=[],Q=16383,i=0,o=I-B;i<o;i+=Q)C.push(hE(A,i,i+Q>o?o:i+Q));return B===1?(g=A[I-1],C.push(QA[g>>2]+QA[g<<4&63]+"==")):B===2&&(g=(A[I-2]<<8)+A[I-1],C.push(QA[g>>10]+QA[g>>4&63]+QA[g<<2&63]+"=")),C.join("")}});var CB=h(Yg=>{Yg.read=function(A,g,I,B,C){var Q,i,o=C*8-B-1,e=(1<<o)-1,t=e>>1,s=-7,G=I?C-1:0,r=I?-1:1,F=A[g+G];for(G+=r,Q=F&(1<<-s)-1,F>>=-s,s+=o;s>0;Q=Q*256+A[g+G],G+=r,s-=8);for(i=Q&(1<<-s)-1,Q>>=-s,s+=B;s>0;i=i*256+A[g+G],G+=r,s-=8);if(Q===0)Q=1-t;else{if(Q===e)return i?NaN:(F?-1:1)*(1/0);i=i+Math.pow(2,B),Q=Q-t}return(F?-1:1)*i*Math.pow(2,Q-B)};Yg.write=function(A,g,I,B,C,Q){var i,o,e,t=Q*8-C-1,s=(1<<t)-1,G=s>>1,r=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,F=B?0:Q-1,K=B?1:-1,R=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(o=isNaN(g)?1:0,i=s):(i=Math.floor(Math.log(g)/Math.LN2),g*(e=Math.pow(2,-i))<1&&(i--,e*=2),i+G>=1?g+=r/e:g+=r*Math.pow(2,1-G),g*e>=2&&(i++,e/=2),i+G>=s?(o=0,i=s):i+G>=1?(o=(g*e-1)*Math.pow(2,C),i=i+G):(o=g*Math.pow(2,G-1)*Math.pow(2,C),i=0));C>=8;A[I+F]=o&255,F+=K,o/=256,C-=8);for(i=i<<C|o,t+=C;t>0;A[I+F]=i&255,F+=K,i/=256,t-=8);A[I+F-K]|=R*128}});var ug=h(RA=>{"use strict";var Ug=BB(),LA=CB(),QB=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;RA.Buffer=a;RA.SlowBuffer=UE;RA.INSPECT_MAX_BYTES=50;var Ig=2147483647;RA.kMaxLength=Ig;a.TYPED_ARRAY_SUPPORT=FE();!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function FE(){try{let A=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(A,g),A.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function DA(A){if(A>Ig)throw new RangeError('The value "'+A+'" is invalid for option "size"');let g=new Uint8Array(A);return Object.setPrototypeOf(g,a.prototype),g}function a(A,g,I){if(typeof A=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Rg(A)}return DB(A,g,I)}a.poolSize=8192;function DB(A,g,I){if(typeof A=="string")return ME(A,g);if(ArrayBuffer.isView(A))return nE(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(EA(A,ArrayBuffer)||A&&EA(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(EA(A,SharedArrayBuffer)||A&&EA(A.buffer,SharedArrayBuffer)))return Lg(A,g,I);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=A.valueOf&&A.valueOf();if(B!=null&&B!==A)return a.from(B,g,I);let C=YE(A);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return a.from(A[Symbol.toPrimitive]Line truncated
|
||||
`).map(C=>C.trimStart().replace(/^\* ?/,"").trim()).filter(C=>C.startsWith("@")),I=Object.create(null);for(let C of g){var B;let Q=$E.exec(C);if(Q==null)continue;let i=Q[1],o=((B=Q[2])!=null?B:"").trim();I[i]?I[i].push(o):I[i]=[o]}return I}function Ai(A){let g=(()=>{if(A.type!=="Program")return null;let I=A;if(I.comments.length===0)return null;let B=(()=>{let C=I.comments[0];if(C.type==="Block")return C;if(I.comments.length===1)return null;let Q=I.comments[1];return C.type==="Line"&&C.range[0]===0&&Q.type==="Block"?Q:null})();return B==null||I.body.length>0&&I.body[0].range[0]<B.range[0]?null:B})();return g==null?null:{directives:LB(g.value),comment:g}}});var WB=h(Pg=>{var RB=globalThis.Buffer??ug().Buffer;Object.defineProperty(Pg,"__esModule",{value:!0});Pg.parse=Qi;var gi=HB(MB()),Ii=HB(JB()),Bi=pB();function HB(A){return A&&A.__esModule?A:{default:A}}var f,lB,uB,dB,mB,fB,TB,PB,xB,OB;function Ci(){f==null&&(f=(0,Ii.default)({quit(A,g){throw g}}),lB=f.cwrap("hermesParse","number",["number","number","number","number","number","number","number","number","number","number","number","number","number","number","number","number"]),uB=f.cwrap("hermesParseResult_free","void",["number"]),dB=f.cwrap("hermesParseResult_getError","string",["number"]),mB=f.cwrap("hermesParseResult_getErrorLine","number",["number"]),fB=f.cwrap("hermesParseResult_getErrorColumn","number",["number"]),TB=f.cwrap("hermesParseResult_getProgramBuffer","number",["number"]),PB=f.cwrap("hermesParseResult_getPositionBuffer","number",["number"]),xB=f.cwrap("hermesParseResult_getPositionBufferSize","number",["number"]),OB=f.cwrap("hermesParseResult_getStringBuffer","number",["number"]))}function qB(A,g){f.HEAP8.set(A,g),f.HEAP8[g+A.length]=0}function eA(A){return A===!0?1:0}function Qi(A,g){Ci();let I=RB.from(A,"utf8"),B=typeof g.sourceFilename=="string"?g.sourceFilename:"",C=B.length>0?RB.from(B,"utf8"):null,Q=0,i=0,o=0,e=0;try{let Z=function(q){if(q==null||typeof q!="object")return;let H=q;if(!U.has(H)){if(U.add(H),H.loc!=null){let j=H.loc,W=d.get(j);if(W==null){let _=j.rangeStart,oA=j.rangeEnd;if(_==null||oA==null)throw new Error("Expected serialized source range");j.source=R,W=[_,oA],d.set(j,W),delete j.rangeStart,delete j.rangeEnd}H.range=W}for(let j of Object.keys(H)){let W=H[j];if(Array.isArray(W))for(let _ of W)Z(_);else Z(W)}}};var t=Z;if(Q=f._malloc(I.length+1),!Q)throw new Error("Parser out of memory");if(C!=null){if(i=f._malloc(C.length+1),!i)throw new Error("Parser out of memory");qB(C,i),o=C.length+1}qB(I,Q);let s=g.enableTypes===!1?0:1,G=g.sourceType==="script"?1:g.sourceType==="module"?2:0;e=lB(Q,I.length+1,i,o,eA(g.enableExperimentalComponentSyntax),eA(g.enableExperimentalFlowMatchSyntax),eA(g.enableExperimentalDecorators),eA(g.tokens),eA(g.allowReturnOutsideFunction),eA(g.assertOperator),eA(g.enableEnums),eA(g.enableRecords),s,G,eA(g.enableTypesPragmaDetection),0);let r=TB(e);if(!r){let q=dB(e),H=new SyntaxError(q||"unknown parse error");throw H.loc={line:mB(e),column:fB(e)},H}let K=new gi.default(r,PB(e),xB(e),OB(e),f,g).deserialize();if(K.type!=="Program")throw new Error(`Expected Program, got ${K.type}`);let R=typeof g.sourceFilename=="string"?g.sourceFilename:null,U=new WeakSet,d=new WeakMap;if(Z(K),g.throwOnParseErrors!==!1){let q=K.errors;if(q!=null&&q.length>0){let H=q[0],j=H.loc.start;if(j==null)throw new Error("Expected serialized parser error start location");let W=j.line,_=j.column,oA=new SyntaxError(`${H.message} (${W}:${_})`);throw oA.loc={line:W,column:_},oA}}return g.sourceType==="script"||g.sourceType==="module"?K.sourceType=g.sourceType:K.sourceType=Ei(K),K.docblock=(0,Bi.getModuleDocblock)(K),K}finally{e!==0&&uB(e),Q!==0&&f._free(Q),i!==0&&f._free(i)}}function Ei(A){if(!Array.isArray(A.body))return"script";for(let g of A.body)if(g!=null)switch(g.type){case"ImportDeclaration":if(g.importKind==="value"||g.importKind==null)return"module";break;case"ExportDefaultDeclaration":return"module";case"ExportNamedDeclaration":case"ExportAllDeclaration":if(g.exportKind==="value"||g.exportKind==null)return"module";break}return"script"}});var Eg=h((sG,jB)=>{"use strict";jB.exports={AbstractMethodDefinition:["key","value"],AbstractPropertyDefinition:["key","value","variance"],AnyTypeAnnotation:[],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrayTypeAnnotation:["elementType"],ArrowFunctionExpression:["params","body","typeParameters","returnType","predicate"],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],BinaryExpression:["left","right"],BlockStatement:["body"],BooleanLiteralTypeAnnotation:[],BooleanTypeAnnotation:[],BreakStatement:["label"],CallExpression:["callee","typeArguments","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","typeParameters","super
Line truncated
|
||||
`))return[];let g=[];for(let I of`*${A.value}*`.split(`
|
||||
`)){if(I=I.trimStart(),!I.startsWith("*"))return[];g.push(I)}return g}var zC=new WeakMap;function cy(A){return TA(zC,A,ry)}function VC(A){zC.delete(A)}function UI(A){return cy(A).length>0}function vC(A){if(A.length<2)return;let g;for(let I=A.length-1;I>=0;I--){let B=A[I];if(g&&P(B)===T(g)&&UI(B)&&UI(g)&&(A.splice(I+1,1),B.value+="*//*"+g.value,B.range=[T(B),P(g)],VC(B)),!WC(B)&&!fA(B))throw new TypeError(`Unknown comment type: "${B.type}".`);g=B}}function hy(A){return A!==null&&typeof A=="object"}var XC=hy;var vA=null;function XA(A){if(vA!==null&&typeof vA.property){let g=vA;return vA=XA.prototype=null,g}return vA=XA.prototype=A??Object.create(null),new XA}var Ky=10;for(let A=0;A<=Ky;A++)XA();function JI(A){return XA(A)}function Fy(A,g="type"){JI(A);function I(B){let C=B[g],Q=A[C];if(!Array.isArray(Q))throw Object.assign(new Error(`Missing visitor keys for '${C}'.`),{node:B});return Q}return I}var _C=Fy;var D=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],$C={ArrayExpression:D[0],AssignmentExpression:D[1],BinaryExpression:D[1],InterpreterDirective:[],Directive:D[2],DirectiveLiteral:[],BlockStatement:D[3],BreakStatement:D[4],CallExpression:D[5],CatchClause:["param","body"],ConditionalExpression:D[6],ContinueStatement:D[4],DebuggerStatement:[],DoWhileStatement:D[7],EmptyStatement:[],ExpressionStatement:D[8],File:["program"],ForInStatement:D[9],ForStatement:["init","test","update","body"],FunctionDeclaration:D[10],FunctionExpression:D[10],Identifier:["typeAnnotation","decorators"],IfStatement:D[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:D[1],MemberExpression:D[11],NewExpression:D[5],Program:D[3],ObjectExpression:D[12],ObjectMethod:D[13],ObjectProperty:D[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:D[15],SequenceExpression:D[16],ParenthesizedExpression:D[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:D[15],TryStatement:["block","handler","finalizer"],UnaryExpression:D[15],UpdateExpression:D[15],VariableDeclaration:["declarations"],VariableDeclarator:D[17],WhileStatement:D[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:D[18],ClassExpression:D[19],ClassDeclaration:D[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:D[20],ExportSpecifier:["local","exported"],ForOfStatement:D[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:D[21],ImportNamespaceSpecifier:D[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:D[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:D[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:D[15],AwaitExpression:D[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:D[22],OptionalMemberExpression:D[11],OptionalCallExpression:D[5],ClassProperty:D[23],ClassPrivateProperty:D[23],ClassPrivateMethod:D[13],PrivateName:D[24],StaticBlock:D[18],ImportAttribute:D[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:D[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:D[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);A=A.replace(CQ,"").trimEnd();let B=Object.create(null),C=nA(0,A,QQ,"").replace(CQ,"").trimEnd(),Q;for(;Q=QQ.exec(A);){let i=nA(0,Q[2],py,"");if(typeof B[Q[1]]=="string"||Array.isArray(B[Q[1]])){let o=B[Q[1]];B[Q[1]]=[...Hy,...Array.isArray(o)?o:[o],i]}else B[Q[1]]=i}return{comments:C,pragmas:B}}var oQ=["noformat","noprettier"],DQ=["format","prettier"];function ly(A){if(!A.startsWith("#!"))return"";let g=A.indexOf(`
|
||||
`);return g===-1?A:A.slice(0,g)}var eQ=ly;function wQ(A){let g=eQ(A);g&&(A=A.slice(g.length+1));let I=EQ(A),{pragmas:B,comments:C}=iQ(I);return{shebang:g,text:A,pragmas:B,comments:C}}function aQ(A){let{pragmas:g}=wQ(A);return DQ.some(I=>pI(g,I))}function tQ(A){let{pragmas:g}=wQ(A);return oQ.some(I=>pI(g,I))}function uy(A){return A=typeof A=="function"?{parse:A}:A,{astFormat:"estree",hasPragma:aQ,hasIgnorePragma:tQ,locStart:T,locEnd:P,...A}}var sQ=uy;var dy={flow:"all",babel:!1,tokens:!1,allowReturnOutsideFunction:!0,enableEnums:!0,enableExperimentalFlowMatchSyntax:!0,enableExperimentalComponentSyntax:!0,enableExperimentalDecorators:!0,enableExperimentalFlowRecordSyntax:!0};function my(A){let{message:g,loc:I}=A;if(!I)return A;let{line:B,column:C}=I,Q=` (${B}:${C})`;return g.endsWith(Q)&&(g=g.slice(0,-Q.length)),fC(g,{loc:{start:{line:B,column:C+1}},cause:A})}function fy(A,g){let I=g?.filepath,B=typeof I=="string"?I:"prettier.js.flow",C;try{C=(0,yQ.parse)(A,{sourceFilename:B,...dy})}catch(Q){throw my(Q)}return BQ(C,{text:A,astType:"flow"})}var Ty=sQ(fy);export{GQ as default,RI as parsers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
glimmer: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
glimmer: Printer;
|
||||
};
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.glimmer=e()}})(function(){"use strict";var Oe=Object.defineProperty;var Mn=Object.getOwnPropertyDescriptor;var zn=Object.getOwnPropertyNames;var Yn=Object.prototype.hasOwnProperty;var Ie=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Gn=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of zn(t))!Yn.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(s=Mn(t,n))||s.enumerable});return e};var Kn=e=>Gn(Oe({},"__esModule",{value:!0}),e);var Oi={};Ie(Oi,{languages:()=>Dn,parsers:()=>kr,printers:()=>Di});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var Wn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},jn=Jt("replaceAll",function(){if(typeof this=="string")return Wn}),ct=jn;function Qn(e){return this[e<0?this.length+e:e]}var Jn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return Qn}),V=Jn;var $n=()=>{},Dt=$n;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",Nt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,Nt]);function Dr(e,t,r){if(!e.has(t)){let s=r(t);e.set(t,s)}return e.get(t)}function Xn(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=Xn;var Zn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ts(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Zn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Be=class extends Error{name="InvalidDocError";constructor(t){super(ts(t)),this.doc=t}},Or=Be;function es(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){return Dr(r,i,n)}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case Nt:return t(i);default:throw new Or(i)}}}function ie(e,t=Ir){return es(e,r=>typeof r=="string"?ut(t,r.split(`
|
||||
`)):r)}var M=Dt,ae=Dt,Br=Dt,Rr=Dt;function F(e){return M(e),{type:kt,contents:e}}function rs(e,t){return Rr(e),M(t),{type:Et,contents:t,n:e}}function Re(e){return rs(-1,e)}var qe={type:Nt};function Ve(e){return Br(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Fe(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ut(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var x={type:Q},H={type:Q,soft:!0},ns={type:Q,hard:!0},ht=[ns,qe],ss={type:Q,hard:!0,literal:!0},Ir=[ss,qe];var qr=Object.freeze({character:"'",codePoint:39}),Vr=Object.freeze({character:'"',codePoint:34}),is=Object.freeze({preferred:qr,alternate:Vr}),as=Object.freeze({preferred:Vr,alternate:qr});function oe(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?is:as,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Ue=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${He([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s);return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
|
||||
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
|
||||
`).map(s=>s.slice(r)).join(`
|
||||
`)}},Fr=Ue;var os=[" ",`
|
||||
`,"\f","\r"," "],ls=new Fr(os),R=ls;function cs(e){return Array.isArray(e)&&e.length>0}var Bt=cs;var Me=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Hr=Me;function us(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Ur=us;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var hs=10;for(let e=0;e<=hs;e++)qt();function ze(e){return qt(e)}function ps(e,t="type"){ze(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Mr=ps;var fs=Object.freeze([]);function Yr(){return fs}var no=Yr(),so=Yr();var Ye=Object.assign;var zr=console;function Gr(e,t="unexpected unreachable branch"){throw zr.log("unreachable",e),zr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var ms=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],Er=[2,51],vr=[1,64],wr=[67,73,75,77,84,85,86,87,88,89],Tr=[56,67,73,75,84,85,86,87,88,89],Nr=[1,75],we=[1,76],Te=[1,83],gt=[33,67,73,75,79,84,85,86,87,88,89],xr=[23,67,73,75,84,85,86,87,88,89],Ar=[67,68,73,75,84,85,86,87,88,89],bt=[33,79],Ne=[1,134],Pr=[73,81],xe={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,
Line truncated
|
||||
`+N.showPosition()+`
|
||||
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==_r?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:N.match,token:this.terminals_[L]||L,line:N.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(N.yytext),l.push(N.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=N.yyleng,u=N.yytext,Z=N.yylineno,Ce=N.yylloc,Cr>0&&Cr--);break;case 2:if(j=this.productions_[q[1]][1],St.$=w[w.length-j],St._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Hn&&(St._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(St,[u,Lt,Z,ot.yy,q[1],w,l].concat(Fn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(St.$),l.push(St._$),Lr=yt[y[y.length-2]][y[y.length-1]],y.push(Lr);break;case 3:return!0}}return!0}},qn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
||||
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var yt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();xe.lexer=qn;function Ae(){this.yy={}}return Ae.prototype=xe,xe.Parser=Ae,new Ae})(),Vt=ms;var Ge=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ke(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<Ge.length;c++)this[Ge[c]]=o[Ge[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ke);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}Ke.prototype=new Error;var tt=Ke;function le(){this.parents=[]}le.prototype={constructor:le,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!le.prototype[r.type])throw new tt('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new tt(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var Ze=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||$r(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),bo=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Ze(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function Zr(e){return function(t){return Array.isArray(t)&&t[0]===e}}var So=Zr(pe.FlushElement);var ko=Zr(pe.GetSymbol);var Is=!1,Bs=/["\x26\xa0]/u,Po=new RegExp(Bs.source,"gu"),Rs=/[&<>\xa0]/u,Co=new RegExp(Rs.source,"gu");var de=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function ln(){return[...de]}function qs(e){return de.has(e.toLowerCase())&&e[0]?.toLowerCase()===e[0]}function Y
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(Is){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},dr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function tn(e,t,r){return new dr("Cannot remove a node unless it is part of an array",e,t,r)}function Us(e,t,r){return new dr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function en(e,t){return new dr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new cr(this)}}},cr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function un(e){return typeof e=="function"?e:e.enter}function hn(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=un(c),s=hn(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(pn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Ms(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function rn(e,t,r){e[t]=r}function Ms(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=un(c),i=hn(c))}if(n!==void 0&&n(a,s)!==void 0)throw en(a,s);if(Array.isArray(o))pn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw tn(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?tn(p,h,f):Us(p,h,f);rn(h,f,g[0])}else rn(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw en(a,s)}}function pn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=zs(t,n,a)-1)}}function zs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Ys(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function fn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var tr;function er(){return tr||(tr=new ft("","(synthetic)")),tr}function nn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function mn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function sn(e=[],t=[],r=!1,s){return d.blockItself({body:e,params:mn(t),chained:r,loc:v(s||null)})}function an(e=[],t=[],r){return d.template({body:e,blockParams:t,loc:v(r||null)})}function v(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?A.forHbsLoc(er(),t):A.forHbsLoc(er(),Fs)}{let[t,r,s,n,i]=e,a=i?new ft("",i):er();return A.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var Gs={mustache:function(e,t=[],r=Ht([]),s=!1,n,i){return d.mustache({path:rt(e),params:t,hash:r,trusting:s,strip:i,loc:v(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,f=null;return h=s.type==="Template"?d.blockItself({params:mn(s.blockParams),body:s.body,loc:s.loc}):s,n?.type==="Template"?(n.blockParams.length,f=d.blockItself({params:[],body:n.body,loc:n.loc})):f=n,d.block({path:rt(e),params:t||[],hash:r||Ht([]),defaultBlock:h,elseBlock:f,loc:v(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},c
Line truncated
|
||||
`)}},hr=class extends ur{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=nr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=on(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(ir)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=on(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(fn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=nr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":sr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":sr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=nr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function nr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map((i=>e.acceptNode(i))),n=Yt(s)?mr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):d.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function sr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(fn(r)){let o=`{{${(function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)})(r)}}}`;throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=d.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function on(e,t,r){if(!t.program.loc){let n=V(0,t.program.body,0),i=V(0,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function xt(e){return/[\t\n\f ]/u.test(e)}Line truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,xt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,xt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,xt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||xt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,xt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||xt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Vs(t),s=mr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(de.has(t.name)&&!s)throw k(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw k(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw k(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return Yt(t)?t[0]:d.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},Ks={},fr=class extends Xe{constructor(){super({})}parse(){}};function dn(e,t={}){let r,s,n,i=t.mode||"precompile";typeLine truncated
|
||||
`).length-1}function ui(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return _t(t)}function hi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,xn)},()=>ht)}function pi(e,t){let{node:{value:r}}=e,s=oe(r,fi(e)?!t.singleQuote:t.singleQuote);return[s,ct(0,r,s,`\\${s}`),s]}function fi(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function mi(e,t){let r=yr(e,t),s=ve(e,t);return s?F([r,x,I(s)]):r}function Nn(e,t){let r=yr(e,t),s=ve(e,t);return s?[F([r,x,s]),H]:r}function yr(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ut(x,s)}function Sr(e){return["as |",e.blockParams.join(" "),"|"]}var di=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),gi=new Set(["true","false","null","undefined"]),bi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&gi.has(e)||/\s/.test(e)||/^\d/.test(e)||Array.prototype.some.call(e,r=>di.has(r));function yi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>bi(r,s)?`[${r}]`:r).join(".")}var Si={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:Xs,massageAstNode:gr,hasPrettierIgnore:Sn,getVisitorKeys:gn,embed:Ur},Ln=Si;var Dn=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var kr={};Ie(kr,{glimmer:()=>Li});function ki(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var On=ki;function Ei(e){return ct(0,e,/[^\n]/g," ")}var In=Ei;var Bn=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function vi(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
|
||||
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
|
||||
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
|
||||
`)),h.length},get column(){return h??(h=c.split(`
|
||||
`)),V(0,h,-1).length}},[Bn]:!0}}function wi(e){let t=vi(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return In(r)+e.slice(r.length)}}:{content:e}}var Rn=wi;function Ti(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/,"\\\\"))}var Ni=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},xi=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){Ni(e),Ti(e)}}}),Ai={mode:"codemod",plugins:{ast:[xi]}};function Pi(e){let{frontMatter:t,content:r}=Rn(e),s;try{s=dn(r,Ai)}catch(n){let i=_i(n);if(i){let a=Ci(n);throw On(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function Ci(e){let{message:t}=e,r=t.split(`
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function _i(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return{start:{line:s.line,column:s.column+1},end:typeof n.line=="number"?{line:n.line,column:n.column+1}:void 0}}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Li={parse:Pi,astFormat:"glimmer",locStart:dt,locEnd:Gt};var Di={glimmer:Ln};return Kn(Oi);});
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
var Mn=Object.defineProperty;var Oe=(e,t)=>{for(var r in t)Mn(e,r,{get:t[r],enumerable:!0})};var Rn={};Oe(Rn,{languages:()=>Ln,parsers:()=>Sr,printers:()=>Pi});var Jt=(e,t)=>(r,s,...n)=>r|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,n);var zn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Yn=Jt("replaceAll",function(){if(typeof this=="string")return zn}),ct=Yn;function Gn(e){return this[e<0?this.length+e:e]}var Kn=Jt("at",function(){if(Array.isArray(this)||typeof this=="string")return Gn}),V=Kn;var Wn=()=>{},Dt=Wn;var Ot="string",It="array",$t="cursor",kt="indent",Et="align",Xt="trim",vt="group",wt="fill",Tt="if-break",Zt="indent-if-break",te="line-suffix",ee="line-suffix-boundary",Q="line",re="label",xt="break-parent",ne=new Set([$t,kt,Et,Xt,vt,wt,Tt,Zt,te,ee,Q,re,xt]);function Lr(e,t,r){if(!e.has(t)){let s=r(t);e.set(t,s)}return e.get(t)}function jn(e){if(typeof e=="string")return Ot;if(Array.isArray(e))return It;if(!e)return;let{type:t}=e;if(ne.has(t))return t}var se=jn;var Qn=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Jn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(se(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Qn([...ne].map(n=>`'${n}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${s}.`}var Ie=class extends Error{name="InvalidDocError";constructor(t){super(Jn(t)),this.doc=t}},Dr=Ie;function $n(e,t){if(typeof e=="string")return t(e);let r=new Map;return s(e);function s(i){return Lr(r,i,n)}function n(i){switch(se(i)){case It:return t(i.map(s));case wt:return t({...i,parts:i.parts.map(s)});case Tt:return t({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case vt:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(s),o=a[0]):o=s(o),t({...i,contents:o,expandedStates:a})}case Et:case kt:case Zt:case re:case te:return t({...i,contents:s(i.contents)});case Ot:case $t:case Xt:case ee:case Q:case xt:return t(i);default:throw new Dr(i)}}}function ie(e,t=Or){return $n(e,r=>typeof r=="string"?ut(t,r.split(`
|
||||
`)):r)}var M=Dt,ae=Dt,Ir=Dt,Br=Dt;function F(e){return M(e),{type:kt,contents:e}}function Xn(e,t){return Br(e),M(t),{type:Et,contents:t,n:e}}function Be(e){return Xn(-1,e)}var Re={type:xt};function qe(e){return Ir(e),{type:wt,parts:e}}function I(e,t={}){return M(e),ae(t.expandedStates,!0),{type:vt,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ve(e,t="",r={}){return M(e),t!==""&&M(t),{type:Tt,breakContents:e,flatContents:t,groupId:r.groupId}}function ut(e,t){M(e),ae(t);let r=[];for(let s=0;s<t.length;s++)s!==0&&r.push(e),r.push(t[s]);return r}var N={type:Q},H={type:Q,soft:!0},Zn={type:Q,hard:!0},ht=[Zn,Re],ts={type:Q,hard:!0,literal:!0},Or=[ts,Re];var Rr=Object.freeze({character:"'",codePoint:39}),qr=Object.freeze({character:'"',codePoint:34}),es=Object.freeze({preferred:Rr,alternate:qr}),rs=Object.freeze({preferred:qr,alternate:Rr});function oe(e,t){let{preferred:r,alternate:s}=t===!0||t==="'"?es:rs,{length:n}=e,i=0,a=0;for(let o=0;o<n;o++){let c=e.charCodeAt(o);c===r.codePoint?i++:c===s.codePoint&&a++}return(i>a?s:r).character}function Fe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var He=class{#t;constructor(t){this.#t=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#t,s=0;for(let n=0;n<t.length&&r.has(t.charAt(n));n++)s++;return s}getTrailingWhitespaceCount(t){let r=this.#t,s=0;for(let n=t.length-1;n>=0&&r.has(t.charAt(n));n--)s++;return s}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#t.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#t.has(V(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let s=`[${Fe([...this.#t].join(""))}]+`,n=new RegExp(r?`(${s})`:s);return t.split(n)}hasWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>r.has(s))}hasNonWhitespaceCharacter(t){let r=this.#t;return Array.prototype.some.call(t,s=>!r.has(s))}isWhitespaceOnly(t){let r=this.#t;return Array.prototype.every.call(t,s=>r.has(s))}#e(t){let r=Number.POSITIVE_INFINITY;for(let s of t.split(`
|
||||
`)){if(s.length===0)continue;let n=this.getLeadingWhitespaceCount(s);if(n===0)return 0;s.length!==n&&n<r&&(r=n)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#e(t);return r===0?t:t.split(`
|
||||
`).map(s=>s.slice(r)).join(`
|
||||
`)}},Vr=He;var ns=[" ",`
|
||||
`,"\f","\r"," "],ss=new Vr(ns),R=ss;function is(e){return Array.isArray(e)&&e.length>0}var Bt=is;var Ue=class extends Error{name="UnexpectedNodeError";constructor(t,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(t[s])}.`),this.node=t}},Fr=Ue;function as(e){let{node:t}=e;if(t.type!=="TextNode")return;let{parent:r}=e;if(!(r.type==="ElementNode"&&r.tag==="style"&&r.children.length===1&&r.children[0]===t))return;let s=r.attributes.find(n=>n.type==="AttrNode"&&n.name==="lang");if(!(s&&!(s.value.type==="TextNode"&&(s.value.chars===""||s.value.chars==="css"))))return async n=>{let i=t.chars;return i.trim()?await n(i,{parser:"css"}):""}}var Hr=as;var Rt=null;function qt(e){if(Rt!==null&&typeof Rt.property){let t=Rt;return Rt=qt.prototype=null,t}return Rt=qt.prototype=e??Object.create(null),new qt}var os=10;for(let e=0;e<=os;e++)qt();function Me(e){return qt(e)}function ls(e,t="type"){Me(e);function r(s){let n=s[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:s});return i}return r}var Ur=ls;var cs=Object.freeze([]);function zr(){return cs}var Xa=zr(),Za=zr();var ze=Object.assign;var Mr=console;function Yr(e,t="unexpected unreachable branch"){throw Mr.log("unreachable",e),Mr.log(`${t} :: ${JSON.stringify(e)} (${e})`),new Error("code reached unreachable")}var us=(function(){var e=function(X,b,S,y){for(S=S||{},y=X.length;y--;S[X[y]]=b);return S},t=[2,52],r=[1,20],s=[5,14,15,19,29,34,39,44,47,48,53,57,61],n=[1,44],i=[1,40],a=[1,43],o=[1,33],c=[1,34],h=[1,35],f=[1,36],p=[1,37],g=[1,42],E=[1,46],T=[14,15,19,29,34,39,44,47,48,53,57,61],D=[14,15,19,29,34,44,47,48,53,57,61],B=[15,18],O=[14,15,19,29,34,47,48,53,57,61],z=[33,67,73,75,84,85,86,87,88,89],P=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89],U=[1,62],C=[1,63],$=[23,33,56,68,73,79],W=[23,33,56,67,68,73,75,77,79,84,85,86,87,88,89,92,93],kr=[2,51],Er=[1,64],vr=[67,73,75,77,84,85,86,87,88,89],wr=[56,67,73,75,84,85,86,87,88,89],Tr=[1,75],we=[1,76],Te=[1,83],gt=[33,67,73,75,79,84,85,86,87,88,89],xr=[23,67,73,75,84,85,86,87,88,89],Nr=[67,68,73,75,84,85,86,87,88,89],bt=[33,79],xe=[1,134],Ar=[73,81],Ne={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,hash:49,expr:50,mustache_repetition0:51,mustache_option0:52,OPEN_UNESCAPED:53,mustache_repetition1:54,mustache_option1:55,CLOSE_UNESCAPED:56,OPEN_PARTIAL:57,partial_repetition0:58,partial_option0:59,openPartialBlock:60,OPEN_PARTIAL_BLOCK:61,openPartialBlock_repetition0:62,openPartialBlock_option0:63,exprHead:64,arrayLiteral:65,sexpr:66,OPEN_SEXPR:67,CLOSE_SEXPR:68,sexpr_repetition0:69,sexpr_option0:70,hash_repetition_plus0:71,hashSegment:72,ID:73,EQUALS:74,OPEN_ARRAY:75,arrayLiteral_repetition0:76,CLOSE_ARRAY:77,blockParams:78,OPEN_BLOCK_PARAMS:79,blockParams_repetition_plus0:80,CLOSE_BLOCK_PARAMS:81,path:82,dataName:83,STRING:84,NUMBER:85,BOOLEAN:86,UNDEFINED:87,NULL:88,DATA:89,pathSegments:90,sep:91,SEP:92,PRIVATE_SEP:93,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",53:"OPEN_UNESCAPED",56:"CLOSE_UNESCAPED",57:"OPEN_PARTIAL",61:"OPEN_PARTIAL_BLOCK",67:"OPEN_SEXPR",68:"CLOSE_SEXPR",73:"ID",74:"EQUALS",75:"OPEN_ARRAY",77:"CLOSE_ARRAY",79:"OPEN_BLOCK_PARAMS",81:"CLOSE_BLOCK_PARAMS",84:"STRING",85:"NUMBER",86:"BOOLEAN",87:"UNDEFINED",88:"NULL",89:"DATA",92:"SEP",93:"PRIVATE_SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,3],[8,5],[8,5],[11,5],[12,3],[60,5],[50,1],[50,1],[64,1],[64,1],[66,3],[66,5],[49,1],[72,3],[65,3],[78,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[83,2],[91,1],[91,1],[82,3],[82,1],[90,3],[90,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[51,0],[51,2],[52,0],[52,1],[54,0],[54,2],[55,0],[55,1],[58,0],[58,2],[59,0],[59,1],[62,0],[62,2],[63,0],[63,1],[69,0],[69,2],[70,0],[70,1],[71,1],[71,
Line truncated
|
||||
`+x.showPosition()+`
|
||||
Expecting `+Qt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":De="Parse error on line "+(Z+1)+": Unexpected "+(L==Cr?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(De,{text:x.match,token:this.terminals_[L]||L,line:x.yylineno,loc:Ce,expected:Qt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+L);switch(q[0]){case 1:y.push(L),w.push(x.yytext),l.push(x.yylloc),y.push(q[1]),L=null,_e?(L=_e,_e=null):(Lt=x.yyleng,u=x.yytext,Z=x.yylineno,Ce=x.yylloc,Pr>0&&Pr--);break;case 2:if(j=this.productions_[q[1]][1],St.$=w[w.length-j],St._$={first_line:l[l.length-(j||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(j||1)].first_column,last_column:l[l.length-1].last_column},Hn&&(St._$.range=[l[l.length-(j||1)].range[0],l[l.length-1].range[1]]),Le=this.performAction.apply(St,[u,Lt,Z,ot.yy,q[1],w,l].concat(Fn)),typeof Le<"u")return Le;j&&(y=y.slice(0,-1*j*2),w=w.slice(0,-1*j),l=l.slice(0,-1*j)),y.push(this.productions_[q[1]][0]),w.push(St.$),l.push(St._$),_r=yt[y[y.length-2]][y[y.length-1]],y.push(_r);break;case 3:return!0}}return!0}},qn=(function(){var X={EOF:1,parseError:function(S,y){if(this.yy.parser)this.yy.parser.parseError(S,y);else throw new Error(S)},setInput:function(b,S){return this.yy=S||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var S=b.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},unput:function(b){var S=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(b){this.unput(this.match.slice(b))},pastInput:function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var b=this.pastInput(),S=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
||||
`+S+"^"},test_match:function(b,S){var y,m,w;if(this.options.backtrack_lexer&&(w={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(w.yylloc.range=this.yylloc.range.slice(0))),m=b[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],y=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var l in w)this[l]=w[l];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,S,y,m;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),l=0;l<w.length;l++)if(y=this._input.match(this.rules[w[l]]),y&&(!S||y[0].length>S[0].length)){if(S=y,m=l,this.options.backtrack_lexer){if(b=this.test_match(y,w[l]),b!==!1)return b;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(b=this.test_match(S,w[m]),b!==!1?b:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(S,y,m,w){function l(u,Z){return y.yytext=y.yytext.substring(u,y.yyleng-Z+u)}var yt=w;switch(m){case 0:if(y.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):y.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),y.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),18);case 5:return 15;case 6:return this.popState(),14;break;case 7:return 67;case 8:return 68;case 9:if(S.syntax.square==="string")this.unput(y.yytext),this.begin("escl");else return 75;break;case 10:return 77;case 11:return 19;case 12:return this.popState(),this.begin("raw"),23;break;case 13:return 57;case 14:return 61;case 15:return 29;case 16:return 47;case 17:return this.popState(),44;break;case 18:return this.popState(),44;break;case 19:return 34;case 20:return 39;case 21:return 53;case 22:return 48;case 23:this.unput(y.yytext),this.popState(),this.begin("com");break;case 24:return this.popState(),14;break;case 25:return 48;case 26:return 74;case 27:return 73;case 28:return 73;case 29:return 93;case 30:return 92;case 31:break;case 32:return this.popState(),56;break;case 33:return this.popState(),33;break;case 34:return y.yytext=l(1,2).replace(/\\"/g,'"'),84;break;case 35:return y.yytext=l(1,2).replace(/\\'/g,"'"),84;break;case 36:return 89;case 37:return 86;case 38:return 86;case 39:return 87;case 40:return 88;case 41:return 85;case 42:return 79;case 43:return 81;case 44:return 73;case 45:return y.yytext=y.yytext.replace(/\\([\\\]])/g,"$1"),this.popState(),73;break;case 46:return"INVALID";case 47:return 5}},rules:[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)\]|])))/,/^(?:\.#)/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)\]])))/,/^(?:false(?=([~}\s)\]])))/,/^(?:undefined(?=([~}\s)\]])))/,/^(?:null(?=([~}\s)\]])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],conditions:{mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},escl:{rules:[45],inclusive:!1},INITIAL:{rules:[0,1,47],inclusive:!0}}};return X})();Ne.lexer=qn;function Ae(){this.yy={}}return Ae.prototype=Ne,Ne.Parser=Ae,new Ae})(),Vt=us;var Ye=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Ge(e,t){var r=t&&t.loc,s,n,i,a;r&&(s=r.start.line,n=r.end.line,i=r.start.column,a=r.end.column,e+=" - "+s+":"+i);for(var o=Error.prototype.constructor.call(this,e),c=0;c<Ye.length;c++)this[Ye[c]]=o[Ye[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Ge);try{r&&(this.lineNumber=s,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=i,this.endColumn=a))}catch{}}Ge.prototype=new Error;var tt=Ge;function le(){this.parents=[]}le.prototype={constructor:le,mutating:!1,acceptKey:function(e,t){var r=this.accept(e[t]);if(this.mutating){if(r&&!le.prototype[r.type])throw new tt('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new tt(e.type+" requires "+t)},acceptArray:function(e){for(var t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
`)}var Xe=(function(){function e(t,r,s){s===void 0&&(s="precompile"),this.delegate=t,this.entityParser=r,this.mode=s,this.state="beforeData",this.line=-1,this.column=-1,this.input="",this.index=-1,this.tagNameBuffer="",this.states={beforeData:function(){var n=this.peek();if(n==="<"&&!this.isIgnoredEndTag())this.transitionTo("tagOpen"),this.markTagStart(),this.consume();else{if(this.mode==="precompile"&&n===`
|
||||
`){var i=this.tagNameBuffer.toLowerCase();(i==="pre"||i==="textarea")&&this.consume()}this.transitionTo("data"),this.delegate.beginData()}},data:function(){var n=this.peek(),i=this.tagNameBuffer;n==="<"&&!this.isIgnoredEndTag()?(this.delegate.finishData(),this.transitionTo("tagOpen"),this.markTagStart(),this.consume()):n==="&"&&i!=="script"&&i!=="style"?(this.consume(),this.delegate.appendToData(this.consumeCharRef()||"&")):(this.consume(),this.delegate.appendToData(n))},tagOpen:function(){var n=this.consume();n==="!"?this.transitionTo("markupDeclarationOpen"):n==="/"?this.transitionTo("endTagOpen"):(n==="@"||n===":"||Jr(n))&&(this.transitionTo("tagName"),this.tagNameBuffer="",this.delegate.beginStartTag(),this.appendToTagName(n))},markupDeclarationOpen:function(){var n=this.consume();if(n==="-"&&this.peek()==="-")this.consume(),this.transitionTo("commentStart"),this.delegate.beginComment();else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+6).toUpperCase();i==="DOCTYPE"&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.transitionTo("doctype"),this.delegate.beginDoctype&&this.delegate.beginDoctype())}},doctype:function(){var n=this.consume();_(n)&&this.transitionTo("beforeDoctypeName")},beforeDoctypeName:function(){var n=this.consume();_(n)||(this.transitionTo("doctypeName"),this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase()))},doctypeName:function(){var n=this.consume();_(n)?this.transitionTo("afterDoctypeName"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeName&&this.delegate.appendToDoctypeName(n.toLowerCase())},afterDoctypeName:function(){var n=this.consume();if(!_(n))if(n===">")this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData");else{var i=n.toUpperCase()+this.input.substring(this.index,this.index+5).toUpperCase(),a=i.toUpperCase()==="PUBLIC",o=i.toUpperCase()==="SYSTEM";(a||o)&&(this.consume(),this.consume(),this.consume(),this.consume(),this.consume(),this.consume()),a?this.transitionTo("afterDoctypePublicKeyword"):o&&this.transitionTo("afterDoctypeSystemKeyword")}},afterDoctypePublicKeyword:function(){var n=this.peek();_(n)?(this.transitionTo("beforeDoctypePublicIdentifier"),this.consume()):n==='"'?(this.transitionTo("doctypePublicIdentifierDoubleQuoted"),this.consume()):n==="'"?(this.transitionTo("doctypePublicIdentifierSingleQuoted"),this.consume()):n===">"&&(this.consume(),this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},doctypePublicIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},doctypePublicIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypePublicIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypePublicIdentifier&&this.delegate.appendToDoctypePublicIdentifier(n)},afterDoctypePublicIdentifier:function(){var n=this.consume();_(n)?this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted")},betweenDoctypePublicAndSystemIdentifiers:function(){var n=this.consume();_(n)||(n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):n==='"'?this.transitionTo("doctypeSystemIdentifierDoubleQuoted"):n==="'"&&this.transitionTo("doctypeSystemIdentifierSingleQuoted"))},doctypeSystemIdentifierDoubleQuoted:function(){var n=this.consume();n==='"'?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},doctypeSystemIdentifierSingleQuoted:function(){var n=this.consume();n==="'"?this.transitionTo("afterDoctypeSystemIdentifier"):n===">"?(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData")):this.delegate.appendToDoctypeSystemIdentifier&&this.delegate.appendToDoctypeSystemIdentifier(n)},afterDoctypeSystemIdentifier:function(){var n=this.consume();_(n)||n===">"&&(this.delegate.endDoctype&&this.delegate.endDoctype(),this.transitionTo("beforeData"))},commentStart:function(){var n=this.consume();n==="-"?this.transitionTo("commentStartDash"):n===">"?(this.delegate.finishComment(),this.transitionTo("beforeData")):(this.delegate.appendToCommentData(n),this.transitionTo("comment"))},commentStartDash:function(){var n=this.consum
Line truncated
|
||||
`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var r=this.input.slice(this.index,t),s=this.entityParser.parse(r);if(s){for(var n=r.length;n;)this.consume(),n--;return this.consume(),s}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!=="</title>"||t==="style"&&this.input.substring(this.index,this.index+8)!=="</style>"||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e})(),ho=(function(){function e(t,r){r===void 0&&(r={}),this.options=r,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new Xe(this,t,r.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var r=0;r<arguments.length;r++)if(t.type===arguments[r])return t;throw new Error("token type was unexpectedly "+t.type)},e.prototype.push=function(t){this.token=t,this.tokens.push(t)},e.prototype.currentAttribute=function(){return this._currentAttribute},e.prototype.addLocInfo=function(){this.options.loc&&(this.current().loc={start:{line:this.startLine,column:this.startColumn},end:{line:this.tokenizer.line,column:this.tokenizer.column}}),this.startLine=this.tokenizer.line,this.startColumn=this.tokenizer.column},e.prototype.beginDoctype=function(){this.push({type:"Doctype",name:""})},e.prototype.appendToDoctypeName=function(t){this.current("Doctype").name+=t},e.prototype.appendToDoctypePublicIdentifier=function(t){var r=this.current("Doctype");r.publicIdentifier===void 0?r.publicIdentifier=t:r.publicIdentifier+=t},e.prototype.appendToDoctypeSystemIdentifier=function(t){var r=this.current("Doctype");r.systemIdentifier===void 0?r.systemIdentifier=t:r.systemIdentifier+=t},e.prototype.endDoctype=function(){this.addLocInfo()},e.prototype.beginData=function(){this.push({type:"Chars",chars:""})},e.prototype.appendToData=function(t){this.current("Chars").chars+=t},e.prototype.finishData=function(){this.addLocInfo()},e.prototype.beginComment=function(){this.push({type:"Comment",chars:""})},e.prototype.appendToCommentData=function(t){this.current("Comment").chars+=t},e.prototype.finishComment=function(){this.addLocInfo()},e.prototype.tagOpen=function(){},e.prototype.beginStartTag=function(){this.push({type:"StartTag",tagName:"",attributes:[],selfClosing:!1})},e.prototype.beginEndTag=function(){this.push({type:"EndTag",tagName:""})},e.prototype.finishTag=function(){this.addLocInfo()},e.prototype.markTagAsSelfClosing=function(){this.current("StartTag").selfClosing=!0},e.prototype.appendToTagName=function(t){this.current("StartTag","EndTag").tagName+=t},e.prototype.beginAttribute=function(){this._currentAttribute=["","",!1]},e.prototype.appendToAttributeName=function(t){this.currentAttribute()[0]+=t},e.prototype.beginAttributeValue=function(t){this.currentAttribute()[2]=t},e.prototype.appendToAttributeValue=function(t){this.currentAttribute()[1]+=t},e.prototype.finishAttributeValue=function(){this.current("StartTag").attributes.push(this._currentAttribute)},e.prototype.reportSyntaxError=function(t){this.current().syntaxError=t},e})();var pe={Append:1,TrustingAppend:2,Comment:3,Modifier:4,StrictModifier:5,Block:6,StrictBlock:7,Component:8,OpenElement:10,OpenElementWithSplat:11,FlushElement:12,CloseElement:13,StaticAttr:14,DynamicAttr:15,ComponentAttr:16,AttrSplat:17,Yield:18,DynamicArg:20,StaticArg:21,TrustingDynamicAttr:22,TrustingComponentAttr:23,StaticComponentAttr:24,Debugger:26,Undefined:27,Call:28,Concat:29,GetSymbol:30,GetLexicalSymbol:32,GetStrictKeyword:31,GetFreeAsComponentOrHelperHead:35,GetFreeAsHelperHead:37,GetFreeAsModifierHead:38,GetFreeAsComponentHead:39,InElement:40,If:41,Each:42,Let:44,WithDynamicVars:45,InvokeComponent:46,HasBlock:48,HasBlockParams:49,Curry:50,Not:51,IfInline:52,GetDynamicVar:53,Log:54};function Xr(e){return function(t){return Array.isArray(t)&&t[0]===e}}var fo=Xr(pe.FlushElement);var mo=Xr(pe.GetSymbol);var _s=!1,Ls=/["\x26\xa0]/u,wo=new RegExp(Ls.source,"gu"),Ds=/[&<>\xa0]/u,To=new RegExp(Ds.source,"gu");var de=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function on(){return[...de]}function Os(e){return de.has(e.toLowerCase())&&e[0]?.toLowerCase()===e[0]}function Y
Line truncated
|
||||
`,s);if(t<=n||n===-1)return{line:r+1,column:t-s};r+=1,s=n+1}}charPosFor(t){let{line:r,column:s}=t,n=this.source.length,i=0,a=0;for(;a<n;){let o=this.source.indexOf(`
|
||||
`,a);if(o===-1&&(o=this.source.length),i===r-1){if(a+s>o)return o;if(_s){let c=this.hbsPosFor(a+s);c.line,c.column}return a+s}if(o===-1)return 0;i+=1,a=o+1}return n}};function k(e,t){let{module:r,loc:s}=t,{line:n,column:i}=s.start,a=t.asString(),o=a?`
|
||||
|
||||
|
|
||||
| ${a.split(`
|
||||
`).join(`
|
||||
| `)}
|
||||
|
|
||||
|
||||
`:"",c=new Error(`${e}: ${o}(error occurred in '${r}' @ line ${n} : column ${i})`);return c.name="SyntaxError",c.location=t,c.code=a,c}var be={Template:["body"],Block:["body"],MustacheStatement:["path","params","hash"],BlockStatement:["path","params","hash","program","inverse"],ElementModifierStatement:["path","params","hash"],CommentStatement:[],MustacheCommentStatement:[],ElementNode:["attributes","modifiers","children","comments"],AttrNode:["value"],TextNode:[],ConcatStatement:["parts"],SubExpression:["path","params","hash"],PathExpression:[],StringLiteral:[],BooleanLiteral:[],NumberLiteral:[],NullLiteral:[],UndefinedLiteral:[],Hash:["pairs"],HashPair:["value"]},mr=(function(){function e(t,r,s,n){let i=Error.call(this,t);this.key=n,this.message=t,this.node=r,this.parent=s,i.stack&&(this.stack=i.stack)}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e})();function Zr(e,t,r){return new mr("Cannot remove a node unless it is part of an array",e,t,r)}function qs(e,t,r){return new mr("Cannot replace a node with multiple nodes unless it is part of an array",e,t,r)}function tn(e,t){return new mr("Replacing and removing in key handlers is not yet supported.",e,null,t)}var Ct=class{constructor(t,r=null,s=null){this.node=t,this.parent=r,this.parentKey=s}get parentNode(){return this.parent?this.parent.node:null}parents(){return{[Symbol.iterator]:()=>new lr(this)}}},lr=class{constructor(t){this.path=t}next(){return this.path.parent?(this.path=this.path.parent,{done:!1,value:this.path}):{done:!0,value:null}}};function cn(e){return typeof e=="function"?e:e.enter}function un(e){return typeof e=="function"?void 0:e.exit}function ye(e,t){let r,s,n,{node:i,parent:a,parentKey:o}=t,c=(function(h,f){if(h.Program&&(f==="Template"&&!h.Template||f==="Block"&&!h.Block))return h.Program;let p=h[f];return p!==void 0?p:h.All})(e,i.type);if(c!==void 0&&(r=cn(c),s=un(c)),r!==void 0&&(n=r(i,t)),n!=null){if(JSON.stringify(i)!==JSON.stringify(n))return Array.isArray(n)?(hn(e,n,a,o),n):ye(e,new Ct(n,a,o))||n;n=void 0}if(n===void 0){let h=be[i.type];for(let f=0;f<h.length;f++)Vs(e,c,t,h[f]);s!==void 0&&(n=s(i,t))}return n}function en(e,t,r){e[t]=r}function Vs(e,t,r,s){let n,i,{node:a}=r,o=(function(c,h){return c[h]})(a,s);if(o){if(t!==void 0){let c=(function(h,f){let p=typeof h!="function"?h.keys:void 0;if(p===void 0)return;let g=p[f];return g!==void 0?g:p.All})(t,s);c!==void 0&&(n=cn(c),i=un(c))}if(n!==void 0&&n(a,s)!==void 0)throw tn(a,s);if(Array.isArray(o))hn(e,o,r,s);else{let c=ye(e,new Ct(o,r,s));c!==void 0&&(function(h,f,p,g){if(g===null)throw Zr(p,h,f);if(Array.isArray(g)){if(g.length!==1)throw g.length===0?Zr(p,h,f):qs(p,h,f);en(h,f,g[0])}else en(h,f,g)})(a,s,o,c)}if(i!==void 0&&i(a,s)!==void 0)throw tn(a,s)}}function hn(e,t,r,s){for(let n=0;n<t.length;n++){let i=t[n],a=ye(e,new Ct(i,r,s));a!==void 0&&(n+=Fs(t,n,a)-1)}}function Fs(e,t,r){return r===null?(e.splice(t,1),0):Array.isArray(r)?(e.splice(t,1,...r),r.length):(e.splice(t,1,r),1)}function Hs(e,t){ye(t,new Ct(e))}function At(e,t){(function(r){switch(r.type){case"Block":case"Template":return r.body;case"ElementNode":return r.children}})(e).push(t)}function pn(e){return e.type==="StringLiteral"||e.type==="BooleanLiteral"||e.type==="NumberLiteral"||e.type==="NullLiteral"||e.type==="UndefinedLiteral"}var Ze;function tr(){return Ze||(Ze=new ft("","(synthetic)")),Ze}function rn(e,t){return d.var({name:e,loc:v(t||null)})}function rt(e,t){let r=v(t||null);if(typeof e!="string"){if("type"in e)return e;{e.head.indexOf(".");let{head:i,tail:a}=e;return d.path({head:d.head({original:i,loc:r.sliceStartChars({chars:i.length})}),tail:a,loc:v(t||null)})}}let{head:s,tail:n}=(function(i,a){let[o,...c]=i.split("."),h=d.head({original:o,loc:v(a||null)});return d.path({head:h,tail:c,loc:v(a||null)})})(e,r);return d.path({head:s,tail:n,loc:r})}function me(e,t,r){return d.literal({type:e,value:t,loc:v(r||null)})}function Ht(e=[],t){return d.hash({pairs:e,loc:v(t||null)})}function fn(e){return e.map((t=>typeof t=="string"?d.var({name:t,loc:A.synthetic(t)}):t))}function nn(e=[],t=[],r=!1,s){return d.blockItself({body:e,params:fn(t),chained:r,loc:v(s||null)})}function sn(e=[],t=[],r){return d.template({body:e,blockParams:t,loc:v(r||null)})}function v(...e){if(e.length===1){let t=e[0];return t&&typeof t=="object"?A.forHbsLoc(tr(),t):A.forHbsLoc(tr(),Bs)}{let[t,r,s,n,i]=e,a=i?new ft("",i):tr();return A.forHbsLoc(a,{start:{line:t,column:r},end:{line:s||t,column:n||r}})}}var Us={mustache:function(e,t=[],r=Ht([]),s=!1,n,i){return d.mustache({path:rt(e),params:t,hash:r,trusting:s,strip:i,loc:v(n||null)})},block:function(e,t,r,s,n=null,i,a,o,c){let h,f=null;return h=s.type==="Template"?d.blockItself({params:fn(s.blockParams),body:s.body,loc:s.loc}):s,n?.type==="Template"?(n.blockParams.length,f=d.blockItself({params:[],body:n.body,loc:n.loc})):f=n,d.block({path:rt(e),params:t||[],hash:r||Ht([]),defaultBlock:h,elseBlock:f,loc:v(i||null),openStrip:a,inverseStrip:o,closeStrip:c})},c
Line truncated
|
||||
`)}},ur=class extends cr{parse(t,r){t.loc;let s=d.template({body:[],blockParams:r,loc:this.source.spanFor(t.loc)}),n=this.parseProgram(s,t);return this.pendingError?.eof(n.loc.getEnd()),n}Program(t,r){t.loc;let s=d.blockItself({body:[],params:r,chained:t.chained,loc:this.source.spanFor(t.loc)});return this.parseProgram(s,t)}parseProgram(t,r){if(r.body.length===0)return t;let s;try{this.elementStack.push(t);for(let n of r.body)this.acceptNode(n)}finally{s=this.elementStack.pop()}if(t!==s){if(s?.type==="ElementNode")throw k(`Unclosed element \`${s.tag}\``,s.loc);t.type}return t}BlockStatement(t){if(this.tokenizer.state==="comment")return t.loc,void this.appendToCommentData(this.sourceForNode(t));if(this.tokenizer.state!=="data"&&this.tokenizer.state!=="beforeData")throw k("A block may only be used inside an HTML element or another block.",this.source.spanFor(t.loc));let{path:r,params:s,hash:n}=rr(this,t),i=this.source.spanFor(t.loc),a,o=[];if(t.program.blockParams?.length){let p=n.loc.collapse("end");p=t.program.loc?p.withEnd(this.source.spanFor(t.program.loc).getStart()):t.program.body[0]?p.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()):p.withEnd(i.getEnd()),a=an(this.source,t,p);let g=p.asString(),E=g.indexOf("|")+1,T=g.indexOf("|",E);for(let D of t.program.blockParams){let B,O;B=E>=T?-1:g.indexOf(D,E),B===-1||B+D.length>T?(E=T,O=this.source.spanFor(sr)):(E=B,O=p.sliceStartChars({skipStart:E,chars:D.length}),E+=D.length),o.push(d.var({name:D,loc:O}))}}else a=an(this.source,t,i);let c=this.Program(a.program,o),h=a.inverse?this.Program(a.inverse,[]):null,f=d.block({path:r,params:s,hash:n,defaultBlock:c,elseBlock:h,loc:this.source.spanFor(t.loc),openStrip:t.openStrip,inverseStrip:t.inverseStrip,closeStrip:t.closeStrip});At(this.currentElement(),f)}MustacheStatement(t){this.pendingError?.mustache(this.source.spanFor(t.loc));let{tokenizer:r}=this;if(r.state==="comment")return void this.appendToCommentData(this.sourceForNode(t));let s,{escaped:n,loc:i,strip:a}=t;if("original"in t.path&&t.path.original==="...attributes")throw k("Illegal use of ...attributes",this.source.spanFor(t.loc));if(pn(t.path))s=d.mustache({path:this.acceptNode(t.path),params:[],hash:d.hash({pairs:[],loc:this.source.spanFor(t.path.loc).collapse("end")}),trusting:!n,loc:this.source.spanFor(i),strip:a});else{let{path:o,params:c,hash:h}=rr(this,t);s=d.mustache({path:o,params:c,hash:h,trusting:!n,loc:this.source.spanFor(i),strip:a})}switch(r.state){case"tagOpen":case"tagName":throw k("Cannot use mustaches in an elements tagname",s.loc);case"beforeAttributeName":nr(this.currentStartTag,s);break;case"attributeName":case"afterAttributeName":this.beginAttributeValue(!1),this.finishAttributeValue(),nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"afterAttributeValueQuoted":nr(this.currentStartTag,s),r.transitionTo("beforeAttributeName");break;case"beforeAttributeValue":this.beginAttributeValue(!1),this.appendDynamicAttributeValuePart(s),r.transitionTo("attributeValueUnquoted");break;case"attributeValueDoubleQuoted":case"attributeValueSingleQuoted":case"attributeValueUnquoted":this.appendDynamicAttributeValuePart(s);break;default:At(this.currentElement(),s)}return s}appendDynamicAttributeValuePart(t){this.finalizeTextPart();let r=this.currentAttr;r.isDynamic=!0,r.parts.push(t)}finalizeTextPart(){let t=this.currentAttr.currentPart;t!==null&&(this.currentAttr.parts.push(t),this.startTextPart())}startTextPart(){this.currentAttr.currentPart=null}ContentStatement(t){(function(r,s){let n=s.loc.start.line,i=s.loc.start.column,a=(function(o,c){if(c==="")return{lines:o.split(`
|
||||
`).length-1,columns:0};let[h]=o.split(c),f=h.split(/\n/u),p=f.length-1;return{lines:p,columns:f[p].length}})(s.original,s.value);n+=a.lines,a.lines?i=a.columns:i+=a.columns,r.line=n,r.column=i})(this.tokenizer,t),this.tokenizer.tokenizePart(t.value),this.tokenizer.flushData()}CommentStatement(t){let{tokenizer:r}=this;if(r.state==="comment")return this.appendToCommentData(this.sourceForNode(t)),null;let{value:s,loc:n}=t,i=d.mustacheComment({value:s,loc:this.source.spanFor(n)});switch(r.state){case"beforeAttributeName":case"afterAttributeName":this.currentStartTag.comments.push(i);break;case"beforeData":case"data":At(this.currentElement(),i);break;default:throw k(`Using a Handlebars comment when in the \`${r.state}\` state is not supported`,this.source.spanFor(t.loc))}return i}PartialStatement(t){throw k("Handlebars partials are not supported",this.source.spanFor(t.loc))}PartialBlockStatement(t){throw k("Handlebars partial blocks are not supported",this.source.spanFor(t.loc))}Decorator(t){throw k("Handlebars decorators are not supported",this.source.spanFor(t.loc))}DecoratorBlock(t){throw k("Handlebars decorator blocks are not supported",this.source.spanFor(t.loc))}SubExpression(t){let{path:r,params:s,hash:n}=rr(this,t);return d.sexpr({path:r,params:s,hash:n,loc:this.source.spanFor(t.loc)})}PathExpression(t){let{original:r}=t,s;if(r.indexOf("/")!==-1){if(r.slice(0,2)==="./")throw k('Using "./" is not supported in Glimmer and unnecessary',this.source.spanFor(t.loc));if(r.slice(0,3)==="../")throw k('Changing context using "../" is not supported in Glimmer',this.source.spanFor(t.loc));if(r.indexOf(".")!==-1)throw k("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths",this.source.spanFor(t.loc));s=[t.parts.join("/")]}else{if(r===".")throw k("'.' is not a supported path in Glimmer; check for a path with a trailing '.'",this.source.spanFor(t.loc));s=t.parts}let n,i=!1;if(/^this(?:\..+)?$/u.test(r)&&(i=!0),i)n=d.this({loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+4}})});else if(t.data){let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.",this.source.spanFor(t.loc));n=d.atName({name:`@${a}`,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length+1}})})}else{let a=s.shift();if(a===void 0)throw k("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.",this.source.spanFor(t.loc));n=d.var({name:a,loc:this.source.spanFor({start:t.loc.start,end:{line:t.loc.start.line,column:t.loc.start.column+a.length}})})}return d.path({head:n,tail:s,loc:this.source.spanFor(t.loc)})}Hash(t){let r=t.pairs.map((s=>d.pair({key:s.key,value:this.acceptNode(s.value),loc:this.source.spanFor(s.loc)})));return d.hash({pairs:r,loc:this.source.spanFor(t.loc)})}StringLiteral(t){return d.literal({type:"StringLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}BooleanLiteral(t){return d.literal({type:"BooleanLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}NumberLiteral(t){return d.literal({type:"NumberLiteral",value:t.value,loc:this.source.spanFor(t.loc)})}UndefinedLiteral(t){return d.literal({type:"UndefinedLiteral",value:void 0,loc:this.source.spanFor(t.loc)})}NullLiteral(t){return d.literal({type:"NullLiteral",value:null,loc:this.source.spanFor(t.loc)})}constructor(...t){super(...t),this.pendingError=null}};function rr(e,t){let r;switch(t.path.type){case"PathExpression":r=e.PathExpression(t.path);break;case"SubExpression":r=e.SubExpression(t.path);break;case"StringLiteral":case"UndefinedLiteral":case"NullLiteral":case"NumberLiteral":case"BooleanLiteral":{let i;throw i=t.path.type==="BooleanLiteral"?t.path.original.toString():t.path.type==="StringLiteral"?`"${t.path.original}"`:t.path.type==="NullLiteral"?"null":t.path.type==="NumberLiteral"?t.path.value.toString():"undefined",k(`${t.path.type} "${t.path.type==="StringLiteral"?t.path.original:i}" cannot be called as a sub-expression, replace (${i}) with ${i}`,e.source.spanFor(t.path.loc))}}let s=t.params.map((i=>e.acceptNode(i))),n=Yt(s)?fr(s).loc:r.loc;return{path:r,params:s,hash:t.hash?e.Hash(t.hash):d.hash({pairs:[],loc:e.source.spanFor(n).collapse("end")})}}function nr(e,t){let{path:r,params:s,hash:n,loc:i}=t;if(pn(r)){let o=`{{${(function(c){return c.type==="UndefinedLiteral"?"undefined":JSON.stringify(c.value)})(r)}}}`;throw k(`In <${e.name} ... ${o} ..., ${o} is not a valid modifier`,t.loc)}let a=d.elementModifier({path:r,params:s,hash:n,loc:i});e.modifiers.push(a)}function an(e,t,r){if(!t.program.loc){let n=V(0,t.program.body,0),i=V(0,t.program.body,-1);if(n&&i)t.program.loc={...n.loc,end:i.loc.end};else{let a=e.spanFor(t.loc);t.program.loc=r.withEnd(a.getEnd())}}let s=e.spanFor(t.program.loc).getEnd();return t.inverse&&!t.inverse.loc&&(t.inverse.loc=s.collapsed()),t}function Nt(e){return/[\t\n\f ]/u.test(e)}Line truncated
|
||||
`?s?s.loc.getEnd():this.currentAttr.valueSpan.getStart():i.move(-1),this.currentAttr.currentPart=d.text({chars:t,loc:i.collapsed()})}}finishAttributeValue(){this.finalizeTextPart();let t=this.currentTag,r=this.offset();if(t.type==="EndTag")throw k("Invalid end tag: closing tag must not have attributes",this.source.spanFor({start:t.start.toJSON(),end:r.toJSON()}));let{name:s,parts:n,start:i,isQuoted:a,isDynamic:o,valueSpan:c}=this.currentAttr;if(s.startsWith("|")&&n.length===0&&!a&&!o)throw k("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword",i.until(i.move(s.length)));let h=this.assembleAttributeValue(n,a,o,i.until(r));h.loc=c.withEnd(r);let f=d.attr({name:s,value:h,loc:i.until(r)});this.currentStartTag.attributes.push(f)}parsePossibleBlockParams(){let t=/[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;this.tokenizer.state;let r=this.currentStartTag,s=this.currentAttr,n={state:"PossibleAs"},i={PossibleAs:o=>{if(n.state,Nt(o))n={state:"BeforeStartPipe"},this.tokenizer.transitionTo("afterAttributeName"),this.tokenizer.consume();else{if(o==="|")throw k('Invalid block parameters syntax: expecting at least one space character between "as" and "|"',s.start.until(this.offset().move(1)));n={state:"Done"}}},BeforeStartPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o==="|"?(n={state:"BeforeBlockParamName"},this.tokenizer.transitionTo("beforeAttributeName"),this.tokenizer.consume()):n={state:"Done"}},BeforeBlockParamName:o=>{if(n.state,Nt(o))this.tokenizer.consume();else if(o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"){if(r.params.length===0)throw k("Invalid block parameters syntax: empty parameters list, expecting at least one identifier",s.start.until(this.offset().move(1)));n={state:"AfterEndPipe"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n={state:"BlockParamName",name:o,start:this.offset()},this.tokenizer.consume()}},BlockParamName:o=>{if(n.state,o==="")n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: mustaches cannot be used inside parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}};else if(o==="|"||Nt(o)){let c=n.start.until(this.offset());if(n.name==="this"||t.test(n.name))throw k(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``,c);r.params.push(d.var({name:n.name,loc:c})),n=o==="|"?{state:"AfterEndPipe"}:{state:"BeforeBlockParamName"},this.tokenizer.consume()}else{if(o===">"||o==="/")throw k('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely',s.start.until(this.offset().move(1)));n.name+=o,this.tokenizer.consume()}},AfterEndPipe:o=>{n.state,Nt(o)?this.tokenizer.consume():o===""?(n={state:"Done"},this.pendingError={mustache(c){throw k("Invalid block parameters syntax: modifiers cannot follow parameters list",c)},eof(c){throw k('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',s.start.until(c))}}):o===">"||o==="/"?n={state:"Done"}:(n={state:"Error",message:'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list',start:this.offset()},this.tokenizer.consume())},Error:o=>{if(n.state,o===""||o==="/"||o===">"||Nt(o))throw k(n.message,n.start.until(this.offset()));this.tokenizer.consume()},Done:()=>{}},a;do a=this.tokenizer.peek(),i[n.state](a);while(n.state!=="Done"&&a!=="");n.state}reportSyntaxError(t){throw k(t,this.offset().collapsed())}assembleConcatenatedValue(t){let r=Is(t),s=fr(t);return d.concat({parts:t,loc:this.source.spanFor(r.loc).extend(this.source.spanFor(s.loc))})}validateEndTag(t,r,s){if(de.has(t.name)&&!s)throw k(`<${t.name}> elements do not need end tags. You should remove it`,t.loc);if(r.type!=="ElementNode")throw k(`Closing tag </${t.name}> without an open tag`,t.loc);if(r.tag!==t.name)throw k(`Closing tag </${t.name}> did not match last open tag <${r.tag}> (on line ${r.loc.startPosition.line})`,t.loc)}assembleAttributeValue(t,r,s,n){if(s){if(r)return this.assembleConcatenatedValue(t);{let[i,a]=t;if(a===void 0||a.type==="TextNode"&&a.chars==="/")return i;throw k("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'",n)}}return Yt(t)?t[0]:d.text({chars:"",loc:n})}constructor(...t){super(...t),this.tagOpenLine=0,this.tagOpenColumn=0}},Ms={},pr=class extends $e{constructor(){super({})}parse(){}};function mn(e,t={}){let r,s,n,i=t.mode||"precompile";typeLine truncated
|
||||
`).length-1}function ai(e){e=typeof e=="string"?e:"";let t=(e.match(/^([^\S\n\r]*[\n\r])+/g)||[])[0]||"";return _t(t)}function oi(e){e=typeof e=="string"?e:"";let t=(e.match(/([\n\r][^\S\n\r]*)+$/g)||[])[0]||"";return _t(t)}function Kt(e=0){return Array.from({length:Math.min(e,xn)},()=>ht)}function li(e,t){let{node:{value:r}}=e,s=oe(r,ci(e)?!t.singleQuote:t.singleQuote);return[s,ct(0,r,s,`\\${s}`),s]}function ci(e){let{ancestors:t}=e,r=t.findIndex(s=>s.type!=="SubExpression");return r!==-1&&t[r+1].type==="ConcatStatement"&&t[r+2].type==="AttrNode"}function ui(e,t){let r=br(e,t),s=ve(e,t);return s?F([r,N,I(s)]):r}function Tn(e,t){let r=br(e,t),s=ve(e,t);return s?[F([r,N,s]),H]:r}function br(e,t){return t("path")}function ve(e,t){let{node:r}=e,s=[];return r.params.length>0&&s.push(...e.map(t,"params")),r.hash?.pairs.length>0&&s.push(t("hash")),s.length===0?"":ut(N,s)}function yr(e){return["as |",e.blockParams.join(" "),"|"]}var hi=new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"),pi=new Set(["true","false","null","undefined"]),fi=(e,t)=>t===0&&e.startsWith("@")?!1:t!==0&&pi.has(e)||/\s/.test(e)||/^\d/.test(e)||Array.prototype.some.call(e,r=>hi.has(r));function mi(e){return e.tail.length===0&&e.original.includes("/")?e.original:[e.head.original,...e.tail].map((r,s)=>fi(r,s)?`[${r}]`:r).join(".")}var di={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:js,massageAstNode:dr,hasPrettierIgnore:yn,getVisitorKeys:dn,embed:Hr},_n=di;var Ln=[{name:"Handlebars",type:"markup",aceMode:"handlebars",extensions:[".handlebars",".hbs"],tmScope:"text.html.handlebars",aliases:["hbs","htmlbars"],parsers:["glimmer"],vscodeLanguageIds:["handlebars"],linguistLanguageId:155}];var Sr={};Oe(Sr,{glimmer:()=>Ai});function gi(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}var Dn=gi;function bi(e){return ct(0,e,/[^\n]/g," ")}var On=bi;var In=Symbol.for("PRETTIER_IS_FRONT_MATTER");var Wt=3;function yi(e){let t=e.slice(0,Wt);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Wt);if(r===-1)return;let s=e.slice(Wt,r).trim(),n=e.indexOf(`
|
||||
${t}`,r),i=s;if(i||(i=t==="+++"?"toml":"yaml"),n===-1&&t==="---"&&i==="yaml"&&(n=e.indexOf(`
|
||||
...`,r)),n===-1)return;let a=n+1+Wt,o=e.charAt(a+1);if(!/\s?/.test(o))return;let c=e.slice(0,a),h;return{language:i,explicitLanguage:s||null,value:e.slice(r+1,n),startDelimiter:t,endDelimiter:c.slice(-Wt),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return h??(h=c.split(`
|
||||
`)),h.length},get column(){return h??(h=c.split(`
|
||||
`)),V(0,h,-1).length}},[In]:!0}}function Si(e){let t=yi(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return On(r)+e.slice(r.length)}}:{content:e}}var Bn=Si;function ki(e){let t=e.children??e.body;if(t)for(let r=0;r<t.length-1;r++)t[r].type==="TextNode"&&t[r+1].type==="MustacheStatement"&&(t[r].chars=t[r].chars.replace(/\\$/,"\\\\"))}var Ei=e=>{let{start:t,end:r}=e.loc;t.offset=e.loc.getStart().offset,r.offset=e.loc.getEnd().offset},vi=()=>({name:"glimmerPrettierParsePlugin",visitor:{All(e){Ei(e),ki(e)}}}),wi={mode:"codemod",plugins:{ast:[vi]}};function Ti(e){let{frontMatter:t,content:r}=Bn(e),s;try{s=mn(r,wi)}catch(n){let i=Ni(n);if(i){let a=xi(n);throw Dn(a,{loc:i,cause:n})}throw n}if(t){let n={...t,type:"FrontMatter",loc:{start:{...t.start,offset:t.start.index},end:{...t.end,offset:t.end.index}}};s.body.unshift(n)}return s}function xi(e){let{message:t}=e,r=t.split(`
|
||||
`);return r.length>=4&&/^Parse error on line \d+:$/.test(r[0])&&/^-*\^$/.test(V(0,r,-2))?V(0,r,-1):r.length>=4&&/:\s?$/.test(r[0])&&/^\(error occurred in '.*?' @ line \d+ : column \d+\)$/.test(V(0,r,-1))&&r[1]===""&&V(0,r,-2)===""&&r.slice(2,-2).every(s=>s.startsWith("|"))?r[0].trim().slice(0,-1):t}function Ni(e){let{location:t,hash:r}=e;if(t){let{start:s,end:n}=t;return{start:{line:s.line,column:s.column+1},end:typeof n.line=="number"?{line:n.line,column:n.column+1}:void 0}}if(r){let{loc:{last_line:s,last_column:n}}=r;return{start:{line:s,column:n+1}}}}var Ai={parse:Ti,astFormat:"glimmer",locStart:dt,locEnd:Gt};var Pi={glimmer:_n};export{Rn as default,Ln as languages,Sr as parsers,Pi as printers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
graphql: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
graphql: Printer;
|
||||
};
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var ae=Object.defineProperty;var Et=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var xt=Object.prototype.hasOwnProperty;var ce=(e,t)=>{for(var n in t)ae(e,n,{get:t[n],enumerable:!0})},yt=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Tt(t))!xt.call(e,i)&&i!==n&&ae(e,i,{get:()=>t[i],enumerable:!(r=Et(t,i))||r.enumerable});return e};var Nt=e=>yt(ae({},"__esModule",{value:!0}),e);var li={};ce(li,{languages:()=>$e,options:()=>He,parsers:()=>Ae,printers:()=>ui});var Ie=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);var Dt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},_t=Ie("replaceAll",function(){if(typeof this=="string")return Dt}),X=_t;var At=()=>{},pe=At;var ge="indent";var Se="group";var Oe="if-break";var H="line";var ve="break-parent";var O=pe,J=pe;function m(e){return O(e),{type:ge,contents:e}}var ue={type:ve};function N(e,t={}){return O(e),J(t.expandedStates,!0),{type:Se,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _(e,t="",n={}){return O(e),t!==""&&O(t),{type:Oe,breakContents:e,flatContents:t,groupId:n.groupId}}function d(e,t){O(e),J(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var S={type:H},u={type:H,soft:!0},It={type:H,hard:!0},l=[It,ue];function W(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,a=n;for(;a>=0&&a<s;){let p=t.charAt(a);if(e instanceof RegExp){if(!e.test(p))return a}else if(!e.includes(p))return a;i?a--:a++}return a===-1||a===s?a:!1}}var wi=W(/\s/),z=W(" "),ke=W(",; "),Ce=W(/[^\n\r]/);var Re=e=>e===`
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function gt(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
|
||||
`)return t-2;if(Re(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(Re(i))return t+1}return t}var Z=gt;function St(e,t,n={}){let r=z(e,n.backwards?t-1:t,n),i=Z(e,r,n);return r!==i}var Le=St;var Ot=()=>!0;function vt(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function le(e,t,n={}){let{indent:r=!1,marker:i,filter:s=Ot}=n,a=new Set(e.node?.comments?.filter(x=>!(x.leading||x.trailing||x.marker!==i||!s(x))));if(a.size===0)return"";let p=e.map(({node:x})=>a.has(x)?vt(e,t):"","comments").filter(Boolean),E=d(l,p);return r?m([l,E]):E}function kt(e){return Array.isArray(e)&&e.length>0}var T=kt;var de=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},be=de;var K=null;function j(e){if(K!==null&&typeof K.property){let t=K;return K=j.prototype=null,t}return K=j.prototype=e??Object.create(null),new j}var Ct=10;for(let e=0;e<=Ct;e++)j();function fe(e){return j(e)}function Rt(e,t="type"){fe(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var Fe=Rt;var D=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],Pe={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:D[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:D[1],FragmentArgument:D[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:D[1],Directive:["name","arguments"],NamedType:D[0],ListType:D[2],NonNullType:D[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:D[2],ScalarTypeDefinition:D[3],ObjectTypeDefinition:D[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:D[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:D[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:D[5],ScalarTypeExtension:D[5],ObjectTypeExtension:D[6],InterfaceTypeExtension:D[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};var Lt=Fe(Pe,"kind"),we=Lt;var ee=e=>e.loc.start,te=e=>e.loc.end;function me(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}me.ignoredProperties=new Set(["loc","comments"]);var Ve="format",Me=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Ue=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;var Be=e=>Ue.test(e),Ge=e=>Me.test(e),Ke=e=>`# @${Ve}
|
||||
|
||||
${e}`;function bt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var je=bt;function Ft(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Ce(e,t):t}var Ye=Ft;function Pt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=ke(e,r),r=je(e,r),r=z(e,r);return r=Ye(e,r),r=Z(e,r),r!==!1&&Le(e,r)}var qe=Pt;function I(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&qe(t.originalText,te(s))?[a,l]:a},r)}function he(e,t,n){let{node:r}=e;return T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):""}function A(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(S):i.push(l),i}function y(e,t){let{node:n}=e;if(!T(n.directives))return"";let r=d(S,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?N([S,r]):[" ",N(m([u,r]))]}function Ee(e,t){let{node:n}=e;return T(n.variableDefinitions)?N(["(",m([u,d([_("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function wt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...d(l,I(e,t,n,"definitions")),l];case"OperationDefinition":{let i=t.originalText[ee(r)]!=="{",s=!!r.name;return[A(e,t,n),i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&T(r.variableDefinitions)?" ":"",Ee(e,n),y(e,n),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),Ee(e,n)," on ",n("typeCondition"),y(e,n)," ",n("selectionSet")];case"SelectionSet":return["{",m([l,d(l,I(e,t,n,"selections"))]),l,"}"];case"Field":return N([r.alias?[n("alias"),": "]:"",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=X(0,r.value,'"""','\\"""').split(`
|
||||
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),d(l,['"""',...i,'"""'])}return['"',X(0,X(0,r.value,/["\\]/g,"\\$&"),`
|
||||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":{let i=!T(r.values);return N(["[",le(e,t,{indent:!0}),i?"":m([u,d([_("",", "),u],e.map(n,"values"))]),u,"]"])}case"ObjectValue":{let i=!T(r.fields),s=t.bracketSpacing&&!i?" ":"";return N(["{",s,le(e,t,{indent:!0}),i?"":[m([u,d([_("",", "),u],e.map(n,"fields"))])],u,_("",s),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),he(e,t,n)];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&T(r.interfaces)&&s.push(" implements ",m([N([d([" &",S],e.map(n,"interfaces"))])])),s.push(y(e,n)),T(r.fields)&&s.push([" {",m([l,d(l,I(e,t,n,"fields"))]),l,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",": ",n("type"),y(e,n)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.repeatable?" repeatable":""," on ",...d(" | ",e.map(n,"locations"))];case"DirectiveExtension":return["extend directive @",n("name"),y(e,n)];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n),T(r.values)?[" {",m([l,d(l,I(e,t,n,"values"))]),l,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),y(e,n)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"SchemaExtension":return["extend schema",y(e,n),...T(r.operationTypes)?[" {",m([l,d(l,I(e,t,n,"operationTypes"))]),l,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",y(e,n)," {",T(r.operationTypes)?m([l,d(l,I(e,t,n,"operationTypes"))]):"",l,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),he(e,t,n),y(e,n)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",y(e,n)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return N([A(e,t,n),N([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n),T(r.types)?[" =",_(""," "),m([_([S,"| "]),d([S,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new be(r,"Graphql","kind")}}function Vt(e){return e.kind!=="Comment"}function Mt({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function Ut(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var Bt={print:wt,massageAstNode:me,hasPrettierIgnore:Ut,insertPragma:Ke,printComment:Mt,canAttachComment:Vt,getVisitorKeys:we},Qe=Bt;var $e=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var Xe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Gt={bracketSpacing:Xe.bracketSpacing},He=Gt;var Ae={};ce(Ae,{gra
Line truncated
|
||||
`,v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){let $=Math.floor(E/80),G=E%80,k=[];for(let C=0;C<P.length;C+=80)k.push(P.slice(C,C+80));return x+Ze([[`${a} |`,k[0]],...k.slice(1,$+1).map(C=>["|",C]),["|","^".padStart(G)],["|",k[$+1]]])}return x+Ze([[`${a-1} |`,v[i-1]],[`${a} |`,P],["|","^".padStart(E)],[`${a+1} |`,v[i+1]]])}function Ze(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
||||
`)}var R=class e extends Error{constructor(t,n={}){let{nodes:r,source:i,positions:s,path:a,originalError:p,cause:E,extensions:x}=n,v="cause"in n,P=v?E:p,$=v||p!=null?{cause:P}:void 0;super(t,$),this.name="GraphQLError",this.path=a??void 0;let G=p??(E instanceof Error?E:void 0);this.originalError=G,this.nodes=et(Array.isArray(r)?r:r?[r]:void 0);let k=et(this.nodes?.map(g=>g.loc).filter(g=>g!=null));this.source=i??k?.[0]?.source,this.positions=s??k?.map(g=>g.start),this.locations=s&&i?s.map(g=>w(i,g)):k?.map(g=>w(g.source,g.start));let C=We(G?.extensions)?G.extensions:void 0;this.extensions=x??C??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p?.stack!=null?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+Te(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+ne(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function et(e){return e===void 0||e.length===0?void 0:e}var Yt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),tt=Yt;var Y=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};var M={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"};var c={};ce(c,{ARGUMENT:()=>Wt,ARGUMENT_COORDINATE:()=>Un,BOOLEAN:()=>an,DIRECTIVE:()=>fn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Gn,DIRECTIVE_COORDINATE:()=>Bn,DIRECTIVE_DEFINITION:()=>vn,DIRECTIVE_EXTENSION:()=>Cn,DOCUMENT:()=>Qt,ENUM:()=>pn,ENUM_TYPE_DEFINITION:()=>gn,ENUM_TYPE_EXTENSION:()=>Pn,ENUM_VALUE_DEFINITION:()=>Sn,FIELD:()=>Jt,FIELD_DEFINITION:()=>Dn,FLOAT:()=>sn,FRAGMENT_ARGUMENT:()=>zt,FRAGMENT_DEFINITION:()=>tn,FRAGMENT_SPREAD:()=>Zt,INLINE_FRAGMENT:()=>en,INPUT_OBJECT_TYPE_DEFINITION:()=>On,INPUT_OBJECT_TYPE_EXTENSION:()=>wn,INPUT_VALUE_DEFINITION:()=>_n,INT:()=>rn,INTERFACE_TYPE_DEFINITION:()=>An,INTERFACE_TYPE_EXTENSION:()=>bn,LIST:()=>un,LIST_TYPE:()=>hn,MEMBER_COORDINATE:()=>Mn,NAME:()=>qt,NAMED_TYPE:()=>mn,NON_NULL_TYPE:()=>En,NULL:()=>cn,OBJECT:()=>ln,OBJECT_FIELD:()=>dn,OBJECT_TYPE_DEFINITION:()=>Nn,OBJECT_TYPE_EXTENSION:()=>Ln,OPERATION_DEFINITION:()=>$t,OPERATION_TYPE_DEFINITION:()=>xn,SCALAR_TYPE_DEFINITION:()=>yn,SCALAR_TYPE_EXTENSION:()=>Rn,SCHEMA_DEFINITION:()=>Tn,SCHEMA_EXTENSION:()=>kn,SELECTION_SET:()=>Ht,STRING:()=>on,TYPE_COORDINATE:()=>Vn,UNION_TYPE_DEFINITION:()=>In,UNION_TYPE_EXTENSION:()=>Fn,VARIABLE:()=>nn,VARIABLE_DEFINITION:()=>Xt});var qt="Name",Qt="Document",$t="OperationDefinition",Xt="VariableDefinition",Ht="SelectionSet",Jt="Field",Wt="Argument",zt="FragmentArgument",Zt="FragmentSpread",en="InlineFragment",tn="FragmentDefinition",nn="Variable",rn="IntValue",sn="FloatValue",on="StringValue",an="BooleanValue",cn="NullValue",pn="EnumValue",un="ListValue",ln="ObjectValue",dn="ObjectField",fn="Directive",mn="NamedType",hn="ListType",En="NonNullType",Tn="SchemaDefinition",xn="OperationTypeDefinition",yn="ScalarTypeDefinition",Nn="ObjectTypeDefinition",Dn="FieldDefinition",_n="InputValueDefinition",An="InterfaceTypeDefinition",In="UnionTypeDefinition",gn="EnumTypeDefinition",Sn="EnumValueDefinition",On="InputObjectTypeDefinition",vn="DirectiveDefinition",kn="SchemaExtension",Cn="DirectiveExtension",Rn="ScalarTypeExtension",Ln="ObjectTypeExtension",bn="InterfaceTypeExtension",Fn="UnionTypeExtension",Pn="EnumTypeExtension",wn="InputObjectTypeExtension",Vn="TypeCoordinate",Mn="MemberCoordinate",Un="ArgumentCoordinate",Bn="DirectiveCoordinate",Gn="DirectiveArgumentCoordinate";function xe(e,t){if(!e)throw new Error(t)}function nt(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function it(e){return e>=97&&e<=122||e>=65&&e<=90}function ye(e){return it(e)||e===95}function rt(e){return it(e)||L(e)||e===95}function st(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){let s=e[i],a=Kn(s);a!==s.length&&(n??(n=i),r=i,i!==0&&a<t&&(t=a))}return e.map((i,s)=>s===0?i:i.slice(t)).slice(n??0,r+1)}function Kn(e){let t=0;for(;t<e.length&&nt(e.charCodeAt(t));)++t;return t}var Ne={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function f(e,t,n){return new R(`Syntax Error: ${n}`,{source:e,positions:[t]})}function jn(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var b=jn(),De=b?.tracingChannel("graphql:parse"),Ts=b?.tracingChannel("graphql:validate"),xs=b?.tracingChannel("graphql:execute"),ys=b?.tracingChannel("graphql:execute:variableCoercion"),Ns=b?.tracingChannel("graphql:execute:rootSelectionSet"),Ds=b?.tracingChannel("graphql:subscribe"),_s=b?.tracingChannel("graphql:resolve"),Yn=["start","end","asyncStart","asyncEnd","error"];function ot(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==v
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function zn(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,p="",E=[];for(;s<r;){let x=n.charCodeAt(s);if(x===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){p+=n.slice(a,s),E.push(p);let v=h(e,o.BLOCK_STRING,t,s+3,st(E).join(`
|
||||
`));return e.line+=E.length-1,e.lineStart=i,v}if(x===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){p+=n.slice(a,s),a=s+1,s+=4;continue}if(x===10||x===13){p+=n.slice(a,s),E.push(p),x===13&&n.charCodeAt(s+1)===10?s+=2:++s,p="",a=s,i=s;continue}if(U(x))++s;else if(re(n,s))s+=2;else throw f(e.source,s,`Invalid character within String: ${F(e,s)}.`)}throw f(e.source,s,"Unterminated string.")}function Zn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(rt(s))++i;else break}return h(e,o.NAME,t,i,n.slice(t,i))}var lt=Symbol("Source"),B=class{constructor(t,n="GraphQL request",r={line:1,column:1}){this.__kind=lt,this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||xe(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||xe(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function dt(e){return Je(e,lt,B)}function oe(e,t){return ot(De)?De.traceSync(()=>ft(e,t),{source:e}):ft(e,t)}function ft(e,t){let n=new _e(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var _e=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else{let s=dt(t)?t:new B(t);this._lexer=new Q(s)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:M.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return M.QUERY;case"mutation":return M.MUTATION;case"subscription":return M.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseFragmentArguments(){let t=this.parseFragmentArgument;return this.optionalMany(o.PAREN_L,t,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLite
Line truncated
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
var Et=Object.defineProperty;var ae=(e,t)=>{for(var n in t)Et(e,n,{get:t[n],enumerable:!0})};var ht={};ae(ht,{languages:()=>Qe,options:()=>Xe,parsers:()=>_e,printers:()=>oi});var Ae=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i);var Tt=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},xt=Ae("replaceAll",function(){if(typeof this=="string")return Tt}),X=xt;var yt=()=>{},ce=yt;var Ie="indent";var ge="group";var Se="if-break";var H="line";var Oe="break-parent";var O=ce,J=ce;function m(e){return O(e),{type:Ie,contents:e}}var pe={type:Oe};function N(e,t={}){return O(e),J(t.expandedStates,!0),{type:ge,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _(e,t="",n={}){return O(e),t!==""&&O(t),{type:Se,breakContents:e,flatContents:t,groupId:n.groupId}}function d(e,t){O(e),J(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}var S={type:H},u={type:H,soft:!0},Nt={type:H,hard:!0},l=[Nt,pe];function W(e){return(t,n,r)=>{if(n===!1)return!1;let i=!!r?.backwards,{length:s}=t,a=n;for(;a>=0&&a<s;){let p=t.charAt(a);if(e instanceof RegExp){if(!e.test(p))return a}else if(!e.includes(p))return a;i?a--:a++}return a===-1||a===s?a:!1}}var Ri=W(/\s/),z=W(" "),ve=W(",; "),ke=W(/[^\n\r]/);var Ce=e=>e===`
|
||||
`||e==="\r"||e==="\u2028"||e==="\u2029";function Dt(e,t,n){if(t===!1)return!1;let r=!!n?.backwards,i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===`
|
||||
`)return t-2;if(Ce(i))return t-1}else{if(i==="\r"&&e.charAt(t+1)===`
|
||||
`)return t+2;if(Ce(i))return t+1}return t}var Z=Dt;function _t(e,t,n={}){let r=z(e,n.backwards?t-1:t,n),i=Z(e,r,n);return r!==i}var Re=_t;var At=()=>!0;function It(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function ue(e,t,n={}){let{indent:r=!1,marker:i,filter:s=At}=n,a=new Set(e.node?.comments?.filter(x=>!(x.leading||x.trailing||x.marker!==i||!s(x))));if(a.size===0)return"";let p=e.map(({node:x})=>a.has(x)?It(e,t):"","comments").filter(Boolean),E=d(l,p);return r?m([l,E]):E}function gt(e){return Array.isArray(e)&&e.length>0}var T=gt;var le=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Le=le;var K=null;function j(e){if(K!==null&&typeof K.property){let t=K;return K=j.prototype=null,t}return K=j.prototype=e??Object.create(null),new j}var St=10;for(let e=0;e<=St;e++)j();function de(e){return j(e)}function Ot(e,t="type"){de(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var be=Ot;var D=[["name"],["name","value"],["type"],["description","name","directives"],["description","name","interfaces","directives","fields"],["name","directives"],["name","interfaces","directives","fields"]],Fe={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:D[0],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:D[1],FragmentArgument:D[1],FragmentSpread:["name","arguments","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:D[1],Directive:["name","arguments"],NamedType:D[0],ListType:D[2],NonNullType:D[2],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:D[2],ScalarTypeDefinition:D[3],ObjectTypeDefinition:D[4],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:D[4],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:D[3],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","directives","locations"],SchemaExtension:["directives","operationTypes"],DirectiveExtension:D[5],ScalarTypeExtension:D[5],ObjectTypeExtension:D[6],InterfaceTypeExtension:D[6],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};var vt=be(Fe,"kind"),Pe=vt;var ee=e=>e.loc.start,te=e=>e.loc.end;function fe(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(`
|
||||
`)&&(t.value=e.value.trim())}fe.ignoredProperties=new Set(["loc","comments"]);var we="format",Ve=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/,Me=/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/;var Ue=e=>Me.test(e),Be=e=>Ve.test(e),Ge=e=>`# @${we}
|
||||
|
||||
${e}`;function kt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Ke=kt;function Ct(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?ke(e,t):t}var je=Ct;function Rt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=ve(e,r),r=Ke(e,r),r=z(e,r);return r=je(e,r),r=Z(e,r),r!==!1&&Re(e,r)}var Ye=Rt;function I(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&Ye(t.originalText,te(s))?[a,l]:a},r)}function me(e,t,n){let{node:r}=e;return T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):""}function A(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(S):i.push(l),i}function y(e,t){let{node:n}=e;if(!T(n.directives))return"";let r=d(S,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?N([S,r]):[" ",N(m([u,r]))]}function he(e,t){let{node:n}=e;return T(n.variableDefinitions)?N(["(",m([u,d([_("",", "),u],e.map(t,"variableDefinitions"))]),u,")"]):""}function Lt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...d(l,I(e,t,n,"definitions")),l];case"OperationDefinition":{let i=t.originalText[ee(r)]!=="{",s=!!r.name;return[A(e,t,n),i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&T(r.variableDefinitions)?" ":"",he(e,n),y(e,n),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return[A(e,t,n),"fragment ",n("name"),he(e,n)," on ",n("typeCondition"),y(e,n)," ",n("selectionSet")];case"SelectionSet":return["{",m([l,d(l,I(e,t,n,"selections"))]),l,"}"];case"Field":return N([r.alias?[n("alias"),": "]:"",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=X(0,r.value,'"""','\\"""').split(`
|
||||
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),d(l,['"""',...i,'"""'])}return['"',X(0,X(0,r.value,/["\\]/g,"\\$&"),`
|
||||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":{let i=!T(r.values);return N(["[",ue(e,t,{indent:!0}),i?"":m([u,d([_("",", "),u],e.map(n,"values"))]),u,"]"])}case"ObjectValue":{let i=!T(r.fields),s=t.bracketSpacing&&!i?" ":"";return N(["{",s,ue(e,t,{indent:!0}),i?"":[m([u,d([_("",", "),u],e.map(n,"fields"))])],u,_("",s),"}"])}case"ObjectField":case"Argument":case"FragmentArgument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),me(e,t,n)];case"NamedType":return n("name");case"VariableDefinition":return[A(e,t,n),n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&T(r.interfaces)&&s.push(" implements ",m([N([d([" &",S],e.map(n,"interfaces"))])])),s.push(y(e,n)),T(r.fields)&&s.push([" {",m([l,d(l,I(e,t,n,"fields"))]),l,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",": ",n("type"),y(e,n)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),T(r.arguments)?N(["(",m([u,d([_("",", "),u],I(e,t,n,"arguments"))]),u,")"]):"",y(e,n),r.repeatable?" repeatable":""," on ",...d(" | ",e.map(n,"locations"))];case"DirectiveExtension":return["extend directive @",n("name"),y(e,n)];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n),T(r.values)?[" {",m([l,d(l,I(e,t,n,"values"))]),l,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),y(e,n)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",y(e,n)];case"SchemaExtension":return["extend schema",y(e,n),...T(r.operationTypes)?[" {",m([l,d(l,I(e,t,n,"operationTypes"))]),l,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",y(e,n)," {",T(r.operationTypes)?m([l,d(l,I(e,t,n,"operationTypes"))]):"",l,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),me(e,t,n),y(e,n)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",y(e,n)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return N([A(e,t,n),N([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n),T(r.types)?[" =",_(""," "),m([_([S,"| "]),d([S,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Le(r,"Graphql","kind")}}function bt(e){return e.kind!=="Comment"}function Ft({node:e}){if(e.kind==="Comment")return"#"+e.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(e))}function Pt(e){let{node:t}=e;return t?.comments?.some(n=>n.value.trim()==="prettier-ignore")}var wt={print:Lt,massageAstNode:fe,hasPrettierIgnore:Pt,insertPragma:Ge,printComment:Ft,canAttachComment:bt,getVisitorKeys:Pe},qe=wt;var Qe=[{name:"GraphQL",type:"data",aceMode:"graphqlschema",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",parsers:["graphql"],vscodeLanguageIds:["graphql"],linguistLanguageId:139}];var $e={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vt={bracketSpacing:$e.bracketSpacing},Xe=Vt;var _e={};ae(_e,{gra
Line truncated
|
||||
`,v=r.split(/\r\n|[\n\r]/g),P=v[i];if(P.length>120){let $=Math.floor(E/80),G=E%80,k=[];for(let C=0;C<P.length;C+=80)k.push(P.slice(C,C+80));return x+ze([[`${a} |`,k[0]],...k.slice(1,$+1).map(C=>["|",C]),["|","^".padStart(G)],["|",k[$+1]]])}return x+ze([[`${a-1} |`,v[i-1]],[`${a} |`,P],["|","^".padStart(E)],[`${a+1} |`,v[i+1]]])}function ze(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
||||
`)}var R=class e extends Error{constructor(t,n={}){let{nodes:r,source:i,positions:s,path:a,originalError:p,cause:E,extensions:x}=n,v="cause"in n,P=v?E:p,$=v||p!=null?{cause:P}:void 0;super(t,$),this.name="GraphQLError",this.path=a??void 0;let G=p??(E instanceof Error?E:void 0);this.originalError=G,this.nodes=Ze(Array.isArray(r)?r:r?[r]:void 0);let k=Ze(this.nodes?.map(g=>g.loc).filter(g=>g!=null));this.source=i??k?.[0]?.source,this.positions=s??k?.map(g=>g.start),this.locations=s&&i?s.map(g=>w(i,g)):k?.map(g=>w(g.source,g.start));let C=Je(G?.extensions)?G.extensions:void 0;this.extensions=x??C??Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p?.stack!=null?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace!=null?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=`
|
||||
|
||||
`+Ee(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=`
|
||||
|
||||
`+ne(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Ze(e){return e===void 0||e.length===0?void 0:e}var Bt=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),et=Bt;var Y=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},V=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};var M={QUERY:"query",MUTATION:"mutation",SUBSCRIPTION:"subscription"};var c={};ae(c,{ARGUMENT:()=>$t,ARGUMENT_COORDINATE:()=>Pn,BOOLEAN:()=>nn,DIRECTIVE:()=>pn,DIRECTIVE_ARGUMENT_COORDINATE:()=>Vn,DIRECTIVE_COORDINATE:()=>wn,DIRECTIVE_DEFINITION:()=>In,DIRECTIVE_EXTENSION:()=>Sn,DOCUMENT:()=>Kt,ENUM:()=>sn,ENUM_TYPE_DEFINITION:()=>Dn,ENUM_TYPE_EXTENSION:()=>Rn,ENUM_VALUE_DEFINITION:()=>_n,FIELD:()=>Qt,FIELD_DEFINITION:()=>Tn,FLOAT:()=>en,FRAGMENT_ARGUMENT:()=>Xt,FRAGMENT_DEFINITION:()=>Wt,FRAGMENT_SPREAD:()=>Ht,INLINE_FRAGMENT:()=>Jt,INPUT_OBJECT_TYPE_DEFINITION:()=>An,INPUT_OBJECT_TYPE_EXTENSION:()=>Ln,INPUT_VALUE_DEFINITION:()=>xn,INT:()=>Zt,INTERFACE_TYPE_DEFINITION:()=>yn,INTERFACE_TYPE_EXTENSION:()=>kn,LIST:()=>on,LIST_TYPE:()=>ln,MEMBER_COORDINATE:()=>Fn,NAME:()=>Gt,NAMED_TYPE:()=>un,NON_NULL_TYPE:()=>dn,NULL:()=>rn,OBJECT:()=>an,OBJECT_FIELD:()=>cn,OBJECT_TYPE_DEFINITION:()=>En,OBJECT_TYPE_EXTENSION:()=>vn,OPERATION_DEFINITION:()=>jt,OPERATION_TYPE_DEFINITION:()=>mn,SCALAR_TYPE_DEFINITION:()=>hn,SCALAR_TYPE_EXTENSION:()=>On,SCHEMA_DEFINITION:()=>fn,SCHEMA_EXTENSION:()=>gn,SELECTION_SET:()=>qt,STRING:()=>tn,TYPE_COORDINATE:()=>bn,UNION_TYPE_DEFINITION:()=>Nn,UNION_TYPE_EXTENSION:()=>Cn,VARIABLE:()=>zt,VARIABLE_DEFINITION:()=>Yt});var Gt="Name",Kt="Document",jt="OperationDefinition",Yt="VariableDefinition",qt="SelectionSet",Qt="Field",$t="Argument",Xt="FragmentArgument",Ht="FragmentSpread",Jt="InlineFragment",Wt="FragmentDefinition",zt="Variable",Zt="IntValue",en="FloatValue",tn="StringValue",nn="BooleanValue",rn="NullValue",sn="EnumValue",on="ListValue",an="ObjectValue",cn="ObjectField",pn="Directive",un="NamedType",ln="ListType",dn="NonNullType",fn="SchemaDefinition",mn="OperationTypeDefinition",hn="ScalarTypeDefinition",En="ObjectTypeDefinition",Tn="FieldDefinition",xn="InputValueDefinition",yn="InterfaceTypeDefinition",Nn="UnionTypeDefinition",Dn="EnumTypeDefinition",_n="EnumValueDefinition",An="InputObjectTypeDefinition",In="DirectiveDefinition",gn="SchemaExtension",Sn="DirectiveExtension",On="ScalarTypeExtension",vn="ObjectTypeExtension",kn="InterfaceTypeExtension",Cn="UnionTypeExtension",Rn="EnumTypeExtension",Ln="InputObjectTypeExtension",bn="TypeCoordinate",Fn="MemberCoordinate",Pn="ArgumentCoordinate",wn="DirectiveCoordinate",Vn="DirectiveArgumentCoordinate";function Te(e,t){if(!e)throw new Error(t)}function tt(e){return e===9||e===32}function L(e){return e>=48&&e<=57}function nt(e){return e>=97&&e<=122||e>=65&&e<=90}function xe(e){return nt(e)||e===95}function it(e){return nt(e)||L(e)||e===95}function rt(e){let t=Number.MAX_SAFE_INTEGER,n=null,r=-1;for(let i=0;i<e.length;++i){let s=e[i],a=Mn(s);a!==s.length&&(n??(n=i),r=i,i!==0&&a<t&&(t=a))}return e.map((i,s)=>s===0?i:i.slice(t)).slice(n??0,r+1)}function Mn(e){let t=0;for(;t<e.length&&tt(e.charCodeAt(t));)++t;return t}var ye={QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",FRAGMENT_VARIABLE_DEFINITION:"FRAGMENT_VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION",DIRECTIVE_DEFINITION:"DIRECTIVE_DEFINITION"};function f(e,t,n){return new R(`Syntax Error: ${n}`,{source:e,positions:[t]})}function Un(){let e;try{let t=globalThis.process;typeof t?.getBuiltinModule=="function"&&(e=t.getBuiltinModule("node:diagnostics_channel"))}catch{}return e}var b=Un(),Ne=b?.tracingChannel("graphql:parse"),ds=b?.tracingChannel("graphql:validate"),fs=b?.tracingChannel("graphql:execute"),ms=b?.tracingChannel("graphql:execute:variableCoercion"),hs=b?.tracingChannel("graphql:execute:rootSelectionSet"),Es=b?.tracingChannel("graphql:subscribe"),Ts=b?.tracingChannel("graphql:resolve"),Bn=["start","end","asyncStart","asyncEnd","error"];function st(e){if(e==null)return!1;let t=e.hasSubscribers;if(t!==v
Line truncated
|
||||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw f(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Xn(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,p="",E=[];for(;s<r;){let x=n.charCodeAt(s);if(x===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){p+=n.slice(a,s),E.push(p);let v=h(e,o.BLOCK_STRING,t,s+3,rt(E).join(`
|
||||
`));return e.line+=E.length-1,e.lineStart=i,v}if(x===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){p+=n.slice(a,s),a=s+1,s+=4;continue}if(x===10||x===13){p+=n.slice(a,s),E.push(p),x===13&&n.charCodeAt(s+1)===10?s+=2:++s,p="",a=s,i=s;continue}if(U(x))++s;else if(re(n,s))s+=2;else throw f(e.source,s,`Invalid character within String: ${F(e,s)}.`)}throw f(e.source,s,"Unterminated string.")}function Hn(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(it(s))++i;else break}return h(e,o.NAME,t,i,n.slice(t,i))}var ut=Symbol("Source"),B=class{constructor(t,n="GraphQL request",r={line:1,column:1}){this.__kind=ut,this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||Te(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Te(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function lt(e){return He(e,ut,B)}function oe(e,t){return st(Ne)?Ne.traceSync(()=>dt(e,t),{source:e}):dt(e,t)}function dt(e,t){let n=new De(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}var De=class{constructor(t,n={}){let{lexer:r,...i}=n;if(r)this._lexer=r;else{let s=lt(t)?t:new B(t);this._lexer=new Q(s)}this._options=i,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===o.BRACE_L)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw f(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");if(n.value==="extend")return this.parseTypeSystemExtension()}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:M.QUERY,description:void 0,name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:this.parseSelectionSet()});let n=this.parseDescription(),r=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:r,description:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return M.QUERY;case"mutation":return M.MUTATION;case"subscription":return M.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseFragmentArguments(){let t=this.parseFragmentArgument;return this.optionalMany(o.PAREN_L,t,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLite
Line truncated
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
angular: Parser;
|
||||
html: Parser;
|
||||
lwc: Parser;
|
||||
mjml: Parser;
|
||||
vue: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
html: Printer;
|
||||
};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var ot=Object.defineProperty;var Zi=Object.getOwnPropertyDescriptor;var es=Object.getOwnPropertyNames;var ts=Object.prototype.hasOwnProperty;var Dr=e=>{throw TypeError(e)};var rs=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ir=(e,t)=>{for(var r in t)ot(e,r,{get:t[r],enumerable:!0})},ns=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of es(t))!ts.call(e,i)&&i!==r&&ot(e,i,{get:()=>t[i],enumerable:!(n=Zi(t,i))||n.enumerable});return e};var is=e=>ns(ot({},"__esModule",{value:!0}),e);var zt=(e,t,r)=>rs(e,typeof t!="symbol"?t+"":t,r),ss=(e,t,r)=>t.has(e)||Dr("Cannot "+r);var qe=(e,t,r)=>(ss(e,t,"read from private field"),r?r.call(e):t.get(e)),Rr=(e,t,r)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var Xo={};Ir(Xo,{languages:()=>Ui,options:()=>zi,parsers:()=>Nr,printers:()=>Qo});var ke=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var as=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},os=ke("replaceAll",function(){if(typeof this=="string")return as}),T=os;function ls(e){return this[e<0?this.length+e:e]}var cs=ke("at",function(){if(Array.isArray(this)||typeof this=="string")return ls}),I=cs;var us=()=>{},He=us;var Fe="string",Ve="array",lt="cursor",be="indent",we="align",ct="trim",Te="group",ye="fill",Ee="if-break",xe="indent-if-break",ut="line-suffix",pt="line-suffix-boundary",z="line",ht="label",Le="break-parent",mt=new Set([lt,be,we,ct,Te,ye,Ee,xe,ut,pt,z,ht,Le]);function ft(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function ps(e){if(typeof e=="string")return Fe;if(Array.isArray(e))return Ve;if(!e)return;let{type:t}=e;if(mt.has(t))return t}var dt=ps;var hs=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function ms(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(dt(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=hs([...mt].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Gt=class extends Error{name="InvalidDocError";constructor(t){super(ms(t)),this.doc=t}},Or=Gt;function $t(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){return ft(r,s,i)}function i(s){switch(dt(s)){case Ve:return t(s.map(n));case ye:return t({...s,parts:s.parts.map(n)});case Ee:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Te:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case we:case be:case xe:case ht:case ut:return t({...s,contents:n(s.contents)});case Fe:case lt:case ct:case pt:case z:case Le:return t(s);default:throw new Or(s)}}}function L(e,t=Mr){return $t(e,r=>typeof r=="string"?R(t,r.split(`
|
||||
`)):r)}var D=He,gt=He,Br=He,qr=He;function A(e){return D(e),{type:be,contents:e}}function fs(e,t){return qr(e),D(t),{type:we,contents:t,n:e}}function Hr(e){return fs(Number.NEGATIVE_INFINITY,e)}var G={type:Le};function _t(e){return Br(e),{type:ye,parts:e}}function C(e,t={}){return D(e),gt(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function $(e,t="",r={}){return D(e),t!==""&&D(t),{type:Ee,breakContents:e,flatContents:t,groupId:r.groupId}}function Fr(e,t){return D(e),{type:xe,contents:e,groupId:t.groupId,negate:t.negate}}function R(e,t){D(e),gt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var S={type:z},y={type:z,soft:!0},ds={type:z,hard:!0},k=[ds,G],gs={type:z,hard:!0,literal:!0},Mr=[gs,G];var Vr=Object.freeze({character:"'",codePoint:39}),Ur=Object.freeze({character:'"',codePoint:34}),_s=Object.freeze({preferred:Vr,alternate:Ur}),Ss=Object.freeze({preferred:Ur,alternate:Vr});function Wr(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?_s:Ss,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let l=e.charCodeAt(o);l===r.codePoint?s++:l===n.codePoint&&a++}return(s>a?n:r).character}function jt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Yt=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(I(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${jt([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n);return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},zr=Yt;var vs=[" ",`
|
||||
`,"\f","\r"," "],Cs=new zr(vs),P=Cs;var Kt=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Gr=Kt;function j(e,t=!0){return[A([y,e]),t?y:""]}function q(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function E(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):j(s)}function ks(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":E(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},q)}var $r=ks;var bs=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),se=bs;var ws=Array.prototype.toReversed??function(){return[...this].reverse()},Ts=ke("toReversed",function(){if(Array.isArray(this))return ws}),jr=Ts;function ys(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var Es=ys();function Yr(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function xs(e){return e=Yr(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Ls(e){e=Yr(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Qt(e){return Es?Ls(e):xs(e)}var Kr=e=>String(e).split(/[/\\]/).pop(),Qr=e=>String(e).startsWith("file:");function As(e){return Array.isArray(e)&&e.length>0}var X=As;function Xr(e,t){if(!t)return;let r=Kr(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function Ps(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var Ns=void 0;function Jr(e,t){if(t){if(Qr(t))try{t=Qt(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function Ds(e,t){let r=jr(0,e.plugins).flatMap(i=>i.languages??[]);return(Ps(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??Jr(r,t.physicalFile)??Jr(r,t.file)??Ns?.(r,t.physicalFile))?.parsers[0]}var St=Ds;var vt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function Is(e){return!!e?.[vt]}var ae=Is;function Rs(e){return T(0,e,/[^\n]/g," ")}var Ct=Rs;var Ue=3;function Os(e){let t=e.slice(0,Ue);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Ue);if(r===-1)return;let n=e.slice(Ue,r).trim(),i=e.indexOf(`
|
||||
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
|
||||
...`,r)),i===-1)return;let a=i+1+Ue,o=e.charAt(a+1);if(!/\s?/.test(o))return;let l=e.slice(0,a),c;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:l.slice(-Ue),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
|
||||
`)),c.length},get column(){return c??(c=l.split(`
|
||||
`)),I(0,c,-1).length}},[vt]:!0}}function Ms(e){let t=Os(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return Ct(r)+e.slice(r.length)}}:{content:e}}var Xt=Ms;var Zr="inline",Jt={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",option:"block",optgroup:"block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block"},en="normal",Zt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Bs(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var oe=Bs;var qs=e=>T(0,e,/^[\t\f\r ]*\n/g,""),er=e=>qs(P.trimEnd(e)),tn=e=>{let t=e,r=P.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=P.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function kt(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||Y(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||Tt(e,t)&&!O(e,t)&&e.kind!=="interpolation")}function le(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:Hs(e.prev)}function Hs(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function N(e){return e.kind==="text"||e.kind==="comment"}function O(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||oe(e)&&(e.name==="script"||e.name==="style"))}function rn(e,t){return e.children&&!O(e,t)}function nn(e,t){return O(e,t)||e.kind==="interpolation"||tr(e)}function tr(e){return dn(e).startsWith("pre")}function sn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Gs(e.parent.cssDisplay))||e.prev&&!Ys(e.prev.cssDisplay))}}function an(e,t){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!$s(e.parent.cssDisplay))||e.next&&!js(e.next.cssDisplay))}function on(e,t){return Ks(e.cssDisplay)&&!O(e,t)}function We(e){return ae(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function ln(e){return rr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>Vs(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&un(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||pn(e.lastChild))}function rr(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function bt(e){return hn(e)||e.prev&&Fs(e.prev)||cn(e)}function Fs(e){return hn(e)||e.kind==="element"&&e.fullName==="br"||cn(e)}function cn(e){return un(e)&&pn(e)}function un(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function pn(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function hn(e){switch(e.kind){case"ieConditionalComment":case"comment":case"directive":r
Line truncated
|
||||
`||e==="\f"||e==="\r"||e===" "}var ia=/^[ \t\n\r\u000c]+/,sa=/^[, \t\n\r\u000c]+/,aa=/^[^ \t\n\r\u000c]+/,oa=/[,]+$/,Pn=/^\d+$/,la=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function ca(e){let t=e.length,r,n,i,s,a,o=0,l;function c(h){let f,g=h.exec(e.substring(o));if(g)return[f]=g,o+=f.length,f}let u=[];for(;;){if(c(sa),o>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=o,r=c(aa),n=[],r.slice(-1)===","?(r=r.replace(oa,""),_()):d()}function d(){for(c(ia),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(An(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),_();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),_();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),_();return}else i+=a;else if(s==="after descriptor"&&!An(a))if(a===""){_();return}else s="in descriptor",o-=1;o+=1}}function _(){let h=!1,f,g,v,W,ie={},Q,at,Ce,Be,Wt;for(W=0;W<n.length;W++)Q=n[W],at=Q[Q.length-1],Ce=Q.substring(0,Q.length-1),Be=parseInt(Ce,10),Wt=parseFloat(Ce),Pn.test(Ce)&&at==="w"?((f||g)&&(h=!0),Be===0?h=!0:f=Be):la.test(Ce)&&at==="x"?((f||g||v)&&(h=!0),Wt<0?h=!0:g=Wt):Pn.test(Ce)&&at==="h"?((v||g)&&(h=!0),Be===0?h=!0:v=Be):h=!0;if(!h)ie.source={value:r,startOffset:l},f&&(ie.width={value:f}),g&&(ie.density={value:g}),v&&(ie.height={value:v}),u.push(ie);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`)}}var Nn=ca;var Dn=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),In={width:"w",height:"h",density:"x"},ua=Object.keys(In);function Rn(e,t,r){let n=w(r.node),i=Nn(n),s=ua.filter(h=>i.some(f=>se(f,h)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=In[a],l=i.map(h=>h.source.value),c=Math.max(...l.map(h=>h.length)),u=i.map(h=>h[a]?String(h[a].value):""),d=u.map(h=>{let f=h.indexOf(".");return f===-1?h.length:f}),_=Math.max(...d);return j(R([",",S],l.map((h,f)=>{let g=[h],v=u[f];if(v){let W=c-h.length+1,ie=_-d[f],Q=" ".repeat(W+ie);g.push($(Q," "),v+o)}return g})))}var On=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),Mn=async(e,t,r)=>j(await e(w(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var pa=new WeakMap;function ha(e,t){return ft(pa,e.root,r=>r.children.some(n=>Et(n,t)&&["ts","typescript"].includes(n.attrMap.lang)))}var H=ha;function Bn(e,t,r){let n=w(r.node);return E(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},q)}function qn(e,t,r,n){let i=w(r.node),s=H(r,n)?"babel-ts":"babel";return E(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function Hn(e,t,r,n){let i=w(r.node),{left:s,operator:a,right:o}=ma(i),l=H(r,n);return[C(await E(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await E(o,e,{parser:l?"__ts_expression":"__js_expression"})]}function ma(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=e.match(t);if(!r)return;let n={for:r[3].trim()};if(!n.for)return;let i=/,([^,\]}]*)(?:,([^,\]}]*))?$/,s=/^\(|\)$/g,a=T(0,r[1].trim(),s,""),o=a.match(i);o?(n.alias=a.replace(i,""),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=a;let l=[n.alias,n.iterator1,n.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:r[2],right:n.for}}var fa=[{test:e=>e.node.fullName==="v-for",print:Hn},{test:(e,t)=>e.node.fullName==="generic"&&Et(e.parent,t),print:Bn},{test:({node:e},t)=>gn(e)||_n(e,t),print:qn},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:da},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:ga},{test:e=>e.node.fullName.startsWith("v-"),print:Fn}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function da(e,t,r,n){try{return await Fn(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=w(r.node),s=H(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return E(i,e,{parser:s},q)}function ga(e,t,r,n){let i=w(r.node),s=H(r,n)?"__vue_ts_expression":"__vue_expression";return E(i,e,{parser:s},q)}function Fn(e,t,r,n){let i=w(r.node),s=H(r,n)?"__ts_expression":"__js_expression";return E(i,e,{parser:s},q)}var Vn=fa;var _a=[{test:Dn,print:Rn},{test:On,print:Mn},{test:Tn,print:yn},{test:bn,print:wn},{test:xn,print:Ln},...Vn,...kn].map(({test:e,print:t})=>({test:e,print:va(t)}));function Sa(e,t){let{node:r}=e,{value:n}=r;if(n)return xt(r,t)?[r.rawName,"=",n]:_a.find(({test:i})=>i(e,t))?.print}function va(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=$t(s,a=>typeof a=="string"?T(0,a,'"',"""):a),[n.node.rawName,'="',C(s),'"']}}var Un=Sa;var F=e=>e.sourceSpan.start.offset,J=e=>e.sourceSpan.end.offset;function $e(e,t){return[e.isSelfClosing?"":Ca(e,t),ue(e,t)]}function Ca(e,t){return e.lastChild&&K(e.las
Line truncated
|
||||
|
||||
${e}`;var ti=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ri(e){let t=J(e);return e.kind==="element"&&!e.endSourceSpan&&X(e.children)?Math.max(t,ri(I(0,e.children,-1))):t}function Ze(e,t,r){let n=e.node;if(le(n)){let i=ri(n);return[B(n,t),L(P.trimEnd(t.originalText.slice(F(n)+(n.prev&&je(n.prev)?At(n).length:0),i-(n.next&&V(n.next)?pe(n,t).length:0)))),M(n,t)]}return r()}function Dt(e,t){return N(e)&&N(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?bt(t)?k:S:"":bt(t)?k:y:je(e)&&(le(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&V(t)?"":t.kind==="comment"&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces?y:!t.isLeadingSpaceSensitive||bt(t)||V(t)&&e.lastChild&&K(e.lastChild)&&e.lastChild.lastChild&&K(e.lastChild.lastChild)?k:t.hasLeadingSpaces?S:y}function Ae(e,t,r){let{node:n}=e;if(rr(n))return[G,...e.map(()=>{let s=e.node,a=s.prev?Dt(s.prev,s):"";return[a?[a,We(s.prev)?k:""]:"",Ze(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(N(s)){if(s.prev&&N(s.prev)){let h=Dt(s.prev,s);if(h)return We(s.prev)?[k,k,Ze(e,t,r)]:[h,Ze(e,t,r)]}return Ze(e,t,r)}let o=[],l=[],c=[],u=[],d=s.prev?Dt(s.prev,s):"",_=s.next?Dt(s,s.next):"";return d&&(We(s.prev)?o.push(k,k):d===k?o.push(k):N(s.prev)?l.push(d):l.push($("",y,{groupId:i[a-1]}))),_&&(We(s)?N(s.next)&&u.push(k,k):_===k?N(s.next)&&u.push(k):c.push(_)),[...o,C([...l,C([Ze(e,t,r),...c],{id:i[a]})]),...u]},"children")}function ni(e,t,r){let{node:n}=e,i=[];Ma(e)&&i.push("} "),i.push("@",n.name);let s=Ra(n);if(n.parameters&&(s||i.push(" "),i.push("(",C(r("parameters")),")")),s)return i.push(";"),i;if(!Oa(n)){i.push(" {");let a=ii(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([k,Ae(e,t,r)])),a&&i.push(k,"}")):a&&i.push("}")}return C(i,{shouldBreak:!0})}function ii(e){return!(e.next?.kind==="angularControlFlowBlock"&&ti.get(e.name)?.has(e.next.name))}var Ia=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default"),Ra=e=>e?.kind==="angularControlFlowBlock"&&e.name==="default never";function Oa(e){return Ia(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function Ma(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!le(t)&&!ii(t)}function si(e,t,r){return[A([y,R([";",S],e.map(r,"children"))]),y]}function ai(e,t,r){let{node:n}=e;return[me(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([S,R(S,e.map(r,"cases"))])]:"",y]),ue(n,t)]}function oi(e,t,r){let{node:n}=e;return[n.value," {",C([A([y,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(S),i.hasTrailingSpaces&&!s&&a.push(S)),a},"expression")]),y]),"}"]}function li(e,t,r){let{node:n}=e;if(kt(n,t))return[B(n,t),C(Ke(e,t,r)),L(Nt(n,t)),...$e(n,t),M(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=u=>C([C(Ke(e,t,r),{id:s}),u,$e(n,t)]);if(n.children.length===0)return a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?S:"");let o=u=>i?Fr(u,{groupId:s}):(O(n,t)||Ge(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:A(u),l=()=>i?$(y,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?S:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Hr(y):y,c=()=>(n.next?V(n.next):he(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":Y(n)&&K(n.lastChild)?"":i?$(y,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?S:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`).test(n.lastChild.value)?"":y;return a([ln(n)?G:"",o([l(),Ae(e,t,r)]),c()])}function ci(e){let{node:{value:t,type:r}}=e;return r==="single"?`//${t.trimEnd()}`:["/*",L(t),"*/"]}var cr=(function(e){return e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA",e})({});function Z(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function ur(e){return Z(e)[1]==="ng-container"}function pr(e){return Z(e)[1]==="ng-content"}function Pe(e){return e===null?null:Z(e)[0]}function fe(e,t){return e?`:${e}:${t}`:t}var e
Line truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=It(e),r=this._schema.get(t)||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Ga.get(n)??n)}allKnownEventsOfElement(e){let t=It(e);return Array.from(this._eventSchema.get(t)??[])}normalizeAnimationStyleProperty(e){return pi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if($a(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function $a(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=2,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){e&&e.length>0&&e.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},di,tt;function Ne(e){return tt||(di=new m({canSelfClose:!0}),tt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:0}),script:new m({contentType:0}),title:new m({contentType:{default:1,svg:2}}),textarea:new m({contentType:1,ignoreFirstLf:!0})}),new fi().allKnownElementNames().forEach(t=>{!tt[t]&&Pe(t)===null&&(tt[t]=new m({canSelfClose:!1}))})),tt[e]??di}var De=class gi{file;offset;line;col;constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,a=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let o=r.substring(0,i-1).lastIndexOf(`
|
||||
`);a=o>0?i-o:i}else a--;for(;i<n&&t>0;){let o=r.charCodeAt(i);i++,t--,o==10?(s++,a=0):a++}return new gi(this.file,i,s,a)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,a=0,o=0;for(;a<t&&i>0&&(i--,a++,!(n[i]==`
|
||||
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
|
||||
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},rt=class{content;url;constructor(e,t){this.content=e,this.url=t}},p=class{start;end;fullStart;details;constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},ja=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),te=class extends Error{span;msg;level;relatedError;constructor(e,t,r=1,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${ja[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var de=class{sourceSpan;i18n;constructor(e,t){this.sourceSpan=e,this.i18n=t}},_i=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitText(this,t)}kind="text"},Si=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitCdata(this,t)}kind="cdata"},vi=class extends de{switchValue;type;cases;switchValueSourceSpan;constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}kind="expansion"},Ci=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}kind="expansionCase"},ki=class extends de{name;value;keySpan;valueSpan;valueTokens;constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s}visit(e,t){return e.visitAttribute(this,t)}kind="attribute";get nameSpan(){return this.keySpan}},bi=class{value;type;sourceSpan;constructor(e,t,r){this.value=e,this.type=t,this.sourceSpan=r}visit(e,t){return e.visitStartTagComment?e.visitStartTagComment(this,t):void 0}kind="startTagComment"},re=class extends de{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;nameSpan;isVoid;comments;constructor(e,t,r,n,i,s,a,o=null,l=null,c,u,d=[]){super(s,u),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=l,this.isVoid=c,this.comments=d}visit(e,t){return e.visitElement(this,t)}kind="element"},wi=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}kind="comment"},Ti=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}kind="docType"},ge=class extends de{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a}visit(e,t){return e.visitBlock(this,t)}kind="block"},U=class extends de{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;comments;constructor(e,t,r,n,i,s,a,o,l,c=null,u,d=[]){super(o,u),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=l,this.endSourceSpan=c,this.comments=d}visit(e,t){return e.visitComponent(this,t)}kind="component"},yi=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i}visit(e,t){return e.visitDirective(this,t)}kind="directive"},dr=class{expression;sourceSpan;constructor(e,t){this.expression=e,this.sourceSpan=t}visit(e,t){return e.visitBlockParameter(this,t)}kind="blockParameter";startSourceSpan=null;endSourceSpan=null},gr=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i}visit(e,t){return e.visitLetDeclaration(this,t)}kind="letDeclaration";startSourceSpan=null;endSourceSpan=null};function Rt(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let a=i(s);a&&n.push(a)}),n}var _r=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.directives),r(e.comments),r(e.children)})}visitAttribute(e,t){}visitStartTagComment(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitComponent(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.comments),r(e.children)})}visitD
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(43),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();this._attemptCharCodeUntilFn(n=>nt(n)?!e:ao(n)?(e=!0,!1):!0);let r=this._cursor.getChars(t).trim();return Za.test(r)?r="else if":Ja.test(r)&&(r="default never"),r}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(26,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{t.type=30;return}if(t.parts[0]==="default never"&&this._attemptCharCode(59)){this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([]);return}this._attemptCharCode(123)?(this._beginToken(27),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([])):t.type=30}_consumeBlockEnd(e){this._beginToken(28,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Ai);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(29);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Ot(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Ai)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(31,e),nt(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=34;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){t.type=34;return}this._attemptCharCodeUntilFn(r=>b(r)&&!Oe(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(33),this._cursor.advance(),this._endToken([])):(t.type=34,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Re(r)||r===36||r===95||t&&Ie(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(32,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;Ot(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(io(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new te(this._cursor.getSpan(t),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new te(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new te(t,e);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(e){if(e instanceof kr&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof te)this.errors.push(e);else throw e}_att
Line truncated
|
||||
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
|
||||
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,Oi):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new _i(i,new p(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[],s=[];this._consumeAttributesAndDirectives(n,i,s);let a=this._getElementFullName(t,this._getClosestElementLikeParent()),o=this._getTagDefinition(a),l=!1;if(this._peek.type===2){this._advance(),l=!0;let v=this._getTagDefinition(a);this.canSelfClose||v?.canSelfClose||Pe(a)!==null||v?.isVoid||this.errors.push(x.create(a,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),l=!1);let c=this._peek.sourceSpan.fullStart,u=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),_=new p(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new re(a,n,i,[],l,u,d,void 0,_,o?.isVoid??!1,void 0,s),f=this._getContainer(),g=f!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.name));this._pushContainer(h,g),l?this._popContainer(a,re,u):t.type===4&&(this._popContainer(a,re,null),this.errors.push(x.create(a,u,`Opening tag "${a}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[],a=[];this._consumeAttributesAndDirectives(i,s,a);let o=this._getClosestElementLikeParent(),l=this._getComponentTagName(t,o),c=this._getComponentFullName(t,o),u=this._peek.type===37;this._advance();let d=this._peek.sourceSpan.fullStart,_=new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),h=new U(n,l,c,i,s,[],u,_,new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),void 0,void 0,a),f=this._getContainer(),g=f!==null&&h.tagName!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.tagName));this._pushContainer(h,g),u?this._popContainer(c,U,_):t.type===39&&(this._popContainer(c,U,null),this.errors.push(x.create(c,_,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r,n){for(;this._peek.type===15||this._peek.type===40||this._peek.type===12;)if(this._peek.type===40)r.push(this._consumeDirective(this._peek));else if(this._peek.type===15)t.push(this._consumeAttr(this._advance()));else{let i=this._advance();n.push(new bi(i.parts[0],i.parts[1],i.sourceSpan))}}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,U,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof U&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(x.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof re?this.tagDefinitionResolver(t.name):t instanceof U&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(x.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,re,t.sourceSpan)){let i=`Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(x.create(n,t.sourceSpan,i))}}_popContainer(t,r,n){let i=!1;for(let a=this._containerStack.length-1;a>=0;a--){var s;let o=this._containerStack[a],l=o instanceof U?o.fullName:o.name;if(Pe(l)?l===t:(l===t||t===null)&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(a,this._containerStack.length-a),!i;(o instanceof ge||!(!((s=this._getTagDefinition(o))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(t){let r=fe(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===16&&(i=this._advance());let s="",a=[],o,l;if(this._peek.type===17)for(o=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===17||this._peek.type===18||this._peek.type===9;){let u=this._advance();a.push(u),u.type===18?s+=u.parts.join("").replace(/&([^;]+);/g,Oi):u.type===9?s+=u.pa
Line truncated
|
||||
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function fo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new p(s.sourceSpan.start,a.sourceSpan.end),l=new p(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=o,i.removeChild(a)}})}function go(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new p(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function _o(e){return go(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function So(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&!X(r.startTagComments)&&r.children.length===1&&r.firstChild.kind==="text"&&!P.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new p(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function vo(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/s;e.walk(n=>{if(rn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a,o=i.value.split(r);for(let l=0;l<o.length;l++,s=a){let c=o[l];if(l%2===0){a=s.moveBy(c.length),c.length>0&&n.insertChildBefore(i,{kind:"text",value:c,sourceSpan:new p(s,a)});continue}a=s.moveBy(c.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new p(s,a),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new p(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function Co(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&P.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=nn(r,t),s=tr(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:u}=tn(o.value),d=o.prev,_=o.next;c?(o.value=c,o.sourceSpan=new p(o.sourceSpan.start.moveBy(l.length),o.sourceSpan.end.moveBy(-u.length)),l&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),u&&(o.hasTrailingSpaces=!0,_&&(_.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(l||u)&&(d&&(d.hasTrailingSpaces=!0),_&&(_.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function ko(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function bo(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function wo(e,t){e.walk(r=>{r.cssDisplay=fn(r,t)})}function To(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=on(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=sn(i,t),i.isTrailingSpaceSensitive=an(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var Fi=ho;function yo(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[C(Ae(e,t,r)),k];case"element":case"ieConditionalComment":return li(e,t,r);case"angularControlFlowBlock":return ni(e,t,r);case"angularControlFlowBlockParameters":return si(e,t,r);case"angularControlFlowBlockParameter":return P.trim(n.expression);case"angularLetDeclaration":return C(["@let ",C([n.id," =",C(A([S,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return ai(e,t,r);case"angularIcuCase":return oi(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[me(n),ue(n)];case"interpolation":return[me(n,t),...e.map(r,"children"),ue(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/,l=o.test(n.value),c=l?n.value.replace(o,""):n.value;return[L(c),l?k:""]}let i=B(n,t),s=yt(n),a=M(n,t);return s[0]=[i,s[0]],s.push([s.pop(),a]),_t(s)}case"docType":return[C([me(n,t),Line truncated
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
var Nr=Object.defineProperty;var Dr=e=>{throw TypeError(e)};var es=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ir=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})};var Wt=(e,t,r)=>es(e,typeof t!="symbol"?t+"":t,r),ts=(e,t,r)=>t.has(e)||Dr("Cannot "+r);var qe=(e,t,r)=>(ts(e,t,"read from private field"),r?r.call(e):t.get(e)),Rr=(e,t,r)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var Zi={};Ir(Zi,{languages:()=>Ui,options:()=>zi,parsers:()=>Pr,printers:()=>$o});var ke=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var rs=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ns=ke("replaceAll",function(){if(typeof this=="string")return rs}),T=ns;function is(e){return this[e<0?this.length+e:e]}var ss=ke("at",function(){if(Array.isArray(this)||typeof this=="string")return is}),I=ss;var as=()=>{},He=as;var Fe="string",Ve="array",ot="cursor",be="indent",we="align",lt="trim",Te="group",ye="fill",Ee="if-break",xe="indent-if-break",ct="line-suffix",ut="line-suffix-boundary",z="line",pt="label",Le="break-parent",ht=new Set([ot,be,we,lt,Te,ye,Ee,xe,ct,ut,z,pt,Le]);function mt(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function os(e){if(typeof e=="string")return Fe;if(Array.isArray(e))return Ve;if(!e)return;let{type:t}=e;if(ht.has(t))return t}var ft=os;var ls=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function cs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(ft(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ls([...ht].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var zt=class extends Error{name="InvalidDocError";constructor(t){super(cs(t)),this.doc=t}},Or=zt;function Gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){return mt(r,s,i)}function i(s){switch(ft(s)){case Ve:return t(s.map(n));case ye:return t({...s,parts:s.parts.map(n)});case Ee:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Te:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case we:case be:case xe:case pt:case ct:return t({...s,contents:n(s.contents)});case Fe:case ot:case lt:case ut:case z:case Le:return t(s);default:throw new Or(s)}}}function L(e,t=Mr){return Gt(e,r=>typeof r=="string"?R(t,r.split(`
|
||||
`)):r)}var D=He,dt=He,Br=He,qr=He;function A(e){return D(e),{type:be,contents:e}}function us(e,t){return qr(e),D(t),{type:we,contents:t,n:e}}function Hr(e){return us(Number.NEGATIVE_INFINITY,e)}var G={type:Le};function gt(e){return Br(e),{type:ye,parts:e}}function C(e,t={}){return D(e),dt(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function $(e,t="",r={}){return D(e),t!==""&&D(t),{type:Ee,breakContents:e,flatContents:t,groupId:r.groupId}}function Fr(e,t){return D(e),{type:xe,contents:e,groupId:t.groupId,negate:t.negate}}function R(e,t){D(e),dt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var S={type:z},y={type:z,soft:!0},ps={type:z,hard:!0},k=[ps,G],hs={type:z,hard:!0,literal:!0},Mr=[hs,G];var Vr=Object.freeze({character:"'",codePoint:39}),Ur=Object.freeze({character:'"',codePoint:34}),ms=Object.freeze({preferred:Vr,alternate:Ur}),fs=Object.freeze({preferred:Ur,alternate:Vr});function Wr(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?ms:fs,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let l=e.charCodeAt(o);l===r.codePoint?s++:l===n.codePoint&&a++}return(s>a?n:r).character}function $t(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var jt=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(I(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${$t([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n);return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
|
||||
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},zr=jt;var ds=[" ",`
|
||||
`,"\f","\r"," "],gs=new zr(ds),P=gs;var Yt=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Gr=Yt;function j(e,t=!0){return[A([y,e]),t?y:""]}function q(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function E(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):j(s)}function _s(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":E(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},q)}var $r=_s;var Ss=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),se=Ss;var vs=Array.prototype.toReversed??function(){return[...this].reverse()},Cs=ke("toReversed",function(){if(Array.isArray(this))return vs}),jr=Cs;function ks(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var bs=ks();function Yr(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ws(e){return e=Yr(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Ts(e){e=Yr(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Kt(e){return bs?Ts(e):ws(e)}var Kr=e=>String(e).split(/[/\\]/).pop(),Qr=e=>String(e).startsWith("file:");function ys(e){return Array.isArray(e)&&e.length>0}var X=ys;function Xr(e,t){if(!t)return;let r=Kr(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function Es(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var xs=void 0;function Jr(e,t){if(t){if(Qr(t))try{t=Kt(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function Ls(e,t){let r=jr(0,e.plugins).flatMap(i=>i.languages??[]);return(Es(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??Jr(r,t.physicalFile)??Jr(r,t.file)??xs?.(r,t.physicalFile))?.parsers[0]}var _t=Ls;var St=Symbol.for("PRETTIER_IS_FRONT_MATTER");function As(e){return!!e?.[St]}var ae=As;function Ps(e){return T(0,e,/[^\n]/g," ")}var vt=Ps;var Ue=3;function Ns(e){let t=e.slice(0,Ue);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
|
||||
`,Ue);if(r===-1)return;let n=e.slice(Ue,r).trim(),i=e.indexOf(`
|
||||
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
|
||||
...`,r)),i===-1)return;let a=i+1+Ue,o=e.charAt(a+1);if(!/\s?/.test(o))return;let l=e.slice(0,a),c;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:l.slice(-Ue),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
|
||||
`)),c.length},get column(){return c??(c=l.split(`
|
||||
`)),I(0,c,-1).length}},[St]:!0}}function Ds(e){let t=Ns(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return vt(r)+e.slice(r.length)}}:{content:e}}var Qt=Ds;var Zr="inline",Xt={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",option:"block",optgroup:"block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block"},en="normal",Jt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Is(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var oe=Is;var Rs=e=>T(0,e,/^[\t\f\r ]*\n/g,""),Zt=e=>Rs(P.trimEnd(e)),tn=e=>{let t=e,r=P.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=P.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function Ct(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||Y(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||wt(e,t)&&!O(e,t)&&e.kind!=="interpolation")}function le(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:Os(e.prev)}function Os(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function N(e){return e.kind==="text"||e.kind==="comment"}function O(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||oe(e)&&(e.name==="script"||e.name==="style"))}function rn(e,t){return e.children&&!O(e,t)}function nn(e,t){return O(e,t)||e.kind==="interpolation"||er(e)}function er(e){return dn(e).startsWith("pre")}function sn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Vs(e.parent.cssDisplay))||e.prev&&!zs(e.prev.cssDisplay))}}function an(e,t){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Y(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||Y(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Us(e.parent.cssDisplay))||e.next&&!Ws(e.next.cssDisplay))}function on(e,t){return Gs(e.cssDisplay)&&!O(e,t)}function We(e){return ae(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function ln(e){return tr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>Bs(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&un(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||pn(e.lastChild))}function tr(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function kt(e){return hn(e)||e.prev&&Ms(e.prev)||cn(e)}function Ms(e){return hn(e)||e.kind==="element"&&e.fullName==="br"||cn(e)}function cn(e){return un(e)&&pn(e)}function un(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function pn(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function hn(e){switch(e.kind){case"ieConditionalComment":case"comment":case"directive":r
Line truncated
|
||||
`||e==="\f"||e==="\r"||e===" "}var ea=/^[ \t\n\r\u000c]+/,ta=/^[, \t\n\r\u000c]+/,ra=/^[^ \t\n\r\u000c]+/,na=/[,]+$/,Pn=/^\d+$/,ia=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function sa(e){let t=e.length,r,n,i,s,a,o=0,l;function c(h){let f,g=h.exec(e.substring(o));if(g)return[f]=g,o+=f.length,f}let u=[];for(;;){if(c(ta),o>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=o,r=c(ra),n=[],r.slice(-1)===","?(r=r.replace(na,""),_()):d()}function d(){for(c(ea),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(An(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),_();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),_();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),_();return}else i+=a;else if(s==="after descriptor"&&!An(a))if(a===""){_();return}else s="in descriptor",o-=1;o+=1}}function _(){let h=!1,f,g,v,W,ie={},Q,at,Ce,Be,Ut;for(W=0;W<n.length;W++)Q=n[W],at=Q[Q.length-1],Ce=Q.substring(0,Q.length-1),Be=parseInt(Ce,10),Ut=parseFloat(Ce),Pn.test(Ce)&&at==="w"?((f||g)&&(h=!0),Be===0?h=!0:f=Be):ia.test(Ce)&&at==="x"?((f||g||v)&&(h=!0),Ut<0?h=!0:g=Ut):Pn.test(Ce)&&at==="h"?((v||g)&&(h=!0),Be===0?h=!0:v=Be):h=!0;if(!h)ie.source={value:r,startOffset:l},f&&(ie.width={value:f}),g&&(ie.density={value:g}),v&&(ie.height={value:v}),u.push(ie);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${Q}".`)}}var Nn=sa;var Dn=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),In={width:"w",height:"h",density:"x"},aa=Object.keys(In);function Rn(e,t,r){let n=w(r.node),i=Nn(n),s=aa.filter(h=>i.some(f=>se(f,h)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=In[a],l=i.map(h=>h.source.value),c=Math.max(...l.map(h=>h.length)),u=i.map(h=>h[a]?String(h[a].value):""),d=u.map(h=>{let f=h.indexOf(".");return f===-1?h.length:f}),_=Math.max(...d);return j(R([",",S],l.map((h,f)=>{let g=[h],v=u[f];if(v){let W=c-h.length+1,ie=_-d[f],Q=" ".repeat(W+ie);g.push($(Q," "),v+o)}return g})))}var On=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),Mn=async(e,t,r)=>j(await e(w(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var oa=new WeakMap;function la(e,t){return mt(oa,e.root,r=>r.children.some(n=>yt(n,t)&&["ts","typescript"].includes(n.attrMap.lang)))}var H=la;function Bn(e,t,r){let n=w(r.node);return E(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},q)}function qn(e,t,r,n){let i=w(r.node),s=H(r,n)?"babel-ts":"babel";return E(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function Hn(e,t,r,n){let i=w(r.node),{left:s,operator:a,right:o}=ca(i),l=H(r,n);return[C(await E(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await E(o,e,{parser:l?"__ts_expression":"__js_expression"})]}function ca(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=e.match(t);if(!r)return;let n={for:r[3].trim()};if(!n.for)return;let i=/,([^,\]}]*)(?:,([^,\]}]*))?$/,s=/^\(|\)$/g,a=T(0,r[1].trim(),s,""),o=a.match(i);o?(n.alias=a.replace(i,""),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=a;let l=[n.alias,n.iterator1,n.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:r[2],right:n.for}}var ua=[{test:e=>e.node.fullName==="v-for",print:Hn},{test:(e,t)=>e.node.fullName==="generic"&&yt(e.parent,t),print:Bn},{test:({node:e},t)=>gn(e)||_n(e,t),print:qn},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:pa},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:ha},{test:e=>e.node.fullName.startsWith("v-"),print:Fn}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function pa(e,t,r,n){try{return await Fn(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=w(r.node),s=H(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return E(i,e,{parser:s},q)}function ha(e,t,r,n){let i=w(r.node),s=H(r,n)?"__vue_ts_expression":"__vue_expression";return E(i,e,{parser:s},q)}function Fn(e,t,r,n){let i=w(r.node),s=H(r,n)?"__ts_expression":"__js_expression";return E(i,e,{parser:s},q)}var Vn=ua;var ma=[{test:Dn,print:Rn},{test:On,print:Mn},{test:Tn,print:yn},{test:bn,print:wn},{test:xn,print:Ln},...Vn,...kn].map(({test:e,print:t})=>({test:e,print:da(t)}));function fa(e,t){let{node:r}=e,{value:n}=r;if(n)return Et(r,t)?[r.rawName,"=",n]:ma.find(({test:i})=>i(e,t))?.print}function da(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=Gt(s,a=>typeof a=="string"?T(0,a,'"',"""):a),[n.node.rawName,'="',C(s),'"']}}var Un=fa;var F=e=>e.sourceSpan.start.offset,J=e=>e.sourceSpan.end.offset;function $e(e,t){return[e.isSelfClosing?"":ga(e,t),ue(e,t)]}function ga(e,t){return e.lastChild&&K(e.las
Line truncated
|
||||
|
||||
${e}`;var ti=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function ri(e){let t=J(e);return e.kind==="element"&&!e.endSourceSpan&&X(e.children)?Math.max(t,ri(I(0,e.children,-1))):t}function Ze(e,t,r){let n=e.node;if(le(n)){let i=ri(n);return[B(n,t),L(P.trimEnd(t.originalText.slice(F(n)+(n.prev&&je(n.prev)?Lt(n).length:0),i-(n.next&&V(n.next)?pe(n,t).length:0)))),M(n,t)]}return r()}function Nt(e,t){return N(e)&&N(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?kt(t)?k:S:"":kt(t)?k:y:je(e)&&(le(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&V(t)?"":t.kind==="comment"&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces?y:!t.isLeadingSpaceSensitive||kt(t)||V(t)&&e.lastChild&&K(e.lastChild)&&e.lastChild.lastChild&&K(e.lastChild.lastChild)?k:t.hasLeadingSpaces?S:y}function Ae(e,t,r){let{node:n}=e;if(tr(n))return[G,...e.map(()=>{let s=e.node,a=s.prev?Nt(s.prev,s):"";return[a?[a,We(s.prev)?k:""]:"",Ze(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(N(s)){if(s.prev&&N(s.prev)){let h=Nt(s.prev,s);if(h)return We(s.prev)?[k,k,Ze(e,t,r)]:[h,Ze(e,t,r)]}return Ze(e,t,r)}let o=[],l=[],c=[],u=[],d=s.prev?Nt(s.prev,s):"",_=s.next?Nt(s,s.next):"";return d&&(We(s.prev)?o.push(k,k):d===k?o.push(k):N(s.prev)?l.push(d):l.push($("",y,{groupId:i[a-1]}))),_&&(We(s)?N(s.next)&&u.push(k,k):_===k?N(s.next)&&u.push(k):c.push(_)),[...o,C([...l,C([Ze(e,t,r),...c],{id:i[a]})]),...u]},"children")}function ni(e,t,r){let{node:n}=e,i=[];Da(e)&&i.push("} "),i.push("@",n.name);let s=Pa(n);if(n.parameters&&(s||i.push(" "),i.push("(",C(r("parameters")),")")),s)return i.push(";"),i;if(!Na(n)){i.push(" {");let a=ii(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([k,Ae(e,t,r)])),a&&i.push(k,"}")):a&&i.push("}")}return C(i,{shouldBreak:!0})}function ii(e){return!(e.next?.kind==="angularControlFlowBlock"&&ti.get(e.name)?.has(e.next.name))}var Aa=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default"),Pa=e=>e?.kind==="angularControlFlowBlock"&&e.name==="default never";function Na(e){return Aa(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function Da(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!le(t)&&!ii(t)}function si(e,t,r){return[A([y,R([";",S],e.map(r,"children"))]),y]}function ai(e,t,r){let{node:n}=e;return[me(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([S,R(S,e.map(r,"cases"))])]:"",y]),ue(n,t)]}function oi(e,t,r){let{node:n}=e;return[n.value," {",C([A([y,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(S),i.hasTrailingSpaces&&!s&&a.push(S)),a},"expression")]),y]),"}"]}function li(e,t,r){let{node:n}=e;if(Ct(n,t))return[B(n,t),C(Ke(e,t,r)),L(Pt(n,t)),...$e(n,t),M(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=u=>C([C(Ke(e,t,r),{id:s}),u,$e(n,t)]);if(n.children.length===0)return a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?S:"");let o=u=>i?Fr(u,{groupId:s}):(O(n,t)||Ge(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:A(u),l=()=>i?$(y,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?S:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Hr(y):y,c=()=>(n.next?V(n.next):he(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":Y(n)&&K(n.lastChild)?"":i?$(y,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?S:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`).test(n.lastChild.value)?"":y;return a([ln(n)?G:"",o([l(),Ae(e,t,r)]),c()])}function ci(e){let{node:{value:t,type:r}}=e;return r==="single"?`//${t.trimEnd()}`:["/*",L(t),"*/"]}var lr=(function(e){return e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA",e})({});function Z(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function cr(e){return Z(e)[1]==="ng-container"}function ur(e){return Z(e)[1]==="ng-content"}function Pe(e){return e===null?null:Z(e)[0]}function fe(e,t){return e?`:${e}:${t}`:t}var e
Line truncated
|
||||
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=Dt(e),r=this._schema.get(t)||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Va.get(n)??n)}allKnownEventsOfElement(e){let t=Dt(e);return Array.from(this._eventSchema.get(t)??[])}normalizeAnimationStyleProperty(e){return pi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(Ua(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function Ua(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=2,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){e&&e.length>0&&e.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},di,tt;function Ne(e){return tt||(di=new m({canSelfClose:!0}),tt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:0}),script:new m({contentType:0}),title:new m({contentType:{default:1,svg:2}}),textarea:new m({contentType:1,ignoreFirstLf:!0})}),new fi().allKnownElementNames().forEach(t=>{!tt[t]&&Pe(t)===null&&(tt[t]=new m({canSelfClose:!1}))})),tt[e]??di}var De=class gi{file;offset;line;col;constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,a=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let o=r.substring(0,i-1).lastIndexOf(`
|
||||
`);a=o>0?i-o:i}else a--;for(;i<n&&t>0;){let o=r.charCodeAt(i);i++,t--,o==10?(s++,a=0):a++}return new gi(this.file,i,s,a)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,a=0,o=0;for(;a<t&&i>0&&(i--,a++,!(n[i]==`
|
||||
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
|
||||
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},rt=class{content;url;constructor(e,t){this.content=e,this.url=t}},p=class{start;end;fullStart;details;constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Wa=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),te=class extends Error{span;msg;level;relatedError;constructor(e,t,r=1,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Wa[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var de=class{sourceSpan;i18n;constructor(e,t){this.sourceSpan=e,this.i18n=t}},_i=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitText(this,t)}kind="text"},Si=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitCdata(this,t)}kind="cdata"},vi=class extends de{switchValue;type;cases;switchValueSourceSpan;constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}kind="expansion"},Ci=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}kind="expansionCase"},ki=class extends de{name;value;keySpan;valueSpan;valueTokens;constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s}visit(e,t){return e.visitAttribute(this,t)}kind="attribute";get nameSpan(){return this.keySpan}},bi=class{value;type;sourceSpan;constructor(e,t,r){this.value=e,this.type=t,this.sourceSpan=r}visit(e,t){return e.visitStartTagComment?e.visitStartTagComment(this,t):void 0}kind="startTagComment"},re=class extends de{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;nameSpan;isVoid;comments;constructor(e,t,r,n,i,s,a,o=null,l=null,c,u,d=[]){super(s,u),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=l,this.isVoid=c,this.comments=d}visit(e,t){return e.visitElement(this,t)}kind="element"},wi=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}kind="comment"},Ti=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}kind="docType"},ge=class extends de{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a}visit(e,t){return e.visitBlock(this,t)}kind="block"},U=class extends de{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;comments;constructor(e,t,r,n,i,s,a,o,l,c=null,u,d=[]){super(o,u),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=l,this.endSourceSpan=c,this.comments=d}visit(e,t){return e.visitComponent(this,t)}kind="component"},yi=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i}visit(e,t){return e.visitDirective(this,t)}kind="directive"},fr=class{expression;sourceSpan;constructor(e,t){this.expression=e,this.sourceSpan=t}visit(e,t){return e.visitBlockParameter(this,t)}kind="blockParameter";startSourceSpan=null;endSourceSpan=null},dr=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i}visit(e,t){return e.visitLetDeclaration(this,t)}kind="letDeclaration";startSourceSpan=null;endSourceSpan=null};function It(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let a=i(s);a&&n.push(a)}),n}var gr=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.directives),r(e.comments),r(e.children)})}visitAttribute(e,t){}visitStartTagComment(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitComponent(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.comments),r(e.children)})}visitD
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",v
Line truncated
|
||||
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(43),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();this._attemptCharCodeUntilFn(n=>nt(n)?!e:ro(n)?(e=!0,!1):!0);let r=this._cursor.getChars(t).trim();return Ka.test(r)?r="else if":Ya.test(r)&&(r="default never"),r}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(26,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{t.type=30;return}if(t.parts[0]==="default never"&&this._attemptCharCode(59)){this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([]);return}this._attemptCharCode(123)?(this._beginToken(27),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([])):t.type=30}_consumeBlockEnd(e){this._beginToken(28,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Ai);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(29);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Rt(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Ai)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(31,e),nt(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=34;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){t.type=34;return}this._attemptCharCodeUntilFn(r=>b(r)&&!Oe(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(33),this._cursor.advance(),this._endToken([])):(t.type=34,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Re(r)||r===36||r===95||t&&Ie(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(32,e);this._cursor.peek()!==0;){let t=this._cursor.peek();if(t===59)break;Rt(t)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===t)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(eo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new te(this._cursor.getSpan(t),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new te(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new te(t,e);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(e){if(e instanceof Cr&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof te)this.errors.push(e);else throw e}_att
Line truncated
|
||||
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
|
||||
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,Oi):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new _i(i,new p(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[],s=[];this._consumeAttributesAndDirectives(n,i,s);let a=this._getElementFullName(t,this._getClosestElementLikeParent()),o=this._getTagDefinition(a),l=!1;if(this._peek.type===2){this._advance(),l=!0;let v=this._getTagDefinition(a);this.canSelfClose||v?.canSelfClose||Pe(a)!==null||v?.isVoid||this.errors.push(x.create(a,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),l=!1);let c=this._peek.sourceSpan.fullStart,u=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),_=new p(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new re(a,n,i,[],l,u,d,void 0,_,o?.isVoid??!1,void 0,s),f=this._getContainer(),g=f!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.name));this._pushContainer(h,g),l?this._popContainer(a,re,u):t.type===4&&(this._popContainer(a,re,null),this.errors.push(x.create(a,u,`Opening tag "${a}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[],a=[];this._consumeAttributesAndDirectives(i,s,a);let o=this._getClosestElementLikeParent(),l=this._getComponentTagName(t,o),c=this._getComponentFullName(t,o),u=this._peek.type===37;this._advance();let d=this._peek.sourceSpan.fullStart,_=new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),h=new U(n,l,c,i,s,[],u,_,new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),void 0,void 0,a),f=this._getContainer(),g=f!==null&&h.tagName!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.tagName));this._pushContainer(h,g),u?this._popContainer(c,U,_):t.type===39&&(this._popContainer(c,U,null),this.errors.push(x.create(c,_,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r,n){for(;this._peek.type===15||this._peek.type===40||this._peek.type===12;)if(this._peek.type===40)r.push(this._consumeDirective(this._peek));else if(this._peek.type===15)t.push(this._consumeAttr(this._advance()));else{let i=this._advance();n.push(new bi(i.parts[0],i.parts[1],i.sourceSpan))}}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,U,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof U&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(x.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof re?this.tagDefinitionResolver(t.name):t instanceof U&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(x.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,re,t.sourceSpan)){let i=`Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(x.create(n,t.sourceSpan,i))}}_popContainer(t,r,n){let i=!1;for(let a=this._containerStack.length-1;a>=0;a--){var s;let o=this._containerStack[a],l=o instanceof U?o.fullName:o.name;if(Pe(l)?l===t:(l===t||t===null)&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(a,this._containerStack.length-a),!i;(o instanceof ge||!(!((s=this._getTagDefinition(o))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(t){let r=fe(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===16&&(i=this._advance());let s="",a=[],o,l;if(this._peek.type===17)for(o=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===17||this._peek.type===18||this._peek.type===9;){let u=this._advance();a.push(u),u.type===18?s+=u.parts.join("").replace(/&([^;]+);/g,Oi):u.type===9?s+=u.pa
Line truncated
|
||||
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function uo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new p(s.sourceSpan.start,a.sourceSpan.end),l=new p(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=o,i.removeChild(a)}})}function po(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new p(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function ho(e){return po(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function mo(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&!X(r.startTagComments)&&r.children.length===1&&r.firstChild.kind==="text"&&!P.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new p(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function fo(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/s;e.walk(n=>{if(rn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a,o=i.value.split(r);for(let l=0;l<o.length;l++,s=a){let c=o[l];if(l%2===0){a=s.moveBy(c.length),c.length>0&&n.insertChildBefore(i,{kind:"text",value:c,sourceSpan:new p(s,a)});continue}a=s.moveBy(c.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new p(s,a),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new p(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function go(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&P.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=nn(r,t),s=er(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:u}=tn(o.value),d=o.prev,_=o.next;c?(o.value=c,o.sourceSpan=new p(o.sourceSpan.start.moveBy(l.length),o.sourceSpan.end.moveBy(-u.length)),l&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),u&&(o.hasTrailingSpaces=!0,_&&(_.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(l||u)&&(d&&(d.hasTrailingSpaces=!0),_&&(_.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function _o(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function So(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function vo(e,t){e.walk(r=>{r.cssDisplay=fn(r,t)})}function Co(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=on(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=sn(i,t),i.isTrailingSpaceSensitive=an(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var Fi=lo;function ko(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[C(Ae(e,t,r)),k];case"element":case"ieConditionalComment":return li(e,t,r);case"angularControlFlowBlock":return ni(e,t,r);case"angularControlFlowBlockParameters":return si(e,t,r);case"angularControlFlowBlockParameter":return P.trim(n.expression);case"angularLetDeclaration":return C(["@let ",C([n.id," =",C(A([S,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return ai(e,t,r);case"angularIcuCase":return oi(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[me(n),ue(n)];case"interpolation":return[me(n,t),...e.map(r,"children"),ue(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/,l=o.test(n.value),c=l?n.value.replace(o,""):n.value;return[L(c),l?k:""]}let i=B(n,t),s=Tt(n),a=M(n,t);return s[0]=[i,s[0]],s.push([s.pop(),a]),gt(s)}case"docType":return[C([me(n,t),Line truncated
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
markdown: Parser;
|
||||
mdx: Parser;
|
||||
remark: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
mdast: Printer;
|
||||
};
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.markdown=e()}})(function(){"use strict";var om=Object.create;var Pr=Object.defineProperty;var sm=Object.getOwnPropertyDescriptor;var lm=Object.getOwnPropertyNames;var cm=Object.getPrototypeOf,fm=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Or=(e,t)=>{for(var r in t)Pr(e,r,{get:t[r],enumerable:!0})},xu=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of lm(t))!fm.call(e,a)&&a!==r&&Pr(e,a,{get:()=>t[a],enumerable:!(n=sm(t,a))||n.enumerable});return e};var At=(e,t,r)=>(r=e!=null?om(cm(e)):{},xu(t||!e||!e.__esModule?Pr(r,"default",{value:e,enumerable:!0}):r,e)),pm=e=>xu(Pr({},"__esModule",{value:!0}),e);var bo=q((k8,Fo)=>{"use strict";Fo.exports=wg;var sr=9,en=10,_t=32,kg=33,Fg=58,Pt=91,bg=92,Pi=93,lr=94,tn=96,rn=4,Eg=1024;function wg(e){var t=this.Parser,r=this.Compiler;Cg(t)&&vg(t,e),yg(r)&&Ag(r)}function Cg(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function yg(e){return!!(e&&e.prototype&&e.prototype.visitors)}function vg(e,t){for(var r=t||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,h=i.length,m;++f<h;)m=i[f],!(m==="newline"||m==="indentedCode"||m==="paragraph"||m==="footnoteDefinition")&&c.push([m]);c.push(["footnoteDefinition"]),r.inlineNotes&&(Oi(o,"reference","inlineNote"),u.inlineNote=g),Oi(i,"definition","footnoteDefinition"),Oi(o,"reference","footnoteCall"),a.definition=E,a.footnoteDefinition=D,u.footnoteCall=x,u.reference=k,n.interruptFootnoteDefinition=c,k.locator=l.locator,x.locator=C,g.locator=S;function D(w,d,v){for(var L=this,y=L.interruptFootnoteDefinition,b=L.offset,_=d.length+1,I=0,T=[],R,O,z,N,W,ne,p,Y,ie,F,ee,ce,te;I<_&&(N=d.charCodeAt(I),!(N!==sr&&N!==_t));)I++;if(d.charCodeAt(I++)===Pt&&d.charCodeAt(I++)===lr){for(O=I;I<_;){if(N=d.charCodeAt(I),N!==N||N===en||N===sr||N===_t)return;if(N===Pi){z=I,I++;break}I++}if(!(z===void 0||O===z||d.charCodeAt(I++)!==Fg)){if(v)return!0;for(R=d.slice(O,z),W=w.now(),ie=0,F=0,ee=I,ce=[];I<_;){if(N=d.charCodeAt(I),N!==N||N===en)te={start:ie,contentStart:ee||I,contentEnd:I,end:I},ce.push(te),N===en&&(ie=I+1,F=0,ee=void 0,te.end=ie);else if(F!==void 0)if(N===_t||N===sr)F+=N===_t?1:rn-F%rn,F>rn&&(F=void 0,ee=I);else{if(F<rn&&te&&(te.contentStart===te.contentEnd||Tg(y,a,L,[w,d.slice(I,Eg),!0])))break;F=void 0,ee=I}I++}for(I=-1,_=ce.length;_>0&&(te=ce[_-1],te.contentStart===te.contentEnd);)_--;for(ne=w(d.slice(0,te.contentEnd));++I<_;)te=ce[I],b[W.line+I]=(b[W.line+I]||0)+(te.contentStart-te.start),T.push(d.slice(te.contentStart,te.end));return p=L.enterBlock(),Y=L.tokenizeBlock(T.join(""),W),p(),ne({type:"footnoteDefinition",identifier:R.toLowerCase(),label:R,children:Y})}}}function x(w,d,v){var L=d.length+1,y=0,b,_,I,T;if(d.charCodeAt(y++)===Pt&&d.charCodeAt(y++)===lr){for(_=y;y<L;){if(T=d.charCodeAt(y),T!==T||T===en||T===sr||T===_t)return;if(T===Pi){I=y,y++;break}y++}if(!(I===void 0||_===I))return v?!0:(b=d.slice(_,I),w(d.slice(0,y))({type:"footnoteReference",identifier:b.toLowerCase(),label:b}))}}function g(w,d,v){var L=this,y=d.length+1,b=0,_=0,I,T,R,O,z,N,W;if(d.charCodeAt(b++)===lr&&d.charCodeAt(b++)===Pt){for(R=b;b<y;){if(T=d.charCodeAt(b),T!==T)return;if(N===void 0)if(T===bg)b+=2;else if(T===Pt)_++,b++;else if(T===Pi)if(_===0){O=b,b++;break}else _--,b++;else if(T===tn){for(z=b,N=1;d.charCodeAt(z+N)===tn;)N++;b+=N}else b++;else if(T===tn){for(z=b,W=1;d.charCodeAt(z+W)===tn;)W++;b+=W,N===W&&(N=void 0),W=void 0}else b++}if(O!==void 0)return v?!0:(I=w.now(),I.column+=2,I.offset+=2,w(d.slice(0,b))({type:"footnote",children:L.tokenizeInline(d.slice(R,O),I)}))}}function k(w,d,v){var L=0;if(d.charCodeAt(L)===kg&&L++,d.charCodeAt(L)===Pt&&d.charCodeAt(L+1)!==lr)return l.call(this,w,d,v)}function E(w,d,v){for(var L=0,y=d.charCodeAt(L);y===_t||y===sr;)y=d.charCodeAt(++L);if(y===Pt&&d.charCodeAt(L+1)!==lr)return s.call(this,w,d,v)}function C(w,d){return w.indexOf("[",d)}function S(w,d){return w.indexOf("^[",d)}}function Ag(e){var t=e.prototype.visitors,r=" ";t.footnote=n,t.footnoteReference=a,t.footnoteDefinition=u;function n(i){return"^["+this.all(i).join("")+"]"}function a(i){return"[^"+(i.label||i.identifier)+"]"}function u(i){for(var o=this.all(i).join(`
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=r+c);return"[^"+(i.label||i.identifier)+"]: "+o.join(`
|
||||
`)}}function Oi(e,t,r){e.splice(e.indexOf(t),0,r)}function Tg(e,t,r,n){for(var a=e.length,u=-1;++u<a;)if(t[e[u][0]].apply(r,n))return!0;return!1}});var Ri=q(Ni=>{Ni.isRemarkParser=Sg;Ni.isRemarkCompiler=Lg;function Sg(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Lg(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var To=q((b8,Ao)=>{var Eo=Ri();Ao.exports=_g;var wo=9,Co=32,nn=36,Ig=48,qg=57,yo=92,Bg=["math","math-inline"],vo="math-display";function _g(e){let t=this.Parser,r=this.Compiler;Eo.isRemarkParser(t)&&Pg(t,e),Eo.isRemarkCompiler(r)&&Og(r,e)}function Pg(e,t){let r=e.prototype,n=r.inlineMethods;u.locator=a,r.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,h=0,m,D,x,g,k,E,C;if(o.charCodeAt(h)===yo&&(f=!0,h++),o.charCodeAt(h)===nn){if(h++,f)return s?!0:i(o.slice(0,h))({type:"text",value:"$"});if(o.charCodeAt(h)===nn&&(c=!0,h++),x=o.charCodeAt(h),!(x===Co||x===wo)){for(g=h;h<l;){if(D=x,x=o.charCodeAt(h+1),D===nn){if(m=o.charCodeAt(h-1),m!==Co&&m!==wo&&(x!==x||x<Ig||x>qg)&&(!c||x===nn)){k=h-1,h++,c&&h++,E=h;break}}else D===yo&&(h++,x=o.charCodeAt(h+1));h++}if(E!==void 0)return s?!0:(C=o.slice(g,k+1),i(o.slice(0,E))({type:"inlineMath",value:C,data:{hName:"span",hProperties:{className:Bg.concat(c&&t.inlineMathDouble?[vo]:[])},hChildren:[{type:"text",value:C}]}}))}}}}function Og(e){let t=e.prototype;t.visitors.inlineMath=r;function r(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(vo)&&(a="$$"),a+n.value+a}}});var Bo=q((E8,qo)=>{var So=Ri();qo.exports=zg;var Lo=10,cr=32,Mi=36,Io=`
|
||||
`,Ng="$",Rg=2,Mg=["math","math-display"];function zg(){let e=this.Parser,t=this.Compiler;So.isRemarkParser(e)&&Ug(e),So.isRemarkCompiler(t)&&Hg(t)}function Ug(e){let t=e.prototype,r=t.blockMethods,n=t.interruptParagraph,a=t.interruptList,u=t.interruptBlockquote;t.blockTokenizers.math=i,r.splice(r.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let h,m,D,x,g,k,E,C,S,w,d;for(;f<c&&s.charCodeAt(f)===cr;)f++;for(g=f;f<c&&s.charCodeAt(f)===Mi;)f++;if(k=f-g,!(k<Rg)){for(;f<c&&s.charCodeAt(f)===cr;)f++;for(E=f;f<c;){if(h=s.charCodeAt(f),h===Mi)return;if(h===Lo)break;f++}if(s.charCodeAt(f)===Lo){if(l)return!0;for(m=[],E!==f&&m.push(s.slice(E,f)),f++,D=s.indexOf(Io,f+1),D=D===-1?c:D;f<c;){for(C=!1,w=f,d=D,x=D,S=0;x>w&&s.charCodeAt(x-1)===cr;)x--;for(;x>w&&s.charCodeAt(x-1)===Mi;)S++,x--;for(k<=S&&s.indexOf(Ng,w)===x&&(C=!0,d=x);w<=d&&w-f<g&&s.charCodeAt(w)===cr;)w++;if(C)for(;d>w&&s.charCodeAt(d-1)===cr;)d--;if((!C||w!==d)&&m.push(s.slice(w,d)),C)break;f=D+1,D=s.indexOf(Io,f+1),D=D===-1?c:D}return m=m.join(`
|
||||
`),o(s.slice(0,D))({type:"math",value:m,data:{hName:"div",hProperties:{className:Mg.concat()},hChildren:[{type:"text",value:m}]}})}}}}function Hg(e){let t=e.prototype;t.visitors.math=r;function r(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var Po=q((w8,_o)=>{var Vg=To(),Gg=Bo();_o.exports=Wg;function Wg(e){var t=e||{};Gg.call(this,t),Vg.call(this,t)}});var Ft=q((C8,Oo)=>{Oo.exports=jg;var Yg=Object.prototype.hasOwnProperty;function jg(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Yg.call(r,n)&&(e[n]=r[n])}return e}});var No=q((y8,zi)=>{typeof Object.create=="function"?zi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:zi.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var zo=q((v8,Mo)=>{"use strict";var $g=Ft(),Ro=No();Mo.exports=Kg;function Kg(e){var t,r,n;Ro(u,e),Ro(a,u),t=u.prototype;for(r in t)n=t[r],n&&typeof n=="object"&&(t[r]="concat"in n?n.concat():$g(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var Ho=q((A8,Uo)=>{"use strict";Uo.exports=Qg;function Qg(e,t,r){return n;function n(){var a=r||this,u=a[e];return a[e]=!t,i;function i(){a[e]=u}}}});var Go=q((T8,Vo)=>{"use strict";Vo.exports=Jg;function Jg(e){for(var t=String(e),r=[],n=/\r?\n|\r/g;n.exec(t);)r.push(n.lastIndex);return r.push(t.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&i<r[r.length-1]){for(;++o<r.length;)if(r[o]>i)return{line:o+1,column:i-(r[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in r&&(l=(r[o-2]||0)+s-1||0),l>-1&&l<r[r.length-1]?l:-1}}});var Yo=q((S8,Wo)=>{"use strict";Wo.exports=Xg;var Ui="\\";function Xg(e,t){return r;function r(n){for(var a=0,u=n.indexOf(Ui),i=e[t],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Ui),u=n.indexOf(Ui,a+1);return o.push(n.slice(a)),o.join("")}}});var jo=q((L8,Zg)=>{Zg.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var $o=q((I8,ex)=>{ex.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var bt=q((q8,Ko)=>{"use strict";Ko.exports=tx;function tx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}});var Jo=q((B8,Qo)=>{"use strict";Qo.exports=rx;function rx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}});var Ot=q((_8,Xo)=>{"use strict";Xo.exports=nx;function nx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}});var es=q((P8,Zo)=>{"use strict";var ix=Ot(),ax=bt();Zo.exports=ux;function ux(e){return ix(e)||ax(e)}});var ts=q((O8,ox)=>{ox.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);_!==-1;)l++,b=_,_=y.indexOf(`
|
||||
`,_+1);b===-1?c+=y.length:c=y.length-b,l in u&&(b!==-1?c+=u[l]:c<=u[l]&&(c=u[l]+1))}function E(){var y=[],b=l+1;return function(){for(var _=l+1;b<_;)y.push((u[b]||0)+1),b++;return y}}function C(){var y={line:l,column:c};return y.offset=a.toOffset(y),y}function S(y){this.start=y,this.end=C()}function w(y){r.slice(0,y.length)!==y&&a.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),C())}function d(){var y=C();return b;function b(_,I){var T=_.position,R=T?T.start:y,O=[],z=T&&T.end.line,N=y.line;if(_.position=new S(R),T&&I&&T.indent){if(O=T.indent,z<N){for(;++z<N;)O.push((u[z]||0)+1);O.push(y.column)}I=O.concat(I)}return _.position.indent=I||[],_}}function v(y,b){var _=b?b.children:i,I=_[_.length-1],T;return I&&y.type===I.type&&(y.type==="text"||y.type==="blockquote")&&bs(I)&&bs(y)&&(T=y.type==="text"?qx:Bx,y=T.call(a,I,y)),y!==I&&_.push(y),a.atStart&&i.length!==0&&a.exitStart(),y}function L(y){var b=E(),_=d(),I=C();return w(y),T.reset=R,R.test=O,T.test=O,r=r.slice(y.length),k(y),b=b(),T;function T(z,N){return _(v(_(z),N),b)}function R(){var z=T.apply(null,arguments);return l=I.line,c=I.column,r=y+r,z}function O(){var z=_({});return l=I.line,c=I.column,r=y+r,z.position}}}}function bs(e){var t,r;return e.type!=="text"||!e.position?!0:(t=e.position.start,r=e.position.end,t.line!==r.line||r.column-t.column===e.value.length)}function qx(e,t){return e.value+=t.value,e}function Bx(e,t){return this.options.commonmark||this.options.gfm?t:(e.children=e.children.concat(t.children),e)}});var vs=q((U8,ys)=>{"use strict";ys.exports=un;var Yi=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],ji=Yi.concat(["~","|"]),Cs=ji.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);un.default=Yi;un.gfm=ji;un.commonmark=Cs;function un(e){var t=e||{};return t.commonmark?Cs:t.gfm?ji:Yi}});var Ts=q((H8,As)=>{"use strict";As.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var $i=q((V8,Ss)=>{"use strict";Ss.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Ts()}});var Is=q((G8,Ls)=>{"use strict";var _x=Ft(),Px=vs(),Ox=$i();Ls.exports=Nx;function Nx(e){var t=this,r=t.options,n,a;if(e==null)e={};else if(typeof e=="object")e=_x(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in Ox){if(a=e[n],a==null&&(a=r[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return t.options=e,t.escape=Px(e),t}});var _s=q((W8,Bs)=>{"use strict";Bs.exports=qs;function qs(e){if(e==null)return Ux;if(typeof e=="string")return zx(e);if(typeof e=="object")return"length"in e?Mx(e):Rx(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function Rx(e){return t;function t(r){var n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function Mx(e){for(var t=[],r=-1;++r<e.length;)t[r]=qs(e[r]);return n;function n(){for(var a=-1;++a<t.length;)if(t[a].apply(this,arguments))return!0;return!1}}function zx(e){return t;function t(r){return!!(r&&r.type===e)}}function Ux(){return!0}});var Os=q((Y8,Ps)=>{Ps.exports=Hx;function Hx(e){return e}});var zs=q((j8,Ms)=>{"use strict";Ms.exports=on;var Vx=_s(),Gx=Os(),Ns=!0,Rs="skip",Ki=!1;on.CONTINUE=Ns;on.SKIP=Rs;on.EXIT=Ki;function on(e,t,r,n){var a,u;typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),u=Vx(t),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,h.displayName="node ("+Gx(c.type+(f?"<"+f+">":""))+")"),h;function h(){var m=l.concat(o),D=[],x,g;if((!t||u(o,s,l[l.length-1]||null))&&(D=Wx(r(o,l)),D[0]===Ki))return D;if(o.children&&D[0]!==Rs)for(g=(n?o.children.length:-1)+a;g>-1&&g<o.children.length;){if(x=i(o.children[g],g,m)(),x[0]===Ki)return x;g=typeof x[1]=="number"?x[1]:g+a}return D}}}function Wx(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[Ns,e]:[e]}});var Hs=q(($8,Us)=>{"use strict";Us.exports=ln;var sn=zs(),Yx=sn.CONTINUE,jx=sn.SKIP,$x=sn.EXIT;ln.CONTINUE=Yx;ln.SKIP=jx;ln.EXIT=$x;function ln(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),sn(e,t,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return r(u,s,o)}}});var Gs=q((K8,Vs)=>{"use strict";var Kx=Hs();Vs.exports=Qx;function Qx(e,t){return Kx(e,t?Jx:Xx),e}function Jx(e){delete e.position}function Xx(e){e.position=void 0}});var js=q((Q8,Ys)=>{"use strict";var Ws=Ft(),Zx=Gs();Ys.exports=r1;var e1=`
|
||||
`,t1=/\r\n|\r/g;function r1(){var e=this,t=String(e.file),r={line:1,column:1,offset:0},n=Ws(r),a;return t=t.replace(t1,e1),t.charCodeAt(0)===65279&&(t=t.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(t,n),position:{start:r,end:e.eof||Ws(r)}},e.options.position||Zx(a,!0),a}});var Ks=q((J8,$s)=>{"use strict";var n1=/^[ \t]*(\n|$)/;$s.exports=i1;function i1(e,t,r){for(var n,a="",u=0,i=t.length;u<i&&(n=n1.exec(t.slice(u)),n!=null);)u+=n[0].length,a+=n[0];if(a!==""){if(r)return!0;e(a)}}});var cn=q((X8,Qs)=>{"use strict";var Ge="",Qi;Qs.exports=a1;function a1(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var r=e.length*t;if(Qi!==e||typeof Qi>"u")Qi=e,Ge="";else if(Ge.length>=r)return Ge.substr(0,r);for(;r>Ge.length&&t>1;)t&1&&(Ge+=e),t>>=1,e+=e;return Ge+=e,Ge=Ge.substr(0,r),Ge}});var Ji=q((Z8,Js)=>{"use strict";Js.exports=u1;function u1(e){return String(e).replace(/\n+$/,"")}});var el=q((eT,Zs)=>{"use strict";var o1=cn(),s1=Ji();Zs.exports=f1;var Xi=`
|
||||
`,Xs=" ",Zi=" ",l1=4,c1=o1(Zi,l1);function f1(e,t,r){for(var n=-1,a=t.length,u="",i="",o="",s="",l,c,f;++n<a;)if(l=t.charAt(n),f)if(f=!1,u+=o,i+=s,o="",s="",l===Xi)o=l,s=l;else for(u+=l,i+=l;++n<a;){if(l=t.charAt(n),!l||l===Xi){s=l,o=l;break}u+=l,i+=l}else if(l===Zi&&t.charAt(n+1)===l&&t.charAt(n+2)===l&&t.charAt(n+3)===l)o+=c1,n+=3,f=!0;else if(l===Xs)o+=l,f=!0;else{for(c="";l===Xs||l===Zi;)c+=l,l=t.charAt(++n);if(l!==Xi)break;o+=c+l,s+=l}if(i)return r?!0:e(u)({type:"code",lang:null,meta:null,value:s1(i)})}});var nl=q((tT,rl)=>{"use strict";rl.exports=D1;var fn=`
|
||||
`,pr=" ",Mt=" ",p1="~",tl="`",h1=3,m1=4;function D1(e,t,r){var n=this,a=n.options.gfm,u=t.length+1,i=0,o="",s,l,c,f,h,m,D,x,g,k,E,C,S;if(a){for(;i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)o+=c,i++;if(C=i,c=t.charAt(i),!(c!==p1&&c!==tl)){for(i++,l=c,s=1,o+=c;i<u&&(c=t.charAt(i),c===l);)o+=c,s++,i++;if(!(s<h1)){for(;i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)o+=c,i++;for(f="",D="";i<u&&(c=t.charAt(i),!(c===fn||l===tl&&c===l));)c===Mt||c===pr?D+=c:(f+=D+c,D=""),i++;if(c=t.charAt(i),!(c&&c!==fn)){if(r)return!0;S=e.now(),S.column+=o.length,S.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),S),D&&(o+=D),D="",k="",E="",x="",g="";for(var w=!0;i<u;){if(c=t.charAt(i),x+=k,g+=E,k="",E="",c!==fn){x+=c,E+=c,i++;continue}for(w?(o+=c,w=!1):(k+=c,E+=c),D="",i++;i<u&&(c=t.charAt(i),c===Mt);)D+=c,i++;if(k+=D,E+=D.slice(C),!(D.length>=m1)){for(D="";i<u&&(c=t.charAt(i),c===l);)D+=c,i++;if(k+=D,E+=D,!(D.length<s)){for(D="";i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)k+=c,E+=c,i++;if(!c||c===fn)break}}}for(o+=x+k,i=-1,u=f.length;++i<u;)if(c=f.charAt(i),c===Mt||c===pr)h||(h=f.slice(0,i));else if(h){m=f.slice(i);break}return e(o)({type:"code",lang:h||f||null,meta:m||null,value:g})}}}}}});var Et=q((zt,il)=>{zt=il.exports=d1;function d1(e){return e.trim?e.trim():zt.right(zt.left(e))}zt.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};zt.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,r=e.length;t.test(e.charAt(--r)););return e.slice(0,r+1)}});var pn=q((rT,al)=>{"use strict";al.exports=g1;function g1(e,t,r,n){for(var a=e.length,u=-1,i,o;++u<a;)if(i=e[u],o=i[1]||{},!(o.pedantic!==void 0&&o.pedantic!==r.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==r.options.commonmark)&&t[i[0]].apply(r,n))return!0;return!1}});var ll=q((nT,sl)=>{"use strict";var x1=Et(),k1=pn();sl.exports=F1;var ea=`
|
||||
`,ul=" ",ta=" ",ol=">";function F1(e,t,r){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=t.length,c=[],f=[],h=[],m,D=0,x,g,k,E,C,S,w,d;D<l&&(x=t.charAt(D),!(x!==ta&&x!==ul));)D++;if(t.charAt(D)===ol){if(r)return!0;for(D=0;D<l;){for(k=t.indexOf(ea,D),S=D,w=!1,k===-1&&(k=l);D<l&&(x=t.charAt(D),!(x!==ta&&x!==ul));)D++;if(t.charAt(D)===ol?(D++,w=!0,t.charAt(D)===ta&&D++):D=S,E=t.slice(D,k),!w&&!x1(E)){D=S;break}if(!w&&(g=t.slice(D),k1(i,u,n,[e,g,!0])))break;C=S===D?E:t.slice(S,k),h.push(D-S),c.push(C),f.push(E),D=k+1}for(D=-1,l=h.length,m=e(c.join(ea));++D<l;)a[s]=(a[s]||0)+h[D],s++;return d=n.enterBlock(),f=n.tokenizeBlock(f.join(ea),o),d(),m({type:"blockquote",children:f})}}});var pl=q((iT,fl)=>{"use strict";fl.exports=E1;var cl=`
|
||||
`,hr=" ",mr=" ",Dr="#",b1=6;function E1(e,t,r){for(var n=this,a=n.options.pedantic,u=t.length+1,i=-1,o=e.now(),s="",l="",c,f,h;++i<u;){if(c=t.charAt(i),c!==mr&&c!==hr){i--;break}s+=c}for(h=0;++i<=u;){if(c=t.charAt(i),c!==Dr){i--;break}s+=c,h++}if(!(h>b1)&&!(!h||!a&&t.charAt(i+1)===Dr)){for(u=t.length+1,f="";++i<u;){if(c=t.charAt(i),c!==mr&&c!==hr){i--;break}f+=c}if(!(!a&&f.length===0&&c&&c!==cl)){if(r)return!0;for(s+=f,f="",l="";++i<u&&(c=t.charAt(i),!(!c||c===cl));){if(c!==mr&&c!==hr&&c!==Dr){l+=f+c,f="";continue}for(;c===mr||c===hr;)f+=c,c=t.charAt(++i);if(!a&&l&&!f&&c===Dr){l+=c;continue}for(;c===Dr;)f+=c,c=t.charAt(++i);for(;c===mr||c===hr;)f+=c,c=t.charAt(++i);i--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:h,children:n.tokenizeInline(l,o)})}}}});var Dl=q((aT,ml)=>{"use strict";ml.exports=S1;var w1=" ",C1=`
|
||||
`,hl=" ",y1="*",v1="-",A1="_",T1=3;function S1(e,t,r){for(var n=-1,a=t.length+1,u="",i,o,s,l;++n<a&&(i=t.charAt(n),!(i!==w1&&i!==hl));)u+=i;if(!(i!==y1&&i!==v1&&i!==A1))for(o=i,u+=i,s=1,l="";++n<a;)if(i=t.charAt(n),i===o)s++,u+=l+o,l="";else if(i===hl)l+=i;else return s>=T1&&(!i||i===C1)?(u+=l,r?!0:e(u)({type:"thematicBreak"})):void 0}});var ra=q((uT,gl)=>{"use strict";gl.exports=B1;var dl=" ",L1=" ",I1=1,q1=4;function B1(e){for(var t=0,r=0,n=e.charAt(t),a={},u,i=0;n===dl||n===L1;){for(u=n===dl?q1:I1,r+=u,u>1&&(r=Math.floor(r/u)*u);i<r;)a[++i]=t;n=e.charAt(++t)}return{indent:r,stops:a}}});var Fl=q((oT,kl)=>{"use strict";var _1=Et(),P1=cn(),O1=ra();kl.exports=M1;var xl=`
|
||||
`,N1=" ",R1="!";function M1(e,t){var r=e.split(xl),n=r.length+1,a=1/0,u=[],i,o,s;for(r.unshift(P1(N1,t)+R1);n--;)if(o=O1(r[n]),u[n]=o.stops,_1(r[n]).length!==0)if(o.indent)o.indent>0&&o.indent<a&&(a=o.indent);else{a=1/0;break}if(a!==1/0)for(n=r.length;n--;){for(s=u[n],i=a;i&&!(i in s);)i--;r[n]=r[n].slice(s[i]+1)}return r.shift(),r.join(xl)}});var vl=q((sT,yl)=>{"use strict";var z1=Et(),U1=cn(),bl=bt(),H1=ra(),V1=Fl(),G1=pn();yl.exports=X1;var na="*",W1="_",El="+",ia="-",wl=".",We=" ",_e=`
|
||||
`,hn=" ",Cl=")",Y1="x",ut=4,j1=/\n\n(?!\s*$)/,$1=/^\[([ X\tx])][ \t]/,K1=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Q1=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,J1=/^( {1,4}|\t)?/gm;function X1(e,t,r){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=t.length,c=null,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y,b,_,I,T,R=!1,O,z,N,W;s<l&&(D=t.charAt(s),!(D!==hn&&D!==We));)s++;if(D=t.charAt(s),D===na||D===El||D===ia)x=D,m=!1;else{for(m=!0,h="";s<l&&(D=t.charAt(s),!!bl(D));)h+=D,s++;if(D=t.charAt(s),!h||!(D===wl||a&&D===Cl)||r&&h!=="1")return;c=parseInt(h,10),x=D}if(D=t.charAt(++s),!(D!==We&&D!==hn&&(u||D!==_e&&D!==""))){if(r)return!0;for(s=0,L=[],y=[],b=[];s<l;){for(g=t.indexOf(_e,s),k=s,E=!1,W=!1,g===-1&&(g=l),f=0;s<l;){if(D=t.charAt(s),D===hn)f+=ut-f%ut;else if(D===We)f++;else break;s++}if(_&&f>=_.indent&&(W=!0),D=t.charAt(s),C=null,!W){if(D===na||D===El||D===ia)C=D,s++,f++;else{for(h="";s<l&&(D=t.charAt(s),!!bl(D));)h+=D,s++;D=t.charAt(s),s++,h&&(D===wl||a&&D===Cl)&&(C=D,f+=h.length+1)}if(C)if(D=t.charAt(s),D===hn)f+=ut-f%ut,s++;else if(D===We){for(N=s+ut;s<N&&t.charAt(s)===We;)s++,f++;s===N&&t.charAt(s)===We&&(s-=ut-1,f-=ut-1)}else D!==_e&&D!==""&&(C=null)}if(C){if(!u&&x!==C)break;E=!0}else!a&&!W&&t.charAt(k)===We?W=!0:a&&_&&(W=f>=_.indent||f>ut),E=!1,s=k;if(w=t.slice(k,g),S=k===s?w:t.slice(s,g),(C===na||C===W1||C===ia)&&i.thematicBreak.call(n,e,w,!0))break;if(d=v,v=!E&&!z1(S).length,W&&_)_.value=_.value.concat(b,w),y=y.concat(b,w),b=[];else if(E)b.length!==0&&(R=!0,_.value.push(""),_.trail=b.concat()),_={value:[w],indent:f,trail:[]},L.push(_),y=y.concat(b,w),b=[];else if(v){if(d&&!a)break;b.push(w)}else{if(d||G1(o,i,n,[e,w,!0]))break;_.value=_.value.concat(b,w),y=y.concat(b,w),b=[]}s=g+1}for(O=e(y.join(_e)).reset({type:"list",ordered:m,start:c,spread:R,children:[]}),I=n.enterList(),T=n.enterBlock(),s=-1,l=L.length;++s<l;)_=L[s].value.join(_e),z=e.now(),e(_)(Z1(n,_,z),O),_=L[s].trail.join(_e),s!==l-1&&(_+=_e),e(_);return I(),T(),O}}function Z1(e,t,r){var n=e.offset,a=e.options.pedantic?ek:tk,u=null,i,o;return t=a.apply(null,arguments),e.options.gfm&&(i=t.match($1),i&&(o=i[0].length,u=i[1].toLowerCase()===Y1,n[r.line]+=o,t=t.slice(o))),{type:"listItem",spread:j1.test(t),checked:u,children:e.tokenizeBlock(t,r)}}function ek(e,t,r){var n=e.offset,a=r.line;return t=t.replace(Q1,u),a=r.line,t.replace(J1,u);function u(i){return n[a]=(n[a]||0)+i.length,a++,""}}function tk(e,t,r){var n=e.offset,a=r.line,u,i,o,s,l,c,f;for(t=t.replace(K1,h),s=t.split(_e),l=V1(t,H1(u).indent).split(_e),l[0]=o,n[a]=(n[a]||0)+i.length,a++,c=0,f=s.length;++c<f;)n[a]=(n[a]||0)+s[c].length-l[c].length,a++;return l.join(_e);function h(m,D,x,g,k){return i=D+x+g,o=k,Number(x)<10&&i.length%2===1&&(x=We+x),u=D+U1(We,x.length)+g,u+o}}});var Ll=q((lT,Sl)=>{"use strict";Sl.exports=ok;var aa=`
|
||||
`,rk=" ",Al=" ",Tl="=",nk="-",ik=3,ak=1,uk=2;function ok(e,t,r){for(var n=this,a=e.now(),u=t.length,i=-1,o="",s,l,c,f,h;++i<u;){if(c=t.charAt(i),c!==Al||i>=ik){i--;break}o+=c}for(s="",l="";++i<u;){if(c=t.charAt(i),c===aa){i--;break}c===Al||c===rk?l+=c:(s+=l+c,l="")}if(a.column+=o.length,a.offset+=o.length,o+=s+l,c=t.charAt(++i),f=t.charAt(++i),!(c!==aa||f!==Tl&&f!==nk)){for(o+=c,l=f,h=f===Tl?ak:uk;++i<u;){if(c=t.charAt(i),c!==f){if(c!==aa)return;i--;break}l+=c}return r?!0:e(o+l)({type:"heading",depth:h,children:n.tokenizeInline(s,a)})}}});var oa=q(ua=>{"use strict";var sk="[a-zA-Z_:][a-zA-Z0-9:._-]*",lk="[^\"'=<>`\\u0000-\\u0020]+",ck="'[^']*'",fk='"[^"]*"',pk="(?:"+lk+"|"+ck+"|"+fk+")",hk="(?:\\s+"+sk+"(?:\\s*=\\s*"+pk+")?)",Il="<[A-Za-z][A-Za-z0-9\\-]*"+hk+"*\\s*\\/?>",ql="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",mk="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Dk="<[?].*?[?]>",dk="<![A-Za-z]+\\s+[^>]*>",gk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";ua.openCloseTag=new RegExp("^(?:"+Il+"|"+ql+")");ua.tag=new RegExp("^(?:"+Il+"|"+ql+"|"+mk+"|"+Dk+"|"+dk+"|"+gk+")")});var Ol=q((fT,Pl)=>{"use strict";var xk=oa().openCloseTag;Pl.exports=Bk;var kk=" ",Fk=" ",Bl=`
|
||||
`,bk="<",Ek=/^<(script|pre|style)(?=(\s|>|$))/i,wk=/<\/(script|pre|style)>/i,Ck=/^<!--/,yk=/-->/,vk=/^<\?/,Ak=/\?>/,Tk=/^<![A-Za-z]/,Sk=/>/,Lk=/^<!\[CDATA\[/,Ik=/]]>/,_l=/^$/,qk=new RegExp(xk.source+"\\s*$");function Bk(e,t,r){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^</?("+a+")(?=(\\s|/?>|$))","i"),i=t.length,o=0,s,l,c,f,h,m,D,x=[[Ek,wk,!0],[Ck,yk,!0],[vk,Ak,!0],[Tk,Sk,!0],[Lk,Ik,!0],[u,_l,!0],[qk,_l,!1]];o<i&&(f=t.charAt(o),!(f!==kk&&f!==Fk));)o++;if(t.charAt(o)===bk){for(s=t.indexOf(Bl,o+1),s=s===-1?i:s,l=t.slice(o,s),c=-1,h=x.length;++c<h;)if(x[c][0].test(l)){m=x[c];break}if(m){if(r)return m[2];if(o=s,!m[1].test(l))for(;o<i;){if(s=t.indexOf(Bl,o+1),s=s===-1?i:s,l=t.slice(o+1,s),m[1].test(l)){l&&(o=s);break}o=s}return D=t.slice(0,o),e(D)({type:"html",value:D})}}}});var Pe=q((pT,Nl)=>{"use strict";Nl.exports=Ok;var _k=String.fromCharCode,Pk=/\s/;function Ok(e){return Pk.test(typeof e=="number"?_k(e):e.charAt(0))}});var mn=q((hT,Rl)=>{"use strict";Rl.exports=Nk;function Nk(e){return String(e).replace(/\s+/g," ")}});var sa=q((mT,Ml)=>{"use strict";var Rk=mn();Ml.exports=Mk;function Mk(e){return Rk(e).toLowerCase()}});var Yl=q((DT,Wl)=>{"use strict";var zk=Pe(),Uk=sa();Wl.exports=Wk;var zl='"',Ul="'",Hk="\\",Ut=`
|
||||
`,Dn=" ",dn=" ",ca="[",dr="]",Vk="(",Gk=")",Hl=":",Vl="<",Gl=">";function Wk(e,t,r){for(var n=this,a=n.options.commonmark,u=0,i=t.length,o="",s,l,c,f,h,m,D,x;u<i&&(f=t.charAt(u),!(f!==dn&&f!==Dn));)o+=f,u++;if(f=t.charAt(u),f===ca){for(u++,o+=f,c="";u<i&&(f=t.charAt(u),f!==dr);)f===Hk&&(c+=f,u++,f=t.charAt(u)),c+=f,u++;if(!(!c||t.charAt(u)!==dr||t.charAt(u+1)!==Hl)){for(m=c,o+=c+dr+Hl,u=o.length,c="";u<i&&(f=t.charAt(u),!(f!==Dn&&f!==dn&&f!==Ut));)o+=f,u++;if(f=t.charAt(u),c="",s=o,f===Vl){for(u++;u<i&&(f=t.charAt(u),!!la(f));)c+=f,u++;if(f=t.charAt(u),f===la.delimiter)o+=Vl+c+f,u++;else{if(a)return;u-=c.length+1,c=""}}if(!c){for(;u<i&&(f=t.charAt(u),!!Yk(f));)c+=f,u++;o+=c}if(c){for(D=c,c="";u<i&&(f=t.charAt(u),!(f!==Dn&&f!==dn&&f!==Ut));)c+=f,u++;if(f=t.charAt(u),h=null,f===zl?h=zl:f===Ul?h=Ul:f===Vk&&(h=Gk),!h)c="",u=o.length;else if(c){for(o+=c+f,u=o.length,c="";u<i&&(f=t.charAt(u),f!==h);){if(f===Ut){if(u++,f=t.charAt(u),f===Ut||f===h)return;c+=Ut}c+=f,u++}if(f=t.charAt(u),f!==h)return;l=o,o+=c+f,u++,x=c,c=""}else return;for(;u<i&&(f=t.charAt(u),!(f!==Dn&&f!==dn));)o+=f,u++;if(f=t.charAt(u),!f||f===Ut)return r?!0:(s=e(s).test().end,D=n.decode.raw(n.unescape(D),s,{nonTerminated:!1}),x&&(l=e(l).test().end,x=n.decode.raw(n.unescape(x),l)),e(o)({type:"definition",identifier:Uk(m),label:m,title:x||null,url:D}))}}}}function la(e){return e!==Gl&&e!==ca&&e!==dr}la.delimiter=Gl;function Yk(e){return e!==ca&&e!==dr&&!zk(e)}});var Kl=q((dT,$l)=>{"use strict";var jk=Pe();$l.exports=n0;var $k=" ",gn=`
|
||||
`,Kk=" ",Qk="-",Jk=":",Xk="\\",fa="|",Zk=1,e0=2,jl="left",t0="center",r0="right";function n0(e,t,r){var n=this,a,u,i,o,s,l,c,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y;if(n.options.gfm){for(a=0,C=0,l=t.length+1,c=[];a<l;){if(v=t.indexOf(gn,a),L=t.indexOf(fa,a+1),v===-1&&(v=t.length),L===-1||L>v){if(C<e0)return;break}c.push(t.slice(a,v)),C++,a=v+1}for(o=c.join(gn),u=c.splice(1,1)[0]||[],a=0,l=u.length,C--,i=!1,D=[];a<l;){if(h=u.charAt(a),h===fa){if(m=null,i===!1){if(y===!1)return}else D.push(i),i=!1;y=!1}else if(h===Qk)m=!0,i=i||null;else if(h===Jk)i===jl?i=t0:m&&i===null?i=r0:i=jl;else if(!jk(h))return;a++}if(i!==!1&&D.push(i),!(D.length<Zk)){if(r)return!0;for(E=-1,w=[],d=e(o).reset({type:"table",align:D,children:w});++E<C;){for(S=c[E],s={type:"tableRow",children:[]},E&&e(gn),e(S).reset(s,d),l=S.length+1,a=0,f="",x="",g=!0;a<l;){if(h=S.charAt(a),h===$k||h===Kk){x?f+=h:e(h),a++;continue}h===""||h===fa?g?e(h):((x||h)&&!g&&(o=x,f.length>1&&(h?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),k=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(x,k)},s)),e(f+h),f="",x=""):(f&&(x+=f,f=""),x+=h,h===Xk&&a!==l-2&&(x+=S.charAt(a+1),a++)),g=!1,a++}E||e(gn+u)}return d}}}});var Xl=q((gT,Jl)=>{"use strict";var i0=Et(),a0=Ji(),u0=pn();Jl.exports=l0;var o0=" ",gr=`
|
||||
`,s0=" ",Ql=4;function l0(e,t,r){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=t.indexOf(gr),l=t.length,c,f,h,m,D;s<l;){if(s===-1){s=l;break}if(t.charAt(s+1)===gr)break;if(u){for(m=0,c=s+1;c<l;){if(h=t.charAt(c),h===o0){m=Ql;break}else if(h===s0)m++;else break;c++}if(m>=Ql&&h!==gr){s=t.indexOf(gr,s+1);continue}}if(f=t.slice(s+1),u0(o,i,n,[e,f,!0]))break;if(c=s,s=t.indexOf(gr,s+1),s!==-1&&i0(t.slice(c,s))===""){s=c;break}}return f=t.slice(0,s),r?!0:(D=e.now(),f=a0(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var ec=q((xT,Zl)=>{"use strict";Zl.exports=c0;function c0(e,t){return e.indexOf("\\",t)}});var ic=q((kT,nc)=>{"use strict";var f0=ec();nc.exports=rc;rc.locator=f0;var p0=`
|
||||
`,tc="\\";function rc(e,t,r){var n=this,a,u;if(t.charAt(0)===tc&&(a=t.charAt(1),n.escape.indexOf(a)!==-1))return r?!0:(a===p0?u={type:"break"}:u={type:"text",value:a},e(tc+a)(u))}});var pa=q((FT,ac)=>{"use strict";ac.exports=h0;function h0(e,t){return e.indexOf("<",t)}});var cc=q((bT,lc)=>{"use strict";var uc=Pe(),m0=fr(),D0=pa();lc.exports=da;da.locator=D0;da.notInLink=!0;var oc="<",ha=">",sc="@",ma="/",Da="mailto:",xn=Da.length;function da(e,t,r){var n=this,a="",u=t.length,i=0,o="",s=!1,l="",c,f,h,m,D;if(t.charAt(0)===oc){for(i++,a=oc;i<u&&(c=t.charAt(i),!(uc(c)||c===ha||c===sc||c===":"&&t.charAt(i+1)===ma));)o+=c,i++;if(o){if(l+=o,o="",c=t.charAt(i),l+=c,i++,c===sc)s=!0;else{if(c!==":"||t.charAt(i+1)!==ma)return;l+=ma,i++}for(;i<u&&(c=t.charAt(i),!(uc(c)||c===ha));)o+=c,i++;if(c=t.charAt(i),!(!o||c!==ha))return r?!0:(l+=o,h=l,a+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,xn).toLowerCase()===Da?(h=h.slice(xn),f.column+=xn,f.offset+=xn):l=Da+l),m=n.inlineTokenizers,n.inlineTokenizers={text:m.text},D=n.enterLink(),h=n.tokenizeInline(h,f),n.inlineTokenizers=m,D(),e(a)({type:"link",title:null,url:m0(l,{nonTerminated:!1}),children:h}))}}}});var pc=q((ET,fc)=>{"use strict";fc.exports=d0;function d0(e,t){var r=String(e),n=0,a;if(typeof t!="string")throw new Error("Expected character");for(a=r.indexOf(t);a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}});var Dc=q((wT,mc)=>{"use strict";mc.exports=g0;var hc=["www.","http://","https://"];function g0(e,t){var r=-1,n,a,u;if(!this.options.gfm)return r;for(a=hc.length,n=-1;++n<a;)u=e.indexOf(hc[n],t),u!==-1&&(r===-1||u<r)&&(r=u);return r}});var Fc=q((CT,kc)=>{"use strict";var dc=pc(),x0=fr(),k0=bt(),ga=Ot(),F0=Pe(),b0=Dc();kc.exports=ka;ka.locator=b0;ka.notInLink=!0;var E0=33,w0=38,C0=41,y0=42,v0=44,A0=45,xa=46,T0=58,S0=59,L0=63,I0=60,gc=95,q0=126,B0="(",xc=")";function ka(e,t,r){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=t.length,o=-1,s=!1,l,c,f,h,m,D,x,g,k,E,C,S,w,d;if(a){if(t.slice(0,4)==="www.")s=!0,h=4;else if(t.slice(0,7).toLowerCase()==="http://")h=7;else if(t.slice(0,8).toLowerCase()==="https://")h=8;else return;for(o=h-1,f=h,l=[];h<i;){if(x=t.charCodeAt(h),x===xa){if(o===h-1)break;l.push(h),o=h,h++;continue}if(k0(x)||ga(x)||x===A0||x===gc){h++;continue}break}if(x===xa&&(l.pop(),h--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,t.slice(c,h).indexOf("_")===-1)){if(r)return!0;for(g=h,m=h;h<i&&(x=t.charCodeAt(h),!(F0(x)||x===I0));)h++,x===E0||x===y0||x===v0||x===xa||x===T0||x===L0||x===gc||x===q0||(g=h);if(h=g,t.charCodeAt(h-1)===C0)for(D=t.slice(m,h),k=dc(D,B0),E=dc(D,xc);E>k;)h=m+D.lastIndexOf(xc),D=t.slice(m,h),E--;if(t.charCodeAt(h-1)===S0&&(h--,ga(t.charCodeAt(h-1)))){for(g=h-2;ga(t.charCodeAt(g));)g--;t.charCodeAt(g)===w0&&(h=g)}return C=t.slice(0,h),w=x0(C,{nonTerminated:!1}),s&&(w="http://"+w),d=n.enterLink(),n.inlineTokenizers={text:u.text},S=n.tokenizeInline(C,e.now()),n.inlineTokenizers=u,d(),e(C)({type:"link",title:null,url:w,children:S})}}}});var Cc=q((yT,wc)=>{"use strict";var _0=bt(),P0=Ot(),O0=43,N0=45,R0=46,M0=95;wc.exports=Ec;function Ec(e,t){var r=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",t),n===-1))return-1;if(a=n,a===t||!bc(e.charCodeAt(a-1)))return Ec.call(r,e,n+1);for(;a>t&&bc(e.charCodeAt(a-1));)a--;return a}function bc(e){return _0(e)||P0(e)||e===O0||e===N0||e===R0||e===M0}});var Tc=q((vT,Ac)=>{"use strict";var z0=fr(),yc=bt(),vc=Ot(),U0=Cc();Ac.exports=Ea;Ea.locator=U0;Ea.notInLink=!0;var H0=43,Fa=45,kn=46,V0=64,ba=95;function Ea(e,t,r){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=t.length,s=-1,l,c,f,h;if(a){for(l=t.charCodeAt(i);yc(l)||vc(l)||l===H0||l===Fa||l===kn||l===ba;)l=t.charCodeAt(++i);if(i!==0&&l===V0){for(i++;i<o;){if(l=t.charCodeAt(i),yc(l)||vc(l)||l===Fa||l===kn||l===ba){i++,s===-1&&l===kn&&(s=i);continue}break}if(!(s===-1||s===i||l===Fa||l===ba))return l===kn&&i--,c=t.slice(0,i),r?!0:(h=n.enterLink(),n.inlineTokenizers={text:u.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=u,h(),e(c)({type:"link",title:null,url:"mailto:"+z0(c,{nonTerminated:!1}),children:f}))}}}});var Ic=q((AT,Lc)=>{"use strict";var G0=Ot(),W0=pa(),Y0=oa().tag;Lc.exports=Sc;Sc.locator=W0;var j0="<",$0="?",K0="!",Q0="/",J0=/^<a /i,X0=/^<\/a>/i;function Sc(e,t,r){var n=this,a=t.length,u,i;if(!(t.charAt(0)!==j0||a<3)&&(u=t.charAt(1),!(!G0(u)&&u!==$0&&u!==K0&&u!==Q0)&&(i=t.match(Y0),!!i)))return r?!0:(i=i[0],!n.inLink&&J0.test(i)?n.inLink=!0:n.inLink&&X0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var wa=q((TT,qc)=>{"use strict";qc.exports=Z0;function Z0(e,t){var r=e.indexOf("[",t),n=e.indexOf("![",t);return n===-1||r<n?r:n}});var Mc=q((ST,Rc)=>{"use strict";var xr=Pe(),eF=wa();Rc.exports=Nc;Nc.locator=eF;var tF=`
|
||||
`,rF="!",Bc='"',_c="'",Ht="(",kr=")",Ca="<",ya=">",Pc="[",Fr="\\",nF="]",Oc="`";function Nc(e,t,r){var n=this,a="",u=0,i=t.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y,b,_;if(i===rF&&(k=!0,a=i,i=t.charAt(++u)),i===Pc&&!(!k&&n.inLink)){for(a+=i,v="",u++,S=t.length,y=e.now(),d=0,y.column+=u,y.offset+=u;u<S;){if(i=t.charAt(u),x=i,i===Oc){for(f=1;t.charAt(u+1)===Oc;)x+=i,u++,f++;h?f>=h&&(h=0):h=f}else if(i===Fr)u++,x+=t.charAt(u);else if((!h||l)&&i===Pc)d++;else if((!h||l)&&i===nF)if(d)d--;else{if(t.charAt(u+1)!==Ht)return;x+=Ht,c=!0,u++;break}v+=x,x="",u++}if(c){for(E=v,a+=v+x,u++;u<S&&(i=t.charAt(u),!!xr(i));)a+=i,u++;if(i=t.charAt(u),v="",m=a,i===Ca){for(u++,m+=Ca;u<S&&(i=t.charAt(u),i!==ya);){if(s&&i===tF)return;v+=i,u++}if(t.charAt(u)!==ya)return;a+=Ca+v+ya,L=v,u++}else{for(i=null,x="";u<S&&(i=t.charAt(u),!(x&&(i===Bc||i===_c||s&&i===Ht)));){if(xr(i)){if(!o)break;x+=i}else{if(i===Ht)d++;else if(i===kr){if(d===0)break;d--}v+=x,x="",i===Fr&&(v+=Fr,i=t.charAt(++u)),v+=i}u++}a+=v,L=v,u=a.length}for(v="";u<S&&(i=t.charAt(u),!!xr(i));)v+=i,u++;if(i=t.charAt(u),a+=v,v&&(i===Bc||i===_c||s&&i===Ht))if(u++,a+=i,v="",C=i===Ht?kr:i,D=a,s){for(;u<S&&(i=t.charAt(u),i!==C);)i===Fr&&(v+=Fr,i=t.charAt(++u)),u++,v+=i;if(i=t.charAt(u),i!==C)return;for(w=v,a+=v+i,u++;u<S&&(i=t.charAt(u),!!xr(i));)a+=i,u++}else for(x="";u<S;){if(i=t.charAt(u),i===C)g&&(v+=C+x,x=""),g=!0;else if(!g)v+=i;else if(i===kr){a+=v+C+x,w=v;break}else xr(i)?x+=i:(v+=C+x+i,x="",g=!1);u++}if(t.charAt(u)===kr)return r?!0:(a+=kr,L=n.decode.raw(n.unescape(L),e(m).test().end,{nonTerminated:!1}),w&&(D=e(D).test().end,w=n.decode.raw(n.unescape(w),D)),_={type:k?"image":"link",title:w||null,url:L},k?_.alt=n.decode.raw(n.unescape(E),y)||null:(b=n.enterLink(),_.children=n.tokenizeInline(E,y),b()),e(a)(_))}}}});var Hc=q((LT,Uc)=>{"use strict";var iF=Pe(),aF=wa(),uF=sa();Uc.exports=zc;zc.locator=aF;var va="link",oF="image",sF="shortcut",lF="collapsed",Aa="full",cF="!",Fn="[",bn="\\",En="]";function zc(e,t,r){var n=this,a=n.options.commonmark,u=t.charAt(0),i=0,o=t.length,s="",l="",c=va,f=sF,h,m,D,x,g,k,E,C;if(u===cF&&(c=oF,l=u,u=t.charAt(++i)),u===Fn){for(i++,l+=u,k="",C=0;i<o;){if(u=t.charAt(i),u===Fn)E=!0,C++;else if(u===En){if(!C)break;C--}u===bn&&(k+=bn,u=t.charAt(++i)),k+=u,i++}if(s=k,h=k,u=t.charAt(i),u===En){if(i++,s+=u,k="",!a)for(;i<o&&(u=t.charAt(i),!!iF(u));)k+=u,i++;if(u=t.charAt(i),u===Fn){for(m="",k+=u,i++;i<o&&(u=t.charAt(i),!(u===Fn||u===En));)u===bn&&(m+=bn,u=t.charAt(++i)),m+=u,i++;u=t.charAt(i),u===En?(f=m?Aa:lF,k+=m+u,i++):m="",s+=k,k=""}else{if(!h)return;m=h}if(!(f!==Aa&&E))return s=l+s,c===va&&n.inLink?null:r?!0:(D=e.now(),D.column+=l.length,D.offset+=l.length,m=f===Aa?m:h,x={type:c+"Reference",identifier:uF(m),label:m,referenceType:f},c===va?(g=n.enterLink(),x.children=n.tokenizeInline(h,D),g()):x.alt=n.decode.raw(n.unescape(h),D)||null,e(s)(x))}}}});var Gc=q((IT,Vc)=>{"use strict";Vc.exports=fF;function fF(e,t){var r=e.indexOf("**",t),n=e.indexOf("__",t);return n===-1?r:r===-1||n<r?n:r}});var $c=q((qT,jc)=>{"use strict";var pF=Et(),Wc=Pe(),hF=Gc();jc.exports=Yc;Yc.locator=hF;var mF="\\",DF="*",dF="_";function Yc(e,t,r){var n=this,a=0,u=t.charAt(a),i,o,s,l,c,f,h;if(!(u!==DF&&u!==dF||t.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=t.length,a++,l="",u="",!(o&&Wc(t.charAt(a)))))for(;a<f;){if(h=u,u=t.charAt(a),u===s&&t.charAt(a+1)===s&&(!o||!Wc(h))&&(u=t.charAt(a+2),u!==s))return pF(l)?r?!0:(i=e.now(),i.column+=2,i.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,i)})):void 0;!o&&u===mF&&(l+=u,u=t.charAt(++a)),l+=u,a++}}});var Qc=q((BT,Kc)=>{"use strict";Kc.exports=kF;var gF=String.fromCharCode,xF=/\w/;function kF(e){return xF.test(typeof e=="number"?gF(e):e.charAt(0))}});var Xc=q((_T,Jc)=>{"use strict";Jc.exports=FF;function FF(e,t){var r=e.indexOf("*",t),n=e.indexOf("_",t);return n===-1?r:r===-1||n<r?n:r}});var nf=q((PT,rf)=>{"use strict";var bF=Et(),EF=Qc(),Zc=Pe(),wF=Xc();rf.exports=tf;tf.locator=wF;var CF="*",ef="_",yF="\\";function tf(e,t,r){var n=this,a=0,u=t.charAt(a),i,o,s,l,c,f,h;if(!(u!==CF&&u!==ef)&&(o=n.options.pedantic,c=u,s=u,f=t.length,a++,l="",u="",!(o&&Zc(t.charAt(a)))))for(;a<f;){if(h=u,u=t.charAt(a),u===s&&(!o||!Zc(h))){if(u=t.charAt(++a),u!==s){if(!bF(l)||h===s)return;if(!o&&s===ef&&EF(u)){l+=s;continue}return r?!0:(i=e.now(),i.column++,i.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,i)}))}l+=s}!o&&u===yF&&(l+=u,u=t.charAt(++a)),l+=u,a++}}});var uf=q((OT,af)=>{"use strict";af.exports=vF;function vF(e,t){return e.indexOf("~~",t)}});var ff=q((NT,cf)=>{"use strict";var of=Pe(),AF=uf();cf.exports=lf;lf.locator=AF;var wn="~",sf="~~";function lf(e,t,r){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||t.charAt(0)!==wn||t.charAt(1)!==wn||of(t.charAt(2))))for(s=1,l=t.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(a=t.charAt(s),a===wn&&u===wn&&(!i||!of(i)))return r?!0:e(sf+o+sf)({type:"delete",children:n.tokenizeInline(o,c)});o+=u,iLine truncated
|
||||
`,t);r>t&&e.charAt(r-1)===" ";)r--;return r}});var bf=q((UT,Ff)=>{"use strict";var IF=xf();Ff.exports=kf;kf.locator=IF;var qF=" ",BF=`
|
||||
`,_F=2;function kf(e,t,r){for(var n=t.length,a=-1,u="",i;++a<n;){if(i=t.charAt(a),i===BF)return a<_F?void 0:r?!0:(u+=i,e(u)({type:"break"}));if(i!==qF)return;u+=i}}});var wf=q((HT,Ef)=>{"use strict";Ef.exports=PF;function PF(e,t,r){var n=this,a,u,i,o,s,l,c,f,h,m;if(r)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,h=t.length;++i<o;)f=a[i],!(f==="text"||!u[f])&&(c=u[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,t,1),l!==-1&&l<h&&(h=l));s=t.slice(0,h),m=e.now(),n.decode(s,m,D);function D(x,g,k){e(k||x)({type:"text",value:x})}}});var Af=q((VT,vf)=>{"use strict";var OF=Ft(),Cn=Ho(),NF=Go(),RF=Yo(),MF=Fs(),Ia=ws();vf.exports=Cf;function Cf(e,t){this.file=t,this.offset={},this.options=OF(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=NF(t).toOffset,this.unescape=RF(this,"escape"),this.decode=MF(this)}var ue=Cf.prototype;ue.setOptions=Is();ue.parse=js();ue.options=$i();ue.exitStart=Cn("atStart",!0);ue.enterList=Cn("inList",!1);ue.enterLink=Cn("inLink",!1);ue.enterBlock=Cn("inBlock",!1);ue.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];ue.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];ue.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];ue.blockTokenizers={blankLine:Ks(),indentedCode:el(),fencedCode:nl(),blockquote:ll(),atxHeading:pl(),thematicBreak:Dl(),list:vl(),setextHeading:Ll(),html:Ol(),definition:Yl(),table:Kl(),paragraph:Xl()};ue.inlineTokenizers={escape:ic(),autoLink:cc(),url:Fc(),email:Tc(),html:Ic(),link:Mc(),reference:Hc(),strong:$c(),emphasis:nf(),deletion:ff(),code:df(),break:bf(),text:wf()};ue.blockMethods=yf(ue.blockTokenizers);ue.inlineMethods=yf(ue.inlineTokenizers);ue.tokenizeBlock=Ia("block");ue.tokenizeInline=Ia("inline");ue.tokenizeFactory=Ia;function yf(e){var t=[],r;for(r in e)t.push(r);return t}});var If=q((GT,Lf)=>{"use strict";var zF=zo(),UF=Ft(),Tf=Af();Lf.exports=Sf;Sf.Parser=Tf;function Sf(e){var t=this.data("settings"),r=zF(Tf);r.prototype.options=UF(r.prototype.options,t,e),this.Parser=r}});var Bf=q((WT,qf)=>{"use strict";qf.exports=HF;function HF(e){if(e)throw e}});var qa=q((YT,_f)=>{_f.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var Vf=q((jT,Hf)=>{"use strict";var yn=Object.prototype.hasOwnProperty,Uf=Object.prototype.toString,Pf=Object.defineProperty,Of=Object.getOwnPropertyDescriptor,Nf=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Uf.call(t)==="[object Array]"},Rf=function(t){if(!t||Uf.call(t)!=="[object Object]")return!1;var r=yn.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&yn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var a;for(a in t);return typeof a>"u"||yn.call(t,a)},Mf=function(t,r){Pf&&r.name==="__proto__"?Pf(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},zf=function(t,r){if(r==="__proto__")if(yn.call(t,r)){if(Of)return Of(t,r).value}else return;return t[r]};Hf.exports=function e(){var t,r,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(t=arguments[s],t!=null)for(r in t)n=zf(o,r),a=zf(t,r),o!==a&&(c&&a&&(Rf(a)||(u=Nf(a)))?(u?(u=!1,i=n&&Nf(n)?n:[]):i=n&&Rf(n)?n:{},Mf(o,{name:r,newValue:e(c,i,a)})):typeof a<"u"&&Mf(o,{name:r,newValue:a}));return o}});var Wf=q(($T,Gf)=>{"use strict";Gf.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}});var jf=q((KT,Yf)=>{"use strict";var VF=[].slice;Yf.exports=GF;function GF(e,t){var r;return n;function n(){var i=VF.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&r)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){r||(r=!0,t.apply(null,arguments))}function u(i){a(null,i)}}});var Xf=q((QT,Jf)=>{"use strict";var Kf=jf();Jf.exports=Qf;Qf.wrap=Kf;var $f=[].slice;function Qf(){var e=[],t={};return t.run=r,t.use=n,t;function r(){var a=-1,u=$f.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=$f.call(arguments,0),f=c.slice(1),h=u.length,m=-1;if(s){i(s);return}for(;++m<h;)(f[m]===null||f[m]===void 0)&&(f[m]=u[m]);u=f,l?Kf(l,o).apply(null,u):i.apply(null,[nul
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash
Line truncated
|
||||
`;break}case-3:{i=`\r
|
||||
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&a)continue;i=" ";break}default:i=String.fromCharCode(u)}a=u===-2,n.push(i)}return n.join("")}function oi(e){let n={constructs:Nr([ui,...(e||{}).extensions||[]]),content:a(Tu),defined:[],document:a(Lu),flow:a(_u),lazy:{},string:a(Ou),text:a(Nu)};return n;function a(u){return i;function i(o){return zu(n,u,o)}}}function si(e){for(;!Gr(e););return e}var Uu=/[\0\t\n\r]/g;function li(){let e=1,t="",r=!0,n;return a;function a(u,i,o){let s=[],l,c,f,h,m;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(i||void 0).decode(u)),f=0,t="",r&&(u.charCodeAt(0)===65279&&f++,r=void 0);f<u.length;){if(Uu.lastIndex=f,l=Uu.exec(u),h=l&&l.index!==void 0?l.index:u.length,m=u.charCodeAt(h),!l){t=u.slice(f);break}if(m===10&&f===h&&n)s.push(-3),n=void 0;else switch(n&&(s.push(-5),n=void 0),f<h&&(s.push(u.slice(f,h)),e+=h-f),m){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:n=!0,e=1}f=h+1}return o&&(n&&s.push(-5),t&&s.push(t),s.push(null)),s}}var MD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hu(e){return e.replace(MD,zD)}function zD(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let a=r.charCodeAt(1),u=a===120||a===88;return Rr(r.slice(u?2:1),u?16:10)}return Tt(r)||e}function Lt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vu(e.position):"start"in e||"end"in e?Vu(e):"line"in e||"column"in e?ci(e):""}function ci(e){return Gu(e&&e.line)+":"+Gu(e&&e.column)}function Vu(e){return ci(e&&e.start)+"-"+ci(e&&e.end)}function Gu(e){return e&&typeof e=="number"?e:1}var Yu={}.hasOwnProperty;function fi(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),UD(r)(si(oi(r).document().write(li()(e,t,!0))))}function UD(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(du),autolinkProtocol:y,autolinkEmail:y,atxHeading:u(hu),blockQuote:u(Me),characterEscape:y,characterReference:y,codeFenced:u(ct),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:u(ct,i),codeText:u(yt,i),codeTextData:y,data:y,codeFlowValue:y,definition:u(Hn),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:u(em),hardBreakEscape:u(mu),hardBreakTrailing:u(mu),htmlFlow:u(Du,i),htmlFlowData:y,htmlText:u(Du,i),htmlTextData:y,image:u(tm),label:i,link:u(du),listItem:u(rm),listItemValue:h,listOrdered:u(gu,f),listUnordered:u(gu),paragraph:u(nm),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:u(hu),strong:u(im),thematicBreak:u(um)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Jt,autolinkProtocol:oe,blockQuote:s(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:te,characterReference:et,codeFenced:s(g),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:D,codeFlowValue:b,codeIndented:s(k),codeText:s(O),codeTextData:b,data:b,definition:s(),definitionDestinationString:S,definitionLabelString:E,definitionTitleString:C,emphasis:s(),hardBreakEscape:s(I),hardBreakTrailing:s(I),htmlFlow:s(T),htmlFlowData:b,htmlText:s(R),htmlTextData:b,image:s(N),label:ne,labelText:W,lineEnding:_,link:s(z),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ee,resourceDestinationString:p,resourceTitleString:Y,resource:ie,setextHeading:s(L),setextHeadingLineSequence:v,setextHeadingText:d,strong:s(),thematicBreak:s()}};ju(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(A){let P={type:"root",children:[]},V={stack:[P],tokenStack:[],config:t,enter:o,exit:l,buffer:i,resume:c,data:r},j=[],$=-1;for(;++$<A.length;)if(A[$][1].type==="listOrdered"||A[$][1].type==="listUnordered")if(A[$][0]==="enter")j.push($);else{let ye=j.pop();$=a(A,ye,$)}for($=-1;++$<A.length;){let ye=t[A[$][0]];Yu.call(ye,A[$][1].type)&&ye[A[$][1].type].call(Object.assign({sliceSerialize:A[$][2].sliceSerialize},V),A[$][1])}if(V.tokenStack.length>0){let ye=V.tokenStack[V.tokenStack.length-1];(ye[1]||Wu).call(V,void 0,ye[0])}for(P.position={start:it(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:it(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<t.transforms.length;)P=t.transforms[$](P)||P;return P}function a(A,P,V){let j=P-1,$=-1,ye=!1,ft,ze,Xt,Zt;for(;++j<=V;){let xe=A[j];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xe[0]==="enter"?$++:$--,Zt=void 0;break}case"lineEndingBlank":{xe[0]==="enter"&&(ft&&!Zt&&!$&&!Xt&&(Xt=j),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!$&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||$===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(ft){let vt=j;for(ze=void 0;vt--;){let Ue=A[vt];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]=Line truncated
|
||||
`,ur);if(r===-1)return;let n=e.slice(ur,r).trim(),a=e.indexOf(`
|
||||
${t}`,r),u=n;if(u||(u=t==="+++"?"toml":"yaml"),a===-1&&t==="---"&&u==="yaml"&&(a=e.indexOf(`
|
||||
...`,r)),a===-1)return;let i=a+1+ur,o=e.charAt(i+1);if(!/\s?/.test(o))return;let s=e.slice(0,i),l;return{language:u,explicitLanguage:n||null,value:e.slice(r+1,a),startDelimiter:t,endDelimiter:s.slice(-ur),raw:s,start:{line:1,column:0,index:0},end:{index:s.length,get line(){return l??(l=s.split(`
|
||||
`)),l.length},get column(){return l??(l=s.split(`
|
||||
`)),J(0,l,-1).length}},[Jr]:!0}}function Cd(e){let t=wd(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return so(r)+e.slice(r.length)}}:{content:e}}var Ve=Cd;function bi(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function ve(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Bt=(function(e){if(e==null)return Td;if(typeof e=="function")return Xr(e);if(typeof e=="object")return Array.isArray(e)?yd(e):vd(e);if(typeof e=="string")return Ad(e);throw new Error("Expected function, string, or object as test")});function yd(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Bt(e[r]);return Xr(n);function n(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function vd(e){let t=e;return Xr(r);function r(n){let a=n,u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function Ad(e){return Xr(t);function t(r){return r&&r.type===e}}function Xr(e){return t;function t(r,n,a){return!!(Sd(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function Td(){return!0}function Sd(e){return e!==null&&typeof e=="object"&&"type"in e}var lo=[],co=!0,Ei=!1,fo="skip";function wi(e,t,r,n){let a;typeof t=="function"&&typeof r!="function"?(n=r,r=t):a=t;let u=Bt(a),i=n?-1:1;o(e,void 0,[])();function o(s,l,c){let f=s&&typeof s=="object"?s:{};if(typeof f.type=="string"){let m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=lo,D,x,g;if((!t||u(s,l,c[c.length-1]||void 0))&&(m=Ld(r(s,c)),m[0]===Ei))return m;if("children"in s&&s.children){let k=s;if(k.children&&m[0]!==fo)for(x=(n?k.children.length:-1)+i,g=c.concat(k);x>-1&&x<k.children.length;){let E=k.children[x];if(D=o(E,x,g)(),D[0]===Ei)return D;x=typeof D[1]=="number"?D[1]:x+i}}return m}}}function Ld(e){return Array.isArray(e)?e:typeof e=="number"?[co,e]:e==null?lo:[e]}function Ci(e,t,r){let a=Bt((r||{}).ignore||[]),u=Id(t),i=-1;for(;++i<u.length;)wi(e,"text",o);function o(l,c){let f=-1,h;for(;++f<c.length;){let m=c[f],D=h?h.children:void 0;if(a(m,D?D.indexOf(m):void 0,h))return;h=m}if(h)return s(l,c)}function s(l,c){let f=c[c.length-1],h=u[i][0],m=u[i][1],D=0,g=f.children.indexOf(l),k=!1,E=[];h.lastIndex=0;let C=h.exec(l.value);for(;C;){let S=C.index,w={index:C.index,input:C.input,stack:[...c,l]},d=m(...C,w);if(typeof d=="string"&&(d=d.length>0?{type:"text",value:d}:void 0),d===!1?h.lastIndex=S+1:(D!==S&&E.push({type:"text",value:l.value.slice(D,S)}),Array.isArray(d)?E.push(...d):d&&E.push(d),D=S+C[0].length,k=!0),!h.global)break;C=h.exec(l.value)}return k?(D<l.value.length&&E.push({type:"text",value:l.value.slice(D)}),f.children.splice(g,1,...E)):E=[l],g+E.length}}function Id(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let a=r[n];t.push([qd(a[0]),Bd(a[1])])}return t}function qd(e){return typeof e=="string"?new RegExp(ve(e),"g"):e}function Bd(e){return typeof e=="function"?e:function(){return e}}function vi(){return{transforms:[Md],enter:{literalAutolink:_d,literalAutolinkEmail:yi,literalAutolinkHttp:yi,literalAutolinkWww:yi},exit:{literalAutolink:Rd,literalAutolinkEmail:Nd,literalAutolinkHttp:Pd,literalAutolinkWww:Od}}}function _d(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function yi(e){this.config.enter.autolinkProtocol.call(this,e)}function Pd(e){this.config.exit.autolinkProtocol.call(this,e)}function Od(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Nd(e){this.config.exit.autolinkEmail.call(this,e)}function Rd(e){this.exit(e)}function Md(e){Ci(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zd],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ud]],{ignore:["link","linkReference"]})}function zd(e,t,r,n,a){let u="";if(!po(a)||(/^w/i.test(t)&&(r=t+r,t="",u="http://"),!Hd(r)))return!1;let i=Vd(r+n);if(!i[0])return!1;let o={type:"link",title:null,url:u+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function Ud(e,t,r,n){return!po(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Hd(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Vd(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),a=bi(e,"("),u=bi(e,")");for(;n!==-1&&a>u;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),u++;return[e,r]}function po(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ie(r)||Dt(r))
Line truncated
|
||||
|
||||
`),n=r===-1?t:t.slice(0,r);if(Tp(n))return e(n)({type:Ap(n)?"export":"import",value:n})};Ua.notInBlock=!0;Ua.locator=e=>Tp(e)?-1:1;var Sp=(e,t)=>{let r=Sb.exec(t);if(r)return e(r[0])({type:"esComment",value:r[1].trim()})};Sp.locator=(e,t)=>e.indexOf("{",t);var Lp=function(){let{Parser:e}=this,{blockTokenizers:t,blockMethods:r,inlineTokenizers:n,inlineMethods:a}=e.prototype;t.esSyntax=Ua,n.esComment=Sp,r.splice(r.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var De="string",de="array",st="cursor",Ae="indent",Te="align",je="trim",ke="group",Fe="fill",be="if-break",$e="indent-if-break",Ke="line-suffix",Qe="line-suffix-boundary",ge="line",Je="label",Se="break-parent",Tn=new Set([st,Ae,Te,je,ke,Fe,be,$e,Ke,Qe,ge,Je,Se]);function Ip(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function Ib(e){if(typeof e=="string")return De;if(Array.isArray(e))return de;if(!e)return;let{type:t}=e;if(Tn.has(t))return t}var me=Ib;var qb=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Bb(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(me(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=qb([...Tn].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Ha=class extends Error{name="InvalidDocError";constructor(t){super(Bb(t)),this.doc=t}},wt=Ha;var qp={};function _b(e,t,r,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===qp){r(a.pop());continue}r&&a.push(u,qp);let i=me(u);if(!i)throw new wt(u);if(t?.(u)!==!1)switch(i){case de:case Fe:{let o=i===de?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case be:a.push(u.flatContents,u.breakContents);break;case ke:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Te:case Ae:case $e:case Je:case Ke:a.push(u.contents);break;case De:case st:case je:case Qe:case ge:case Se:break;default:throw new wt(u)}}}var Bp=_b;function Pb(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){return Ip(r,u,a)}function a(u){switch(me(u)){case de:return t(u.map(n));case Fe:return t({...u,parts:u.parts.map(n)});case be:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case ke:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),t({...u,contents:o,expandedStates:i})}case Te:case Ae:case $e:case Je:case Ke:return t({...u,contents:n(u.contents)});case De:case st:case je:case Qe:case ge:case Se:return t(u);default:throw new wt(u)}}}function _p(e){if(e.length>0){let t=J(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Pp(e){let t=new Set,r=[];function n(u){if(u.type===Se&&_p(r),u.type===ke){if(r.push(u),t.has(u))return!1;t.add(u)}}function a(u){u.type===ke&&r.pop().break&&_p(r)}Bp(e,n,a,!0)}function Xe(e,t=wr){return Pb(e,r=>typeof r=="string"?Sn(t,r.split(`
|
||||
`)):r)}var Le=ar,Ln=ar,Op=ar,Np=ar;function Cr(e){return Le(e),{type:Ae,contents:e}}function we(e,t){return Np(e),Le(t),{type:Te,contents:t,n:e}}function yr(e){return we({type:"root"},e)}var Wt={type:Se};function Yt(e){return Op(e),{type:Fe,parts:e}}function jt(e,t={}){return Le(e),Ln(t.expandedStates,!0),{type:ke,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Rp(e,t="",r={}){return Le(e),t!==""&&Le(t),{type:be,breakContents:e,flatContents:t,groupId:r.groupId}}function Sn(e,t){Le(e),Ln(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var In={type:ge},qn={type:ge,soft:!0},vr={type:ge,hard:!0},Z=[vr,Wt],Ob={type:ge,hard:!0,literal:!0},wr=[Ob,Wt];var Nb="cr",Rb="crlf";var Mb="\r",zb=`\r
|
||||
`,Ub=`
|
||||
`,Hb=Ub;function Mp(e){return e===Nb?Mb:e===Rb?zb:Hb}var zp=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?X(0,g,`
|
||||
`,a):g;k&&(l.write(k),i.length>0&&(u+=Ar(k)));break}case de:for(let k=g.length-1;k>=0;k--)i.push({indent:D,mode:x,doc:g[k]});break;case st:l.markPosition();break;case Ae:i.push({indent:Qp(D,t),mode:x,doc:g.contents});break;case Te:i.push({indent:Kp(D,g.n,t),mode:x,doc:g.contents});break;case je:u-=l.trim();break;case ke:{let k=(function(){if(x===Ne&&!o)return{indent:D,mode:g.break?Ce:Ne,doc:g.contents};o=!1;let C=n-u,S=s.length>0,w={indent:D,mode:Ne,doc:g.contents};if(!g.break&&_n(w,i,C,S,r))return w;if(!g.expandedStates)return{indent:D,mode:Ce,doc:g.contents};if(!g.break)for(let d=1;d<g.expandedStates.length-1;d++){let v={indent:D,mode:Ne,doc:g.expandedStates[d]};if(_n(v,i,C,S,r))return v}return{indent:D,mode:Ce,doc:J(0,g.expandedStates,-1)}})();i.push(k),g.id&&(r[g.id]=k.mode);break}case Fe:{let k=n-u,E=g[Ka]??0,{parts:C}=g,S=C.length-E;if(S===0)break;let w=C[E+0],d=C[E+1],v={indent:D,mode:Ne,doc:w},L={indent:D,mode:Ce,doc:w},y=_n(v,[],k,s.length>0,r,!0);if(S===1){y?i.push(v):i.push(L);break}let b={indent:D,mode:Ne,doc:d},_={indent:D,mode:Ce,doc:d};if(S===2){y?i.push(b,v):i.push(_,L);break}let I=C[E+2],T={indent:D,mode:x,doc:{...g,[Ka]:E+2}},O=_n({indent:D,mode:Ne,doc:[w,d,I]},[],k,s.length>0,r,!0);i.push(T),O?i.push(b,v):y?i.push(_,v):i.push(_,L);break}case be:case $e:{let k=g.groupId?r[g.groupId]:x;if(k===Ce){let E=g.type===be?g.breakContents:g.negate?g.contents:Cr(g.contents);E&&i.push({indent:D,mode:x,doc:E})}if(k===Ne){let E=g.type===be?g.flatContents:g.negate?Cr(g.contents):g.contents;E&&i.push({indent:D,mode:x,doc:E})}break}case Ke:s.push({indent:D,mode:x,doc:g.contents});break;case Qe:s.length>0&&i.push({indent:D,mode:x,doc:vr});break;case ge:switch(x){case Ne:if(!g.hard){g.soft||(l.write(" "),u+=1);break}o=!0;case Ce:if(s.length>0){i.push({indent:D,mode:x,doc:g},...s.reverse()),s.length=0;break}g.literal?(l.write(a),u=0,D.root&&(D.root.value&&l.write(D.root.value),u=D.root.length)):(l.trim(),l.write(a+D.value),u=D.length);break}break;case Je:i.push({indent:D,mode:x,doc:g.contents});break;case Se:break;default:throw new wt(g)}i.length===0&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let{text:c,positions:f}=l.finish();if(f.length!==2)return{formatted:c};let[h,m]=f;return{formatted:c,cursorNodeStart:h,cursorNodeText:c.slice(h,m)}}var Xb=Array.prototype.toReversed??function(){return[...this].reverse()},Zb=qt("toReversed",function(){if(Array.isArray(this))return Xb}),Zp=Zb;function eE(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var tE=eE();function eh(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function rE(e){return e=eh(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function nE(e){e=eh(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Qa(e){return tE?nE(e):rE(e)}var th=e=>String(e).split(/[/\\]/).pop(),rh=e=>String(e).startsWith("file:");function nh(e,t){if(!t)return;let r=th(t).toLowerCase();return e.find(({filenames:n})=>n?.some(a=>a.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(a=>r.endsWith(a)))}function iE(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var aE=void 0;function ih(e,t){if(t){if(rh(t))try{t=Qa(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function uE(e,t){let r=Zp(0,e.plugins).flatMap(a=>a.languages??[]);return(iE(r,t.language)??nh(r,t.physicalFile)??nh(r,t.file)??ih(r,t.physicalFile)??ih(r,t.file)??aE?.(r,t.physicalFile))?.parsers[0]}var Ja=uE;function oE(e){return!!e?.[Jr]}var Xa=oE;var sE=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=t;function t(r,n){let{frontMatter:a}=Ve(n);if(a)return r(a.raw)({...a,type:"frontMatter"})}t.onlyAtStart=!0},ah=sE;var uh=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{16ff2}-\u{16ff6}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b81d}\u{2b820}-\u{2cead}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{33479}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01e
Line truncated
|
||||
`:" "});continue}if((a===0||a===r.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${uh.source})`,"u"));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:$t,isCJ:!1,hasLeadingPunctuation:Ze.test(s[0]),hasTrailingPunctuation:Ze.test(J(0,s,-1))});continue}if(Ze.test(s)){n({type:"word",value:s,kind:Tr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(lE.test(s)){n({type:"word",value:s,kind:Ct,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:Re,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return t;function n(a){let u=J(0,t,-1);u?.type==="word"&&!i($t,Tr)&&[u.value,a.value].every(o=>!/\u3000/.test(o))&&t.push({type:"whitespace",value:""}),t.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function lt(e,t){let r=t.originalText.slice(e.position.start.offset,e.position.end.offset);if(t.parser!=="mdx"){let u=e.children[0];u&&(r=t.originalText.slice(e.position.start.offset,u.position.start.offset))}let{numberText:n,leadingSpaces:a}=r.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/).groups;return{number:Number(n),leadingSpaces:a}}function eu(e,t){return!e.ordered||e.children.length<2||lt(e.children[1],t).number!==1?!1:lt(e.children[0],t).number!==0?!0:e.children.length>2&<(e.children[2],t).number===1}function On(e,t){let{value:r}=e;return e.position.end.offset===t.length&&r.endsWith(`
|
||||
`)&&t.endsWith(`
|
||||
`)?r.slice(0,-1):r}function Ee(e,t){return(function r(n,a,u){let i={...t(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>r(o,s,[i,...u]))),i})(e,null,[])}function Nn(e){if(e?.type!=="link"||e.children.length!==1)return!1;let[t]=e.children;return pt(e)===pt(t)&&ht(e)===ht(t)}function Lr(e){let t;if(e.type==="html")t=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/);else{let r;e.type==="esComment"?r=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(r=e.children[0]),r&&(t=r.value.match(/^prettier-ignore(?:-(start|end))?$/))}return t?t[1]||"next":!1}function Ir(e,t){return r(e,t,n=>n.ordered===e.ordered);function r(n,a,u){let i=-1;for(let o of a.children)if(o.type===n.type&&u(o)?i++:i=-1,o===n)return i}}function oh(e){return e.index>0&&Lr(e.previous)==="next"}function Kt(e){let{start:t,end:r}=e.position;return t.line!==r.line}var Qt=e=>e?.type==="whitespace"&&e.value===`
|
||||
`;function cE(){return e=>Ee(e,(t,r,[n])=>t.type!=="html"||vp.test(t.value)||Pn.has(n.type)?t:{...t,type:"jsx"})}var sh=cE;var fE=function(){let e=this.Parser.prototype,t=e.inlineMethods;t.splice(t.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=r;function r(n,a){let u=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}r.locator=function(n,a){return n.indexOf("{",a)}},lh=fE;var pE=function(){let e="wikiLink",t=/^\[\[(?<linkContents>.+?)\]\]/s,r=this.Parser.prototype,n=r.inlineMethods;n.splice(n.indexOf("link"),0,e),r.inlineTokenizers.wikiLink=a;function a(u,i){let o=t.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},ch=pE;function tu(e){let t=(0,mh.default)().use(hh.default,{commonmark:!0,blocks:[yp]}).use(fh.default).use(ah).use(ph.default).use(Lp).use(lh).use(sh).use(ch);return t.run(t.parse(e))}var Dh="format";var dh=/<!--\s*@(?:noformat|noprettier)\s*-->|\{\s*\/\*\s*@(?:noformat|noprettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:noformat|noprettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/m,gh=/<!--\s*@(?:format|prettier)\s*-->|\{\s*\/\*\s*@(?:format|prettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:format|prettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/m;var Rn=e=>Ve(e).content.trimStart().match(gh)?.index===0,xh=e=>Ve(e).content.trimStart().match(dh)?.index===0,kh=e=>{let{frontMatter:t}=Ve(e),r=`<!-- @${Dh} -->`;return t?`${t.raw}
|
||||
|
||||
${r}
|
||||
|
||||
${e.slice(t.end.index)}`:`${r}
|
||||
|
||||
${e}`};function Fh(e){return{astFormat:"mdast",hasPragma:Rn,hasIgnorePragma:xh,locStart:pt,locEnd:ht,parse:e}}var hE=Fh(_i),mE=Fh(tu);var pu={};Or(pu,{mdast:()=>sw});function DE(e,t){let r=e.matchAll(new RegExp(`(?:${ve(t)})+`,"g"));return r.reduce||(r=[...r]),r.reduce((n,[a])=>Math.max(n,a.length),0)/t.length}var Mn=DE;function dE(e,t){let{node:r}=e;switch(r.type){case"code":{let{lang:n}=r;if(!n)return;let a;return n==="angular-ts"?a=Ja(t,{language:"typescript"}):n==="angular-html"?a="angular":a=Ja(t,{language:n}),a?async u=>{let i={parser:a};n==="ts"||n==="typescript"?i.filepath="dummy.ts":n==="tsx"&&(i.filepath="dummy.tsx");let o=await u(t.parser==="mdx"?On(r,t.originalText):r.value,i),s=t.__inJsTemplate?"~":"`",l=s.repeat(Math.max(3,Mn(r.value,s)+1));return yr([l,r.lang,r.meta?" "+r.meta:"",Z,Xe(o),Z,l])}:void 0}case"import":case"export":return n=>n(r.value,{__onHtmlBindingRoot:a=>gE(a,r.type),parser:"babel"});case"jsx":return n=>n(`<$>${r.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}function gE(e,t){let{program:{body:r}}=e;if(r.some(n=>!(n.type==="ImportDeclaration"||n.type==="ExportDefaultDeclaration"||n.type==="ExportNamedDeclaration")))throw new Error(`Unexpected '${t}' in MDX.`)}var bh=dE;var nu=At(mn(),1);var xE=new Set(["position","raw"]);function iu(e,t,r){if((e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete t.value,e.type==="list"&&delete t.isAligned,(e.type==="list"||e.type==="listItem")&&delete t.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(t.value=X(0,e.value,`
|
||||
`," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(t.label=(0,nu.default)(e.label)),e.type==="imageReference"&&e.referenceType==="collapsed"&&(t.alt=(0,nu.default)(e.alt)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")t.url=X(0,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(t.title=X(0,e.title,/\\(?=["')])/g,"")),r?.type==="root"&&r.children.length>0&&(r.children[0]===e||Xa(r.children[0])&&r.children[1]===e)&&e.type==="html"&&Rn(e.value))return null}iu.ignoredProperties=xE;function au(e,t){let r=t.originalText.slice(e.node.position.start.offset,e.node.position.end.offset);return t.parser==="mdx"?r:e.node.type==="list"&&e.findAncestor(n=>n.type==="blockquote")&&t.proseWrap!=="always"?r.replace(/\n>\s*$/,""):r}var jh=At(mn(),1);function kE(e,t){let r=e.match(new RegExp(`(${ve(t)})+`,"g"));if(r===null)return 1;let n=new Map,a=0;for(let u of r){let i=u.length/t.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;u<a;u++)if(!n.get(u))return u;return a+1}var Eh=kE;var wh=Object.freeze({character:"'",codePoint:39}),Ch=Object.freeze({character:'"',codePoint:34}),FE=Object.freeze({preferred:wh,alternate:Ch}),bE=Object.freeze({preferred:Ch,alternate:wh});function yh(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?FE:bE,{length:a}=e,u=0,i=0;for(let o=0;o<a;o++){let s=e.charCodeAt(o);s===r.codePoint?u++:s===n.codePoint&&i++}return(u>i?n:r).character}var uu=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},vh=uu;function ae(e,t,r,n={}){let{processor:a=r}=n,u=[];return e.each(()=>{let i=a(e);i!==!1&&(u.length>0&&EE(e)&&(u.push(Z),CE(e,t)&&u.push(Z)),u.push(i))},"children"),u}function EE({node:e,parent:t}){let r=Za.has(e.type),n=e.type==="html"&&Pn.has(t.type);return!r&&!n}var wE=new Set(["listItem","definition"]);function CE(e,t){let{node:r,previous:n,parent:a}=e;if(t.parser==="mdx"){if(Ah(n,t)||r.type==="list"&&a.type==="listItem"&&(n.type==="code"||n.type==="paragraph")&&n.position.end.line+1<r.position.start.line)return!0}else{if(Kt(r)&&r.position.start.line<n.position.end.line)return!1;if(yE(e)||r.type==="list"&&a.type==="listItem"&&(n.type==="code"||n.type==="paragraph")&&n.position.end.line+1<r.position.start.line)return!0}let i=n.type===r.type&&wE.has(r.type),o;t.parser==="mdx"?o=a.type==="listItem"&&(r.type==="list"||!Ah(a,t)):o=a.type==="listItem"&&(r.type==="list"||!e.callParent(Th));let s=Lr(n)==="next",l=r.type==="html"&&n.type==="html"&&n.position.end.line+1===r.position.start.line,c=t.parser!=="mdx"&&r.type==="html"&&n.type==="paragraph"&&n.position.end.line+1===r.position.start.line,f=r.type==="html"&&a.type==="listItem"&&n.type==="paragraph"&&n.position.end.line+1===r.position.start.line;return!(i||o||s||l||c||f)}function Ah(e,t){return e.type==="listItem"&&(e.spread||t.originalText.charAt(e.position.end.offset-1)===`
|
||||
`)}function Th({node:e,parent:t,next:r}){return e.type==="listItem"&&(e.spread||t.type==="list"&&r?.type==="listItem"&&e.position.end.line+1<r.position.start.line)}function yE(e){return e.index===0?!1:Th({node:e.previous,parent:e.parent,next:e.node})}function vE(e,t,r){return["#".repeat(e.node.depth)+" ",ae(e,t,r)]}function AE(e,t,r){let{originalText:n}=t,{node:a}=e,u=a.position.end.offset,i=n.lastIndexOf(`
|
||||
`,u-1)+1,o=n.slice(i,u),s=Math.max(o.indexOf("="),o.indexOf("-")),l=o.slice(s);return[ae(e,t,r),Z,l]}function Sh(e,t,r){return t.parser!=="mdx"&&Kt(e.node)?AE(e,t,r):vE(e,t,r)}var TE=999999999;function qh(e,t,r){let{node:n}=e,a=Ir(n,e.parent),u=eu(n,t),i=SE(e);return ae(e,t,r,{processor(){let o=l(),{node:s}=e;if(s.children.length===2&&s.children[1].type==="html"&&s.children[0].position.start.column!==s.children[1].position.start.column)return[o,Lh(e,t,r,o)];return[o,we(" ".repeat(o.length),Lh(e,t,r,o))];function l(){let c=n.ordered?(e.isFirst?n.start:u?1:Math.min(n.start+e.index,TE))+(a%2===0?". ":") "):a%2===0?"- ":"* ",f=n.isAligned&&n.ordered?_h(c,t):c;if(f.length>=i)return f;f=f.trimEnd();let h=Math.min(i-f.length,4);h>0&&(f+=" ".repeat(h));let m=Math.min(i-f.length,3);return m>0&&(f=" ".repeat(m)+f),f}}})}function Lh(e,t,r,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,ae(e,t,r,{processor({node:i,isFirst:o}){if(o&&i.type!=="list"||i.type==="code"&&i.isIndented)return we(" ".repeat(u.length),r());let s=" ".repeat(Ph(t.tabWidth-n.length,0,3));return[s,we(s,r())]}})]}function SE(e){let{node:t,next:r}=e;return t.checked===null||!(r?.type==="code"&&r.isIndented)?0:4+[.../^[ \t]*/.exec(r.value)?.[0]??""].reduce((a,u)=>a+(u===" "?4:1),0)+1}function Bh(e,t,r){let{node:n}=e,a=Ir(n,e.parent),u=eu(n,t);return ae(e,t,r,{processor(){let i=s(),{node:o}=e;if(o.children.length===2&&o.children[1].type==="html"&&o.children[0].position.start.column!==o.children[1].position.start.column)return[i,Ih(e,t,r,i)];return[i,we(" ".repeat(i.length),Ih(e,t,r,i))];function s(){let l=n.ordered?(e.isFirst?n.start:u?1:n.start+e.index)+(a%2===0?". ":") "):a%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?_h(l,t):l}}})}function Ih(e,t,r,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,ae(e,t,r,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return we(" ".repeat(u.length),r());let s=" ".repeat(Ph(t.tabWidth-n.length,0,3));return[s,we(s,r())]}})]}function _h(e,t){let r=n();return e+" ".repeat(r>=4?0:r);function n(){let a=e.length%t.tabWidth;return a===0?0:t.tabWidth-a}}function Ph(e,t,r){return Math.max(t,Math.min(e,r))}function Oh(e,t,r){let n=e.map(r,"children");return LE(n)}function LE(e){let t=[""];return(function r(n){for(let a of n){let u=me(a);if(u===de){r(a);continue}let i=a,o=[];u===Fe&&([i,...o]=a.parts),t.push([t.pop(),i],...o)}})(e),Yt(t)}function Nh(e,t){let r=[""];return e.each(()=>{let{node:n}=e,a=t();switch(n.type){case"whitespace":if(me(a)!==De){r.push(a,"");break}default:r.push([r.pop(),a])}},"children"),Yt(r)}function Rh(e,t,r){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let h=Xp(r(),t).formatted,m=Ar(h);return a[f]=Math.max(a[f]??3,m),{text:h,width:m}},"children"),"children"),i=s(!1);if(t.proseWrap!=="never")return[Wt,i];let o=s(!0);return[Wt,jt(Rp(o,i))];function s(f){return Sn(vr,[c(u[0],f),l(f),...u.slice(1).map(h=>c(h,f))].map(h=>`| ${h.join(" | ")} |`))}function l(f){return a.map((h,m)=>{if(t.parser!=="mdx"&&m>=u[0].length)return null;let D=n.align[m],x=D==="center"||D==="left"?":":"-",g=D==="center"||D==="right"?":":"-",k=f?"-":"-".repeat(h-2);return`${x}${k}${g}`}).filter(h=>h!==null)}function c(f,h){return f.map(({text:m,width:D},x)=>{if(h)return m;let g=a[x]-D,k=n.align[x],E=0;k==="right"?E=g:k==="center"&&(E=Math.floor(g/2));let C=g-E;return`${" ".repeat(E)}${m}${" ".repeat(C)}`})}}var IE=new Set(["tableCell","link","wikiLink"]),Mh=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function qE({parent:e}){if(e.usesCJSpaces===void 0){let t={" ":0,"":0},{children:r}=e;for(let n=1;n<r.length-1;++n){let a=r[n];if(a.type==="whitespace"&&(a.value===" "||a.value==="")){let u=r[n-1].kind,i=r[n+1].kind;(u===Re&&i===$t||u===$t&&i===Re)&&++t[a.value]}}e.usesCJSpaces=t[" "]>t[""]}return e.usesCJSpaces}function BE(e,t){if(t)return!0;let{previous:r,next:n}=e;if(!r||!n)return!0;let a=r.kind,u=n.kind;return zh(a)&&zh(u)||a===Ct&&u===Re||u===Ct&&a===Re?!0:a===Tr||u===Tr||a===Re&&u===Re?!1:Mh.has(n.value[0])||Mh.has(J(0,r.value,-1))?!0:r.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:qE(e)}function zh(e){return e===$t||e===Ct}function _E(e,t,r,n,a){if(r!=="always"||e.hasAncestor(o=>IE.has(o.type)||o.type==="heading"&&(a.parser==="mdx"||!Kt(o))))return!1;if(n)return t!=="";let{previous:u,next:i}=e;return!u||!i?!0:t===""?!1:u.kind===Ct&&i.kind===Re||i.kind===Ct&&u.kind===Re?!0:!(u.isCJ||i.isCJ)}function ou(e,t,r,n,a){if(r==="preserve"&&t===`
|
||||
`)return Z;let u=t===" "||t===`
|
||||
`&&BE(e,n);return _E(e,t,r,n,a)?u?In:qn:u?" ":""}var PE=/^(?:=+|-+)$/;function Uh(e,t){let{node:r}=e,n=e.findAncestor(u=>u.type==="emphasis"||u.type==="strong"),a=r.value;return n?(e.isFirst&&(a.startsWith("*")||a.startsWith("_"))&&e.callParent(()=>e.isFirst)&&e.grandparent===n&&(a=`\\${a}`),a=X(0,a,/(\\+|^|.)(\*+|_+)($|.)/g,(u,i,o,s)=>[...i].every(l=>l==="\\")&&i.length%2===1?u:OE(J(0,i,-1)||J(1,e.previous?.value,-1),o,s[0]||e.next?.value[0])?`${i}\\${o}${s}`:u),a):t.proseWrap==="preserve"&&e.parent.type==="sentence"&&PE.test(a)&&Qt(e.previous)&&(e.isLast||Qt(e.next))?`\\${a}`:a}function OE(e,t,r){if(!e||!r)return null;let n=/[\p{Space_Separator}\t\n\f\r]/u.test(r),a=/[\p{Space_Separator}\t\n\f\r]/u.test(e),u=Ze.test(r),i=Ze.test(e),o=!n&&(!u||u&&(a||i)),s=!a&&(!i||i&&(n||u));return t[0]==="*"?o||s:o?!s||i:s?!o||u:!1}function Hh(e){let{node:t}=e,r=X(0,X(0,t.value,"*","\\*"),new RegExp([`(^|${Ze.source})(_+)`,`(_+)(${Ze.source}|$)`].join("|"),"gu"),(u,i,o,s,l)=>X(0,o?`${i}${o}`:`${s}${l}`,"_","\\_")),n=(u,i,o)=>u.type==="sentence"&&o===0,a=(u,i,o)=>Nn(u.children[o-1]);return r!==t.value&&(e.match(void 0,n,a)||e.match(void 0,n,(u,i,o)=>u.type==="emphasis"&&o===0,a))&&(r=r.replace(/^(\\?[*_])+/,u=>X(0,u,"\\",""))),r}function Vh(e){let{previous:t,next:r}=e;return t?.type==="sentence"&&J(0,t.children,-1)?.type==="word"&&!J(0,t.children,-1).hasTrailingPunctuation&&!/[\p{Space_Separator}\t\n\f\r]$/u.test(J(0,t.children,-1).value)||r?.type==="sentence"&&r.children[0]?.type==="word"&&!r.children[0].hasLeadingPunctuation&&!/^[\p{Space_Separator}\t\n\f\r]/u.test(r.children[0].value)}function NE(e){let{siblings:t,index:r}=e;if(!t||typeof r!="number")return!1;let n=t[r+2];return n?.type==="whitespace"&&n.value===""}function RE(e){if(!Qt(e.node)||e.next?.value!=="-")return!1;let t=e.siblings[e.index+2];return!t||Qt(t)}function lu(e,t,r){let{node:n}=e;if(zE(e)){let a=[""],u=Sr(t.originalText.slice(n.position.start.offset,n.position.end.offset));for(let i of u){if(i.type==="word"){a.push([a.pop(),i.value]);continue}let o=ou(e,i.value,t.proseWrap,!0,t);if(me(o)===De){a.push([a.pop(),o]);continue}a.push(o,"")}return Yt(a)}switch(n.type){case"root":return n.children.length===0?"":[ME(e,t,r),Z];case"paragraph":return Oh(e,t,r);case"sentence":return Nh(e,r);case"word":return t.parser!=="mdx"?Uh(e,t):Hh(e);case"whitespace":{let{next:a}=e,u=a&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(a.value)&&!NE(e)&&!(t.proseWrap==="preserve"&&RE(e))?"never":t.proseWrap;return ou(e,n.value,u,!1,t)}case"emphasis":{let a;if(Nn(n.children[0]))a=t.originalText[n.position.start.offset];else{let u=Vh(e),i=e.callParent(({node:o})=>o.type==="strong"&&Vh(e));a=u||i||e.hasAncestor(o=>o.type==="emphasis")?"*":"_"}return[a,ae(e,t,r),a]}case"strong":return["**",ae(e,t,r),"**"];case"delete":return["~~",ae(e,t,r),"~~"];case"inlineCode":{let a=t.proseWrap==="preserve"?n.value:X(0,n.value,`
|
||||
`," ");t.parser!=="mdx"&&e.hasAncestor(s=>s.type==="tableCell")&&(a=X(0,a,"|","\\|"));let u=Eh(a,"`"),i="`".repeat(u),o=a.startsWith("`")||a.endsWith("`")||/^[\n ]/.test(a)&&/[\n ]$/.test(a)&&/[^\n ]/.test(a)?" ":"";return[i,o,a,o,i]}case"wikiLink":{let a;return t.proseWrap==="preserve"?a=n.value:a=X(0,n.value,/[\t\n]+/g," "),["[[",a,"]]"]}case"link":switch(t.originalText[n.position.start.offset]){case"<":{let a="mailto:";return["<",n.url.startsWith(a)&&t.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+a.length)!==a?n.url.slice(a.length):n.url,">"]}case"[":return["[",ae(e,t,r),"](",t.parser!=="mdx"&&n.url===""?"<>":su(n.url,")"),Un(n.title,t),")"];default:return t.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),Un(n.title,t),")"];case"blockquote":return["> ",we("> ",ae(e,t,r))];case"heading":return Sh(e,t,r);case"code":{if(n.isIndented){let i=" ".repeat(4);return we(i,[i,Xe(n.value,Z)])}let a=t.__inJsTemplate?"~":"`",u=a.repeat(Math.max(3,Mn(n.value,a)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",Z,Xe(t.parser==="mdx"?On(n,t.originalText):n.value,Z),Z,u]}case"html":{let{parent:a,isLast:u}=e,i=a.type==="root"&&u?n.value.trimEnd():n.value,o=/^<!--.*-->$/s.test(i);return Xe(i,o?Z:yr(wr))}case"list":return t.parser==="mdx"?Bh(e,t,r):qh(e,t,r);case"thematicBreak":{let{ancestors:a}=e,u=a.findIndex(o=>o.type==="list");return u===-1?"---":Ir(a[u],a[u+1])%2===0?"***":"---"}case"linkReference":return["[",ae(e,t,r),"]",n.referenceType==="full"?zn(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":{let a=Yh(n,t);return n.referenceType==="full"?["![",a,"]",zn(n)]:[...t.parser==="mdx"?["![",a,"]"]:["!",zn(n)],n.referenceType==="collapsed"?"[]":""]}case"definition":{let a=t.proseWrap==="always"?In:" ";return jt([zn(n),":",Cr([a,t.parser!=="mdx"&&n.url===""?"<>":su(n.url),n.title===null?"":[a,Un(n.title,t,!1)]])])}case"footnote":return["[^",ae(e,t,r),"]"];case"footnoteReference":return Wh(n);case"footnoteDefinition":{let a=n.children.length===1&&n.children[0].type==="paragraph"&&(t.proseWrap==="never"||t.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Wh(n),": ",a?ae(e,t,r):jt([we(" ".repeat(4),ae(e,t,r,{processor:({isFirst:u})=>u?jt([qn,r()]):r()}))])]}case"table":return Rh(e,t,r);case"tableCell":return ae(e,t,r);case"break":return/\s/.test(t.originalText[n.position.start.offset])?[" ",yr(wr)]:["\\",Z];case"liquidNode":return Xe(n.value,Z);case"import":case"export":case"jsx":return n.value.trimEnd();case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",n.meta?" "+n.meta:"",Z,n.value?[Xe(n.value,Z),Z]:"","$$"];case"inlineMath":return t.originalText.slice(pt(n),ht(n));case"text":return Xe(n.value,Z);default:throw new vh(n,"Markdown")}}function ME(e,t,r){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(Lr(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return ae(e,t,r,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[Gh(u[o.start.index]),t.originalText.slice(o.start.offset,o.end.offset),Gh(u[o.end.index])];if(o.start.index<i&&i<o.end.index)return!1;if(i===o.end.index)return n.shift(),!1}return r()}})}function Gh(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function zE(e){let t=e.findAncestor(r=>r.type==="linkReference"||r.type==="imageReference");return t&&(t.type!=="linkReference"||t.referenceType!=="full")}var UE=(e,t)=>{for(let r of t)e=X(0,e,r,encodeURIComponent(r));return e};function su(e,t=[]){let r=[" ",...Array.isArray(t)?t:[t]];return new RegExp(r.map(n=>ve(n)).join("|")).test(e)?`<${UE(e,"<>")}>`:e}function Un(e,t,r=!0){if(!e)return"";if(r)return" "+Un(e,t,!1);if(t.parser==="mdx"&&(e=X(0,e,/\\(?=["')])/g,"")),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=yh(e,t.singleQuote);return e=X(0,e,"\\","\\\\"),e=X(0,e,n,`\\${n}`),`${n}${e}${n}`}function zn(e,t){let r=(0,jh.default)(e.label);return t?.parser==="mdx"?`[${r}]`:`[${X(0,r,/[\\[\]]/g,a=>`\\${a}`)}]`}function Wh(e){return`[^${e.label}]`}function Yh(e,t){return t.parser!=="mdx"&&e.originalAltText?e.originalAltText:e.alt||""}var cu=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let a=0;a<t.length&&r.has(t.charAt(a));a++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let a=t.length-1;a>=0&&r.has(t.charAt(a));a--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))Line truncated
|
||||
`)){if(n.length===0)continue;let a=this.getLeadingWhitespaceCount(n);if(a===0)return 0;n.length!==a&&a<r&&(r=a)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},$h=cu;var HE=[" ",`
|
||||
`,"\f","\r"," "],VE=new $h(HE),qr=VE;var GE=/^\\?.$/su,WE=/^\n *>[ >]*$/;function YE(e,t){return t.parser==="mdx"?e=jE(e,t):e=$E(e,t),e=QE(e),t.parser==="mdx"?e=tw(e,t):e=ew(e,t),t.parser!=="mdx"&&(e=rw(e,t)),t.parser==="mdx"?e=iw(e,t):e=nw(e,t),t.parser==="mdx"?e=JE(e):e=XE(e),e}function jE(e,t){return Ee(e,r=>{if(r.type!=="text")return r;let{value:n}=r;if(n==="*"||n==="_"||!GE.test(n)||r.position.end.offset-r.position.start.offset===n.length)return r;let a=t.originalText.slice(r.position.start.offset,r.position.end.offset);return WE.test(a)?r:{...r,value:a}})}function $E(e,t){return Ee(e,r=>(r.type==="text"&&(r.raw=t.originalText.slice(r.position.start.offset,r.position.end.offset)),r))}function KE(e,t,r){return Ee(e,n=>{if(!n.children)return n;let a=[],u,i;for(let o of n.children)u&&t(u,o)?(o=r(u,o),a.splice(-1,1,o),i||(i=!0)):a.push(o),u=o;return i?{...n,children:a}:n})}function QE(e){return KE(e,(t,r)=>t.type==="text"&&r.type==="text",(t,r)=>({type:"text",value:t.value+r.value,position:{start:t.position.start,end:r.position.end}}))}function JE(e){return Ee(e,(t,r,[n])=>{if(t.type!=="text")return t;let{value:a}=t;return n.type==="paragraph"&&(r===0&&(a=qr.trimStart(a)),r===n.children.length-1&&(a=qr.trimEnd(a))),{type:"sentence",position:t.position,children:Sr(a)}})}function XE(e){let t=new Set,r=new Set;return n(e,(u,i)=>{if(u.type==="wikiLink"){a(i);return}if(u.type==="text"){if(u.raw.includes("[["))for(let o of i)o.type==="paragraph"&&t.add(o);u.raw.includes("]]")&&a(i)}}),Ee(e,(u,i,o)=>{if(u.type!=="text")return u;let s=u.raw,l=o.findIndex(f=>f?.type==="paragraph"),c=l===-1?void 0:o[l];if(c){o.slice(l+1).some(h=>h?.type==="blockquote")&&(s=ZE(s,u));let f=o[0];f?.type==="paragraph"&&(i===0&&(s=qr.trimStart(s)),i===f.children.length-1&&(s=qr.trimEnd(s)))}return c&&r.has(c.position)?{type:"text",position:u.position,value:s}:{type:"sentence",position:u.position,children:Sr(s)}});function n(u,i){return(function o(s,l){if(i(s,l),s.children)for(let c of s.children)o(c,[s,...l])})(u,[])}function a(u){for(let i of u)i.type==="paragraph"&&t.has(i)&&r.add(i.position)}}function ZE(e,t){let r=/^([ \t]*>[ \t]*)*/,n=e.split(`
|
||||
`),a=t.value.split(`
|
||||
`);return n.map((i,o)=>{let l=(a[o]??"").match(r)[0]??"";return i.replace(r,l)}).join(`
|
||||
`)}function ew(e,t){return Ee(e,r=>{if(r.type!=="code")return r;let n=/^\n?(?: {4,}|\t)/.test(t.originalText.slice(r.position.start.offset,r.position.end.offset));return r.isIndented=n,r})}function tw(e,t){return Ee(e,(r,n,a)=>{if(r.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(t.originalText.slice(r.position.start.offset,r.position.end.offset));if(r.isIndented=u,u)for(let i=0;i<a.length;i++){let o=a[i];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return r})}function rw(e,t){let{originalText:r}=t;return Ee(e,n=>{if(n.type==="image"||n.type==="imageReference")return n.originalAltText=Kh(r,n.position.start.offset,n.position.end.offset),n;if(n.type!=="link"||!n.url)return n;let a=Kh(r,n.position.start.offset,n.position.end.offset);return a&&/[[\]]/.test(a)&&(n.originalLabelText=a),n})}function Kh(e,t,r){let n=e.indexOf("[",t);if(n===-1||n>=r)return null;let a=1,u=n+1;for(;u<r;){let i=e[u];if(i==="\\"){u+=2;continue}if(i==="[")a++;else if(i==="]"&&(a--,a===0))return e.slice(n+1,u);u++}return null}function nw(e,t){return Ee(e,(a,u,i)=>{if(a.type==="list"&&a.children.length>0){for(let s=0;s<i.length;s++){let l=i[s];if(l.type==="list"&&!l.isAligned)return a.isAligned=!1,a}let o=i[0]?.children[u+1];if(o?.type==="code"&&o.isIndented)return a.isAligned=!1,a;a.isAligned=n(a)}return a});function r(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[u,i]=a.children;if(lt(u,t).leadingSpaces.length>1)return!0;let s=r(u);if(s===-1)return!1;if(a.children.length===1)return s%t.tabWidth===0;let l=r(i);return s!==l?!1:s%t.tabWidth===0?!0:lt(i,t).leadingSpaces.length>1}}function iw(e,t){return Ee(e,(a,u,i)=>{if(a.type==="list"&&a.children.length>0){for(let o=0;o<i.length;o++){let s=i[o];if(s.type==="list"&&!s.isAligned)return a.isAligned=!1,a}a.isAligned=n(a)}return a});function r(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[u,i]=a.children;if(lt(u,t).leadingSpaces.length>1)return!0;let s=r(u);if(s===-1)return!1;if(a.children.length===1)return s%t.tabWidth===0;let l=r(i);return s!==l?!1:s%t.tabWidth===0?!0:lt(i,t).leadingSpaces.length>1}}var Qh=YE;var Br=null;function _r(e){if(Br!==null&&typeof Br.property){let t=Br;return Br=_r.prototype=null,t}return Br=_r.prototype=e??Object.create(null),new _r}var aw=10;for(let e=0;e<=aw;e++)_r();function fu(e){return _r(e)}function uw(e,t="type"){fu(e);function r(n){let a=n[t],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return r}var Jh=uw;var le=[["children"]],Xh={root:le[0],paragraph:le[0],sentence:le[0],word:[],whitespace:[],emphasis:le[0],strong:le[0],delete:le[0],inlineCode:[],wikiLink:[],link:le[0],image:[],blockquote:le[0],heading:le[0],code:[],html:[],list:le[0],thematicBreak:[],linkReference:le[0],imageReference:[],definition:[],footnote:le[0],footnoteReference:[],footnoteDefinition:le[0],table:le[0],tableCell:le[0],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:le[0],listItem:le[0],text:[]};var ow=Jh(Xh),Zh=ow;var sw={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:Qh,print:lu,embed:bh,massageAstNode:iu,hasPrettierIgnore:oh,insertPragma:kh,getVisitorKeys:Zh,printPrettierIgnored:au};return pm(lw);});
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
var om=Object.create;var Hn=Object.defineProperty;var sm=Object.getOwnPropertyDescriptor;var lm=Object.getOwnPropertyNames;var cm=Object.getPrototypeOf,fm=Object.prototype.hasOwnProperty;var q=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Pr=(e,t)=>{for(var r in t)Hn(e,r,{get:t[r],enumerable:!0})},pm=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of lm(t))!fm.call(e,a)&&a!==r&&Hn(e,a,{get:()=>t[a],enumerable:!(n=sm(t,a))||n.enumerable});return e};var At=(e,t,r)=>(r=e!=null?om(cm(e)):{},pm(t||!e||!e.__esModule?Hn(r,"default",{value:e,enumerable:!0}):r,e));var Fo=q((x8,ko)=>{"use strict";ko.exports=wg;var sr=9,Zr=10,_t=32,kg=33,Fg=58,Pt=91,bg=92,Pi=93,lr=94,en=96,tn=4,Eg=1024;function wg(e){var t=this.Parser,r=this.Compiler;Cg(t)&&vg(t,e),yg(r)&&Ag(r)}function Cg(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function yg(e){return!!(e&&e.prototype&&e.prototype.visitors)}function vg(e,t){for(var r=t||{},n=e.prototype,a=n.blockTokenizers,u=n.inlineTokenizers,i=n.blockMethods,o=n.inlineMethods,s=a.definition,l=u.reference,c=[],f=-1,h=i.length,m;++f<h;)m=i[f],!(m==="newline"||m==="indentedCode"||m==="paragraph"||m==="footnoteDefinition")&&c.push([m]);c.push(["footnoteDefinition"]),r.inlineNotes&&(Oi(o,"reference","inlineNote"),u.inlineNote=g),Oi(i,"definition","footnoteDefinition"),Oi(o,"reference","footnoteCall"),a.definition=E,a.footnoteDefinition=D,u.footnoteCall=x,u.reference=k,n.interruptFootnoteDefinition=c,k.locator=l.locator,x.locator=C,g.locator=S;function D(w,d,v){for(var L=this,y=L.interruptFootnoteDefinition,b=L.offset,_=d.length+1,I=0,T=[],R,O,z,N,W,ne,p,Y,ie,F,ee,ce,te;I<_&&(N=d.charCodeAt(I),!(N!==sr&&N!==_t));)I++;if(d.charCodeAt(I++)===Pt&&d.charCodeAt(I++)===lr){for(O=I;I<_;){if(N=d.charCodeAt(I),N!==N||N===Zr||N===sr||N===_t)return;if(N===Pi){z=I,I++;break}I++}if(!(z===void 0||O===z||d.charCodeAt(I++)!==Fg)){if(v)return!0;for(R=d.slice(O,z),W=w.now(),ie=0,F=0,ee=I,ce=[];I<_;){if(N=d.charCodeAt(I),N!==N||N===Zr)te={start:ie,contentStart:ee||I,contentEnd:I,end:I},ce.push(te),N===Zr&&(ie=I+1,F=0,ee=void 0,te.end=ie);else if(F!==void 0)if(N===_t||N===sr)F+=N===_t?1:tn-F%tn,F>tn&&(F=void 0,ee=I);else{if(F<tn&&te&&(te.contentStart===te.contentEnd||Tg(y,a,L,[w,d.slice(I,Eg),!0])))break;F=void 0,ee=I}I++}for(I=-1,_=ce.length;_>0&&(te=ce[_-1],te.contentStart===te.contentEnd);)_--;for(ne=w(d.slice(0,te.contentEnd));++I<_;)te=ce[I],b[W.line+I]=(b[W.line+I]||0)+(te.contentStart-te.start),T.push(d.slice(te.contentStart,te.end));return p=L.enterBlock(),Y=L.tokenizeBlock(T.join(""),W),p(),ne({type:"footnoteDefinition",identifier:R.toLowerCase(),label:R,children:Y})}}}function x(w,d,v){var L=d.length+1,y=0,b,_,I,T;if(d.charCodeAt(y++)===Pt&&d.charCodeAt(y++)===lr){for(_=y;y<L;){if(T=d.charCodeAt(y),T!==T||T===Zr||T===sr||T===_t)return;if(T===Pi){I=y,y++;break}y++}if(!(I===void 0||_===I))return v?!0:(b=d.slice(_,I),w(d.slice(0,y))({type:"footnoteReference",identifier:b.toLowerCase(),label:b}))}}function g(w,d,v){var L=this,y=d.length+1,b=0,_=0,I,T,R,O,z,N,W;if(d.charCodeAt(b++)===lr&&d.charCodeAt(b++)===Pt){for(R=b;b<y;){if(T=d.charCodeAt(b),T!==T)return;if(N===void 0)if(T===bg)b+=2;else if(T===Pt)_++,b++;else if(T===Pi)if(_===0){O=b,b++;break}else _--,b++;else if(T===en){for(z=b,N=1;d.charCodeAt(z+N)===en;)N++;b+=N}else b++;else if(T===en){for(z=b,W=1;d.charCodeAt(z+W)===en;)W++;b+=W,N===W&&(N=void 0),W=void 0}else b++}if(O!==void 0)return v?!0:(I=w.now(),I.column+=2,I.offset+=2,w(d.slice(0,b))({type:"footnote",children:L.tokenizeInline(d.slice(R,O),I)}))}}function k(w,d,v){var L=0;if(d.charCodeAt(L)===kg&&L++,d.charCodeAt(L)===Pt&&d.charCodeAt(L+1)!==lr)return l.call(this,w,d,v)}function E(w,d,v){for(var L=0,y=d.charCodeAt(L);y===_t||y===sr;)y=d.charCodeAt(++L);if(y===Pt&&d.charCodeAt(L+1)!==lr)return s.call(this,w,d,v)}function C(w,d){return w.indexOf("[",d)}function S(w,d){return w.indexOf("^[",d)}}function Ag(e){var t=e.prototype.visitors,r=" ";t.footnote=n,t.footnoteReference=a,t.footnoteDefinition=u;function n(i){return"^["+this.all(i).join("")+"]"}function a(i){return"[^"+(i.label||i.identifier)+"]"}function u(i){for(var o=this.all(i).join(`
|
||||
|
||||
`).split(`
|
||||
`),s=0,l=o.length,c;++s<l;)c=o[s],c!==""&&(o[s]=r+c);return"[^"+(i.label||i.identifier)+"]: "+o.join(`
|
||||
`)}}function Oi(e,t,r){e.splice(e.indexOf(t),0,r)}function Tg(e,t,r,n){for(var a=e.length,u=-1;++u<a;)if(t[e[u][0]].apply(r,n))return!0;return!1}});var Ri=q(Ni=>{Ni.isRemarkParser=Sg;Ni.isRemarkCompiler=Lg;function Sg(e){return!!(e&&e.prototype&&e.prototype.blockTokenizers)}function Lg(e){return!!(e&&e.prototype&&e.prototype.visitors)}});var Ao=q((F8,vo)=>{var bo=Ri();vo.exports=_g;var Eo=9,wo=32,rn=36,Ig=48,qg=57,Co=92,Bg=["math","math-inline"],yo="math-display";function _g(e){let t=this.Parser,r=this.Compiler;bo.isRemarkParser(t)&&Pg(t,e),bo.isRemarkCompiler(r)&&Og(r,e)}function Pg(e,t){let r=e.prototype,n=r.inlineMethods;u.locator=a,r.inlineTokenizers.math=u,n.splice(n.indexOf("text"),0,"math");function a(i,o){return i.indexOf("$",o)}function u(i,o,s){let l=o.length,c=!1,f=!1,h=0,m,D,x,g,k,E,C;if(o.charCodeAt(h)===Co&&(f=!0,h++),o.charCodeAt(h)===rn){if(h++,f)return s?!0:i(o.slice(0,h))({type:"text",value:"$"});if(o.charCodeAt(h)===rn&&(c=!0,h++),x=o.charCodeAt(h),!(x===wo||x===Eo)){for(g=h;h<l;){if(D=x,x=o.charCodeAt(h+1),D===rn){if(m=o.charCodeAt(h-1),m!==wo&&m!==Eo&&(x!==x||x<Ig||x>qg)&&(!c||x===rn)){k=h-1,h++,c&&h++,E=h;break}}else D===Co&&(h++,x=o.charCodeAt(h+1));h++}if(E!==void 0)return s?!0:(C=o.slice(g,k+1),i(o.slice(0,E))({type:"inlineMath",value:C,data:{hName:"span",hProperties:{className:Bg.concat(c&&t.inlineMathDouble?[yo]:[])},hChildren:[{type:"text",value:C}]}}))}}}}function Og(e){let t=e.prototype;t.visitors.inlineMath=r;function r(n){let a="$";return(n.data&&n.data.hProperties&&n.data.hProperties.className||[]).includes(yo)&&(a="$$"),a+n.value+a}}});var qo=q((b8,Io)=>{var To=Ri();Io.exports=zg;var So=10,cr=32,Mi=36,Lo=`
|
||||
`,Ng="$",Rg=2,Mg=["math","math-display"];function zg(){let e=this.Parser,t=this.Compiler;To.isRemarkParser(e)&&Ug(e),To.isRemarkCompiler(t)&&Hg(t)}function Ug(e){let t=e.prototype,r=t.blockMethods,n=t.interruptParagraph,a=t.interruptList,u=t.interruptBlockquote;t.blockTokenizers.math=i,r.splice(r.indexOf("fencedCode")+1,0,"math"),n.splice(n.indexOf("fencedCode")+1,0,["math"]),a.splice(a.indexOf("fencedCode")+1,0,["math"]),u.splice(u.indexOf("fencedCode")+1,0,["math"]);function i(o,s,l){var c=s.length,f=0;let h,m,D,x,g,k,E,C,S,w,d;for(;f<c&&s.charCodeAt(f)===cr;)f++;for(g=f;f<c&&s.charCodeAt(f)===Mi;)f++;if(k=f-g,!(k<Rg)){for(;f<c&&s.charCodeAt(f)===cr;)f++;for(E=f;f<c;){if(h=s.charCodeAt(f),h===Mi)return;if(h===So)break;f++}if(s.charCodeAt(f)===So){if(l)return!0;for(m=[],E!==f&&m.push(s.slice(E,f)),f++,D=s.indexOf(Lo,f+1),D=D===-1?c:D;f<c;){for(C=!1,w=f,d=D,x=D,S=0;x>w&&s.charCodeAt(x-1)===cr;)x--;for(;x>w&&s.charCodeAt(x-1)===Mi;)S++,x--;for(k<=S&&s.indexOf(Ng,w)===x&&(C=!0,d=x);w<=d&&w-f<g&&s.charCodeAt(w)===cr;)w++;if(C)for(;d>w&&s.charCodeAt(d-1)===cr;)d--;if((!C||w!==d)&&m.push(s.slice(w,d)),C)break;f=D+1,D=s.indexOf(Lo,f+1),D=D===-1?c:D}return m=m.join(`
|
||||
`),o(s.slice(0,D))({type:"math",value:m,data:{hName:"div",hProperties:{className:Mg.concat()},hChildren:[{type:"text",value:m}]}})}}}}function Hg(e){let t=e.prototype;t.visitors.math=r;function r(n){return`$$
|
||||
`+n.value+`
|
||||
$$`}}});var _o=q((E8,Bo)=>{var Vg=Ao(),Gg=qo();Bo.exports=Wg;function Wg(e){var t=e||{};Gg.call(this,t),Vg.call(this,t)}});var Ft=q((w8,Po)=>{Po.exports=jg;var Yg=Object.prototype.hasOwnProperty;function jg(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Yg.call(r,n)&&(e[n]=r[n])}return e}});var Oo=q((C8,zi)=>{typeof Object.create=="function"?zi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:zi.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var Mo=q((y8,Ro)=>{"use strict";var $g=Ft(),No=Oo();Ro.exports=Kg;function Kg(e){var t,r,n;No(u,e),No(a,u),t=u.prototype;for(r in t)n=t[r],n&&typeof n=="object"&&(t[r]="concat"in n?n.concat():$g(n));return u;function a(i){return e.apply(this,i)}function u(){return this instanceof u?e.apply(this,arguments):new a(arguments)}}});var Uo=q((v8,zo)=>{"use strict";zo.exports=Qg;function Qg(e,t,r){return n;function n(){var a=r||this,u=a[e];return a[e]=!t,i;function i(){a[e]=u}}}});var Vo=q((A8,Ho)=>{"use strict";Ho.exports=Jg;function Jg(e){for(var t=String(e),r=[],n=/\r?\n|\r/g;n.exec(t);)r.push(n.lastIndex);return r.push(t.length+1),{toPoint:a,toPosition:a,toOffset:u};function a(i){var o=-1;if(i>-1&&i<r[r.length-1]){for(;++o<r.length;)if(r[o]>i)return{line:o+1,column:i-(r[o-1]||0)+1,offset:i}}return{}}function u(i){var o=i&&i.line,s=i&&i.column,l;return!isNaN(o)&&!isNaN(s)&&o-1 in r&&(l=(r[o-2]||0)+s-1||0),l>-1&&l<r[r.length-1]?l:-1}}});var Wo=q((T8,Go)=>{"use strict";Go.exports=Xg;var Ui="\\";function Xg(e,t){return r;function r(n){for(var a=0,u=n.indexOf(Ui),i=e[t],o=[],s;u!==-1;)o.push(n.slice(a,u)),a=u+1,s=n.charAt(a),(!s||i.indexOf(s)===-1)&&o.push(Ui),u=n.indexOf(Ui,a+1);return o.push(n.slice(a)),o.join("")}}});var Yo=q((S8,Zg)=>{Zg.exports={AElig:"\xC6",AMP:"&",Aacute:"\xC1",Acirc:"\xC2",Agrave:"\xC0",Aring:"\xC5",Atilde:"\xC3",Auml:"\xC4",COPY:"\xA9",Ccedil:"\xC7",ETH:"\xD0",Eacute:"\xC9",Ecirc:"\xCA",Egrave:"\xC8",Euml:"\xCB",GT:">",Iacute:"\xCD",Icirc:"\xCE",Igrave:"\xCC",Iuml:"\xCF",LT:"<",Ntilde:"\xD1",Oacute:"\xD3",Ocirc:"\xD4",Ograve:"\xD2",Oslash:"\xD8",Otilde:"\xD5",Ouml:"\xD6",QUOT:'"',REG:"\xAE",THORN:"\xDE",Uacute:"\xDA",Ucirc:"\xDB",Ugrave:"\xD9",Uuml:"\xDC",Yacute:"\xDD",aacute:"\xE1",acirc:"\xE2",acute:"\xB4",aelig:"\xE6",agrave:"\xE0",amp:"&",aring:"\xE5",atilde:"\xE3",auml:"\xE4",brvbar:"\xA6",ccedil:"\xE7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",ecirc:"\xEA",egrave:"\xE8",eth:"\xF0",euml:"\xEB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",iacute:"\xED",icirc:"\xEE",iexcl:"\xA1",igrave:"\xEC",iquest:"\xBF",iuml:"\xEF",laquo:"\xAB",lt:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",oacute:"\xF3",ocirc:"\xF4",ograve:"\xF2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",otilde:"\xF5",ouml:"\xF6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',raquo:"\xBB",reg:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",times:"\xD7",uacute:"\xFA",ucirc:"\xFB",ugrave:"\xF9",uml:"\xA8",uuml:"\xFC",yacute:"\xFD",yen:"\xA5",yuml:"\xFF"}});var jo=q((L8,ex)=>{ex.exports={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"}});var bt=q((I8,$o)=>{"use strict";$o.exports=tx;function tx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}});var Qo=q((q8,Ko)=>{"use strict";Ko.exports=rx;function rx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}});var Ot=q((B8,Jo)=>{"use strict";Jo.exports=nx;function nx(e){var t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}});var Zo=q((_8,Xo)=>{"use strict";var ix=Ot(),ax=bt();Xo.exports=ux;function ux(e){return ix(e)||ax(e)}});var es=q((P8,ox)=>{ox.exports={AEli:"\xC6",AElig:"\xC6",AM:"&",AMP:"&",Aacut:"\xC1",Aacute:"\xC1",Abreve:"\u0102",Acir:"\xC2",Acirc:"\xC2",Acy:"\u0410",Afr:"\u{1D504}",Agrav:"\xC0",Agrave:"\xC0",Alpha:"\u0391",Amacr:"\u0100",And:"\u2A53",Aogon:"\u0104",Aopf:"\u{1D538}",ApplyFunction:"\u2061",Arin:"\xC5",Aring:"\xC5",Ascr:"\u{1D49C}",Assign:"\u2254",Atild:"\xC3",Atilde:"\xC3",Aum:"\xC4",Auml:"\xC4",Backslash:"\u2216",Barv:"\u2AE7",Barwed:"\u2306",Bcy:"\u0411",Because:"\u2235",Bernoullis:"\u212C",Beta:"\u0392",Bfr:"\u{1D505}",Bopf:"\u{1D539}",Breve:"\u02D8",Bscr:"\u212C",Bumpeq:"\u224E",CHcy:"\u0427",COP:"\xA9",COPY:"\xA9",Cacute:"\u0106",Cap:"\u22D2",CapitalDifferentialD:"\u2145",Cayleys:"\u212D",Ccaron:"\u010C",Ccedi:"\xC7",Ccedil:"\xC7",Ccirc:"\u0108",
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacut:"\xDA",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucir:"\xDB",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrav:"\xD9",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRi
Line truncated
|
||||
`);_!==-1;)l++,b=_,_=y.indexOf(`
|
||||
`,_+1);b===-1?c+=y.length:c=y.length-b,l in u&&(b!==-1?c+=u[l]:c<=u[l]&&(c=u[l]+1))}function E(){var y=[],b=l+1;return function(){for(var _=l+1;b<_;)y.push((u[b]||0)+1),b++;return y}}function C(){var y={line:l,column:c};return y.offset=a.toOffset(y),y}function S(y){this.start=y,this.end=C()}function w(y){r.slice(0,y.length)!==y&&a.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),C())}function d(){var y=C();return b;function b(_,I){var T=_.position,R=T?T.start:y,O=[],z=T&&T.end.line,N=y.line;if(_.position=new S(R),T&&I&&T.indent){if(O=T.indent,z<N){for(;++z<N;)O.push((u[z]||0)+1);O.push(y.column)}I=O.concat(I)}return _.position.indent=I||[],_}}function v(y,b){var _=b?b.children:i,I=_[_.length-1],T;return I&&y.type===I.type&&(y.type==="text"||y.type==="blockquote")&&Fs(I)&&Fs(y)&&(T=y.type==="text"?qx:Bx,y=T.call(a,I,y)),y!==I&&_.push(y),a.atStart&&i.length!==0&&a.exitStart(),y}function L(y){var b=E(),_=d(),I=C();return w(y),T.reset=R,R.test=O,T.test=O,r=r.slice(y.length),k(y),b=b(),T;function T(z,N){return _(v(_(z),N),b)}function R(){var z=T.apply(null,arguments);return l=I.line,c=I.column,r=y+r,z}function O(){var z=_({});return l=I.line,c=I.column,r=y+r,z.position}}}}function Fs(e){var t,r;return e.type!=="text"||!e.position?!0:(t=e.position.start,r=e.position.end,t.line!==r.line||r.column-t.column===e.value.length)}function qx(e,t){return e.value+=t.value,e}function Bx(e,t){return this.options.commonmark||this.options.gfm?t:(e.children=e.children.concat(t.children),e)}});var ys=q((z8,Cs)=>{"use strict";Cs.exports=an;var Yi=["\\","`","*","{","}","[","]","(",")","#","+","-",".","!","_",">"],ji=Yi.concat(["~","|"]),ws=ji.concat([`
|
||||
`,'"',"$","%","&","'",",","/",":",";","<","=","?","@","^"]);an.default=Yi;an.gfm=ji;an.commonmark=ws;function an(e){var t=e||{};return t.commonmark?ws:t.gfm?ji:Yi}});var As=q((U8,vs)=>{"use strict";vs.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var $i=q((H8,Ts)=>{"use strict";Ts.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:As()}});var Ls=q((V8,Ss)=>{"use strict";var _x=Ft(),Px=ys(),Ox=$i();Ss.exports=Nx;function Nx(e){var t=this,r=t.options,n,a;if(e==null)e={};else if(typeof e=="object")e=_x(e);else throw new Error("Invalid value `"+e+"` for setting `options`");for(n in Ox){if(a=e[n],a==null&&(a=r[n]),n!=="blocks"&&typeof a!="boolean"||n==="blocks"&&typeof a!="object")throw new Error("Invalid value `"+a+"` for setting `options."+n+"`");e[n]=a}return t.options=e,t.escape=Px(e),t}});var Bs=q((G8,qs)=>{"use strict";qs.exports=Is;function Is(e){if(e==null)return Ux;if(typeof e=="string")return zx(e);if(typeof e=="object")return"length"in e?Mx(e):Rx(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function Rx(e){return t;function t(r){var n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function Mx(e){for(var t=[],r=-1;++r<e.length;)t[r]=Is(e[r]);return n;function n(){for(var a=-1;++a<t.length;)if(t[a].apply(this,arguments))return!0;return!1}}function zx(e){return t;function t(r){return!!(r&&r.type===e)}}function Ux(){return!0}});var Ps=q((W8,_s)=>{_s.exports=Hx;function Hx(e){return e}});var Ms=q((Y8,Rs)=>{"use strict";Rs.exports=un;var Vx=Bs(),Gx=Ps(),Os=!0,Ns="skip",Ki=!1;un.CONTINUE=Os;un.SKIP=Ns;un.EXIT=Ki;function un(e,t,r,n){var a,u;typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),u=Vx(t),a=n?-1:1,i(e,null,[])();function i(o,s,l){var c=typeof o=="object"&&o!==null?o:{},f;return typeof c.type=="string"&&(f=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0,h.displayName="node ("+Gx(c.type+(f?"<"+f+">":""))+")"),h;function h(){var m=l.concat(o),D=[],x,g;if((!t||u(o,s,l[l.length-1]||null))&&(D=Wx(r(o,l)),D[0]===Ki))return D;if(o.children&&D[0]!==Ns)for(g=(n?o.children.length:-1)+a;g>-1&&g<o.children.length;){if(x=i(o.children[g],g,m)(),x[0]===Ki)return x;g=typeof x[1]=="number"?x[1]:g+a}return D}}}function Wx(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[Os,e]:[e]}});var Us=q((j8,zs)=>{"use strict";zs.exports=sn;var on=Ms(),Yx=on.CONTINUE,jx=on.SKIP,$x=on.EXIT;sn.CONTINUE=Yx;sn.SKIP=jx;sn.EXIT=$x;function sn(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),on(e,t,a,n);function a(u,i){var o=i[i.length-1],s=o?o.children.indexOf(u):null;return r(u,s,o)}}});var Vs=q(($8,Hs)=>{"use strict";var Kx=Us();Hs.exports=Qx;function Qx(e,t){return Kx(e,t?Jx:Xx),e}function Jx(e){delete e.position}function Xx(e){e.position=void 0}});var Ys=q((K8,Ws)=>{"use strict";var Gs=Ft(),Zx=Vs();Ws.exports=r1;var e1=`
|
||||
`,t1=/\r\n|\r/g;function r1(){var e=this,t=String(e.file),r={line:1,column:1,offset:0},n=Gs(r),a;return t=t.replace(t1,e1),t.charCodeAt(0)===65279&&(t=t.slice(1),n.column++,n.offset++),a={type:"root",children:e.tokenizeBlock(t,n),position:{start:r,end:e.eof||Gs(r)}},e.options.position||Zx(a,!0),a}});var $s=q((Q8,js)=>{"use strict";var n1=/^[ \t]*(\n|$)/;js.exports=i1;function i1(e,t,r){for(var n,a="",u=0,i=t.length;u<i&&(n=n1.exec(t.slice(u)),n!=null);)u+=n[0].length,a+=n[0];if(a!==""){if(r)return!0;e(a)}}});var ln=q((J8,Ks)=>{"use strict";var Ge="",Qi;Ks.exports=a1;function a1(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var r=e.length*t;if(Qi!==e||typeof Qi>"u")Qi=e,Ge="";else if(Ge.length>=r)return Ge.substr(0,r);for(;r>Ge.length&&t>1;)t&1&&(Ge+=e),t>>=1,e+=e;return Ge+=e,Ge=Ge.substr(0,r),Ge}});var Ji=q((X8,Qs)=>{"use strict";Qs.exports=u1;function u1(e){return String(e).replace(/\n+$/,"")}});var Zs=q((Z8,Xs)=>{"use strict";var o1=ln(),s1=Ji();Xs.exports=f1;var Xi=`
|
||||
`,Js=" ",Zi=" ",l1=4,c1=o1(Zi,l1);function f1(e,t,r){for(var n=-1,a=t.length,u="",i="",o="",s="",l,c,f;++n<a;)if(l=t.charAt(n),f)if(f=!1,u+=o,i+=s,o="",s="",l===Xi)o=l,s=l;else for(u+=l,i+=l;++n<a;){if(l=t.charAt(n),!l||l===Xi){s=l,o=l;break}u+=l,i+=l}else if(l===Zi&&t.charAt(n+1)===l&&t.charAt(n+2)===l&&t.charAt(n+3)===l)o+=c1,n+=3,f=!0;else if(l===Js)o+=l,f=!0;else{for(c="";l===Js||l===Zi;)c+=l,l=t.charAt(++n);if(l!==Xi)break;o+=c+l,s+=l}if(i)return r?!0:e(u)({type:"code",lang:null,meta:null,value:s1(i)})}});var rl=q((eT,tl)=>{"use strict";tl.exports=D1;var cn=`
|
||||
`,pr=" ",Mt=" ",p1="~",el="`",h1=3,m1=4;function D1(e,t,r){var n=this,a=n.options.gfm,u=t.length+1,i=0,o="",s,l,c,f,h,m,D,x,g,k,E,C,S;if(a){for(;i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)o+=c,i++;if(C=i,c=t.charAt(i),!(c!==p1&&c!==el)){for(i++,l=c,s=1,o+=c;i<u&&(c=t.charAt(i),c===l);)o+=c,s++,i++;if(!(s<h1)){for(;i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)o+=c,i++;for(f="",D="";i<u&&(c=t.charAt(i),!(c===cn||l===el&&c===l));)c===Mt||c===pr?D+=c:(f+=D+c,D=""),i++;if(c=t.charAt(i),!(c&&c!==cn)){if(r)return!0;S=e.now(),S.column+=o.length,S.offset+=o.length,o+=f,f=n.decode.raw(n.unescape(f),S),D&&(o+=D),D="",k="",E="",x="",g="";for(var w=!0;i<u;){if(c=t.charAt(i),x+=k,g+=E,k="",E="",c!==cn){x+=c,E+=c,i++;continue}for(w?(o+=c,w=!1):(k+=c,E+=c),D="",i++;i<u&&(c=t.charAt(i),c===Mt);)D+=c,i++;if(k+=D,E+=D.slice(C),!(D.length>=m1)){for(D="";i<u&&(c=t.charAt(i),c===l);)D+=c,i++;if(k+=D,E+=D,!(D.length<s)){for(D="";i<u&&(c=t.charAt(i),!(c!==Mt&&c!==pr));)k+=c,E+=c,i++;if(!c||c===cn)break}}}for(o+=x+k,i=-1,u=f.length;++i<u;)if(c=f.charAt(i),c===Mt||c===pr)h||(h=f.slice(0,i));else if(h){m=f.slice(i);break}return e(o)({type:"code",lang:h||f||null,meta:m||null,value:g})}}}}}});var Et=q((zt,nl)=>{zt=nl.exports=d1;function d1(e){return e.trim?e.trim():zt.right(zt.left(e))}zt.left=function(e){return e.trimLeft?e.trimLeft():e.replace(/^\s\s*/,"")};zt.right=function(e){if(e.trimRight)return e.trimRight();for(var t=/\s/,r=e.length;t.test(e.charAt(--r)););return e.slice(0,r+1)}});var fn=q((tT,il)=>{"use strict";il.exports=g1;function g1(e,t,r,n){for(var a=e.length,u=-1,i,o;++u<a;)if(i=e[u],o=i[1]||{},!(o.pedantic!==void 0&&o.pedantic!==r.options.pedantic)&&!(o.commonmark!==void 0&&o.commonmark!==r.options.commonmark)&&t[i[0]].apply(r,n))return!0;return!1}});var sl=q((rT,ol)=>{"use strict";var x1=Et(),k1=fn();ol.exports=F1;var ea=`
|
||||
`,al=" ",ta=" ",ul=">";function F1(e,t,r){for(var n=this,a=n.offset,u=n.blockTokenizers,i=n.interruptBlockquote,o=e.now(),s=o.line,l=t.length,c=[],f=[],h=[],m,D=0,x,g,k,E,C,S,w,d;D<l&&(x=t.charAt(D),!(x!==ta&&x!==al));)D++;if(t.charAt(D)===ul){if(r)return!0;for(D=0;D<l;){for(k=t.indexOf(ea,D),S=D,w=!1,k===-1&&(k=l);D<l&&(x=t.charAt(D),!(x!==ta&&x!==al));)D++;if(t.charAt(D)===ul?(D++,w=!0,t.charAt(D)===ta&&D++):D=S,E=t.slice(D,k),!w&&!x1(E)){D=S;break}if(!w&&(g=t.slice(D),k1(i,u,n,[e,g,!0])))break;C=S===D?E:t.slice(S,k),h.push(D-S),c.push(C),f.push(E),D=k+1}for(D=-1,l=h.length,m=e(c.join(ea));++D<l;)a[s]=(a[s]||0)+h[D],s++;return d=n.enterBlock(),f=n.tokenizeBlock(f.join(ea),o),d(),m({type:"blockquote",children:f})}}});var fl=q((nT,cl)=>{"use strict";cl.exports=E1;var ll=`
|
||||
`,hr=" ",mr=" ",Dr="#",b1=6;function E1(e,t,r){for(var n=this,a=n.options.pedantic,u=t.length+1,i=-1,o=e.now(),s="",l="",c,f,h;++i<u;){if(c=t.charAt(i),c!==mr&&c!==hr){i--;break}s+=c}for(h=0;++i<=u;){if(c=t.charAt(i),c!==Dr){i--;break}s+=c,h++}if(!(h>b1)&&!(!h||!a&&t.charAt(i+1)===Dr)){for(u=t.length+1,f="";++i<u;){if(c=t.charAt(i),c!==mr&&c!==hr){i--;break}f+=c}if(!(!a&&f.length===0&&c&&c!==ll)){if(r)return!0;for(s+=f,f="",l="";++i<u&&(c=t.charAt(i),!(!c||c===ll));){if(c!==mr&&c!==hr&&c!==Dr){l+=f+c,f="";continue}for(;c===mr||c===hr;)f+=c,c=t.charAt(++i);if(!a&&l&&!f&&c===Dr){l+=c;continue}for(;c===Dr;)f+=c,c=t.charAt(++i);for(;c===mr||c===hr;)f+=c,c=t.charAt(++i);i--}return o.column+=s.length,o.offset+=s.length,s+=l+f,e(s)({type:"heading",depth:h,children:n.tokenizeInline(l,o)})}}}});var ml=q((iT,hl)=>{"use strict";hl.exports=S1;var w1=" ",C1=`
|
||||
`,pl=" ",y1="*",v1="-",A1="_",T1=3;function S1(e,t,r){for(var n=-1,a=t.length+1,u="",i,o,s,l;++n<a&&(i=t.charAt(n),!(i!==w1&&i!==pl));)u+=i;if(!(i!==y1&&i!==v1&&i!==A1))for(o=i,u+=i,s=1,l="";++n<a;)if(i=t.charAt(n),i===o)s++,u+=l+o,l="";else if(i===pl)l+=i;else return s>=T1&&(!i||i===C1)?(u+=l,r?!0:e(u)({type:"thematicBreak"})):void 0}});var ra=q((aT,dl)=>{"use strict";dl.exports=B1;var Dl=" ",L1=" ",I1=1,q1=4;function B1(e){for(var t=0,r=0,n=e.charAt(t),a={},u,i=0;n===Dl||n===L1;){for(u=n===Dl?q1:I1,r+=u,u>1&&(r=Math.floor(r/u)*u);i<r;)a[++i]=t;n=e.charAt(++t)}return{indent:r,stops:a}}});var kl=q((uT,xl)=>{"use strict";var _1=Et(),P1=ln(),O1=ra();xl.exports=M1;var gl=`
|
||||
`,N1=" ",R1="!";function M1(e,t){var r=e.split(gl),n=r.length+1,a=1/0,u=[],i,o,s;for(r.unshift(P1(N1,t)+R1);n--;)if(o=O1(r[n]),u[n]=o.stops,_1(r[n]).length!==0)if(o.indent)o.indent>0&&o.indent<a&&(a=o.indent);else{a=1/0;break}if(a!==1/0)for(n=r.length;n--;){for(s=u[n],i=a;i&&!(i in s);)i--;r[n]=r[n].slice(s[i]+1)}return r.shift(),r.join(gl)}});var yl=q((oT,Cl)=>{"use strict";var z1=Et(),U1=ln(),Fl=bt(),H1=ra(),V1=kl(),G1=fn();Cl.exports=X1;var na="*",W1="_",bl="+",ia="-",El=".",We=" ",_e=`
|
||||
`,pn=" ",wl=")",Y1="x",ut=4,j1=/\n\n(?!\s*$)/,$1=/^\[([ X\tx])][ \t]/,K1=/^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/,Q1=/^([ \t]*)([*+-]|\d+[.)])([ \t]+)/,J1=/^( {1,4}|\t)?/gm;function X1(e,t,r){for(var n=this,a=n.options.commonmark,u=n.options.pedantic,i=n.blockTokenizers,o=n.interruptList,s=0,l=t.length,c=null,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y,b,_,I,T,R=!1,O,z,N,W;s<l&&(D=t.charAt(s),!(D!==pn&&D!==We));)s++;if(D=t.charAt(s),D===na||D===bl||D===ia)x=D,m=!1;else{for(m=!0,h="";s<l&&(D=t.charAt(s),!!Fl(D));)h+=D,s++;if(D=t.charAt(s),!h||!(D===El||a&&D===wl)||r&&h!=="1")return;c=parseInt(h,10),x=D}if(D=t.charAt(++s),!(D!==We&&D!==pn&&(u||D!==_e&&D!==""))){if(r)return!0;for(s=0,L=[],y=[],b=[];s<l;){for(g=t.indexOf(_e,s),k=s,E=!1,W=!1,g===-1&&(g=l),f=0;s<l;){if(D=t.charAt(s),D===pn)f+=ut-f%ut;else if(D===We)f++;else break;s++}if(_&&f>=_.indent&&(W=!0),D=t.charAt(s),C=null,!W){if(D===na||D===bl||D===ia)C=D,s++,f++;else{for(h="";s<l&&(D=t.charAt(s),!!Fl(D));)h+=D,s++;D=t.charAt(s),s++,h&&(D===El||a&&D===wl)&&(C=D,f+=h.length+1)}if(C)if(D=t.charAt(s),D===pn)f+=ut-f%ut,s++;else if(D===We){for(N=s+ut;s<N&&t.charAt(s)===We;)s++,f++;s===N&&t.charAt(s)===We&&(s-=ut-1,f-=ut-1)}else D!==_e&&D!==""&&(C=null)}if(C){if(!u&&x!==C)break;E=!0}else!a&&!W&&t.charAt(k)===We?W=!0:a&&_&&(W=f>=_.indent||f>ut),E=!1,s=k;if(w=t.slice(k,g),S=k===s?w:t.slice(s,g),(C===na||C===W1||C===ia)&&i.thematicBreak.call(n,e,w,!0))break;if(d=v,v=!E&&!z1(S).length,W&&_)_.value=_.value.concat(b,w),y=y.concat(b,w),b=[];else if(E)b.length!==0&&(R=!0,_.value.push(""),_.trail=b.concat()),_={value:[w],indent:f,trail:[]},L.push(_),y=y.concat(b,w),b=[];else if(v){if(d&&!a)break;b.push(w)}else{if(d||G1(o,i,n,[e,w,!0]))break;_.value=_.value.concat(b,w),y=y.concat(b,w),b=[]}s=g+1}for(O=e(y.join(_e)).reset({type:"list",ordered:m,start:c,spread:R,children:[]}),I=n.enterList(),T=n.enterBlock(),s=-1,l=L.length;++s<l;)_=L[s].value.join(_e),z=e.now(),e(_)(Z1(n,_,z),O),_=L[s].trail.join(_e),s!==l-1&&(_+=_e),e(_);return I(),T(),O}}function Z1(e,t,r){var n=e.offset,a=e.options.pedantic?ek:tk,u=null,i,o;return t=a.apply(null,arguments),e.options.gfm&&(i=t.match($1),i&&(o=i[0].length,u=i[1].toLowerCase()===Y1,n[r.line]+=o,t=t.slice(o))),{type:"listItem",spread:j1.test(t),checked:u,children:e.tokenizeBlock(t,r)}}function ek(e,t,r){var n=e.offset,a=r.line;return t=t.replace(Q1,u),a=r.line,t.replace(J1,u);function u(i){return n[a]=(n[a]||0)+i.length,a++,""}}function tk(e,t,r){var n=e.offset,a=r.line,u,i,o,s,l,c,f;for(t=t.replace(K1,h),s=t.split(_e),l=V1(t,H1(u).indent).split(_e),l[0]=o,n[a]=(n[a]||0)+i.length,a++,c=0,f=s.length;++c<f;)n[a]=(n[a]||0)+s[c].length-l[c].length,a++;return l.join(_e);function h(m,D,x,g,k){return i=D+x+g,o=k,Number(x)<10&&i.length%2===1&&(x=We+x),u=D+U1(We,x.length)+g,u+o}}});var Sl=q((sT,Tl)=>{"use strict";Tl.exports=ok;var aa=`
|
||||
`,rk=" ",vl=" ",Al="=",nk="-",ik=3,ak=1,uk=2;function ok(e,t,r){for(var n=this,a=e.now(),u=t.length,i=-1,o="",s,l,c,f,h;++i<u;){if(c=t.charAt(i),c!==vl||i>=ik){i--;break}o+=c}for(s="",l="";++i<u;){if(c=t.charAt(i),c===aa){i--;break}c===vl||c===rk?l+=c:(s+=l+c,l="")}if(a.column+=o.length,a.offset+=o.length,o+=s+l,c=t.charAt(++i),f=t.charAt(++i),!(c!==aa||f!==Al&&f!==nk)){for(o+=c,l=f,h=f===Al?ak:uk;++i<u;){if(c=t.charAt(i),c!==f){if(c!==aa)return;i--;break}l+=c}return r?!0:e(o+l)({type:"heading",depth:h,children:n.tokenizeInline(s,a)})}}});var oa=q(ua=>{"use strict";var sk="[a-zA-Z_:][a-zA-Z0-9:._-]*",lk="[^\"'=<>`\\u0000-\\u0020]+",ck="'[^']*'",fk='"[^"]*"',pk="(?:"+lk+"|"+ck+"|"+fk+")",hk="(?:\\s+"+sk+"(?:\\s*=\\s*"+pk+")?)",Ll="<[A-Za-z][A-Za-z0-9\\-]*"+hk+"*\\s*\\/?>",Il="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",mk="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Dk="<[?].*?[?]>",dk="<![A-Za-z]+\\s+[^>]*>",gk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>";ua.openCloseTag=new RegExp("^(?:"+Ll+"|"+Il+")");ua.tag=new RegExp("^(?:"+Ll+"|"+Il+"|"+mk+"|"+Dk+"|"+dk+"|"+gk+")")});var Pl=q((cT,_l)=>{"use strict";var xk=oa().openCloseTag;_l.exports=Bk;var kk=" ",Fk=" ",ql=`
|
||||
`,bk="<",Ek=/^<(script|pre|style)(?=(\s|>|$))/i,wk=/<\/(script|pre|style)>/i,Ck=/^<!--/,yk=/-->/,vk=/^<\?/,Ak=/\?>/,Tk=/^<![A-Za-z]/,Sk=/>/,Lk=/^<!\[CDATA\[/,Ik=/]]>/,Bl=/^$/,qk=new RegExp(xk.source+"\\s*$");function Bk(e,t,r){for(var n=this,a=n.options.blocks.join("|"),u=new RegExp("^</?("+a+")(?=(\\s|/?>|$))","i"),i=t.length,o=0,s,l,c,f,h,m,D,x=[[Ek,wk,!0],[Ck,yk,!0],[vk,Ak,!0],[Tk,Sk,!0],[Lk,Ik,!0],[u,Bl,!0],[qk,Bl,!1]];o<i&&(f=t.charAt(o),!(f!==kk&&f!==Fk));)o++;if(t.charAt(o)===bk){for(s=t.indexOf(ql,o+1),s=s===-1?i:s,l=t.slice(o,s),c=-1,h=x.length;++c<h;)if(x[c][0].test(l)){m=x[c];break}if(m){if(r)return m[2];if(o=s,!m[1].test(l))for(;o<i;){if(s=t.indexOf(ql,o+1),s=s===-1?i:s,l=t.slice(o+1,s),m[1].test(l)){l&&(o=s);break}o=s}return D=t.slice(0,o),e(D)({type:"html",value:D})}}}});var Pe=q((fT,Ol)=>{"use strict";Ol.exports=Ok;var _k=String.fromCharCode,Pk=/\s/;function Ok(e){return Pk.test(typeof e=="number"?_k(e):e.charAt(0))}});var hn=q((pT,Nl)=>{"use strict";Nl.exports=Nk;function Nk(e){return String(e).replace(/\s+/g," ")}});var sa=q((hT,Rl)=>{"use strict";var Rk=hn();Rl.exports=Mk;function Mk(e){return Rk(e).toLowerCase()}});var Wl=q((mT,Gl)=>{"use strict";var zk=Pe(),Uk=sa();Gl.exports=Wk;var Ml='"',zl="'",Hk="\\",Ut=`
|
||||
`,mn=" ",Dn=" ",ca="[",dr="]",Vk="(",Gk=")",Ul=":",Hl="<",Vl=">";function Wk(e,t,r){for(var n=this,a=n.options.commonmark,u=0,i=t.length,o="",s,l,c,f,h,m,D,x;u<i&&(f=t.charAt(u),!(f!==Dn&&f!==mn));)o+=f,u++;if(f=t.charAt(u),f===ca){for(u++,o+=f,c="";u<i&&(f=t.charAt(u),f!==dr);)f===Hk&&(c+=f,u++,f=t.charAt(u)),c+=f,u++;if(!(!c||t.charAt(u)!==dr||t.charAt(u+1)!==Ul)){for(m=c,o+=c+dr+Ul,u=o.length,c="";u<i&&(f=t.charAt(u),!(f!==mn&&f!==Dn&&f!==Ut));)o+=f,u++;if(f=t.charAt(u),c="",s=o,f===Hl){for(u++;u<i&&(f=t.charAt(u),!!la(f));)c+=f,u++;if(f=t.charAt(u),f===la.delimiter)o+=Hl+c+f,u++;else{if(a)return;u-=c.length+1,c=""}}if(!c){for(;u<i&&(f=t.charAt(u),!!Yk(f));)c+=f,u++;o+=c}if(c){for(D=c,c="";u<i&&(f=t.charAt(u),!(f!==mn&&f!==Dn&&f!==Ut));)c+=f,u++;if(f=t.charAt(u),h=null,f===Ml?h=Ml:f===zl?h=zl:f===Vk&&(h=Gk),!h)c="",u=o.length;else if(c){for(o+=c+f,u=o.length,c="";u<i&&(f=t.charAt(u),f!==h);){if(f===Ut){if(u++,f=t.charAt(u),f===Ut||f===h)return;c+=Ut}c+=f,u++}if(f=t.charAt(u),f!==h)return;l=o,o+=c+f,u++,x=c,c=""}else return;for(;u<i&&(f=t.charAt(u),!(f!==mn&&f!==Dn));)o+=f,u++;if(f=t.charAt(u),!f||f===Ut)return r?!0:(s=e(s).test().end,D=n.decode.raw(n.unescape(D),s,{nonTerminated:!1}),x&&(l=e(l).test().end,x=n.decode.raw(n.unescape(x),l)),e(o)({type:"definition",identifier:Uk(m),label:m,title:x||null,url:D}))}}}}function la(e){return e!==Vl&&e!==ca&&e!==dr}la.delimiter=Vl;function Yk(e){return e!==ca&&e!==dr&&!zk(e)}});var $l=q((DT,jl)=>{"use strict";var jk=Pe();jl.exports=n0;var $k=" ",dn=`
|
||||
`,Kk=" ",Qk="-",Jk=":",Xk="\\",fa="|",Zk=1,e0=2,Yl="left",t0="center",r0="right";function n0(e,t,r){var n=this,a,u,i,o,s,l,c,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y;if(n.options.gfm){for(a=0,C=0,l=t.length+1,c=[];a<l;){if(v=t.indexOf(dn,a),L=t.indexOf(fa,a+1),v===-1&&(v=t.length),L===-1||L>v){if(C<e0)return;break}c.push(t.slice(a,v)),C++,a=v+1}for(o=c.join(dn),u=c.splice(1,1)[0]||[],a=0,l=u.length,C--,i=!1,D=[];a<l;){if(h=u.charAt(a),h===fa){if(m=null,i===!1){if(y===!1)return}else D.push(i),i=!1;y=!1}else if(h===Qk)m=!0,i=i||null;else if(h===Jk)i===Yl?i=t0:m&&i===null?i=r0:i=Yl;else if(!jk(h))return;a++}if(i!==!1&&D.push(i),!(D.length<Zk)){if(r)return!0;for(E=-1,w=[],d=e(o).reset({type:"table",align:D,children:w});++E<C;){for(S=c[E],s={type:"tableRow",children:[]},E&&e(dn),e(S).reset(s,d),l=S.length+1,a=0,f="",x="",g=!0;a<l;){if(h=S.charAt(a),h===$k||h===Kk){x?f+=h:e(h),a++;continue}h===""||h===fa?g?e(h):((x||h)&&!g&&(o=x,f.length>1&&(h?(o+=f.slice(0,-1),f=f.charAt(f.length-1)):(o+=f,f="")),k=e.now(),e(o)({type:"tableCell",children:n.tokenizeInline(x,k)},s)),e(f+h),f="",x=""):(f&&(x+=f,f=""),x+=h,h===Xk&&a!==l-2&&(x+=S.charAt(a+1),a++)),g=!1,a++}E||e(dn+u)}return d}}}});var Jl=q((dT,Ql)=>{"use strict";var i0=Et(),a0=Ji(),u0=fn();Ql.exports=l0;var o0=" ",gr=`
|
||||
`,s0=" ",Kl=4;function l0(e,t,r){for(var n=this,a=n.options,u=a.commonmark,i=n.blockTokenizers,o=n.interruptParagraph,s=t.indexOf(gr),l=t.length,c,f,h,m,D;s<l;){if(s===-1){s=l;break}if(t.charAt(s+1)===gr)break;if(u){for(m=0,c=s+1;c<l;){if(h=t.charAt(c),h===o0){m=Kl;break}else if(h===s0)m++;else break;c++}if(m>=Kl&&h!==gr){s=t.indexOf(gr,s+1);continue}}if(f=t.slice(s+1),u0(o,i,n,[e,f,!0]))break;if(c=s,s=t.indexOf(gr,s+1),s!==-1&&i0(t.slice(c,s))===""){s=c;break}}return f=t.slice(0,s),r?!0:(D=e.now(),f=a0(f),e(f)({type:"paragraph",children:n.tokenizeInline(f,D)}))}});var Zl=q((gT,Xl)=>{"use strict";Xl.exports=c0;function c0(e,t){return e.indexOf("\\",t)}});var nc=q((xT,rc)=>{"use strict";var f0=Zl();rc.exports=tc;tc.locator=f0;var p0=`
|
||||
`,ec="\\";function tc(e,t,r){var n=this,a,u;if(t.charAt(0)===ec&&(a=t.charAt(1),n.escape.indexOf(a)!==-1))return r?!0:(a===p0?u={type:"break"}:u={type:"text",value:a},e(ec+a)(u))}});var pa=q((kT,ic)=>{"use strict";ic.exports=h0;function h0(e,t){return e.indexOf("<",t)}});var lc=q((FT,sc)=>{"use strict";var ac=Pe(),m0=fr(),D0=pa();sc.exports=da;da.locator=D0;da.notInLink=!0;var uc="<",ha=">",oc="@",ma="/",Da="mailto:",gn=Da.length;function da(e,t,r){var n=this,a="",u=t.length,i=0,o="",s=!1,l="",c,f,h,m,D;if(t.charAt(0)===uc){for(i++,a=uc;i<u&&(c=t.charAt(i),!(ac(c)||c===ha||c===oc||c===":"&&t.charAt(i+1)===ma));)o+=c,i++;if(o){if(l+=o,o="",c=t.charAt(i),l+=c,i++,c===oc)s=!0;else{if(c!==":"||t.charAt(i+1)!==ma)return;l+=ma,i++}for(;i<u&&(c=t.charAt(i),!(ac(c)||c===ha));)o+=c,i++;if(c=t.charAt(i),!(!o||c!==ha))return r?!0:(l+=o,h=l,a+=l+c,f=e.now(),f.column++,f.offset++,s&&(l.slice(0,gn).toLowerCase()===Da?(h=h.slice(gn),f.column+=gn,f.offset+=gn):l=Da+l),m=n.inlineTokenizers,n.inlineTokenizers={text:m.text},D=n.enterLink(),h=n.tokenizeInline(h,f),n.inlineTokenizers=m,D(),e(a)({type:"link",title:null,url:m0(l,{nonTerminated:!1}),children:h}))}}}});var fc=q((bT,cc)=>{"use strict";cc.exports=d0;function d0(e,t){var r=String(e),n=0,a;if(typeof t!="string")throw new Error("Expected character");for(a=r.indexOf(t);a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}});var mc=q((ET,hc)=>{"use strict";hc.exports=g0;var pc=["www.","http://","https://"];function g0(e,t){var r=-1,n,a,u;if(!this.options.gfm)return r;for(a=pc.length,n=-1;++n<a;)u=e.indexOf(pc[n],t),u!==-1&&(r===-1||u<r)&&(r=u);return r}});var kc=q((wT,xc)=>{"use strict";var Dc=fc(),x0=fr(),k0=bt(),ga=Ot(),F0=Pe(),b0=mc();xc.exports=ka;ka.locator=b0;ka.notInLink=!0;var E0=33,w0=38,C0=41,y0=42,v0=44,A0=45,xa=46,T0=58,S0=59,L0=63,I0=60,dc=95,q0=126,B0="(",gc=")";function ka(e,t,r){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=t.length,o=-1,s=!1,l,c,f,h,m,D,x,g,k,E,C,S,w,d;if(a){if(t.slice(0,4)==="www.")s=!0,h=4;else if(t.slice(0,7).toLowerCase()==="http://")h=7;else if(t.slice(0,8).toLowerCase()==="https://")h=8;else return;for(o=h-1,f=h,l=[];h<i;){if(x=t.charCodeAt(h),x===xa){if(o===h-1)break;l.push(h),o=h,h++;continue}if(k0(x)||ga(x)||x===A0||x===dc){h++;continue}break}if(x===xa&&(l.pop(),h--),l[0]!==void 0&&(c=l.length<2?f:l[l.length-2]+1,t.slice(c,h).indexOf("_")===-1)){if(r)return!0;for(g=h,m=h;h<i&&(x=t.charCodeAt(h),!(F0(x)||x===I0));)h++,x===E0||x===y0||x===v0||x===xa||x===T0||x===L0||x===dc||x===q0||(g=h);if(h=g,t.charCodeAt(h-1)===C0)for(D=t.slice(m,h),k=Dc(D,B0),E=Dc(D,gc);E>k;)h=m+D.lastIndexOf(gc),D=t.slice(m,h),E--;if(t.charCodeAt(h-1)===S0&&(h--,ga(t.charCodeAt(h-1)))){for(g=h-2;ga(t.charCodeAt(g));)g--;t.charCodeAt(g)===w0&&(h=g)}return C=t.slice(0,h),w=x0(C,{nonTerminated:!1}),s&&(w="http://"+w),d=n.enterLink(),n.inlineTokenizers={text:u.text},S=n.tokenizeInline(C,e.now()),n.inlineTokenizers=u,d(),e(C)({type:"link",title:null,url:w,children:S})}}}});var wc=q((CT,Ec)=>{"use strict";var _0=bt(),P0=Ot(),O0=43,N0=45,R0=46,M0=95;Ec.exports=bc;function bc(e,t){var r=this,n,a;if(!this.options.gfm||(n=e.indexOf("@",t),n===-1))return-1;if(a=n,a===t||!Fc(e.charCodeAt(a-1)))return bc.call(r,e,n+1);for(;a>t&&Fc(e.charCodeAt(a-1));)a--;return a}function Fc(e){return _0(e)||P0(e)||e===O0||e===N0||e===R0||e===M0}});var Ac=q((yT,vc)=>{"use strict";var z0=fr(),Cc=bt(),yc=Ot(),U0=wc();vc.exports=Ea;Ea.locator=U0;Ea.notInLink=!0;var H0=43,Fa=45,xn=46,V0=64,ba=95;function Ea(e,t,r){var n=this,a=n.options.gfm,u=n.inlineTokenizers,i=0,o=t.length,s=-1,l,c,f,h;if(a){for(l=t.charCodeAt(i);Cc(l)||yc(l)||l===H0||l===Fa||l===xn||l===ba;)l=t.charCodeAt(++i);if(i!==0&&l===V0){for(i++;i<o;){if(l=t.charCodeAt(i),Cc(l)||yc(l)||l===Fa||l===xn||l===ba){i++,s===-1&&l===xn&&(s=i);continue}break}if(!(s===-1||s===i||l===Fa||l===ba))return l===xn&&i--,c=t.slice(0,i),r?!0:(h=n.enterLink(),n.inlineTokenizers={text:u.text},f=n.tokenizeInline(c,e.now()),n.inlineTokenizers=u,h(),e(c)({type:"link",title:null,url:"mailto:"+z0(c,{nonTerminated:!1}),children:f}))}}}});var Lc=q((vT,Sc)=>{"use strict";var G0=Ot(),W0=pa(),Y0=oa().tag;Sc.exports=Tc;Tc.locator=W0;var j0="<",$0="?",K0="!",Q0="/",J0=/^<a /i,X0=/^<\/a>/i;function Tc(e,t,r){var n=this,a=t.length,u,i;if(!(t.charAt(0)!==j0||a<3)&&(u=t.charAt(1),!(!G0(u)&&u!==$0&&u!==K0&&u!==Q0)&&(i=t.match(Y0),!!i)))return r?!0:(i=i[0],!n.inLink&&J0.test(i)?n.inLink=!0:n.inLink&&X0.test(i)&&(n.inLink=!1),e(i)({type:"html",value:i}))}});var wa=q((AT,Ic)=>{"use strict";Ic.exports=Z0;function Z0(e,t){var r=e.indexOf("[",t),n=e.indexOf("![",t);return n===-1||r<n?r:n}});var Rc=q((TT,Nc)=>{"use strict";var xr=Pe(),eF=wa();Nc.exports=Oc;Oc.locator=eF;var tF=`
|
||||
`,rF="!",qc='"',Bc="'",Ht="(",kr=")",Ca="<",ya=">",_c="[",Fr="\\",nF="]",Pc="`";function Oc(e,t,r){var n=this,a="",u=0,i=t.charAt(0),o=n.options.pedantic,s=n.options.commonmark,l=n.options.gfm,c,f,h,m,D,x,g,k,E,C,S,w,d,v,L,y,b,_;if(i===rF&&(k=!0,a=i,i=t.charAt(++u)),i===_c&&!(!k&&n.inLink)){for(a+=i,v="",u++,S=t.length,y=e.now(),d=0,y.column+=u,y.offset+=u;u<S;){if(i=t.charAt(u),x=i,i===Pc){for(f=1;t.charAt(u+1)===Pc;)x+=i,u++,f++;h?f>=h&&(h=0):h=f}else if(i===Fr)u++,x+=t.charAt(u);else if((!h||l)&&i===_c)d++;else if((!h||l)&&i===nF)if(d)d--;else{if(t.charAt(u+1)!==Ht)return;x+=Ht,c=!0,u++;break}v+=x,x="",u++}if(c){for(E=v,a+=v+x,u++;u<S&&(i=t.charAt(u),!!xr(i));)a+=i,u++;if(i=t.charAt(u),v="",m=a,i===Ca){for(u++,m+=Ca;u<S&&(i=t.charAt(u),i!==ya);){if(s&&i===tF)return;v+=i,u++}if(t.charAt(u)!==ya)return;a+=Ca+v+ya,L=v,u++}else{for(i=null,x="";u<S&&(i=t.charAt(u),!(x&&(i===qc||i===Bc||s&&i===Ht)));){if(xr(i)){if(!o)break;x+=i}else{if(i===Ht)d++;else if(i===kr){if(d===0)break;d--}v+=x,x="",i===Fr&&(v+=Fr,i=t.charAt(++u)),v+=i}u++}a+=v,L=v,u=a.length}for(v="";u<S&&(i=t.charAt(u),!!xr(i));)v+=i,u++;if(i=t.charAt(u),a+=v,v&&(i===qc||i===Bc||s&&i===Ht))if(u++,a+=i,v="",C=i===Ht?kr:i,D=a,s){for(;u<S&&(i=t.charAt(u),i!==C);)i===Fr&&(v+=Fr,i=t.charAt(++u)),u++,v+=i;if(i=t.charAt(u),i!==C)return;for(w=v,a+=v+i,u++;u<S&&(i=t.charAt(u),!!xr(i));)a+=i,u++}else for(x="";u<S;){if(i=t.charAt(u),i===C)g&&(v+=C+x,x=""),g=!0;else if(!g)v+=i;else if(i===kr){a+=v+C+x,w=v;break}else xr(i)?x+=i:(v+=C+x+i,x="",g=!1);u++}if(t.charAt(u)===kr)return r?!0:(a+=kr,L=n.decode.raw(n.unescape(L),e(m).test().end,{nonTerminated:!1}),w&&(D=e(D).test().end,w=n.decode.raw(n.unescape(w),D)),_={type:k?"image":"link",title:w||null,url:L},k?_.alt=n.decode.raw(n.unescape(E),y)||null:(b=n.enterLink(),_.children=n.tokenizeInline(E,y),b()),e(a)(_))}}}});var Uc=q((ST,zc)=>{"use strict";var iF=Pe(),aF=wa(),uF=sa();zc.exports=Mc;Mc.locator=aF;var va="link",oF="image",sF="shortcut",lF="collapsed",Aa="full",cF="!",kn="[",Fn="\\",bn="]";function Mc(e,t,r){var n=this,a=n.options.commonmark,u=t.charAt(0),i=0,o=t.length,s="",l="",c=va,f=sF,h,m,D,x,g,k,E,C;if(u===cF&&(c=oF,l=u,u=t.charAt(++i)),u===kn){for(i++,l+=u,k="",C=0;i<o;){if(u=t.charAt(i),u===kn)E=!0,C++;else if(u===bn){if(!C)break;C--}u===Fn&&(k+=Fn,u=t.charAt(++i)),k+=u,i++}if(s=k,h=k,u=t.charAt(i),u===bn){if(i++,s+=u,k="",!a)for(;i<o&&(u=t.charAt(i),!!iF(u));)k+=u,i++;if(u=t.charAt(i),u===kn){for(m="",k+=u,i++;i<o&&(u=t.charAt(i),!(u===kn||u===bn));)u===Fn&&(m+=Fn,u=t.charAt(++i)),m+=u,i++;u=t.charAt(i),u===bn?(f=m?Aa:lF,k+=m+u,i++):m="",s+=k,k=""}else{if(!h)return;m=h}if(!(f!==Aa&&E))return s=l+s,c===va&&n.inLink?null:r?!0:(D=e.now(),D.column+=l.length,D.offset+=l.length,m=f===Aa?m:h,x={type:c+"Reference",identifier:uF(m),label:m,referenceType:f},c===va?(g=n.enterLink(),x.children=n.tokenizeInline(h,D),g()):x.alt=n.decode.raw(n.unescape(h),D)||null,e(s)(x))}}}});var Vc=q((LT,Hc)=>{"use strict";Hc.exports=fF;function fF(e,t){var r=e.indexOf("**",t),n=e.indexOf("__",t);return n===-1?r:r===-1||n<r?n:r}});var jc=q((IT,Yc)=>{"use strict";var pF=Et(),Gc=Pe(),hF=Vc();Yc.exports=Wc;Wc.locator=hF;var mF="\\",DF="*",dF="_";function Wc(e,t,r){var n=this,a=0,u=t.charAt(a),i,o,s,l,c,f,h;if(!(u!==DF&&u!==dF||t.charAt(++a)!==u)&&(o=n.options.pedantic,s=u,c=s+s,f=t.length,a++,l="",u="",!(o&&Gc(t.charAt(a)))))for(;a<f;){if(h=u,u=t.charAt(a),u===s&&t.charAt(a+1)===s&&(!o||!Gc(h))&&(u=t.charAt(a+2),u!==s))return pF(l)?r?!0:(i=e.now(),i.column+=2,i.offset+=2,e(c+l+c)({type:"strong",children:n.tokenizeInline(l,i)})):void 0;!o&&u===mF&&(l+=u,u=t.charAt(++a)),l+=u,a++}}});var Kc=q((qT,$c)=>{"use strict";$c.exports=kF;var gF=String.fromCharCode,xF=/\w/;function kF(e){return xF.test(typeof e=="number"?gF(e):e.charAt(0))}});var Jc=q((BT,Qc)=>{"use strict";Qc.exports=FF;function FF(e,t){var r=e.indexOf("*",t),n=e.indexOf("_",t);return n===-1?r:r===-1||n<r?n:r}});var rf=q((_T,tf)=>{"use strict";var bF=Et(),EF=Kc(),Xc=Pe(),wF=Jc();tf.exports=ef;ef.locator=wF;var CF="*",Zc="_",yF="\\";function ef(e,t,r){var n=this,a=0,u=t.charAt(a),i,o,s,l,c,f,h;if(!(u!==CF&&u!==Zc)&&(o=n.options.pedantic,c=u,s=u,f=t.length,a++,l="",u="",!(o&&Xc(t.charAt(a)))))for(;a<f;){if(h=u,u=t.charAt(a),u===s&&(!o||!Xc(h))){if(u=t.charAt(++a),u!==s){if(!bF(l)||h===s)return;if(!o&&s===Zc&&EF(u)){l+=s;continue}return r?!0:(i=e.now(),i.column++,i.offset++,e(c+l+s)({type:"emphasis",children:n.tokenizeInline(l,i)}))}l+=s}!o&&u===yF&&(l+=u,u=t.charAt(++a)),l+=u,a++}}});var af=q((PT,nf)=>{"use strict";nf.exports=vF;function vF(e,t){return e.indexOf("~~",t)}});var cf=q((OT,lf)=>{"use strict";var uf=Pe(),AF=af();lf.exports=sf;sf.locator=AF;var En="~",of="~~";function sf(e,t,r){var n=this,a="",u="",i="",o="",s,l,c;if(!(!n.options.gfm||t.charAt(0)!==En||t.charAt(1)!==En||uf(t.charAt(2))))for(s=1,l=t.length,c=e.now(),c.column+=2,c.offset+=2;++s<l;){if(a=t.charAt(s),a===En&&u===En&&(!i||!uf(i)))return r?!0:e(of+o+of)({type:"delete",children:n.tokenizeInline(o,c)});o+=u,iLine truncated
|
||||
`,t);r>t&&e.charAt(r-1)===" ";)r--;return r}});var Ff=q((zT,kf)=>{"use strict";var IF=gf();kf.exports=xf;xf.locator=IF;var qF=" ",BF=`
|
||||
`,_F=2;function xf(e,t,r){for(var n=t.length,a=-1,u="",i;++a<n;){if(i=t.charAt(a),i===BF)return a<_F?void 0:r?!0:(u+=i,e(u)({type:"break"}));if(i!==qF)return;u+=i}}});var Ef=q((UT,bf)=>{"use strict";bf.exports=PF;function PF(e,t,r){var n=this,a,u,i,o,s,l,c,f,h,m;if(r)return!0;for(a=n.inlineMethods,o=a.length,u=n.inlineTokenizers,i=-1,h=t.length;++i<o;)f=a[i],!(f==="text"||!u[f])&&(c=u[f].locator,c||e.file.fail("Missing locator: `"+f+"`"),l=c.call(n,t,1),l!==-1&&l<h&&(h=l));s=t.slice(0,h),m=e.now(),n.decode(s,m,D);function D(x,g,k){e(k||x)({type:"text",value:x})}}});var vf=q((HT,yf)=>{"use strict";var OF=Ft(),wn=Uo(),NF=Vo(),RF=Wo(),MF=ks(),Ia=Es();yf.exports=wf;function wf(e,t){this.file=t,this.offset={},this.options=OF(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=NF(t).toOffset,this.unescape=RF(this,"escape"),this.decode=MF(this)}var ue=wf.prototype;ue.setOptions=Ls();ue.parse=Ys();ue.options=$i();ue.exitStart=wn("atStart",!0);ue.enterList=wn("inList",!1);ue.enterLink=wn("inLink",!1);ue.enterBlock=wn("inBlock",!1);ue.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]];ue.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]];ue.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]];ue.blockTokenizers={blankLine:$s(),indentedCode:Zs(),fencedCode:rl(),blockquote:sl(),atxHeading:fl(),thematicBreak:ml(),list:yl(),setextHeading:Sl(),html:Pl(),definition:Wl(),table:$l(),paragraph:Jl()};ue.inlineTokenizers={escape:nc(),autoLink:lc(),url:kc(),email:Ac(),html:Lc(),link:Rc(),reference:Uc(),strong:jc(),emphasis:rf(),deletion:cf(),code:Df(),break:Ff(),text:Ef()};ue.blockMethods=Cf(ue.blockTokenizers);ue.inlineMethods=Cf(ue.inlineTokenizers);ue.tokenizeBlock=Ia("block");ue.tokenizeInline=Ia("inline");ue.tokenizeFactory=Ia;function Cf(e){var t=[],r;for(r in e)t.push(r);return t}});var Lf=q((VT,Sf)=>{"use strict";var zF=Mo(),UF=Ft(),Af=vf();Sf.exports=Tf;Tf.Parser=Af;function Tf(e){var t=this.data("settings"),r=zF(Af);r.prototype.options=UF(r.prototype.options,t,e),this.Parser=r}});var qf=q((GT,If)=>{"use strict";If.exports=HF;function HF(e){if(e)throw e}});var qa=q((WT,Bf)=>{Bf.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var Hf=q((YT,Uf)=>{"use strict";var Cn=Object.prototype.hasOwnProperty,zf=Object.prototype.toString,_f=Object.defineProperty,Pf=Object.getOwnPropertyDescriptor,Of=function(t){return typeof Array.isArray=="function"?Array.isArray(t):zf.call(t)==="[object Array]"},Nf=function(t){if(!t||zf.call(t)!=="[object Object]")return!1;var r=Cn.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Cn.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var a;for(a in t);return typeof a>"u"||Cn.call(t,a)},Rf=function(t,r){_f&&r.name==="__proto__"?_f(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Mf=function(t,r){if(r==="__proto__")if(Cn.call(t,r)){if(Pf)return Pf(t,r).value}else return;return t[r]};Uf.exports=function e(){var t,r,n,a,u,i,o=arguments[0],s=1,l=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<l;++s)if(t=arguments[s],t!=null)for(r in t)n=Mf(o,r),a=Mf(t,r),o!==a&&(c&&a&&(Nf(a)||(u=Of(a)))?(u?(u=!1,i=n&&Of(n)?n:[]):i=n&&Nf(n)?n:{},Rf(o,{name:r,newValue:e(c,i,a)})):typeof a<"u"&&Rf(o,{name:r,newValue:a}));return o}});var Gf=q((jT,Vf)=>{"use strict";Vf.exports=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}});var Yf=q(($T,Wf)=>{"use strict";var VF=[].slice;Wf.exports=GF;function GF(e,t){var r;return n;function n(){var i=VF.call(arguments,0),o=e.length>i.length,s;o&&i.push(a);try{s=e.apply(null,i)}catch(l){if(o&&r)throw l;return a(l)}o||(s&&typeof s.then=="function"?s.then(u,a):s instanceof Error?a(s):u(s))}function a(){r||(r=!0,t.apply(null,arguments))}function u(i){a(null,i)}}});var Jf=q((KT,Qf)=>{"use strict";var $f=Yf();Qf.exports=Kf;Kf.wrap=$f;var jf=[].slice;function Kf(){var e=[],t={};return t.run=r,t.use=n,t;function r(){var a=-1,u=jf.call(arguments,0,-1),i=arguments[arguments.length-1];if(typeof i!="function")throw new Error("Expected function as last argument, not "+i);o.apply(null,[null].concat(u));function o(s){var l=e[++a],c=jf.call(arguments,0),f=c.slice(1),h=u.length,m=-1;if(s){i(s);return}for(;++m<h;)(f[m]===null||f[m]===void 0)&&(f[m]=u[m]);u=f,l?$f(l,o).apply(null,u):i.apply(null,[nul
Line truncated
|
||||
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THORN:"\xDE",TRADE:"\u2122",TSHcy:"\u040B",TScy:"\u0426",Tab:" ",Tau:"\u03A4",Tcaron:"\u0164",Tcedil:"\u0162",Tcy:"\u0422",Tfr:"\u{1D517}",Therefore:"\u2234",Theta:"\u0398",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",Topf:"\u{1D54B}",TripleDot:"\u20DB",Tscr:"\u{1D4AF}",Tstrok:"\u0166",Uacute:"\xDA",Uarr:"\u219F",Uarrocir:"\u2949",Ubrcy:"\u040E",Ubreve:"\u016C",Ucirc:"\xDB",Ucy:"\u0423",Udblac:"\u0170",Ufr:"\u{1D518}",Ugrave:"\xD9",Umacr:"\u016A",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",Uopf:"\u{1D54C}",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",UpTee:"\u22A5",UpTeeArrow:"\u21A5",Uparrow:"\u21D1",Updownarrow:"\u21D5",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",Upsilon:"\u03A5",Uring:"\u016E",Uscr:"\u{1D4B0}",Utilde:"\u0168",Uuml:"\xDC",VDash:"\u22AB",Vbar:"\u2AEB",Vcy:"\u0412",Vdash
Line truncated
|
||||
`;break}case-3:{i=`\r
|
||||
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&a)continue;i=" ";break}default:i=String.fromCharCode(u)}a=u===-2,n.push(i)}return n.join("")}function oi(e){let n={constructs:Or([ui,...(e||{}).extensions||[]]),content:a(Au),defined:[],document:a(Su),flow:a(Bu),lazy:{},string:a(Pu),text:a(Ou)};return n;function a(u){return i;function i(o){return Mu(n,u,o)}}}function si(e){for(;!Vr(e););return e}var zu=/[\0\t\n\r]/g;function li(){let e=1,t="",r=!0,n;return a;function a(u,i,o){let s=[],l,c,f,h,m;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(i||void 0).decode(u)),f=0,t="",r&&(u.charCodeAt(0)===65279&&f++,r=void 0);f<u.length;){if(zu.lastIndex=f,l=zu.exec(u),h=l&&l.index!==void 0?l.index:u.length,m=u.charCodeAt(h),!l){t=u.slice(f);break}if(m===10&&f===h&&n)s.push(-3),n=void 0;else switch(n&&(s.push(-5),n=void 0),f<h&&(s.push(u.slice(f,h)),e+=h-f),m){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:n=!0,e=1}f=h+1}return o&&(n&&s.push(-5),t&&s.push(t),s.push(null)),s}}var MD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Uu(e){return e.replace(MD,zD)}function zD(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let a=r.charCodeAt(1),u=a===120||a===88;return Nr(r.slice(u?2:1),u?16:10)}return Tt(r)||e}function Lt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Hu(e.position):"start"in e||"end"in e?Hu(e):"line"in e||"column"in e?ci(e):""}function ci(e){return Vu(e&&e.line)+":"+Vu(e&&e.column)}function Hu(e){return ci(e&&e.start)+"-"+ci(e&&e.end)}function Vu(e){return e&&typeof e=="number"?e:1}var Wu={}.hasOwnProperty;function fi(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),UD(r)(si(oi(r).document().write(li()(e,t,!0))))}function UD(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(du),autolinkProtocol:y,autolinkEmail:y,atxHeading:u(hu),blockQuote:u(Me),characterEscape:y,characterReference:y,codeFenced:u(ct),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:u(ct,i),codeText:u(yt,i),codeTextData:y,data:y,codeFlowValue:y,definition:u(Un),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:u(em),hardBreakEscape:u(mu),hardBreakTrailing:u(mu),htmlFlow:u(Du,i),htmlFlowData:y,htmlText:u(Du,i),htmlTextData:y,image:u(tm),label:i,link:u(du),listItem:u(rm),listItemValue:h,listOrdered:u(gu,f),listUnordered:u(gu),paragraph:u(nm),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:u(hu),strong:u(im),thematicBreak:u(um)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Jt,autolinkProtocol:oe,blockQuote:s(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:te,characterReference:et,codeFenced:s(g),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:D,codeFlowValue:b,codeIndented:s(k),codeText:s(O),codeTextData:b,data:b,definition:s(),definitionDestinationString:S,definitionLabelString:E,definitionTitleString:C,emphasis:s(),hardBreakEscape:s(I),hardBreakTrailing:s(I),htmlFlow:s(T),htmlFlowData:b,htmlText:s(R),htmlTextData:b,image:s(N),label:ne,labelText:W,lineEnding:_,link:s(z),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ee,resourceDestinationString:p,resourceTitleString:Y,resource:ie,setextHeading:s(L),setextHeadingLineSequence:v,setextHeadingText:d,strong:s(),thematicBreak:s()}};Yu(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(A){let P={type:"root",children:[]},V={stack:[P],tokenStack:[],config:t,enter:o,exit:l,buffer:i,resume:c,data:r},j=[],$=-1;for(;++$<A.length;)if(A[$][1].type==="listOrdered"||A[$][1].type==="listUnordered")if(A[$][0]==="enter")j.push($);else{let ye=j.pop();$=a(A,ye,$)}for($=-1;++$<A.length;){let ye=t[A[$][0]];Wu.call(ye,A[$][1].type)&&ye[A[$][1].type].call(Object.assign({sliceSerialize:A[$][2].sliceSerialize},V),A[$][1])}if(V.tokenStack.length>0){let ye=V.tokenStack[V.tokenStack.length-1];(ye[1]||Gu).call(V,void 0,ye[0])}for(P.position={start:it(A.length>0?A[0][1].start:{line:1,column:1,offset:0}),end:it(A.length>0?A[A.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<t.transforms.length;)P=t.transforms[$](P)||P;return P}function a(A,P,V){let j=P-1,$=-1,ye=!1,ft,ze,Xt,Zt;for(;++j<=V;){let xe=A[j];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xe[0]==="enter"?$++:$--,Zt=void 0;break}case"lineEndingBlank":{xe[0]==="enter"&&(ft&&!Zt&&!$&&!Xt&&(Xt=j),Zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Zt=void 0}if(!$&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||$===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(ft){let vt=j;for(ze=void 0;vt--;){let Ue=A[vt];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]=Line truncated
|
||||
`,ur);if(r===-1)return;let n=e.slice(ur,r).trim(),a=e.indexOf(`
|
||||
${t}`,r),u=n;if(u||(u=t==="+++"?"toml":"yaml"),a===-1&&t==="---"&&u==="yaml"&&(a=e.indexOf(`
|
||||
...`,r)),a===-1)return;let i=a+1+ur,o=e.charAt(i+1);if(!/\s?/.test(o))return;let s=e.slice(0,i),l;return{language:u,explicitLanguage:n||null,value:e.slice(r+1,a),startDelimiter:t,endDelimiter:s.slice(-ur),raw:s,start:{line:1,column:0,index:0},end:{index:s.length,get line(){return l??(l=s.split(`
|
||||
`)),l.length},get column(){return l??(l=s.split(`
|
||||
`)),J(0,l,-1).length}},[Qr]:!0}}function Cd(e){let t=wd(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return oo(r)+e.slice(r.length)}}:{content:e}}var Ve=Cd;function bi(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function ve(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var Bt=(function(e){if(e==null)return Td;if(typeof e=="function")return Jr(e);if(typeof e=="object")return Array.isArray(e)?yd(e):vd(e);if(typeof e=="string")return Ad(e);throw new Error("Expected function, string, or object as test")});function yd(e){let t=[],r=-1;for(;++r<e.length;)t[r]=Bt(e[r]);return Jr(n);function n(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function vd(e){let t=e;return Jr(r);function r(n){let a=n,u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function Ad(e){return Jr(t);function t(r){return r&&r.type===e}}function Jr(e){return t;function t(r,n,a){return!!(Sd(r)&&e.call(this,r,typeof n=="number"?n:void 0,a||void 0))}}function Td(){return!0}function Sd(e){return e!==null&&typeof e=="object"&&"type"in e}var so=[],lo=!0,Ei=!1,co="skip";function wi(e,t,r,n){let a;typeof t=="function"&&typeof r!="function"?(n=r,r=t):a=t;let u=Bt(a),i=n?-1:1;o(e,void 0,[])();function o(s,l,c){let f=s&&typeof s=="object"?s:{};if(typeof f.type=="string"){let m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(s.type+(m?"<"+m+">":""))+")"})}return h;function h(){let m=so,D,x,g;if((!t||u(s,l,c[c.length-1]||void 0))&&(m=Ld(r(s,c)),m[0]===Ei))return m;if("children"in s&&s.children){let k=s;if(k.children&&m[0]!==co)for(x=(n?k.children.length:-1)+i,g=c.concat(k);x>-1&&x<k.children.length;){let E=k.children[x];if(D=o(E,x,g)(),D[0]===Ei)return D;x=typeof D[1]=="number"?D[1]:x+i}}return m}}}function Ld(e){return Array.isArray(e)?e:typeof e=="number"?[lo,e]:e==null?so:[e]}function Ci(e,t,r){let a=Bt((r||{}).ignore||[]),u=Id(t),i=-1;for(;++i<u.length;)wi(e,"text",o);function o(l,c){let f=-1,h;for(;++f<c.length;){let m=c[f],D=h?h.children:void 0;if(a(m,D?D.indexOf(m):void 0,h))return;h=m}if(h)return s(l,c)}function s(l,c){let f=c[c.length-1],h=u[i][0],m=u[i][1],D=0,g=f.children.indexOf(l),k=!1,E=[];h.lastIndex=0;let C=h.exec(l.value);for(;C;){let S=C.index,w={index:C.index,input:C.input,stack:[...c,l]},d=m(...C,w);if(typeof d=="string"&&(d=d.length>0?{type:"text",value:d}:void 0),d===!1?h.lastIndex=S+1:(D!==S&&E.push({type:"text",value:l.value.slice(D,S)}),Array.isArray(d)?E.push(...d):d&&E.push(d),D=S+C[0].length,k=!0),!h.global)break;C=h.exec(l.value)}return k?(D<l.value.length&&E.push({type:"text",value:l.value.slice(D)}),f.children.splice(g,1,...E)):E=[l],g+E.length}}function Id(e){let t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let r=!e[0]||Array.isArray(e[0])?e:[e],n=-1;for(;++n<r.length;){let a=r[n];t.push([qd(a[0]),Bd(a[1])])}return t}function qd(e){return typeof e=="string"?new RegExp(ve(e),"g"):e}function Bd(e){return typeof e=="function"?e:function(){return e}}function vi(){return{transforms:[Md],enter:{literalAutolink:_d,literalAutolinkEmail:yi,literalAutolinkHttp:yi,literalAutolinkWww:yi},exit:{literalAutolink:Rd,literalAutolinkEmail:Nd,literalAutolinkHttp:Pd,literalAutolinkWww:Od}}}function _d(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function yi(e){this.config.enter.autolinkProtocol.call(this,e)}function Pd(e){this.config.exit.autolinkProtocol.call(this,e)}function Od(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Nd(e){this.config.exit.autolinkEmail.call(this,e)}function Rd(e){this.exit(e)}function Md(e){Ci(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,zd],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Ud]],{ignore:["link","linkReference"]})}function zd(e,t,r,n,a){let u="";if(!fo(a)||(/^w/i.test(t)&&(r=t+r,t="",u="http://"),!Hd(r)))return!1;let i=Vd(r+n);if(!i[0])return!1;let o={type:"link",title:null,url:u+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[o,{type:"text",value:i[1]}]:o}function Ud(e,t,r,n){return!fo(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function Hd(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Vd(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),a=bi(e,"("),u=bi(e,")");for(;n!==-1&&a>u;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),u++;return[e,r]}function fo(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Ie(r)||Dt(r))
Line truncated
|
||||
|
||||
`),n=r===-1?t:t.slice(0,r);if(Ap(n))return e(n)({type:vp(n)?"export":"import",value:n})};Ua.notInBlock=!0;Ua.locator=e=>Ap(e)?-1:1;var Tp=(e,t)=>{let r=Sb.exec(t);if(r)return e(r[0])({type:"esComment",value:r[1].trim()})};Tp.locator=(e,t)=>e.indexOf("{",t);var Sp=function(){let{Parser:e}=this,{blockTokenizers:t,blockMethods:r,inlineTokenizers:n,inlineMethods:a}=e.prototype;t.esSyntax=Ua,n.esComment=Tp,r.splice(r.indexOf("paragraph"),0,"esSyntax"),a.splice(a.indexOf("text"),0,"esComment")};var De="string",de="array",st="cursor",Ae="indent",Te="align",je="trim",ke="group",Fe="fill",be="if-break",$e="indent-if-break",Ke="line-suffix",Qe="line-suffix-boundary",ge="line",Je="label",Se="break-parent",An=new Set([st,Ae,Te,je,ke,Fe,be,$e,Ke,Qe,ge,Je,Se]);function Lp(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function Ib(e){if(typeof e=="string")return De;if(Array.isArray(e))return de;if(!e)return;let{type:t}=e;if(An.has(t))return t}var me=Ib;var qb=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function Bb(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
|
||||
Expected it to be 'string' or 'object'.`;if(me(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=qb([...An].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
|
||||
Expected it to be ${n}.`}var Ha=class extends Error{name="InvalidDocError";constructor(t){super(Bb(t)),this.doc=t}},wt=Ha;var Ip={};function _b(e,t,r,n){let a=[e];for(;a.length>0;){let u=a.pop();if(u===Ip){r(a.pop());continue}r&&a.push(u,Ip);let i=me(u);if(!i)throw new wt(u);if(t?.(u)!==!1)switch(i){case de:case Fe:{let o=i===de?u:u.parts;for(let s=o.length,l=s-1;l>=0;--l)a.push(o[l]);break}case be:a.push(u.flatContents,u.breakContents);break;case ke:if(n&&u.expandedStates)for(let o=u.expandedStates.length,s=o-1;s>=0;--s)a.push(u.expandedStates[s]);else a.push(u.contents);break;case Te:case Ae:case $e:case Je:case Ke:a.push(u.contents);break;case De:case st:case je:case Qe:case ge:case Se:break;default:throw new wt(u)}}}var qp=_b;function Pb(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(u){return Lp(r,u,a)}function a(u){switch(me(u)){case de:return t(u.map(n));case Fe:return t({...u,parts:u.parts.map(n)});case be:return t({...u,breakContents:n(u.breakContents),flatContents:n(u.flatContents)});case ke:{let{expandedStates:i,contents:o}=u;return i?(i=i.map(n),o=i[0]):o=n(o),t({...u,contents:o,expandedStates:i})}case Te:case Ae:case $e:case Je:case Ke:return t({...u,contents:n(u.contents)});case De:case st:case je:case Qe:case ge:case Se:return t(u);default:throw new wt(u)}}}function Bp(e){if(e.length>0){let t=J(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function _p(e){let t=new Set,r=[];function n(u){if(u.type===Se&&Bp(r),u.type===ke){if(r.push(u),t.has(u))return!1;t.add(u)}}function a(u){u.type===ke&&r.pop().break&&Bp(r)}qp(e,n,a,!0)}function Xe(e,t=wr){return Pb(e,r=>typeof r=="string"?Tn(t,r.split(`
|
||||
`)):r)}var Le=ar,Sn=ar,Pp=ar,Op=ar;function Cr(e){return Le(e),{type:Ae,contents:e}}function we(e,t){return Op(e),Le(t),{type:Te,contents:t,n:e}}function yr(e){return we({type:"root"},e)}var Wt={type:Se};function Yt(e){return Pp(e),{type:Fe,parts:e}}function jt(e,t={}){return Le(e),Sn(t.expandedStates,!0),{type:ke,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Np(e,t="",r={}){return Le(e),t!==""&&Le(t),{type:be,breakContents:e,flatContents:t,groupId:r.groupId}}function Tn(e,t){Le(e),Sn(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var Ln={type:ge},In={type:ge,soft:!0},vr={type:ge,hard:!0},Z=[vr,Wt],Ob={type:ge,hard:!0,literal:!0},wr=[Ob,Wt];var Nb="cr",Rb="crlf";var Mb="\r",zb=`\r
|
||||
`,Ub=`
|
||||
`,Hb=Ub;function Rp(e){return e===Nb?Mb:e===Rb?zb:Hb}var Mp=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
|
||||
`?X(0,g,`
|
||||
`,a):g;k&&(l.write(k),i.length>0&&(u+=Ar(k)));break}case de:for(let k=g.length-1;k>=0;k--)i.push({indent:D,mode:x,doc:g[k]});break;case st:l.markPosition();break;case Ae:i.push({indent:Kp(D,t),mode:x,doc:g.contents});break;case Te:i.push({indent:$p(D,g.n,t),mode:x,doc:g.contents});break;case je:u-=l.trim();break;case ke:{let k=(function(){if(x===Ne&&!o)return{indent:D,mode:g.break?Ce:Ne,doc:g.contents};o=!1;let C=n-u,S=s.length>0,w={indent:D,mode:Ne,doc:g.contents};if(!g.break&&Bn(w,i,C,S,r))return w;if(!g.expandedStates)return{indent:D,mode:Ce,doc:g.contents};if(!g.break)for(let d=1;d<g.expandedStates.length-1;d++){let v={indent:D,mode:Ne,doc:g.expandedStates[d]};if(Bn(v,i,C,S,r))return v}return{indent:D,mode:Ce,doc:J(0,g.expandedStates,-1)}})();i.push(k),g.id&&(r[g.id]=k.mode);break}case Fe:{let k=n-u,E=g[Ka]??0,{parts:C}=g,S=C.length-E;if(S===0)break;let w=C[E+0],d=C[E+1],v={indent:D,mode:Ne,doc:w},L={indent:D,mode:Ce,doc:w},y=Bn(v,[],k,s.length>0,r,!0);if(S===1){y?i.push(v):i.push(L);break}let b={indent:D,mode:Ne,doc:d},_={indent:D,mode:Ce,doc:d};if(S===2){y?i.push(b,v):i.push(_,L);break}let I=C[E+2],T={indent:D,mode:x,doc:{...g,[Ka]:E+2}},O=Bn({indent:D,mode:Ne,doc:[w,d,I]},[],k,s.length>0,r,!0);i.push(T),O?i.push(b,v):y?i.push(_,v):i.push(_,L);break}case be:case $e:{let k=g.groupId?r[g.groupId]:x;if(k===Ce){let E=g.type===be?g.breakContents:g.negate?g.contents:Cr(g.contents);E&&i.push({indent:D,mode:x,doc:E})}if(k===Ne){let E=g.type===be?g.flatContents:g.negate?Cr(g.contents):g.contents;E&&i.push({indent:D,mode:x,doc:E})}break}case Ke:s.push({indent:D,mode:x,doc:g.contents});break;case Qe:s.length>0&&i.push({indent:D,mode:x,doc:vr});break;case ge:switch(x){case Ne:if(!g.hard){g.soft||(l.write(" "),u+=1);break}o=!0;case Ce:if(s.length>0){i.push({indent:D,mode:x,doc:g},...s.reverse()),s.length=0;break}g.literal?(l.write(a),u=0,D.root&&(D.root.value&&l.write(D.root.value),u=D.root.length)):(l.trim(),l.write(a+D.value),u=D.length);break}break;case Je:i.push({indent:D,mode:x,doc:g.contents});break;case Se:break;default:throw new wt(g)}i.length===0&&s.length>0&&(i.push(...s.reverse()),s.length=0)}let{text:c,positions:f}=l.finish();if(f.length!==2)return{formatted:c};let[h,m]=f;return{formatted:c,cursorNodeStart:h,cursorNodeText:c.slice(h,m)}}var Xb=Array.prototype.toReversed??function(){return[...this].reverse()},Zb=qt("toReversed",function(){if(Array.isArray(this))return Xb}),Xp=Zb;function eE(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var tE=eE();function Zp(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function rE(e){return e=Zp(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function nE(e){e=Zp(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Qa(e){return tE?nE(e):rE(e)}var eh=e=>String(e).split(/[/\\]/).pop(),th=e=>String(e).startsWith("file:");function rh(e,t){if(!t)return;let r=eh(t).toLowerCase();return e.find(({filenames:n})=>n?.some(a=>a.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(a=>r.endsWith(a)))}function iE(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var aE=void 0;function nh(e,t){if(t){if(th(t))try{t=Qa(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function uE(e,t){let r=Xp(0,e.plugins).flatMap(a=>a.languages??[]);return(iE(r,t.language)??rh(r,t.physicalFile)??rh(r,t.file)??nh(r,t.physicalFile)??nh(r,t.file)??aE?.(r,t.physicalFile))?.parsers[0]}var Ja=uE;function oE(e){return!!e?.[Qr]}var Xa=oE;var sE=function(){let e=this.Parser.prototype;e.blockMethods=["frontMatter",...e.blockMethods],e.blockTokenizers.frontMatter=t;function t(r,n){let{frontMatter:a}=Ve(n);if(a)return r(a.raw)({...a,type:"frontMatter"})}t.onlyAtStart=!0},ih=sE;var ah=/(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{16ff2}-\u{16ff6}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b81d}\u{2b820}-\u{2cead}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{33479}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01e
Line truncated
|
||||
`:" "});continue}if((a===0||a===r.length-1)&&u==="")continue;let i=u.split(new RegExp(`(${ah.source})`,"u"));for(let[o,s]of i.entries())if(!((o===0||o===i.length-1)&&s==="")){if(o%2===0){s!==""&&n({type:"word",value:s,kind:$t,isCJ:!1,hasLeadingPunctuation:Ze.test(s[0]),hasTrailingPunctuation:Ze.test(J(0,s,-1))});continue}if(Ze.test(s)){n({type:"word",value:s,kind:Tr,isCJ:!0,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0});continue}if(lE.test(s)){n({type:"word",value:s,kind:Ct,isCJ:!1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1});continue}n({type:"word",value:s,kind:Re,isCJ:!0,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return t;function n(a){let u=J(0,t,-1);u?.type==="word"&&!i($t,Tr)&&[u.value,a.value].every(o=>!/\u3000/.test(o))&&t.push({type:"whitespace",value:""}),t.push(a);function i(o,s){return u.kind===o&&a.kind===s||u.kind===s&&a.kind===o}}}function lt(e,t){let r=t.originalText.slice(e.position.start.offset,e.position.end.offset);if(t.parser!=="mdx"){let u=e.children[0];u&&(r=t.originalText.slice(e.position.start.offset,u.position.start.offset))}let{numberText:n,leadingSpaces:a}=r.match(/^\s*(?<numberText>\d+)(\.|\))(?<leadingSpaces>\s*)/).groups;return{number:Number(n),leadingSpaces:a}}function eu(e,t){return!e.ordered||e.children.length<2||lt(e.children[1],t).number!==1?!1:lt(e.children[0],t).number!==0?!0:e.children.length>2&<(e.children[2],t).number===1}function Pn(e,t){let{value:r}=e;return e.position.end.offset===t.length&&r.endsWith(`
|
||||
`)&&t.endsWith(`
|
||||
`)?r.slice(0,-1):r}function Ee(e,t){return(function r(n,a,u){let i={...t(n,a,u)};return i.children&&(i.children=i.children.map((o,s)=>r(o,s,[i,...u]))),i})(e,null,[])}function On(e){if(e?.type!=="link"||e.children.length!==1)return!1;let[t]=e.children;return pt(e)===pt(t)&&ht(e)===ht(t)}function Lr(e){let t;if(e.type==="html")t=e.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/);else{let r;e.type==="esComment"?r=e:e.type==="paragraph"&&e.children.length===1&&e.children[0].type==="esComment"&&(r=e.children[0]),r&&(t=r.value.match(/^prettier-ignore(?:-(start|end))?$/))}return t?t[1]||"next":!1}function Ir(e,t){return r(e,t,n=>n.ordered===e.ordered);function r(n,a,u){let i=-1;for(let o of a.children)if(o.type===n.type&&u(o)?i++:i=-1,o===n)return i}}function uh(e){return e.index>0&&Lr(e.previous)==="next"}function Kt(e){let{start:t,end:r}=e.position;return t.line!==r.line}var Qt=e=>e?.type==="whitespace"&&e.value===`
|
||||
`;function cE(){return e=>Ee(e,(t,r,[n])=>t.type!=="html"||yp.test(t.value)||_n.has(n.type)?t:{...t,type:"jsx"})}var oh=cE;var fE=function(){let e=this.Parser.prototype,t=e.inlineMethods;t.splice(t.indexOf("text"),0,"liquid"),e.inlineTokenizers.liquid=r;function r(n,a){let u=a.match(/^(\{%.*?%\}|\{\{.*?\}\})/s);if(u)return n(u[0])({type:"liquidNode",value:u[0]})}r.locator=function(n,a){return n.indexOf("{",a)}},sh=fE;var pE=function(){let e="wikiLink",t=/^\[\[(?<linkContents>.+?)\]\]/s,r=this.Parser.prototype,n=r.inlineMethods;n.splice(n.indexOf("link"),0,e),r.inlineTokenizers.wikiLink=a;function a(u,i){let o=t.exec(i);if(o){let s=o.groups.linkContents.trim();return u(o[0])({type:e,value:s})}}a.locator=function(u,i){return u.indexOf("[",i)}},lh=pE;function tu(e){let t=(0,hh.default)().use(ph.default,{commonmark:!0,blocks:[Cp]}).use(ch.default).use(ih).use(fh.default).use(Sp).use(sh).use(oh).use(lh);return t.run(t.parse(e))}var mh="format";var Dh=/<!--\s*@(?:noformat|noprettier)\s*-->|\{\s*\/\*\s*@(?:noformat|noprettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:noformat|noprettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/m,dh=/<!--\s*@(?:format|prettier)\s*-->|\{\s*\/\*\s*@(?:format|prettier)\s*\*\/\s*\}|<!--.*\r?\n[\s\S]*(^|\n)[^\S\n]*@(?:format|prettier)[^\S\n]*($|\n)[\s\S]*\n.*-->/m;var Nn=e=>Ve(e).content.trimStart().match(dh)?.index===0,gh=e=>Ve(e).content.trimStart().match(Dh)?.index===0,xh=e=>{let{frontMatter:t}=Ve(e),r=`<!-- @${mh} -->`;return t?`${t.raw}
|
||||
|
||||
${r}
|
||||
|
||||
${e.slice(t.end.index)}`:`${r}
|
||||
|
||||
${e}`};function kh(e){return{astFormat:"mdast",hasPragma:Nn,hasIgnorePragma:gh,locStart:pt,locEnd:ht,parse:e}}var hE=kh(_i),mE=kh(tu);var pu={};Pr(pu,{mdast:()=>sw});function DE(e,t){let r=e.matchAll(new RegExp(`(?:${ve(t)})+`,"g"));return r.reduce||(r=[...r]),r.reduce((n,[a])=>Math.max(n,a.length),0)/t.length}var Rn=DE;function dE(e,t){let{node:r}=e;switch(r.type){case"code":{let{lang:n}=r;if(!n)return;let a;return n==="angular-ts"?a=Ja(t,{language:"typescript"}):n==="angular-html"?a="angular":a=Ja(t,{language:n}),a?async u=>{let i={parser:a};n==="ts"||n==="typescript"?i.filepath="dummy.ts":n==="tsx"&&(i.filepath="dummy.tsx");let o=await u(t.parser==="mdx"?Pn(r,t.originalText):r.value,i),s=t.__inJsTemplate?"~":"`",l=s.repeat(Math.max(3,Rn(r.value,s)+1));return yr([l,r.lang,r.meta?" "+r.meta:"",Z,Xe(o),Z,l])}:void 0}case"import":case"export":return n=>n(r.value,{__onHtmlBindingRoot:a=>gE(a,r.type),parser:"babel"});case"jsx":return n=>n(`<$>${r.value}</$>`,{parser:"__js_expression",rootMarker:"mdx"})}return null}function gE(e,t){let{program:{body:r}}=e;if(r.some(n=>!(n.type==="ImportDeclaration"||n.type==="ExportDefaultDeclaration"||n.type==="ExportNamedDeclaration")))throw new Error(`Unexpected '${t}' in MDX.`)}var Fh=dE;var nu=At(hn(),1);var xE=new Set(["position","raw"]);function iu(e,t,r){if((e.type==="code"||e.type==="yaml"||e.type==="import"||e.type==="export"||e.type==="jsx")&&delete t.value,e.type==="list"&&delete t.isAligned,(e.type==="list"||e.type==="listItem")&&delete t.spread,e.type==="text")return null;if(e.type==="inlineCode"&&(t.value=X(0,e.value,`
|
||||
`," ")),(e.type==="definition"||e.type==="linkReference"||e.type==="imageReference")&&(t.label=(0,nu.default)(e.label)),e.type==="imageReference"&&e.referenceType==="collapsed"&&(t.alt=(0,nu.default)(e.alt)),(e.type==="link"||e.type==="image")&&e.url&&e.url.includes("("))for(let n of"<>")t.url=X(0,e.url,n,encodeURIComponent(n));if((e.type==="definition"||e.type==="link"||e.type==="image")&&e.title&&(t.title=X(0,e.title,/\\(?=["')])/g,"")),r?.type==="root"&&r.children.length>0&&(r.children[0]===e||Xa(r.children[0])&&r.children[1]===e)&&e.type==="html"&&Nn(e.value))return null}iu.ignoredProperties=xE;function au(e,t){let r=t.originalText.slice(e.node.position.start.offset,e.node.position.end.offset);return t.parser==="mdx"?r:e.node.type==="list"&&e.findAncestor(n=>n.type==="blockquote")&&t.proseWrap!=="always"?r.replace(/\n>\s*$/,""):r}var Yh=At(hn(),1);function kE(e,t){let r=e.match(new RegExp(`(${ve(t)})+`,"g"));if(r===null)return 1;let n=new Map,a=0;for(let u of r){let i=u.length/t.length;n.set(i,!0),i>a&&(a=i)}for(let u=1;u<a;u++)if(!n.get(u))return u;return a+1}var bh=kE;var Eh=Object.freeze({character:"'",codePoint:39}),wh=Object.freeze({character:'"',codePoint:34}),FE=Object.freeze({preferred:Eh,alternate:wh}),bE=Object.freeze({preferred:wh,alternate:Eh});function Ch(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?FE:bE,{length:a}=e,u=0,i=0;for(let o=0;o<a;o++){let s=e.charCodeAt(o);s===r.codePoint?u++:s===n.codePoint&&i++}return(u>i?n:r).character}var uu=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},yh=uu;function ae(e,t,r,n={}){let{processor:a=r}=n,u=[];return e.each(()=>{let i=a(e);i!==!1&&(u.length>0&&EE(e)&&(u.push(Z),CE(e,t)&&u.push(Z)),u.push(i))},"children"),u}function EE({node:e,parent:t}){let r=Za.has(e.type),n=e.type==="html"&&_n.has(t.type);return!r&&!n}var wE=new Set(["listItem","definition"]);function CE(e,t){let{node:r,previous:n,parent:a}=e;if(t.parser==="mdx"){if(vh(n,t)||r.type==="list"&&a.type==="listItem"&&(n.type==="code"||n.type==="paragraph")&&n.position.end.line+1<r.position.start.line)return!0}else{if(Kt(r)&&r.position.start.line<n.position.end.line)return!1;if(yE(e)||r.type==="list"&&a.type==="listItem"&&(n.type==="code"||n.type==="paragraph")&&n.position.end.line+1<r.position.start.line)return!0}let i=n.type===r.type&&wE.has(r.type),o;t.parser==="mdx"?o=a.type==="listItem"&&(r.type==="list"||!vh(a,t)):o=a.type==="listItem"&&(r.type==="list"||!e.callParent(Ah));let s=Lr(n)==="next",l=r.type==="html"&&n.type==="html"&&n.position.end.line+1===r.position.start.line,c=t.parser!=="mdx"&&r.type==="html"&&n.type==="paragraph"&&n.position.end.line+1===r.position.start.line,f=r.type==="html"&&a.type==="listItem"&&n.type==="paragraph"&&n.position.end.line+1===r.position.start.line;return!(i||o||s||l||c||f)}function vh(e,t){return e.type==="listItem"&&(e.spread||t.originalText.charAt(e.position.end.offset-1)===`
|
||||
`)}function Ah({node:e,parent:t,next:r}){return e.type==="listItem"&&(e.spread||t.type==="list"&&r?.type==="listItem"&&e.position.end.line+1<r.position.start.line)}function yE(e){return e.index===0?!1:Ah({node:e.previous,parent:e.parent,next:e.node})}function vE(e,t,r){return["#".repeat(e.node.depth)+" ",ae(e,t,r)]}function AE(e,t,r){let{originalText:n}=t,{node:a}=e,u=a.position.end.offset,i=n.lastIndexOf(`
|
||||
`,u-1)+1,o=n.slice(i,u),s=Math.max(o.indexOf("="),o.indexOf("-")),l=o.slice(s);return[ae(e,t,r),Z,l]}function Th(e,t,r){return t.parser!=="mdx"&&Kt(e.node)?AE(e,t,r):vE(e,t,r)}var TE=999999999;function Ih(e,t,r){let{node:n}=e,a=Ir(n,e.parent),u=eu(n,t),i=SE(e);return ae(e,t,r,{processor(){let o=l(),{node:s}=e;if(s.children.length===2&&s.children[1].type==="html"&&s.children[0].position.start.column!==s.children[1].position.start.column)return[o,Sh(e,t,r,o)];return[o,we(" ".repeat(o.length),Sh(e,t,r,o))];function l(){let c=n.ordered?(e.isFirst?n.start:u?1:Math.min(n.start+e.index,TE))+(a%2===0?". ":") "):a%2===0?"- ":"* ",f=n.isAligned&&n.ordered?Bh(c,t):c;if(f.length>=i)return f;f=f.trimEnd();let h=Math.min(i-f.length,4);h>0&&(f+=" ".repeat(h));let m=Math.min(i-f.length,3);return m>0&&(f=" ".repeat(m)+f),f}}})}function Sh(e,t,r,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,ae(e,t,r,{processor({node:i,isFirst:o}){if(o&&i.type!=="list"||i.type==="code"&&i.isIndented)return we(" ".repeat(u.length),r());let s=" ".repeat(_h(t.tabWidth-n.length,0,3));return[s,we(s,r())]}})]}function SE(e){let{node:t,next:r}=e;return t.checked===null||!(r?.type==="code"&&r.isIndented)?0:4+[.../^[ \t]*/.exec(r.value)?.[0]??""].reduce((a,u)=>a+(u===" "?4:1),0)+1}function qh(e,t,r){let{node:n}=e,a=Ir(n,e.parent),u=eu(n,t);return ae(e,t,r,{processor(){let i=s(),{node:o}=e;if(o.children.length===2&&o.children[1].type==="html"&&o.children[0].position.start.column!==o.children[1].position.start.column)return[i,Lh(e,t,r,i)];return[i,we(" ".repeat(i.length),Lh(e,t,r,i))];function s(){let l=n.ordered?(e.isFirst?n.start:u?1:n.start+e.index)+(a%2===0?". ":") "):a%2===0?"- ":"* ";return(n.isAligned||n.hasIndentedCodeblock)&&n.ordered?Bh(l,t):l}}})}function Lh(e,t,r,n){let{node:a}=e,u=a.checked===null?"":a.checked?"[x] ":"[ ] ";return[u,ae(e,t,r,{processor({node:i,isFirst:o}){if(o&&i.type!=="list")return we(" ".repeat(u.length),r());let s=" ".repeat(_h(t.tabWidth-n.length,0,3));return[s,we(s,r())]}})]}function Bh(e,t){let r=n();return e+" ".repeat(r>=4?0:r);function n(){let a=e.length%t.tabWidth;return a===0?0:t.tabWidth-a}}function _h(e,t,r){return Math.max(t,Math.min(e,r))}function Ph(e,t,r){let n=e.map(r,"children");return LE(n)}function LE(e){let t=[""];return(function r(n){for(let a of n){let u=me(a);if(u===de){r(a);continue}let i=a,o=[];u===Fe&&([i,...o]=a.parts),t.push([t.pop(),i],...o)}})(e),Yt(t)}function Oh(e,t){let r=[""];return e.each(()=>{let{node:n}=e,a=t();switch(n.type){case"whitespace":if(me(a)!==De){r.push(a,"");break}default:r.push([r.pop(),a])}},"children"),Yt(r)}function Nh(e,t,r){let{node:n}=e,a=[],u=e.map(()=>e.map(({index:f})=>{let h=Jp(r(),t).formatted,m=Ar(h);return a[f]=Math.max(a[f]??3,m),{text:h,width:m}},"children"),"children"),i=s(!1);if(t.proseWrap!=="never")return[Wt,i];let o=s(!0);return[Wt,jt(Np(o,i))];function s(f){return Tn(vr,[c(u[0],f),l(f),...u.slice(1).map(h=>c(h,f))].map(h=>`| ${h.join(" | ")} |`))}function l(f){return a.map((h,m)=>{if(t.parser!=="mdx"&&m>=u[0].length)return null;let D=n.align[m],x=D==="center"||D==="left"?":":"-",g=D==="center"||D==="right"?":":"-",k=f?"-":"-".repeat(h-2);return`${x}${k}${g}`}).filter(h=>h!==null)}function c(f,h){return f.map(({text:m,width:D},x)=>{if(h)return m;let g=a[x]-D,k=n.align[x],E=0;k==="right"?E=g:k==="center"&&(E=Math.floor(g/2));let C=g-E;return`${" ".repeat(E)}${m}${" ".repeat(C)}`})}}var IE=new Set(["tableCell","link","wikiLink"]),Rh=new Set("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");function qE({parent:e}){if(e.usesCJSpaces===void 0){let t={" ":0,"":0},{children:r}=e;for(let n=1;n<r.length-1;++n){let a=r[n];if(a.type==="whitespace"&&(a.value===" "||a.value==="")){let u=r[n-1].kind,i=r[n+1].kind;(u===Re&&i===$t||u===$t&&i===Re)&&++t[a.value]}}e.usesCJSpaces=t[" "]>t[""]}return e.usesCJSpaces}function BE(e,t){if(t)return!0;let{previous:r,next:n}=e;if(!r||!n)return!0;let a=r.kind,u=n.kind;return Mh(a)&&Mh(u)||a===Ct&&u===Re||u===Ct&&a===Re?!0:a===Tr||u===Tr||a===Re&&u===Re?!1:Rh.has(n.value[0])||Rh.has(J(0,r.value,-1))?!0:r.hasTrailingPunctuation||n.hasLeadingPunctuation?!1:qE(e)}function Mh(e){return e===$t||e===Ct}function _E(e,t,r,n,a){if(r!=="always"||e.hasAncestor(o=>IE.has(o.type)||o.type==="heading"&&(a.parser==="mdx"||!Kt(o))))return!1;if(n)return t!=="";let{previous:u,next:i}=e;return!u||!i?!0:t===""?!1:u.kind===Ct&&i.kind===Re||i.kind===Ct&&u.kind===Re?!0:!(u.isCJ||i.isCJ)}function ou(e,t,r,n,a){if(r==="preserve"&&t===`
|
||||
`)return Z;let u=t===" "||t===`
|
||||
`&&BE(e,n);return _E(e,t,r,n,a)?u?Ln:In:u?" ":""}var PE=/^(?:=+|-+)$/;function zh(e,t){let{node:r}=e,n=e.findAncestor(u=>u.type==="emphasis"||u.type==="strong"),a=r.value;return n?(e.isFirst&&(a.startsWith("*")||a.startsWith("_"))&&e.callParent(()=>e.isFirst)&&e.grandparent===n&&(a=`\\${a}`),a=X(0,a,/(\\+|^|.)(\*+|_+)($|.)/g,(u,i,o,s)=>[...i].every(l=>l==="\\")&&i.length%2===1?u:OE(J(0,i,-1)||J(1,e.previous?.value,-1),o,s[0]||e.next?.value[0])?`${i}\\${o}${s}`:u),a):t.proseWrap==="preserve"&&e.parent.type==="sentence"&&PE.test(a)&&Qt(e.previous)&&(e.isLast||Qt(e.next))?`\\${a}`:a}function OE(e,t,r){if(!e||!r)return null;let n=/[\p{Space_Separator}\t\n\f\r]/u.test(r),a=/[\p{Space_Separator}\t\n\f\r]/u.test(e),u=Ze.test(r),i=Ze.test(e),o=!n&&(!u||u&&(a||i)),s=!a&&(!i||i&&(n||u));return t[0]==="*"?o||s:o?!s||i:s?!o||u:!1}function Uh(e){let{node:t}=e,r=X(0,X(0,t.value,"*","\\*"),new RegExp([`(^|${Ze.source})(_+)`,`(_+)(${Ze.source}|$)`].join("|"),"gu"),(u,i,o,s,l)=>X(0,o?`${i}${o}`:`${s}${l}`,"_","\\_")),n=(u,i,o)=>u.type==="sentence"&&o===0,a=(u,i,o)=>On(u.children[o-1]);return r!==t.value&&(e.match(void 0,n,a)||e.match(void 0,n,(u,i,o)=>u.type==="emphasis"&&o===0,a))&&(r=r.replace(/^(\\?[*_])+/,u=>X(0,u,"\\",""))),r}function Hh(e){let{previous:t,next:r}=e;return t?.type==="sentence"&&J(0,t.children,-1)?.type==="word"&&!J(0,t.children,-1).hasTrailingPunctuation&&!/[\p{Space_Separator}\t\n\f\r]$/u.test(J(0,t.children,-1).value)||r?.type==="sentence"&&r.children[0]?.type==="word"&&!r.children[0].hasLeadingPunctuation&&!/^[\p{Space_Separator}\t\n\f\r]/u.test(r.children[0].value)}function NE(e){let{siblings:t,index:r}=e;if(!t||typeof r!="number")return!1;let n=t[r+2];return n?.type==="whitespace"&&n.value===""}function RE(e){if(!Qt(e.node)||e.next?.value!=="-")return!1;let t=e.siblings[e.index+2];return!t||Qt(t)}function lu(e,t,r){let{node:n}=e;if(zE(e)){let a=[""],u=Sr(t.originalText.slice(n.position.start.offset,n.position.end.offset));for(let i of u){if(i.type==="word"){a.push([a.pop(),i.value]);continue}let o=ou(e,i.value,t.proseWrap,!0,t);if(me(o)===De){a.push([a.pop(),o]);continue}a.push(o,"")}return Yt(a)}switch(n.type){case"root":return n.children.length===0?"":[ME(e,t,r),Z];case"paragraph":return Ph(e,t,r);case"sentence":return Oh(e,r);case"word":return t.parser!=="mdx"?zh(e,t):Uh(e);case"whitespace":{let{next:a}=e,u=a&&/^>|^(?:[*+-]|#{1,6}|\d+[).])$/.test(a.value)&&!NE(e)&&!(t.proseWrap==="preserve"&&RE(e))?"never":t.proseWrap;return ou(e,n.value,u,!1,t)}case"emphasis":{let a;if(On(n.children[0]))a=t.originalText[n.position.start.offset];else{let u=Hh(e),i=e.callParent(({node:o})=>o.type==="strong"&&Hh(e));a=u||i||e.hasAncestor(o=>o.type==="emphasis")?"*":"_"}return[a,ae(e,t,r),a]}case"strong":return["**",ae(e,t,r),"**"];case"delete":return["~~",ae(e,t,r),"~~"];case"inlineCode":{let a=t.proseWrap==="preserve"?n.value:X(0,n.value,`
|
||||
`," ");t.parser!=="mdx"&&e.hasAncestor(s=>s.type==="tableCell")&&(a=X(0,a,"|","\\|"));let u=bh(a,"`"),i="`".repeat(u),o=a.startsWith("`")||a.endsWith("`")||/^[\n ]/.test(a)&&/[\n ]$/.test(a)&&/[^\n ]/.test(a)?" ":"";return[i,o,a,o,i]}case"wikiLink":{let a;return t.proseWrap==="preserve"?a=n.value:a=X(0,n.value,/[\t\n]+/g," "),["[[",a,"]]"]}case"link":switch(t.originalText[n.position.start.offset]){case"<":{let a="mailto:";return["<",n.url.startsWith(a)&&t.originalText.slice(n.position.start.offset+1,n.position.start.offset+1+a.length)!==a?n.url.slice(a.length):n.url,">"]}case"[":return["[",ae(e,t,r),"](",t.parser!=="mdx"&&n.url===""?"<>":su(n.url,")"),zn(n.title,t),")"];default:return t.originalText.slice(n.position.start.offset,n.position.end.offset)}case"image":return[""),zn(n.title,t),")"];case"blockquote":return["> ",we("> ",ae(e,t,r))];case"heading":return Th(e,t,r);case"code":{if(n.isIndented){let i=" ".repeat(4);return we(i,[i,Xe(n.value,Z)])}let a=t.__inJsTemplate?"~":"`",u=a.repeat(Math.max(3,Rn(n.value,a)+1));return[u,n.lang||"",n.meta?" "+n.meta:"",Z,Xe(t.parser==="mdx"?Pn(n,t.originalText):n.value,Z),Z,u]}case"html":{let{parent:a,isLast:u}=e,i=a.type==="root"&&u?n.value.trimEnd():n.value,o=/^<!--.*-->$/s.test(i);return Xe(i,o?Z:yr(wr))}case"list":return t.parser==="mdx"?qh(e,t,r):Ih(e,t,r);case"thematicBreak":{let{ancestors:a}=e,u=a.findIndex(o=>o.type==="list");return u===-1?"---":Ir(a[u],a[u+1])%2===0?"***":"---"}case"linkReference":return["[",ae(e,t,r),"]",n.referenceType==="full"?Mn(n):n.referenceType==="collapsed"?"[]":""];case"imageReference":{let a=Wh(n,t);return n.referenceType==="full"?["![",a,"]",Mn(n)]:[...t.parser==="mdx"?["![",a,"]"]:["!",Mn(n)],n.referenceType==="collapsed"?"[]":""]}case"definition":{let a=t.proseWrap==="always"?Ln:" ";return jt([Mn(n),":",Cr([a,t.parser!=="mdx"&&n.url===""?"<>":su(n.url),n.title===null?"":[a,zn(n.title,t,!1)]])])}case"footnote":return["[^",ae(e,t,r),"]"];case"footnoteReference":return Gh(n);case"footnoteDefinition":{let a=n.children.length===1&&n.children[0].type==="paragraph"&&(t.proseWrap==="never"||t.proseWrap==="preserve"&&n.children[0].position.start.line===n.children[0].position.end.line);return[Gh(n),": ",a?ae(e,t,r):jt([we(" ".repeat(4),ae(e,t,r,{processor:({isFirst:u})=>u?jt([In,r()]):r()}))])]}case"table":return Nh(e,t,r);case"tableCell":return ae(e,t,r);case"break":return/\s/.test(t.originalText[n.position.start.offset])?[" ",yr(wr)]:["\\",Z];case"liquidNode":return Xe(n.value,Z);case"import":case"export":case"jsx":return n.value.trimEnd();case"esComment":return["{/* ",n.value," */}"];case"math":return["$$",n.meta?" "+n.meta:"",Z,n.value?[Xe(n.value,Z),Z]:"","$$"];case"inlineMath":return t.originalText.slice(pt(n),ht(n));case"text":return Xe(n.value,Z);default:throw new yh(n,"Markdown")}}function ME(e,t,r){let n=[],a=null,{children:u}=e.node;for(let[i,o]of u.entries())switch(Lr(o)){case"start":a===null&&(a={index:i,offset:o.position.end.offset});break;case"end":a!==null&&(n.push({start:a,end:{index:i,offset:o.position.start.offset}}),a=null);break;default:break}return ae(e,t,r,{processor({index:i}){if(n.length>0){let o=n[0];if(i===o.start.index)return[Vh(u[o.start.index]),t.originalText.slice(o.start.offset,o.end.offset),Vh(u[o.end.index])];if(o.start.index<i&&i<o.end.index)return!1;if(i===o.end.index)return n.shift(),!1}return r()}})}function Vh(e){if(e.type==="html")return e.value;if(e.type==="paragraph"&&Array.isArray(e.children)&&e.children.length===1&&e.children[0].type==="esComment")return["{/* ",e.children[0].value," */}"]}function zE(e){let t=e.findAncestor(r=>r.type==="linkReference"||r.type==="imageReference");return t&&(t.type!=="linkReference"||t.referenceType!=="full")}var UE=(e,t)=>{for(let r of t)e=X(0,e,r,encodeURIComponent(r));return e};function su(e,t=[]){let r=[" ",...Array.isArray(t)?t:[t]];return new RegExp(r.map(n=>ve(n)).join("|")).test(e)?`<${UE(e,"<>")}>`:e}function zn(e,t,r=!0){if(!e)return"";if(r)return" "+zn(e,t,!1);if(t.parser==="mdx"&&(e=X(0,e,/\\(?=["')])/g,"")),e.includes('"')&&e.includes("'")&&!e.includes(")"))return`(${e})`;let n=Ch(e,t.singleQuote);return e=X(0,e,"\\","\\\\"),e=X(0,e,n,`\\${n}`),`${n}${e}${n}`}function Mn(e,t){let r=(0,Yh.default)(e.label);return t?.parser==="mdx"?`[${r}]`:`[${X(0,r,/[\\[\]]/g,a=>`\\${a}`)}]`}function Gh(e){return`[^${e.label}]`}function Wh(e,t){return t.parser!=="mdx"&&e.originalAltText?e.originalAltText:e.alt||""}var cu=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let a=0;a<t.length&&r.has(t.charAt(a));a++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let a=t.length-1;a>=0&&r.has(t.charAt(a));a--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))Line truncated
|
||||
`)){if(n.length===0)continue;let a=this.getLeadingWhitespaceCount(n);if(a===0)return 0;n.length!==a&&a<r&&(r=a)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
|
||||
`).map(n=>n.slice(r)).join(`
|
||||
`)}},jh=cu;var HE=[" ",`
|
||||
`,"\f","\r"," "],VE=new jh(HE),qr=VE;var GE=/^\\?.$/su,WE=/^\n *>[ >]*$/;function YE(e,t){return t.parser==="mdx"?e=jE(e,t):e=$E(e,t),e=QE(e),t.parser==="mdx"?e=tw(e,t):e=ew(e,t),t.parser!=="mdx"&&(e=rw(e,t)),t.parser==="mdx"?e=iw(e,t):e=nw(e,t),t.parser==="mdx"?e=JE(e):e=XE(e),e}function jE(e,t){return Ee(e,r=>{if(r.type!=="text")return r;let{value:n}=r;if(n==="*"||n==="_"||!GE.test(n)||r.position.end.offset-r.position.start.offset===n.length)return r;let a=t.originalText.slice(r.position.start.offset,r.position.end.offset);return WE.test(a)?r:{...r,value:a}})}function $E(e,t){return Ee(e,r=>(r.type==="text"&&(r.raw=t.originalText.slice(r.position.start.offset,r.position.end.offset)),r))}function KE(e,t,r){return Ee(e,n=>{if(!n.children)return n;let a=[],u,i;for(let o of n.children)u&&t(u,o)?(o=r(u,o),a.splice(-1,1,o),i||(i=!0)):a.push(o),u=o;return i?{...n,children:a}:n})}function QE(e){return KE(e,(t,r)=>t.type==="text"&&r.type==="text",(t,r)=>({type:"text",value:t.value+r.value,position:{start:t.position.start,end:r.position.end}}))}function JE(e){return Ee(e,(t,r,[n])=>{if(t.type!=="text")return t;let{value:a}=t;return n.type==="paragraph"&&(r===0&&(a=qr.trimStart(a)),r===n.children.length-1&&(a=qr.trimEnd(a))),{type:"sentence",position:t.position,children:Sr(a)}})}function XE(e){let t=new Set,r=new Set;return n(e,(u,i)=>{if(u.type==="wikiLink"){a(i);return}if(u.type==="text"){if(u.raw.includes("[["))for(let o of i)o.type==="paragraph"&&t.add(o);u.raw.includes("]]")&&a(i)}}),Ee(e,(u,i,o)=>{if(u.type!=="text")return u;let s=u.raw,l=o.findIndex(f=>f?.type==="paragraph"),c=l===-1?void 0:o[l];if(c){o.slice(l+1).some(h=>h?.type==="blockquote")&&(s=ZE(s,u));let f=o[0];f?.type==="paragraph"&&(i===0&&(s=qr.trimStart(s)),i===f.children.length-1&&(s=qr.trimEnd(s)))}return c&&r.has(c.position)?{type:"text",position:u.position,value:s}:{type:"sentence",position:u.position,children:Sr(s)}});function n(u,i){return(function o(s,l){if(i(s,l),s.children)for(let c of s.children)o(c,[s,...l])})(u,[])}function a(u){for(let i of u)i.type==="paragraph"&&t.has(i)&&r.add(i.position)}}function ZE(e,t){let r=/^([ \t]*>[ \t]*)*/,n=e.split(`
|
||||
`),a=t.value.split(`
|
||||
`);return n.map((i,o)=>{let l=(a[o]??"").match(r)[0]??"";return i.replace(r,l)}).join(`
|
||||
`)}function ew(e,t){return Ee(e,r=>{if(r.type!=="code")return r;let n=/^\n?(?: {4,}|\t)/.test(t.originalText.slice(r.position.start.offset,r.position.end.offset));return r.isIndented=n,r})}function tw(e,t){return Ee(e,(r,n,a)=>{if(r.type==="code"){let u=/^\n?(?: {4,}|\t)/.test(t.originalText.slice(r.position.start.offset,r.position.end.offset));if(r.isIndented=u,u)for(let i=0;i<a.length;i++){let o=a[i];if(o.hasIndentedCodeblock)break;o.type==="list"&&(o.hasIndentedCodeblock=!0)}}return r})}function rw(e,t){let{originalText:r}=t;return Ee(e,n=>{if(n.type==="image"||n.type==="imageReference")return n.originalAltText=$h(r,n.position.start.offset,n.position.end.offset),n;if(n.type!=="link"||!n.url)return n;let a=$h(r,n.position.start.offset,n.position.end.offset);return a&&/[[\]]/.test(a)&&(n.originalLabelText=a),n})}function $h(e,t,r){let n=e.indexOf("[",t);if(n===-1||n>=r)return null;let a=1,u=n+1;for(;u<r;){let i=e[u];if(i==="\\"){u+=2;continue}if(i==="[")a++;else if(i==="]"&&(a--,a===0))return e.slice(n+1,u);u++}return null}function nw(e,t){return Ee(e,(a,u,i)=>{if(a.type==="list"&&a.children.length>0){for(let s=0;s<i.length;s++){let l=i[s];if(l.type==="list"&&!l.isAligned)return a.isAligned=!1,a}let o=i[0]?.children[u+1];if(o?.type==="code"&&o.isIndented)return a.isAligned=!1,a;a.isAligned=n(a)}return a});function r(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[u,i]=a.children;if(lt(u,t).leadingSpaces.length>1)return!0;let s=r(u);if(s===-1)return!1;if(a.children.length===1)return s%t.tabWidth===0;let l=r(i);return s!==l?!1:s%t.tabWidth===0?!0:lt(i,t).leadingSpaces.length>1}}function iw(e,t){return Ee(e,(a,u,i)=>{if(a.type==="list"&&a.children.length>0){for(let o=0;o<i.length;o++){let s=i[o];if(s.type==="list"&&!s.isAligned)return a.isAligned=!1,a}a.isAligned=n(a)}return a});function r(a){return a.children.length===0?-1:a.children[0].position.start.column-1}function n(a){if(!a.ordered)return!0;let[u,i]=a.children;if(lt(u,t).leadingSpaces.length>1)return!0;let s=r(u);if(s===-1)return!1;if(a.children.length===1)return s%t.tabWidth===0;let l=r(i);return s!==l?!1:s%t.tabWidth===0?!0:lt(i,t).leadingSpaces.length>1}}var Kh=YE;var Br=null;function _r(e){if(Br!==null&&typeof Br.property){let t=Br;return Br=_r.prototype=null,t}return Br=_r.prototype=e??Object.create(null),new _r}var aw=10;for(let e=0;e<=aw;e++)_r();function fu(e){return _r(e)}function uw(e,t="type"){fu(e);function r(n){let a=n[t],u=e[a];if(!Array.isArray(u))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return u}return r}var Qh=uw;var le=[["children"]],Jh={root:le[0],paragraph:le[0],sentence:le[0],word:[],whitespace:[],emphasis:le[0],strong:le[0],delete:le[0],inlineCode:[],wikiLink:[],link:le[0],image:[],blockquote:le[0],heading:le[0],code:[],html:[],list:le[0],thematicBreak:[],linkReference:le[0],imageReference:[],definition:[],footnote:le[0],footnoteReference:[],footnoteDefinition:le[0],table:le[0],tableCell:le[0],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:le[0],listItem:le[0],text:[]};var ow=Qh(Jh),Xh=ow;var sw={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:Kh,print:lu,embed:Fh,massageAstNode:iu,hasPrettierIgnore:uh,insertPragma:xh,getVisitorKeys:Xh,printPrettierIgnored:au};export{Zh as default,xu as languages,ku as options,ru as parsers,pu as printers};
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
meriyah: Parser;
|
||||
};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.meriyah=e()}})(function(){"use strict";var Xe=Object.defineProperty;var J2=Object.getOwnPropertyDescriptor;var j2=Object.getOwnPropertyNames;var X2=Object.prototype.hasOwnProperty;var kt=(e,t)=>{for(var n in t)Xe(e,n,{get:t[n],enumerable:!0})},H2=(e,t,n,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j2(t))!X2.call(e,o)&&o!==n&&Xe(e,o,{get:()=>t[o],enumerable:!(u=J2(t,o))||u.enumerable});return e};var W2=e=>H2(Xe({},"__esModule",{value:!0}),e);var mi={};kt(mi,{parsers:()=>ht});var ht={};kt(ht,{meriyah:()=>gi});var z2=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),ae=z2;var Z=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var K2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},$2=Z("replaceAll",function(){if(typeof this=="string")return K2}),$=$2;var Y2=55296,Q2=56319,Z2=56320,G2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===Y2&&(n>Q2||++t>=e||(this.charCodeAt(t)&64512)!==Z2))return!1}return!0},x2=Z("isWellFormed",function(){if(typeof this=="string")return G2}),yt=x2;var St=((e,t)=>{let n=new Uint32Array(69632),u=0,o=0;for(;u<2597;){let i=e[u++];if(i<0)o-=i;else{let l=e[u++];i&2&&(l=t[l]),i&1?n.fill(l,o,o+=e[u++]):n[o++]=l}}return n})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,61,2,62,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,63,2,0,0,4294836735,0,3221225471,0,4294901942,2,64,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,58,2,7,2,6,0,4286643967,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,929054175,0,65487,0,4294828015,0,4092591615,0,1885355487,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,69,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,70,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,9,2,0,2,15,2,22,3,0,10,2,72,2,0,2,73,2,74,2,75,2,0,2,76,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,77,2,5,3,0,2,2,78,0,2151677951,2,29,2,10,0,909311,3,0,2,0,814743551,2,48,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,108,2,51,2,0,2,79,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,9,2,18,3,0,2,2,53,0,1046528,3,0,3,2,10,2,0,2,127,0,4294960127,2,9,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,80,2,9,2,0,2,81,2,82,2,83,0,12288,2,54,0,1048577,2,84,2,14,-1,2,14,0,131042,2,85,2,86,2,87,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,88,2,2,0,-16,2,89,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,49,2,0,-1,2,17,-16,3,0,206,-2,3,0,692,2,71,-1,2,17,2,9,3,0,8,2,91,2,18,2,0,0,3220242431,3,0,3,2,19,2,92,2,93,3,0,2,2,94,2,0,2,20,2,95,2,0,0,4351,2,0,2,10,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,10,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,99,2,100,2,22,2,23,3,0,3,0,67057663,3,0,349,2,101,2,102,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,103,2,104,3,0,2,2,19,2,105,3,0,10,2,9,2,17,2,0,2,46,2,0,2,31,2,106,2,25,0,1638399,0,57344,2,107,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,109,-1,2,110,2,111,2,112,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,65,2,6,2,12,2,9,2,0,2,113,-1,3,0,4,2,9,2,23,2,114,2,7,2,0,2,115,2,0,2,116,2,117,2,118,2,0,2,10,3,0,9,2,21,2,30,2,31,2,119,2,120,-2,2,121,2,122,2,30,2,21,2,8,-2,2,123,2,30,3,32,2,-1,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,47,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,125,0,4227858432,2,20,2,43,2,36,2,17,2,37,2,17,2,124,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,145,2,0,2,56,2,55,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,59,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,133,0,4190109695,2,52,-2,2,134,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,66,2,17,2,0,2,42,-3,2,31,-2,2,0,2,45,2,57,2,44,2,45,2,135,2,46,0,8388351,-2,2,136,0,3028287487,2,47,2,138,0,33259519,2,23,2,7,2,48,-7,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,67,-2,3,0,28,2,32,-3,3,0,3,2,49,3,0,6,2,50,-81,2,17,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17Line truncated
|
||||
`))return[];let t=[];for(let n of`*${e.value}*`.split(`
|
||||
`)){if(n=n.trimStart(),!n.startsWith("*"))return[];t.push(n)}return t}var h2=new WeakMap;function Ku(e){return se(h2,e,zu)}function k2(e){h2.delete(e)}function gt(e){return Ku(e).length>0}function y2(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&V(u)===R(t)&>(u)&>(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[R(u),V(t)],k2(u)),!a2(u)&&!ce(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}function $u(e){return e!==null&&typeof e=="object"}var A2=$u;var be=null;function De(e){if(be!==null&&typeof be.property){let t=be;return be=De.prototype=null,t}return be=De.prototype=e??Object.create(null),new De}var Yu=10;for(let e=0;e<=Yu;e++)De();function mt(e){return De(e)}function Qu(e,t="type"){mt(e);function n(u){let o=u[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return n}var T2=Qu;var g=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],b2={ArrayExpression:g[0],AssignmentExpression:g[1],BinaryExpression:g[1],InterpreterDirective:[],Directive:g[2],DirectiveLiteral:[],BlockStatement:g[3],BreakStatement:g[4],CallExpression:g[5],CatchClause:["param","body"],ConditionalExpression:g[6],ContinueStatement:g[4],DebuggerStatement:[],DoWhileStatement:g[7],EmptyStatement:[],ExpressionStatement:g[8],File:["program"],ForInStatement:g[9],ForStatement:["init","test","update","body"],FunctionDeclaration:g[10],FunctionExpression:g[10],Identifier:["typeAnnotation","decorators"],IfStatement:g[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:g[1],MemberExpression:g[11],NewExpression:g[5],Program:g[3],ObjectExpression:g[12],ObjectMethod:g[13],ObjectProperty:g[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:g[15],SequenceExpression:g[16],ParenthesizedExpression:g[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:g[15],TryStatement:["block","handler","finalizer"],UnaryExpression:g[15],UpdateExpression:g[15],VariableDeclaration:["declarations"],VariableDeclarator:g[17],WhileStatement:g[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:g[18],ClassExpression:g[19],ClassDeclaration:g[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:g[20],ExportSpecifier:["local","exported"],ForOfStatement:g[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:g[21],ImportNamespaceSpecifier:g[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:g[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:g[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:g[15],AwaitExpression:g[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:g[22],OptionalMemberExpression:g[11],OptionalCallExpression:g[5],ClassProperty:g[23],ClassPrivateProperty:g[23],ClassPrivateMethod:g[13],PrivateName:g[24],StaticBlock:g[18],ImportAttribute:g[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:g[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:g[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(S2,"").trimEnd();let u=Object.create(null),o=$(0,e,B2,"").replace(S2,"").trimEnd(),i;for(;i=B2.exec(e);){let l=$(0,i[2],ni,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...oi,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var I2=["noformat","noprettier"],L2=["format","prettier"];function li(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var q2=li;function P2(e){let t=q2(e);t&&(e=e.slice(t.length+1));let n=F2(e),{pragmas:u,comments:o}=N2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function O2(e){let{pragmas:t}=P2(e);return L2.some(n=>ae(t,n))}function R2(e){let{pragmas:t}=P2(e);return I2.some(n=>ae(t,n))}function fi(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:O2,hasIgnorePragma:R2,locStart:R,locEnd:V,...e}}var V2=fi;var M2="module",v2="commonjs",U2=[M2,v2];function _2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return M2;if(/\.(?:cjs|cts)$/i.test(e))return v2}}var ci={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function si(e,t){let n=[],u=i2(e,{...ci,sourceType:t,onComment:n});return u.comments=n,u}function di(e){let{description:t,loc:n}=e;return n?o2(t,{loc:{start:{line:n.start.line,column:n.start.column+1},end:{line:n.end.line,column:n.end.column+1}},cause:e}):e}function ai(e,t){let n=_2(t?.filepath),u=(n?[n]:U2).map(i=>()=>si(e,i)),o;try{o=l2(u)}catch({errors:[i]}){throw di(i)}return w2(o,{text:e,astType:"meriyah"})}var gi=V2(ai);return W2(mi);});
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
var J2=Object.defineProperty;var ht=(e,t)=>{for(var n in t)J2(e,n,{get:t[n],enumerable:!0})};var _2={};ht(_2,{parsers:()=>rt});var rt={};ht(rt,{meriyah:()=>ci});var j2=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),ae=j2;var Z=(e,t)=>(n,u,...o)=>n|1&&u==null?void 0:(t.call(u)??u[e]).apply(u,o);var X2=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},H2=Z("replaceAll",function(){if(typeof this=="string")return X2}),$=H2;var W2=55296,z2=56319,K2=56320,$2=String.prototype.isWellFormed??function(){let{length:e}=this;for(let t=0;t<e;t++){let n=this.charCodeAt(t);if((n&64512)===W2&&(n>z2||++t>=e||(this.charCodeAt(t)&64512)!==K2))return!1}return!0},Y2=Z("isWellFormed",function(){if(typeof this=="string")return $2}),kt=Y2;var wt=((e,t)=>{let n=new Uint32Array(69632),u=0,o=0;for(;u<2597;){let i=e[u++];if(i<0)o-=i;else{let l=e[u++];i&2&&(l=t[l]),i&1?n.fill(l,o,o+=e[u++]):n[o++]=l}}return n})([-1,2,26,2,27,2,5,-1,0,77595648,3,44,2,3,0,14,2,61,2,62,3,0,3,0,3168796671,0,4294956992,2,1,2,0,2,41,3,0,4,0,4294966523,3,0,4,2,16,2,63,2,0,0,4294836735,0,3221225471,0,4294901942,2,64,0,134152192,3,0,2,0,4294951935,3,0,2,0,2683305983,0,2684354047,2,17,2,0,0,4294961151,3,0,2,2,19,2,0,0,608174079,2,0,2,58,2,7,2,6,0,4286643967,3,0,2,2,1,3,0,3,0,4294901711,2,40,0,4089839103,0,2961209759,0,1342439375,0,4294543342,0,3547201023,0,1577204103,0,4194240,0,4294688750,2,2,0,80831,0,4261478351,0,4294549486,2,2,0,2967484831,0,196559,0,3594373100,0,3288319768,0,8469959,0,65472,2,3,0,4093640191,0,929054175,0,65487,0,4294828015,0,4092591615,0,1885355487,0,982991,2,3,2,0,0,2163244511,0,4227923919,0,4236247022,2,69,0,4284449919,0,851904,2,4,2,12,0,67076095,-1,2,70,0,1073741743,0,4093607775,-1,0,50331649,0,3265266687,2,33,0,4294844415,0,4278190047,2,20,2,137,-1,3,0,2,2,23,2,0,2,9,2,0,2,15,2,22,3,0,10,2,72,2,0,2,73,2,74,2,75,2,0,2,76,2,0,2,11,0,261632,2,25,3,0,2,2,13,2,4,3,0,18,2,77,2,5,3,0,2,2,78,0,2151677951,2,29,2,10,0,909311,3,0,2,0,814743551,2,48,0,67090432,3,0,2,2,42,2,0,2,6,2,0,2,30,2,8,0,268374015,2,108,2,51,2,0,2,79,0,134153215,-1,2,7,2,0,2,8,0,2684354559,0,67044351,0,3221160064,2,9,2,18,3,0,2,2,53,0,1046528,3,0,3,2,10,2,0,2,127,0,4294960127,2,9,2,6,2,11,0,4294377472,2,12,3,0,16,2,13,2,0,2,80,2,9,2,0,2,81,2,82,2,83,0,12288,2,54,0,1048577,2,84,2,14,-1,2,14,0,131042,2,85,2,86,2,87,2,0,2,34,-83,3,0,7,0,1046559,2,0,2,15,2,0,0,2147516671,2,21,3,88,2,2,0,-16,2,89,0,524222462,2,4,2,0,0,4269801471,2,4,3,0,2,2,28,2,16,3,0,2,2,49,2,0,-1,2,17,-16,3,0,206,-2,3,0,692,2,71,-1,2,17,2,9,3,0,8,2,91,2,18,2,0,0,3220242431,3,0,3,2,19,2,92,2,93,3,0,2,2,94,2,0,2,20,2,95,2,0,0,4351,2,0,2,10,3,0,2,0,67043391,0,3909091327,2,0,2,24,2,10,2,20,3,0,2,0,67076097,2,8,2,0,2,21,0,67059711,0,4236247039,3,0,2,0,939524103,0,8191999,2,99,2,100,2,22,2,23,3,0,3,0,67057663,3,0,349,2,101,2,102,2,7,-264,3,0,11,2,24,3,0,2,2,32,-1,0,3774349439,2,103,2,104,3,0,2,2,19,2,105,3,0,10,2,9,2,17,2,0,2,46,2,0,2,31,2,106,2,25,0,1638399,0,57344,2,107,3,0,3,2,20,2,26,2,27,2,5,2,28,2,0,2,8,2,109,-1,2,110,2,111,2,112,-1,3,0,3,2,12,-2,2,0,2,29,-3,0,536870912,-4,2,20,2,0,2,36,0,1,2,0,2,65,2,6,2,12,2,9,2,0,2,113,-1,3,0,4,2,9,2,23,2,114,2,7,2,0,2,115,2,0,2,116,2,117,2,118,2,0,2,10,3,0,9,2,21,2,30,2,31,2,119,2,120,-2,2,121,2,122,2,30,2,21,2,8,-2,2,123,2,30,3,32,2,-1,2,0,2,39,-2,0,4277137519,0,2269118463,-1,3,20,2,-1,2,33,2,38,2,0,3,30,2,2,35,2,19,-3,3,0,2,2,34,-1,2,0,2,35,2,0,2,35,2,0,2,47,2,0,0,4294950463,2,37,-7,2,0,0,203775,2,125,0,4227858432,2,20,2,43,2,36,2,17,2,37,2,17,2,124,2,21,3,0,2,2,38,0,2151677888,2,0,2,12,0,4294901764,2,145,2,0,2,56,2,55,0,5242879,3,0,2,0,402644511,-1,2,128,2,39,0,3,-1,2,129,2,130,2,0,0,67045375,2,40,0,4226678271,0,3766565279,0,2039759,2,132,2,41,0,1046437,0,6,3,0,2,0,3288270847,0,3,3,0,2,0,67043519,-5,2,0,0,4282384383,0,1056964609,-1,3,0,2,0,67043345,-1,2,0,2,42,2,23,2,50,2,11,2,59,2,38,-5,2,0,2,12,-3,3,0,2,0,2147484671,2,133,0,4190109695,2,52,-2,2,134,0,4244635647,0,27,2,0,2,8,2,43,2,0,2,66,2,17,2,0,2,42,-3,2,31,-2,2,0,2,45,2,57,2,44,2,45,2,135,2,46,0,8388351,-2,2,136,0,3028287487,2,47,2,138,0,33259519,2,23,2,7,2,48,-7,2,21,0,4294836223,0,3355443199,0,134152199,-2,2,67,-2,3,0,28,2,32,-3,3,0,3,2,49,3,0,6,2,50,-81,2,17,3,0,2,2,36,3,0,33,2,25,2,30,3,0,124,2,12,3,0,18,2,38,-213,2,0,2,32,-54,3,0,17,2,42,2,8,2,23,2,0,2,8,2,23,2,51,2,0,2,21,2,52,2,139,2,25,-13,2,0,2,53,-6,3,0,2,-1,2,140,2,10,-1,3,0,2,0,4294936575,2,0,0,4294934783,-2,0,8323099,3,0,230,2,30,2,54,2,8,-3,3,0,3,2,35,-271,2,141,3,0,9,2,142,2,143,2,55,3,0,11,2,7,-72,3,0,3,2,144,0,1677656575,-130,2,26,-16,2,0,2,24,2,38,-16,0,4161266656,0,4071,0,15360,-4,0,28,-13,3,0,2,2,56,2,0,2,146,2,147,2,60,2,0,2,148,2,149,2,150,3,0,10,2,151,2,152,2,22,3,56,2,3,153,2,3,57,2,0,4294954999,2,0,-16,2,0,2,90,2,0,0,2105343,0,4160749584,0,65534,-34,2,8,2,155,-6,0,4194303871,0,4294903771,2,0,2,58,2,98,-3,2,0,0,1073684479,0,17407,-9,2,17,2,49,2,0,2,32,-14,2,17,2,32,-6,2,17,2,12,-6,2,8,0,3225419775,-7,2,156,3,0,6,0,8323103,-1,3,0,2,2,59,-37,2,60,2,157,2,158,2,159,Line truncated
|
||||
`))return[];let t=[];for(let n of`*${e.value}*`.split(`
|
||||
`)){if(n=n.trimStart(),!n.startsWith("*"))return[];t.push(n)}return t}var r2=new WeakMap;function Xu(e){return se(r2,e,ju)}function h2(e){r2.delete(e)}function at(e){return Xu(e).length>0}function k2(e){if(e.length<2)return;let t;for(let n=e.length-1;n>=0;n--){let u=e[n];if(t&&V(u)===R(t)&&at(u)&&at(t)&&(e.splice(n+1,1),u.value+="*//*"+t.value,u.range=[R(u),V(t)],h2(u)),!d2(u)&&!ce(u))throw new TypeError(`Unknown comment type: "${u.type}".`);t=u}}function Hu(e){return e!==null&&typeof e=="object"}var y2=Hu;var be=null;function De(e){if(be!==null&&typeof be.property){let t=be;return be=De.prototype=null,t}return be=De.prototype=e??Object.create(null),new De}var Wu=10;for(let e=0;e<=Wu;e++)De();function gt(e){return De(e)}function zu(e,t="type"){gt(e);function n(u){let o=u[t],i=e[o];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${o}'.`),{node:u});return i}return n}var A2=zu;var g=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],T2={ArrayExpression:g[0],AssignmentExpression:g[1],BinaryExpression:g[1],InterpreterDirective:[],Directive:g[2],DirectiveLiteral:[],BlockStatement:g[3],BreakStatement:g[4],CallExpression:g[5],CatchClause:["param","body"],ConditionalExpression:g[6],ContinueStatement:g[4],DebuggerStatement:[],DoWhileStatement:g[7],EmptyStatement:[],ExpressionStatement:g[8],File:["program"],ForInStatement:g[9],ForStatement:["init","test","update","body"],FunctionDeclaration:g[10],FunctionExpression:g[10],Identifier:["typeAnnotation","decorators"],IfStatement:g[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:g[1],MemberExpression:g[11],NewExpression:g[5],Program:g[3],ObjectExpression:g[12],ObjectMethod:g[13],ObjectProperty:g[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:g[15],SequenceExpression:g[16],ParenthesizedExpression:g[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:g[15],TryStatement:["block","handler","finalizer"],UnaryExpression:g[15],UpdateExpression:g[15],VariableDeclaration:["declarations"],VariableDeclarator:g[17],WhileStatement:g[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:g[18],ClassExpression:g[19],ClassDeclaration:g[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:g[20],ExportSpecifier:["local","exported"],ForOfStatement:g[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:g[21],ImportNamespaceSpecifier:g[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:g[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:g[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:g[15],AwaitExpression:g[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:g[22],OptionalMemberExpression:g[11],OptionalCallExpression:g[5],ClassProperty:g[23],ClassPrivateProperty:g[23],ClassPrivateMethod:g[13],PrivateName:g[24],StaticBlock:g[18],ImportAttribute:g[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:g[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:g[27],DeclareClass:["id","typePa
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(w2,"").trimEnd();let u=Object.create(null),o=$(0,e,S2,"").replace(w2,"").trimEnd(),i;for(;i=S2.exec(e);){let l=$(0,i[2],xu,"");if(typeof u[i[1]]=="string"||Array.isArray(u[i[1]])){let f=u[i[1]];u[i[1]]=[...ti,...Array.isArray(f)?f:[f],l]}else u[i[1]]=l}return{comments:o,pragmas:u}}var N2=["noformat","noprettier"],I2=["format","prettier"];function ni(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var L2=ni;function q2(e){let t=L2(e);t&&(e=e.slice(t.length+1));let n=B2(e),{pragmas:u,comments:o}=F2(n);return{shebang:t,text:e,pragmas:u,comments:o}}function P2(e){let{pragmas:t}=q2(e);return I2.some(n=>ae(t,n))}function O2(e){let{pragmas:t}=q2(e);return N2.some(n=>ae(t,n))}function ui(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:P2,hasIgnorePragma:O2,locStart:R,locEnd:V,...e}}var R2=ui;var V2="module",M2="commonjs",v2=[V2,M2];function U2(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return V2;if(/\.(?:cjs|cts)$/i.test(e))return M2}}var ii={next:!0,ranges:!0,webcompat:!0,loc:!1,raw:!0,directives:!0,impliedStrict:!1,preserveParens:!0,lexical:!1,jsx:!0,validateRegex:!1};function oi(e,t){let n=[],u=u2(e,{...ii,sourceType:t,onComment:n});return u.comments=n,u}function li(e){let{description:t,loc:n}=e;return n?i2(t,{loc:{start:{line:n.start.line,column:n.start.column+1},end:{line:n.end.line,column:n.end.column+1}},cause:e}):e}function fi(e,t){let n=U2(t?.filepath),u=(n?[n]:v2).map(i=>()=>oi(e,i)),o;try{o=o2(u)}catch({errors:[i]}){throw li(i)}return E2(o,{text:e,astType:"meriyah"})}var ci=R2(fi);export{_2 as default,rt as parsers};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
css: Parser;
|
||||
less: Parser;
|
||||
scss: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
postcss: Printer;
|
||||
};
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.postcss=e()}})(function(){"use strict";var Bl=Object.create;var Tt=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Fl=Object.getOwnPropertyNames;var Wl=Object.getPrototypeOf,$l=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(s){throw e=0,s}},hn=(t,e)=>{for(var s in e)Tt(t,s,{get:e[s],enumerable:!0})},dn=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fl(e))!$l.call(t,n)&&n!==s&&Tt(t,n,{get:()=>e[n],enumerable:!(r=Ul(e,n))||r.enumerable});return t};var Ne=(t,e,s)=>(s=t!=null?Bl(Wl(t)):{},dn(e||!t||!t.__esModule?Tt(s,"default",{value:t,enumerable:!0}):s,t)),Gl=t=>dn(Tt({},"__esModule",{value:!0}),t);var Vi=w((Ux,ds)=>{var _=String,Yi=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ds.exports=Yi();ds.exports.createColors=Yi});var ms=w(()=>{});var Xt=w(($x,Hi)=>{"use strict";var zi=Vi(),ji=ms(),ot=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=zi.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:h,red:l}=zi.createColors(!0);n=m=>f(l(m)),r=m=>h(m),ji&&(i=m=>ji(m))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,h)=>{let l=u+1+h,m=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let d=20,p=Math.max(0,this.column-d),y=Math.max(this.column+d,this.endColumn+d),g=f.slice(p,y),v=r(m.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return n(">")+r(m)+i(g)+`
|
||||
`+v+n("^")}let x=r(m.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(m)+i(f)+`
|
||||
`+x+n("^")}return" "+r(m)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};Hi.exports=ot;ot.default=ot});var Jt=w((Gx,Ki)=>{"use strict";var Zc=/(<)(\/?style\b)/gi,ef=/(<)(!--)/g;function fe(t){return typeof t!="string"||!t.includes("<")?t:t.replace(Zc,"\\3c $2").replace(ef,"\\3c $2")}var Qi={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function tf(t){return t[0].toUpperCase()+t.slice(1)}var at=class{constructor(e){this.builder=e}atrule(e,s){let r=e.raws,n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof r.afterName<"u"?n+=r.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let o=(r.between||"")+(s?";":"");this.builder(fe(n+i+o),e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(fe(s+r)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(fe(n)),this.builder("}",e,"end")}body(e){let s=e.nodes,r=s.length-1;for(;r>0&&s[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon"),i=e.type==="document";for(let o=0;o<s.length;o++){let u=s[o],a=this.raw(u,"before");a&&this.builder(i?a:fe(a)),this.stringify(u,r!==o||n)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(fe("/*"+s+e.text+r+"*/"),e)}decl(e,s){let r=e.raws,n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),s&&(i+=";"),this.builder(fe(i),e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Qi[r];let o=e.root(),u=o.rawCache||(o.rawCache={});if(typeof u[r]<"u")return u[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+tf(r);this[a]?n=this[a](o,e):o.walk(c=>{if(n=c.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Qi[r]),u[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){if(this.body(e),e.raws.after){let s=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?s:fe(s))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(fe(e.raws.ownSemicolon),e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Ki.exports=at;at.default=at});var ut=w((Yx,Xi)=>{"use strict";var rf=Jt();function ys(t,e){new rf(e).stringify(t)}Xi.exports=ys;ys.default=ys});var Zt=w((Vx,gs)=>{"use strict";gs.exports.isClean=Symbol("isClean");gs.exports.my=Symbol("my")});var ft=w((zx,Ji)=>{"use strict";var sf=Xt(),nf=Jt(),of=ut(),{isClean:lt,my:af}=Zt();function ws(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>ws(o,s)):(i==="object"&&n!==null&&(n=ws(n)),s[r]=n)}return s}function J(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var ct=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[lt]=!1,this[af]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=ws(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new sf(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=J(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:J(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:J(s,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:J(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):typeof e.index=="number"&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new nf().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=of){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Ji.exports=ct;ct.default=ct});var Fe=w((jx,Zi)=>{"use strict";var uf=ft(),pt=class extends uf{constructor(e){super(e),this.type="comment"}};Zi.exports=pt;pt.default=pt});var dt=w((Hx,eo)=>{"use strict";var lf=ft(),ht=class extends lf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};eo.exports=ht;ht.default=ht});var pe=w((Qx,lo)=>{"use strict";var to=Fe(),ro=dt(),cf=ft(),{isClean:so,my:no}=Zt(),vs,io,oo,xs;function ao(t){return t.map(e=>(e.nodes&&(e.nodes=ao(e.nodes)),delete e.source,e))}function uo(t){if(t[so]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)uo(e)}var z=class t extends cf{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){i
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[Es]=s,s}var We=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!go||/^\w+:\/\//.test(s.from)||Ss(s.from)?this.file=s.from:this.file=Ts(s.from)),go&&wf){let r=new gf(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+df(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,c;if(s&&typeof s=="object"){let h=s,l=r;if(typeof h.offset=="number"){a=h.offset;let m=this.fromOffset(a);s=m.line,r=m.col}else s=h.line,r=h.column,a=this.fromLineAndColumn(s,r);if(typeof l.offset=="number"){u=l.offset;let m=this.fromOffset(u);o=m.line,i=m.col}else o=l.line,i=l.column,u=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let h=this.fromOffset(a);s=h.line,r=h.col}let f=this.origin(s,r,o,i);return f?c=new yo(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):c=new yo(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),c.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(er&&(c.input.url=er(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,s){return wo(this)[e-1]+s-1}fromOffset(e){let s=wo(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ts(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s-1,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n-1,line:r}));let a;Ss(o.source)?a=er(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||er(this.map.mapFile));let c={column:o.column+1,endColumn:u&&u.column+1,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(mo)c.file=mo(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};vo.exports=We;We.default=We;bs&&bs.registerInput&&bs.registerInput(We)});var tr=w((r_,_o)=>{"use strict";var xo=pe(),Ge=class extends xo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};_o.exports=Ge;Ge.default=Ge;xo.registerAtRule(Ge)});var Ye=w((s_,To)=>{"use strict";var bo=pe(),Eo,So,he=class extends bo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Eo(new So,this,e).stringify()}};he.registerLazyResult=t=>{Eo=t};he.registerProcessor=t=>{So=t};To.exports=he;he.default=he;bo.registerRoot(he)});var ks=w((n_,ko)=>{"use strict";var mt={comma(t){return mt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return mt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};ko.exports=mt;mt.default=mt});var rr=w((i_,Ao)=>{"use strict";var Oo=pe(),vf=ks(),Ve=class extends Oo{get selectors(){return vf.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Ao.exports=Ve;Ve.default=Ve;Oo.registerRule(Ve)});var ir=w((o_,No)=>{"use strict";var sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xf=/.[\r\n"'(/\\]/,Co=/[\da-f]/i;No.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,m,x,d=r.length,p=0,y=[],g=[],v=-1;function C(){return p}function q(k){throw e.error("Unclosed "+k,p)}function W(){return g.length===0&&p>=d}function se(k){if(g.length)return g.pop();if(p>=d)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(p),i){case 10:case 32:case 9:case 13:case 12:{a=p;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(p,a)],p=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);f=[S,S,p];break}case 40:{if(x=y.length?y.pop()[1]:"",m=r.charCodeAt(p+1),x==="url"&&m!==39&&m!==34&&m!==32&&m!==10&&m!==9&&m!==12&&m!==13){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(n||b){a=p;break}else q("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["brackets",r.slice(p,a+1),p,a],p=a}else p<=v?f=["(","(",p]:(a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||xf.test(o)?(v=a===-1?d:a,f=["(","(",p]):(f=["brackets",o,p,a],p=a));break}case 39:case 34:{c=i===39?"'":'"',a=p;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(n||b){a=p+1;break}else q("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["string",r.slice(p,a+1),p,a],p=a;break}case 64:{sr.lastIndex=p+1,sr.test(r),sr.lastIndex===0?a=r.length-1:a=sr.lastIndex-2,f=["at-word",r.slice(p,a+1),p,a],p=a;break}case 92:{for(a=p,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,Co.test(r.charAt(a)))){for(;Co.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(p,a+1),p,a],p=a;break}default:{i===47&&r.charCodeAt(p+1)===42?(a=r.indexOf("*/",p+2)+1,a===0&&(n||b?a=r.length:q("comment")),f=["comment",r.slice(p,a+1),p,a],p=a):(nr.lastIndex=p+1,nr.test(r),nr.lastIndex===0?a=r.length-1:a=nr.lastIndex-2,f=["word",r.slice(p,a+1),p,a],y.push(f),p=a);break}}return p++,f}function ye(k){g.push(k)}return{back:ye,endOfFile:W,nextToken:se,position:C}}});var or=w((a_,Io)=>{"use strict";var _f=tr(),bf=Fe(),Ef=dt(),Sf=Ye(),Po=rr(),Tf=ir(),Ro={empty:!0,space:!0};function kf(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}function Os(t,e,s){let r="";for(let n=e;n<s;n++)r+=t[n][1];return r}var As=class{constructor(e){this.input=e,this.root=new Sf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new _f;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new bf;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new Pf(n),this.tokenizer=Nf(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),Cs.exports.isInlineComment.bind(this)(t)}return!1}}});var Mo=w((c_,Do)=>{Do.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Uo=w((f_,Bo)=>{var Rf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,If=/\.[0-9]/,Lf=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Rf.test(e)===!1&&If.test(e)===!1};Bo.exports={isMixinToken:Lf}});var Wo=w((p_,Fo)=>{var qf=ir(),Df=/^url\((.+)\)/;Fo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=qf({css:s});for(t.filename=s.replace(Df,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Vo=w((h_,Yo)=>{var $o=/:$/,Go=/^:(\s+)?/;Yo.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if($o.test(e)){let[r]=e.match($o);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if(Go.test(s)){let[r]=s.match(Go);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var Ho=w((m_,jo)=>{var Mf=Fe(),Bf=or(),{isInlineComment:Uf}=qo(),{interpolation:zo}=Mo(),{isMixinToken:Ff}=Uo(),Wf=Wo(),$f=Vo(),Gf=/(!\s*important)$/i;jo.exports=class extends Bf{constructor(...e){super(...e),this.lastNode=null}atrule(e){zo.bind(this)(e)||(super.atrule(e),Wf(this.lastNode),$f(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Mf,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((v,C,q)=>C[0]===")"?q:v),h=e.slice(i,c+i).map(v=>v[1]).join(""),[l]=e.slice(i),m=[l[2],l[3]],[x]=e.slice(c,c+1),d=[x[2],x[3]],p=["brackets",h].concat(m,d),y=e.slice(0,i),g=e.slice(c+1);e=y,e.push(p),e=e.concat(g)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),h=u[u.length-1],l=[c[2],c[3]],m=[h[4],h[5]],d=["word",u.map(p=>p[1]).join("")].concat(l,m);e.splice(f,u.length,d)}let a=e.findIndex(c=>Gf.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){Uf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),zo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Ff(s)){this.mixin(e);return}super.unknownWord(e)}}});var Ko=w((g_,Qo)=>{var Yf=Jt();Qo.exports=class extends Yf{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Xo=w((w_,Ns)=>{var Vf=$e(),zf=Ho(),jf=Ko();Ns.exports={parse(t,e){let s=new Vf(t,e),r=new zf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Ms().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return E([n(a)]).process(o,u)},n};E.stringify=Np;E.parse=Ap;E.fromJSON=Ep;E.list=kp;E.comment=t=>new ga(t);E.atRule=t=>new ya(t);E.decl=t=>new wa(t);E.rule=t=>new _a(t);E.root=t=>new xa(t);E.document=t=>new va(t);E.CssSyntaxError=bp;E.Declaration=wa;E.Container=_p;E.Processor=Ms;E.Document=va;E.Comment=ga;E.Warning=Pp;E.AtRule=ya;E.Result=Cp;E.Input=Sp;E.Rule=_a;E.Root=xa;E.Node=Op;Tp.registerPostcss(E);ba.exports=E;E.default=E});var Sa=w((R_,Ea)=>{var{Container:Rp}=cr(),Bs=class extends Rp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};Ea.exports=Bs});var Oa=w((I_,ka)=>{"use strict";var fr=/[\t\n\f\r "#'()/;[\\\]{}]/g,pr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ip=/.[\r\n"'(/\\]/,Ta=/[\da-f]/i,hr=/[\n\f\r]/g;ka.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,m,x=r.length,d=0,p=[],y=[],g;function v(){return d}function C(k){throw e.error("Unclosed "+k,d)}function q(){return y.length===0&&d>=x}function W(){let k=1,b=!1,S=!1;for(;k>0;)o+=1,r.length<=o&&C("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),b?!S&&i===b?(b=!1,S=!1):i===92?S=!S:S&&(S=!1):i===39||i===34?b=i:i===125?k-=1:i===35&&l===123&&(k+=1)}function se(k){if(y.length)return y.pop();if(d>=x)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(d),i){case 10:case 32:case 9:case 13:case 12:{o=d;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);m=["space",r.slice(d,o)],d=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);m=[S,S,d];break}case 44:{m=["word",",",d,d+1];break}case 40:{if(h=p.length?p.pop()[1]:"",l=r.charCodeAt(d+1),h==="url"&&l!==39&&l!==34){for(g=1,f=!1,o=d+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)g+=1;else if(l===41&&(g-=1,g===0))break;o+=1}a=r.slice(d,o+1),m=["brackets",a,d,o],d=o}else o=r.indexOf(")",d+1),a=r.slice(d,o+1),o===-1||Ip.test(a)?m=["(","(",d]:(m=["brackets",a,d,o],d=o);break}case 39:case 34:{for(u=i,o=d,f=!1;o<x&&(o++,o===x&&C("string"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&l===123&&W();m=["string",r.slice(d,o+1),d,o],d=o;break}case 64:{fr.lastIndex=d+1,fr.test(r),fr.lastIndex===0?o=r.length-1:o=fr.lastIndex-2,m=["at-word",r.slice(d,o+1),d,o],d=o;break}case 92:{for(o=d,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,Ta.test(r.charAt(o)))){for(;Ta.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}m=["word",r.slice(d,o+1),d,o],d=o;break}default:l=r.charCodeAt(d+1),i===35&&l===123?(o=d,W(),a=r.slice(d,o+1),m=["word",a,d,o],d=o):i===47&&l===42?(o=r.indexOf("*/",d+2)+1,o===0&&(n||b?o=r.length:C("comment")),m=["comment",r.slice(d,o+1),d,o],d=o):i===47&&l===47?(hr.lastIndex=d+1,hr.test(r),hr.lastIndex===0?o=r.length-1:o=hr.lastIndex-2,a=r.slice(d,o+1),m=["comment",a,d,o,"inline"],d=o):(pr.lastIndex=d+1,pr.test(r),pr.lastIndex===0?o=r.length-1:o=pr.lastIndex-2,m=["word",r.slice(d,o+1),d,o],p.push(m),d=o);break}return d++,m}function ye(k){y.push(k)}return{back:ye,endOfFile:q,nextToken:se,position:v}}});var Ca=w((L_,Aa)=>{var{Comment:Lp}=cr(),qp=or(),Dp=Sa(),Mp=Oa(),Us=class extends qp{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Lp;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=Mp(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Dp;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let h=a;h>0;h--){let l=c[h][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Aa.exports=Us});var Pa=w((q_,Na)=>{var{Input:Bp}=cr(),Up=Ca();Na.exports=function(e,s){let r=new Bp(e,s),n=new Up(r);return n.parse(),n.root}});var Ws=w(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function $p(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Fs.default=$p});var Gs=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Gp=Ws(),Ia=Yp(Gp);function Yp(t){return t&&t.__esModule?t:{default:t}}function bt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}bt.prototype=Object.create(Ia.default.prototype);bt.constructor=Ia.default;bt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};bt.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};$s.default=bt});var Ma=w(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.parseMediaFeature=Da;Et.parseMediaQuery=Vs;Et.parseMediaList=jp;var Vp=Ws(),La=qa(Vp),zp=Gs(),Ys=qa(zp);function qa(t){return t&&t.__esModule?t:{default:t}}function Da(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f<c.length;f++){var h=c[f];if((h==="'"||h==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:h}),n++):s[n].mode==="string"&&s[n].character===h&&c[f-1]!=="\\"&&(s.pop(),n--)),h==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):h==="}"&&(s.pop(),n--),s[n].mode==="normal"&&h===":"){var l=c.substring(f+1);u={type:"value",before:/^(\s*)/.exec(l)[1],after:/(\s*)$/.exec(l)[1],value:l.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=h}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Vs(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=Da(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new Ys.default(i):new La.default(i)),i=o(),n=!1)}for(var c=0;c<s.length;c++)if(i=s[c],c>0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=p+u,h=n-o[u].length):(f=p,h=d),e.push(["comment",a,p,y-d,f,n-h,y]),d=h,p=f,y=n):(Rr.lastIndex=y+1,Rr.test(s),Rr.lastIndex===0?n=s.length-1:n=Rr.lastIndex-2,e.push(["word",s.slice(y,n+1),p,y-d,p,n-d,y]),y=n);break}y++}return e}Ou.exports=Ir.default});var Pu=w((Lr,Nu)=>{"use strict";Lr.__esModule=!0;var Tm=(function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}})(),km=Hs(),Om=L(km),Am=Qs(),rn=L(Am),Cm=Ks(),Nm=L(Cm),Pm=Ha(),Rm=L(Pm),Im=Ka(),sn=L(Im),Lm=Za(),qm=L(Lm),Dm=tu(),Mm=L(Dm),Bm=su(),Um=L(Bm),Fm=iu(),Wm=L(Fm),$m=au(),Gm=L($m),Ym=lu(),Vm=L(Ym),zm=fu(),jm=L(zm),Hm=hu(),Qm=L(Hm),Km=mu(),Xm=L(Km),Jm=gu(),Zm=L(Jm),ey=vu(),ty=L(ey),ry=Au(),Cu=L(ry),sy=M(),ny=iy(sy);function iy(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function L(t){return t&&t.__esModule?t:{default:t}}function oy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ay=(function(){function t(e){oy(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new Rm.default;var s=new sn.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,Cu.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,Cu.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new jm.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new Xm.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new sn.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new Mm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new Zm.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===ny.PSEUDO){var r=new sn.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var U=w((hb,Du)=>{"use strict";var my=j(),He=class extends my{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};He.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!He.prototype[e]&&(He.prototype[e]=function(s){return this.walkType(t,s)})};Du.exports=He});var Bu=w((mb,Mu)=>{"use strict";var yy=U();Mu.exports=class extends yy{constructor(e){super(e),this.type="root"}}});var Fu=w((gb,Uu)=>{"use strict";var gy=U();Uu.exports=class extends gy{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var Gu=w((wb,$u)=>{"use strict";var Wu=U(),Dr=class extends Wu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Wu.registerWalker(Dr);$u.exports=Dr});var Vu=w((vb,Yu)=>{"use strict";var wy=U(),vy=j(),Mr=class extends vy{constructor(e){super(e),this.type="colon"}};wy.registerWalker(Mr);Yu.exports=Mr});var ju=w((xb,zu)=>{"use strict";var xy=U(),_y=j(),Br=class extends _y{constructor(e){super(e),this.type="comma"}};xy.registerWalker(Br);zu.exports=Br});var Qu=w((_b,Hu)=>{"use strict";var by=U(),Ey=j(),Ur=class extends Ey{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};by.registerWalker(Ur);Hu.exports=Ur});var Ju=w((bb,Xu)=>{"use strict";var Ku=U(),Fr=class extends Ku{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Ku.registerWalker(Fr);Xu.exports=Fr});var el=w((Eb,Zu)=>{"use strict";var Sy=U(),Ty=j(),Wr=class extends Ty{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Sy.registerWalker(Wr);Zu.exports=Wr});var rl=w((Sb,tl)=>{"use strict";var ky=U(),Oy=j(),$r=class extends Oy{constructor(e){super(e),this.type="operator"}};ky.registerWalker($r);tl.exports=$r});var nl=w((Tb,sl)=>{"use strict";var Ay=U(),Cy=j(),Gr=class extends Cy{constructor(e){super(e),this.type="paren",this.parenType=""}};Ay.registerWalker(Gr);sl.exports=Gr});var ol=w((kb,il)=>{"use strict";var Ny=U(),Py=j(),Yr=class extends Py{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Ny.registerWalker(Yr);il.exports=Yr});var ul=w((Ob,al)=>{"use strict";var Ry=U(),Iy=j(),Vr=class extends Iy{constructor(e){super(e),this.type="word"}};Ry.registerWalker(Vr);al.exports=Vr});var cl=w((Ab,ll)=>{"use strict";var Ly=U(),qy=j(),zr=class extends qy{constructor(e){super(e),this.type="unicode-range"}};Ly.registerWalker(zr);ll.exports=zr});var pl=w((Cb,fl)=>{"use strict";var on=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);l=S!==-1?S-1:i}p=n.slice(a,l+1),x=p.split(`
|
||||
`),d=x.length-1,d>0?(g=u+d,v=l-x[d].length):(g=u,v=o),r.push(["comment",p,u,a-o,g,l-v,a]),o=v,u=g,a=l}else if(h===35&&!My.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((h===117||h===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,h=n.charCodeAt(l);while(l<i&&By.test(n.slice(l,l+1)));r.push(["unicoderange",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1}else if(h===47)l=a+1,r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else{let b=Dy;if(h>=48&&h<=57&&(b=Qe),b.lastIndex=a+1,b.test(n),b.lastIndex===0?l=n.length-1:l=b.lastIndex-2,b===Qe||h===46){let S=n.charCodeAt(l),fn=n.charCodeAt(l+1),pn=n.charCodeAt(l+2);(S===101||S===69)&&(fn===45||fn===43)&&pn>=48&&pn<=57&&(Qe.lastIndex=l+2,Qe.test(n),Qe.lastIndex===0?l=n.length-1:l=Qe.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var gl=w((Pb,yl)=>{"use strict";var an=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};yl.exports=an});var _l=w((Ib,xl)=>{"use strict";var Uy=Bu(),Fy=Fu(),Wy=Gu(),$y=Vu(),Gy=ju(),Yy=Qu(),Vy=Ju(),zy=el(),jy=rl(),wl=nl(),Hy=ol(),vl=ul(),Qy=cl(),Ky=ml(),Xy=Hs(),Jy=Qs(),Zy=Ks(),eg=gl();function tg(t){return t.sort((e,s)=>e-s)}xl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new Uy;let n=new Fy;this.root.append(n),this.current=n,this.tokens=Ky(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new $y({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new Gy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new Yy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new eg(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new jy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new wl({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new vl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(ae(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=Kl([...Pt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var Kr=class extends Error{name="InvalidDocError";constructor(e){super(Xl(e)),this.doc=e}},yn=Kr;function gn(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){return mn(s,i,n)}function n(i){switch(ae(i)){case Xe:return e(i.map(r));case oe:return e({...i,parts:i.parts.map(r)});case ge:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ie:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Pe:case ne:case Ct:case Nt:case Re:return e({...i,contents:r(i.contents)});case Ke:case Ot:case At:case Ie:case H:case Le:return e(i);default:throw new yn(i)}}}function Jl(t){return t.type===H&&!t.hard?t.soft?"":" ":t.type===ge?t.flatContents:t}function wn(t){return gn(t,Jl)}function vn(t,e=xn){return gn(t,s=>typeof s=="string"?Y(e,s.split(`
|
||||
`)):s)}var F=G,we=G,_n=G,bn=G;function R(t){return F(t),{type:ne,contents:t}}function Zl(t,e){return bn(t),F(e),{type:Pe,contents:e,n:t}}function ue(t){return Zl(-1,t)}var ve={type:Le};function qe(t){return _n(t),{type:oe,parts:t}}function D(t,e={}){return F(t),we(e.expandedStates,!0),{type:ie,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Rt(t,e="",s={}){return F(t),e!==""&&F(e),{type:ge,breakContents:t,flatContents:e,groupId:s.groupId}}function Y(t,e){F(t),we(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}var A={type:H},I={type:H,soft:!0},ec={type:H,hard:!0},O=[ec,ve],Xr={type:H,hard:!0,literal:!0},xn=[Xr,ve];function It(t){return F(t),{type:Re,contents:t}}var Lt={type:Ie};function tc(t){return Array.isArray(t)&&t.length>0}var le=tc;var Sn=Object.freeze({character:"'",codePoint:39}),Tn=Object.freeze({character:'"',codePoint:34}),rc=Object.freeze({preferred:Sn,alternate:Tn}),sc=Object.freeze({preferred:Tn,alternate:Sn});function kn(t,e){let{preferred:s,alternate:r}=e===!0||e==="'"?rc:sc,{length:n}=t,i=0,o=0;for(let u=0;u<n;u++){let a=t.charCodeAt(u);a===s.codePoint?i++:a===r.codePoint&&o++}return(i>o?r:s).character}var nc=/\\(["'\\])|(["'])/g;function ic(t,e){let s=e==='"'?"'":'"',r=T(0,t,nc,(n,i,o)=>i?i===s?s:n:o===e?"\\"+o:o);return e+r+e}var An=ic;function oc(t,e){G(/^(?<quote>["']).*\k<quote>$/s.test(t));let s=t.slice(1,-1),r;return e.parser==="json"||e.parser==="jsonc"||e.parser==="json-stringify"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?r='"':e.__isInHtmlAttribute?r="'":r=kn(s,e.singleQuote),t.charAt(0)===r?t:An(s,r)}var qt=oc;var Zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Cn=Zr;function Nn(){}Nn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var Pn=Nn;var Je=null;function Ze(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Ze.prototype=null,e}return Je=Ze.prototype=t??Object.create(null),new Ze}var ac=10;for(let t=0;t<=ac;t++)Ze();function es(t){return Ze(t)}function uc(t,e="type"){es(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var Rn=uc;var Q=[["nodes"],["group"]],In={"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":Q[0],"media-query":Q[0],"media-type":[],"media-feature-expression":Q[0],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":Q[0],"selector-selector":Q[0],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":Q[0],"selector-universal":[],"selector-pseudo":Q[0],"selector-nesting":[],"selector-unknown":[],"value-value":Q[1],"value-root":Q[1],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":Q[1],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]};var lc=Rn(In),Ln=lc;function cc(t,e){let s=0;for(let r=0;r<t.line-1;++r)s=e.indexOf(`
|
||||
`,s)+1;return s+t.column}var ts=cc;function Dt(t){return(e,s,r)=>{if(s===!1)return!1;let n=!!r?.backwards,{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Xw=Dt(/\s/),Mt=Dt(" "),qn=Dt(",; "),Bt=Dt(/[^\n\r]/);function Dn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Mn(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?Dn(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return ts(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Bn(t,e){if(t.type==="css-comment"&&t.inline)return Bt(e,t.source.startOffset);if(t.type==="value-paren"&&typeof t.sourceIndex=="number")return t.sourceIndex+(t.value===")"?t.value.length:0);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let s=ts(t.source.end,e);return t.type==="value-word"?Dn(t,s):s}if(le(t.nodes))return Bn($(0,t.nodes,-1),e);if(t.type==="css-atrule"&&typeof t.name=="string")return Mn(t,e)+1+t.name.length+t.raws.afterName.length+t.raws.params.length}return typeof t.sourceIndex=="number"&&typeof t.value=="string"?t.sourceIndex+t.value.length:null}function Un(t,e){ss(t,e,0,!1)}function ss(t,e,s,r){if(r&&typeof t.type=="string")t.source??(t.source={}),t.source.startOffset=s,t.source.endOffset=s+e.length;else if(!(typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number")){if(t.source||typeof t.sourceIndex=="number"){t.source??(t.source={});let n=s+e.length;t.source.startOffset=Math.min(Mn(t,e)+s,n);let i=Bn(t,e);t.source.endOffset=typeof i=="number"?Math.min(i+s,n):i}}for(let n in t){let i=t[n];if(n==="source"||!i||typeof i!="object")continue;let o=Array.isArray(i)?i:[i];for(let u of o){if(!u||typeof u!="object")continue;let a=fc(t,u,s);a?ss(u,a.text,a.rootOffset,!0):ss(u,e,s,!1),$n(u,t)}}dc(t),mc(t)}function fc(t,e,s){if(e.type==="value-root"||e.type==="value-unknown")return{rootOffset:Fn(t),text:e.text||e.value||""};if(e.type==="media-query-list"||t.params===e)return{rootOffset:Wn(t),text:t.raws?.params||e.value||""};if(e.type?.startsWith("selector-")){let r=pc(t,e);if(typeof r=="string")return{rootOffset:hc(t,e,r,s),text:r}}}function Fn(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function Wn(t){let e=t.source.startOffset;return t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),e}function pc(t,e){if(typeof e.raws?.selector=="string")return e.raws.selector;if(t.selector===e){if(t.mixin)return t.raws.identifier+t.name+t.raws.afterName+t.raws.params;if(typeof t.raws?.selector=="string")return t.raws.selector;if(t.customSelector&&typeof t.raws?.params=="string")return t.raws.params.slice(t.customSelector.length).trim();if(typeof t.raws?.params=="string")return t.raws.params;if(t.type==="css-decl"&&typeof t.raws?.value=="string"){let{value:s}=t.raws;return t.extend&&s.startsWith("extend(")?s.slice(7,-1):s}}}function hc(t,e,s,r){return typeof e.sourceIndex=="number"&&typeof e.raws?.selector=="string"?r+e.sourceIndex:t.mixin?t.source.startOffset:typeof t.raws?.selector=="string"?t.source.startOffset+rs(t.raws.selector,s):typeof t.raws?.params=="string"?Wn(t)+rs(t.raws.params,s):t.type==="css-decl"&&typeof t.raws?.value=="string"?Fn(t)+rs(t.raws.value,s):r}function rs(t,e){let s=t.indexOf(e);return s===-1?0:s}function dc(t){var u,a;if(typeof t.type!="string")return;let e=typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number",s=t.source?.start&&t.source.end;if(e&&s)return;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i,o;for(let c in t){if(c==="source"||c==="raws"||c==="spaces")continue;let f=t[c],h=Array.isArray(f)?f:[f];for(let l of h)!l||typeof l!="object"||typeof l.source?.startOffset!="number"||typeof l.source?.endOffset!="number"||(l.source.startOffset<r&&(r=l.source.startOffset,i=l.source.start),l.source.endOffset>n&&(n=l.source.endOffset,o=l.source.end))}r!==Number.POSITIVE_INFINITY&&(t.source??(t.source={}),e||(t.source.startOffset=r,t.source.endOffset=n),(u=t.source).start??(u.start=i),(a=t.source).end??(a.end=o))}function $n(t,e){typeof t.type!="string"||t.source||typeof e.source?.startOffset!="number"||typeof e.source?.endOffset!="number"||!yc(t)||(t.source={startOffset:e.source.startOffset,endOffset:e.source.startOffset,start:e.source.start,end:e.source.start})}function mc(t){if(!(typeof t.source?.startOffset!="number"||typeof t.source?.endOffset!="number"))for(let e in t){if(e==="source"||e==="raws"||e==="spaces")continue;let s=t[e],r=Array.isArray(s)?s:[s
Line truncated
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")")e="initial";else if(u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":u==='"'||u==="'"||u==="*"?n=!0:(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+T(0,t.slice(o,u),/["'*]/g," ")+t.slice(u);return t}var N=t=>t.source.startOffset,P=t=>t.source.endOffset;var Ut=Symbol.for("PRETTIER_IS_FRONT_MATTER");function gc(t){return!!t?.[Ut]}var De=gc;function wc(t){return T(0,t,/[^\n]/g," ")}var Ft=wc;var et=3;function vc(t){let e=t.slice(0,et);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,et);if(s===-1)return;let r=t.slice(et,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+et,u=t.charAt(o+1);if(!/\s?/.test(u))return;let a=t.slice(0,o),c;return{language:i,explicitLanguage:r||null,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-et),raw:a,start:{line:1,column:0,index:0},end:{index:a.length,get line(){return c??(c=a.split(`
|
||||
`)),c.length},get column(){return c??(c=a.split(`
|
||||
`)),$(0,c,-1).length}},[Ut]:!0}}function xc(t){let e=vc(t);return e?{frontMatter:e,get content(){let{raw:s}=e;return Ft(s)+t.slice(s.length)}}:{content:t}}var xe=xc;var _c=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function ns(t,e,s){if(t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||De(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||s.type==="css-root"&&$(0,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&(delete e.params,t.extend&&Ec(t.selector)&&delete e.extend),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=bc(t.value)),t.type==="selector-combinator"&&(e.value=T(0,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=T(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=T(0,e.value,/;$/g,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:r}=e;/\s[a-z]$/i.test(r)&&(e.__prettier_attribute_selector_flag=$(0,r,-1),r=r.slice(0,-1)),r=r.trim(),r=r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/,"$<value>"),e.value=r,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=T(0,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&(r.value.endsWith("[")||r.value.endsWith("]"))||r.type==="value-word"&&(r.value.startsWith("]")||r.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(r=>r.value).join("")};if(t.type==="value-func"&&t.value==="if"&&t.group.type==="value-paren_group"&&t.group.groups.length===1&&t.group.groups[0].type==="value-comma_group"){let r=t.group.groups[0].groups,n=e.group.groups[0].groups;for(let i=r.length-1;i>=0;i--){let o=r[i];if(o.type==="value-word"&&typeof o.value=="string"&&o.value.endsWith(";")){if(o.value===";"){r[i-1]?.type==="value-number"&&n.splice(i-1,2,{type:"#node-placeholder"});continue}n[i]={type:"#node-placeholder"}}}}}ns.ignoredProperties=_c;function bc(t){return T(0,T(0,t,"'",'"'),/\\([^\da-f])/gi,"$1")}function Ec(t){return t?.nodes?.some(e=>e.nodes?.some(s=>s.type==="selector-pseudo"&&s.value===":extend"))}var Sc=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),is=Sc;var Tc=/\*\/$/,kc=/^\/\*\*?/,jn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Oc=/(^|\s+)\/\/([^\n\r]*)/g,Yn=/^(\r?\n)+/,Ac=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Vn=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Cc=/(\r?\n|^) *\* ?/g,Hn=[];function Qn(t){let e=t.match(jn);return e?e[0].trimStart():""}function Kn(t){let s=t.match(jn)?.[0];return s==null?t:t.slice(s.length)}function Xn(t){t=T(0,t.replace(kc,"").replace(Tc,""),Cc,"$1");let s="";for(;s!==t;)s=t,t=T(0,t,Ac,`
|
||||
$1 $2
|
||||
`);t=t.replace(Yn,"").trimEnd();let r=Object.create(null),n=T(0,t,Vn,"").replace(Yn,"").trimEnd(),i;for(;i=Vn.exec(t);){let o=T(0,i[2],Oc,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...Hn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Jn({comments:t="",pragmas:e={}}){let o=Object.keys(e),u=o.flatMap(c=>zn(c,e[c])).map(c=>` * ${c}
|
||||
`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`/** ${zn(o[0],c)[0]} */`}}let a=t.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(t?a:"")+(t&&o.length>0?` *
|
||||
`:"")+u+" */"}function zn(t,e){return[...Hn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Zn=["noformat","noprettier"],ei=["format","prettier"],ti="format";function Nc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var ri=Nc;function os(t){let e=ri(t);e&&(t=t.slice(e.length+1));let s=Qn(t),{pragmas:r,comments:n}=Xn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function si(t){let{pragmas:e}=os(t);return ei.some(s=>is(e,s))}function ni(t){let{pragmas:e}=os(t);return Zn.some(s=>is(e,s))}function ii(t){let{shebang:e,text:s,pragmas:r,comments:n}=os(t),i=Kn(s),o=Jn({pragmas:{[ti]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var oi=t=>si(xe(t).content),ai=t=>ni(xe(t).content),ui=t=>{let{frontMatter:e,content:s}=xe(t);return(e?e.raw+`
|
||||
|
||||
`:"")+ii(s)};var Pc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function li(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var Rc=new Set(["initial","inherit","unset","revert"]);function ci(t){return Rc.has(t.toLowerCase())}function fi(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function Me(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function _e(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function pi(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let s=e.raws?.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))})}function be(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function hi(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(s=>s.type==="css-atrule")?.name==="import"}function di(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function mi(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function yi(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function gi(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function wi(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function vi(t){return t.type==="value-word"&&t.value==="in"}function Wt(t){return t.type==="value-operator"&&t.value==="*"}function Ee(t){return t?.type==="value-operator"&&t.value==="/"}function K(t){return t.type==="value-operator"&&t.value==="+"}function Se(t){return t.type==="value-operator"&&t.value==="-"}function Ic(t){return t.type==="value-operator"&&t.value==="%"}function tt(t){return Wt(t)||Ee(t)||K(t)||Se(t)||Ic(t)}function xi(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function _i(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function rt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function us(t){return t.raws?.params&&/^\(\s*\)$/.test(t.raws.params)}function $t(t){return t.name.startsWith("prettier-placeholder")}function bi(t){return t.prop.startsWith("@prettier-placeholder")}function Ei(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function Si(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function Ti(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function X(t){return t?.raws?.before===""}function Gt(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function as(t){return t.type==="value-paren_group"&&t.groups?.[0]&&Gt(t.groups[0])}function ls(t,e){if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0||s.type==="value-paren_group"&&s.open&&s.close&&s.groups.length===1&&s.groups[0].type!=="value-comma_group")return!1;let r=t.parent;if(r&&r.type==="value-func"&&r.value==="if")return!1;let n=t.grandparent;return!as(s)&&!(n&&as(n))?!1:t.findAncestor(o=>o.type==="css-decl")?.prop?.startsWith("$")?!0:as(n)?!r.groups.some(o=>tt(o)):n.type==="value-func"}function st(t){return t.type==="value-comment"&&t.inline}function Yt(t){return t.type==="value-word"&&t.value==="#"}function cs(t){return t.type==="value-word"&&t.value==="{"}function Vt(t){return t.type==="value-word"&&t.value==="}"}function nt(t){return["value-word","value-atword"].includes(t.type)}function zt(t){return t?.type==="value-colon"}function ki(t,e){if(!Gt(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:zt(s[r+1])}function Oi(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function Ai(t){return t.type!=="value-func"?!1:Pc.has(t.value.toLowerCase())}function Be(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function ce(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function Ci(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,r=e.groups[s];if(r?.type==="value-word"&&r.value==="with")return!0}return!1}function it(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function Lc(t,e,s){let{node:r}=t,n=t.parent,i=t.grandparent,o=li(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(p=>p.type==="css-atrule"),c=a&&rt(a,e),f=r.groups.some(p=>st(p)),h=t.map(s,"groups"),l=[""],m=_e(t,"url"),x=!1,d=!1;for(let p=0;
Line truncated
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function Fc(t,e,s){if(e===!1)return!1;let r=!!s?.backwards,n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===`
|
||||
`)return e-2;if(Di(n))return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(Di(n))return e+1}return e}var Ht=Fc;function Wc(t,e,s={}){let r=Mt(t,s.backwards?e-1:e,s),n=Ht(t,r,s);return r!==n}var Qt=Wc;function $c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var Mi=$c;function Gc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Bt(t,e):e}var Bi=Gc;function Yc(t,e){let s=null,r=e;for(;r!==s;)s=r,r=qn(t,r),r=Mi(t,r),r=Mt(t,r);return r=Bi(t,r),r=Ht(t,r),r!==!1&&Qt(t,r)}var Kt=Yc;function Vc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(N(t),N(e.close)).trimEnd().endsWith(","))}function zc(t,e){return mi(t.grandparent)&&Vc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&qi(e)&&t.callParent(()=>ls(t,e))?Rt(","):""}function Ui(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:m})=>typeof m=="string"?m:s(),"groups");if(n&&di(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let m=hs(t);we(i);let x=Hc(Y(",",i),2),d=Y(m?O:A,x);return R(m?[O,d]:D([jc(t)?I:"",qe(d)]))}let o=t.map(({node:m,isLast:x,index:d})=>{let p=i[d];Gt(m)&&m.type==="value-comma_group"&&m.groups&&m.groups[0].type!=="value-paren_group"&&m.groups[2]?.type==="value-paren_group"&&ae(p)===ie&&ae(p.contents)===ne&&ae(p.contents.contents)===oe&&(p=D(ue(p)));let y=[p,x?zc(t,e):","];if(!x&&m.type==="value-comma_group"&&le(m.groups)){let g=$(0,m.groups,-1);!g.source&&g.close&&(g=g.close),g.source&&Kt(e.originalText,P(g))&&y.push(O)}return y},"groups"),u=ki(r,n),a=Ci(r,n),c=ls(t,e),f=a||c&&!u,h=a||u,l=D([r.open?s("open"):"",R([I,Y(A,o)]),I,Lt,r.close?s("close"):""],{shouldBreak:f});return h?ue(l):l}function hs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function jc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function Hc(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function Qc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if(i?.type==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Qt(e.originalText,N(o),{backwards:!0})&&!De(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:O),Kt(e.originalText,P(n))&&!De(n)&&r.push(O))},"nodes"),r}var Ue=Qc;function Kc(t,e,s){let{node:r}=t;switch(r.type){case"css-root":{let n=Ue(t,e,s),i=r.raws.after.trim();return i.startsWith(";")&&(i=i.slice(1).trim()),[r.frontMatter?[s("frontMatter"),O,r.nodes.length>0?O:""]:"",n,i?` ${i}`:"",r.nodes.length>0?O:""]}case"css-comment":{let n=r.inline||r.raws.inline,i=e.originalText.slice(N(r),P(r));return n?i.trimEnd():i}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[r.selector?.type==="selector-unknown"&&Be(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?R([O,Ue(t,e,s)]):"",O,"}",yi(r)?";":""]:";"];case"css-decl":{let n=t.parent,{between:i}=r.raws,o=i.trim(),u=o===":",a=i.endsWith(" ")&&u,c=typeof r.value=="string"&&/^ *$/.test(r.value),f=typeof r.value=="string"?r.value:s("value");return f=Si(r)?wn(f):f,!u&&Be(o)&&!t.call(()=>hs(t),"value","group","group")&&(f=R([O,ue(f)])),[T(0,r.raws.before,/[\s;]/g,""),n.type==="css-atrule"&&n.variable||pi(t)?r.prop:Me(r.prop),o.startsWith("//")?" ":"",o,r.extend||c||!a&&r.isNested&&(ce(r.value.group.group)||ce(r.value.group.group.groups?.[0]))?"":" ",e.parser==="less"&&r.extend&&r.selector?r.selector.nodes.length>1?D(["extend(",R([I,s("selector")]),I,")"]):["extend(",s("selector"),")"]:"",f,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",r.nodes.length>0?R([I,Ue(t,e,s)]):"",I,"}"]:bi(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Rt(";"):";"]}case"css-atrule":{let n=t.parent,i=$t(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",i?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),i?"":";"];if(r.variable)return["@",r.nam
Line truncated
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
var Bl=Object.create;var Qr=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Fl=Object.getOwnPropertyNames;var Wl=Object.getPrototypeOf,$l=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(s){throw e=0,s}},hn=(t,e)=>{for(var s in e)Qr(t,s,{get:e[s],enumerable:!0})},Gl=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fl(e))!$l.call(t,n)&&n!==s&&Qr(t,n,{get:()=>e[n],enumerable:!(r=Ul(e,n))||r.enumerable});return t};var Ne=(t,e,s)=>(s=t!=null?Bl(Wl(t)):{},Gl(e||!t||!t.__esModule?Qr(s,"default",{value:t,enumerable:!0}):s,t));var Yi=w((Bx,ms)=>{var _=String,Gi=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ms.exports=Gi();ms.exports.createColors=Gi});var ds=w(()=>{});var Kt=w((Wx,ji)=>{"use strict";var Vi=Yi(),zi=ds(),ot=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Vi.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:h,red:l}=Vi.createColors(!0);n=d=>f(l(d)),r=d=>h(d),zi&&(i=d=>zi(d))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,h)=>{let l=u+1+h,d=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let m=20,p=Math.max(0,this.column-m),y=Math.max(this.column+m,this.endColumn+m),g=f.slice(p,y),v=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return n(">")+r(d)+i(g)+`
|
||||
`+v+n("^")}let x=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+i(f)+`
|
||||
`+x+n("^")}return" "+r(d)+i(f)}).join(`
|
||||
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
||||
|
||||
`+e+`
|
||||
`),this.name+": "+this.message+e}};ji.exports=ot;ot.default=ot});var Xt=w(($x,Qi)=>{"use strict";var Zc=/(<)(\/?style\b)/gi,ef=/(<)(!--)/g;function fe(t){return typeof t!="string"||!t.includes("<")?t:t.replace(Zc,"\\3c $2").replace(ef,"\\3c $2")}var Hi={after:`
|
||||
`,beforeClose:`
|
||||
`,beforeComment:`
|
||||
`,beforeDecl:`
|
||||
`,beforeOpen:" ",beforeRule:`
|
||||
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function tf(t){return t[0].toUpperCase()+t.slice(1)}var at=class{constructor(e){this.builder=e}atrule(e,s){let r=e.raws,n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof r.afterName<"u"?n+=r.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let o=(r.between||"")+(s?";":"");this.builder(fe(n+i+o),e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
|
||||
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(fe(s+r)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(fe(n)),this.builder("}",e,"end")}body(e){let s=e.nodes,r=s.length-1;for(;r>0&&s[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon"),i=e.type==="document";for(let o=0;o<s.length;o++){let u=s[o],a=this.raw(u,"before");a&&this.builder(i?a:fe(a)),this.stringify(u,r!==o||n)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(fe("/*"+s+e.text+r+"*/"),e)}decl(e,s){let r=e.raws,n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),s&&(i+=";"),this.builder(fe(i),e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Hi[r];let o=e.root(),u=o.rawCache||(o.rawCache={});if(typeof u[r]<"u")return u[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+tf(r);this[a]?n=this[a](o,e):o.walk(c=>{if(n=c.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Hi[r]),u[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
|
||||
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
|
||||
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
|
||||
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){if(this.body(e),e.raws.after){let s=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?s:fe(s))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(fe(e.raws.ownSemicolon),e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Qi.exports=at;at.default=at});var ut=w((Gx,Ki)=>{"use strict";var rf=Xt();function ys(t,e){new rf(e).stringify(t)}Ki.exports=ys;ys.default=ys});var Jt=w((Yx,gs)=>{"use strict";gs.exports.isClean=Symbol("isClean");gs.exports.my=Symbol("my")});var ft=w((Vx,Xi)=>{"use strict";var sf=Kt(),nf=Xt(),of=ut(),{isClean:lt,my:af}=Jt();function ws(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>ws(o,s)):(i==="object"&&n!==null&&(n=ws(n)),s[r]=n)}return s}function J(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
|
||||
`?(s=1,r+=1):s+=1}return n}var ct=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[lt]=!1,this[af]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=ws(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new sf(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=J(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
|
||||
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:J(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:J(s,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:J(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):typeof e.index=="number"&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new nf().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=of){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Xi.exports=ct;ct.default=ct});var Fe=w((zx,Ji)=>{"use strict";var uf=ft(),pt=class extends uf{constructor(e){super(e),this.type="comment"}};Ji.exports=pt;pt.default=pt});var mt=w((jx,Zi)=>{"use strict";var lf=ft(),ht=class extends lf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Zi.exports=ht;ht.default=ht});var pe=w((Hx,uo)=>{"use strict";var eo=Fe(),to=mt(),cf=ft(),{isClean:ro,my:so}=Jt(),vs,no,io,xs;function oo(t){return t.map(e=>(e.nodes&&(e.nodes=oo(e.nodes)),delete e.source,e))}function ao(t){if(t[ro]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ao(e)}var z=class t extends cf{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){i
Line truncated
|
||||
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[Es]=s,s}var We=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!yo||/^\w+:\/\//.test(s.from)||Ss(s.from)?this.file=s.from:this.file=Ts(s.from)),yo&&wf){let r=new gf(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+mf(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,c;if(s&&typeof s=="object"){let h=s,l=r;if(typeof h.offset=="number"){a=h.offset;let d=this.fromOffset(a);s=d.line,r=d.col}else s=h.line,r=h.column,a=this.fromLineAndColumn(s,r);if(typeof l.offset=="number"){u=l.offset;let d=this.fromOffset(u);o=d.line,i=d.col}else o=l.line,i=l.column,u=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let h=this.fromOffset(a);s=h.line,r=h.col}let f=this.origin(s,r,o,i);return f?c=new mo(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):c=new mo(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),c.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(Zt&&(c.input.url=Zt(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,s){return go(this)[e-1]+s-1}fromOffset(e){let s=go(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ts(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s-1,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n-1,line:r}));let a;Ss(o.source)?a=Zt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Zt(this.map.mapFile));let c={column:o.column+1,endColumn:u&&u.column+1,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(ho)c.file=ho(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};wo.exports=We;We.default=We;bs&&bs.registerInput&&bs.registerInput(We)});var er=w((t_,xo)=>{"use strict";var vo=pe(),Ge=class extends vo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};xo.exports=Ge;Ge.default=Ge;vo.registerAtRule(Ge)});var Ye=w((r_,So)=>{"use strict";var _o=pe(),bo,Eo,he=class extends _o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new bo(new Eo,this,e).stringify()}};he.registerLazyResult=t=>{bo=t};he.registerProcessor=t=>{Eo=t};So.exports=he;he.default=he;_o.registerRoot(he)});var ks=w((s_,To)=>{"use strict";var dt={comma(t){return dt.split(t,[","],!0)},space(t){let e=[" ",`
|
||||
`," "];return dt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};To.exports=dt;dt.default=dt});var tr=w((n_,Oo)=>{"use strict";var ko=pe(),vf=ks(),Ve=class extends ko{get selectors(){return vf.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Oo.exports=Ve;Ve.default=Ve;ko.registerRule(Ve)});var nr=w((i_,Co)=>{"use strict";var rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xf=/.[\r\n"'(/\\]/,Ao=/[\da-f]/i;Co.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,d,x,m=r.length,p=0,y=[],g=[],v=-1;function C(){return p}function q(k){throw e.error("Unclosed "+k,p)}function W(){return g.length===0&&p>=m}function se(k){if(g.length)return g.pop();if(p>=m)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(p),i){case 10:case 32:case 9:case 13:case 12:{a=p;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(p,a)],p=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);f=[S,S,p];break}case 40:{if(x=y.length?y.pop()[1]:"",d=r.charCodeAt(p+1),x==="url"&&d!==39&&d!==34&&d!==32&&d!==10&&d!==9&&d!==12&&d!==13){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(n||b){a=p;break}else q("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["brackets",r.slice(p,a+1),p,a],p=a}else p<=v?f=["(","(",p]:(a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||xf.test(o)?(v=a===-1?m:a,f=["(","(",p]):(f=["brackets",o,p,a],p=a));break}case 39:case 34:{c=i===39?"'":'"',a=p;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(n||b){a=p+1;break}else q("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["string",r.slice(p,a+1),p,a],p=a;break}case 64:{rr.lastIndex=p+1,rr.test(r),rr.lastIndex===0?a=r.length-1:a=rr.lastIndex-2,f=["at-word",r.slice(p,a+1),p,a],p=a;break}case 92:{for(a=p,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,Ao.test(r.charAt(a)))){for(;Ao.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(p,a+1),p,a],p=a;break}default:{i===47&&r.charCodeAt(p+1)===42?(a=r.indexOf("*/",p+2)+1,a===0&&(n||b?a=r.length:q("comment")),f=["comment",r.slice(p,a+1),p,a],p=a):(sr.lastIndex=p+1,sr.test(r),sr.lastIndex===0?a=r.length-1:a=sr.lastIndex-2,f=["word",r.slice(p,a+1),p,a],y.push(f),p=a);break}}return p++,f}function ye(k){g.push(k)}return{back:ye,endOfFile:W,nextToken:se,position:C}}});var ir=w((o_,Ro)=>{"use strict";var _f=er(),bf=Fe(),Ef=mt(),Sf=Ye(),No=tr(),Tf=nr(),Po={empty:!0,space:!0};function kf(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}function Os(t,e,s){let r="";for(let n=e;n<s;n++)r+=t[n][1];return r}var As=class{constructor(e){this.input=e,this.root=new Sf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new _f;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new bf;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3
Line truncated
|
||||
`))),n=t[1].substring(t[1].indexOf(`
|
||||
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new Pf(n),this.tokenizer=Nf(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),Cs.exports.isInlineComment.bind(this)(t)}return!1}}});var Do=w((l_,qo)=>{qo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Bo=w((c_,Mo)=>{var Rf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,If=/\.[0-9]/,Lf=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Rf.test(e)===!1&&If.test(e)===!1};Mo.exports={isMixinToken:Lf}});var Fo=w((f_,Uo)=>{var qf=nr(),Df=/^url\((.+)\)/;Uo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=qf({css:s});for(t.filename=s.replace(Df,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Yo=w((p_,Go)=>{var Wo=/:$/,$o=/^:(\s+)?/;Go.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(Wo.test(e)){let[r]=e.match(Wo);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if($o.test(s)){let[r]=s.match($o);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var jo=w((m_,zo)=>{var Mf=Fe(),Bf=ir(),{isInlineComment:Uf}=Lo(),{interpolation:Vo}=Do(),{isMixinToken:Ff}=Bo(),Wf=Fo(),$f=Yo(),Gf=/(!\s*important)$/i;zo.exports=class extends Bf{constructor(...e){super(...e),this.lastNode=null}atrule(e){Vo.bind(this)(e)||(super.atrule(e),Wf(this.lastNode),$f(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Mf,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((v,C,q)=>C[0]===")"?q:v),h=e.slice(i,c+i).map(v=>v[1]).join(""),[l]=e.slice(i),d=[l[2],l[3]],[x]=e.slice(c,c+1),m=[x[2],x[3]],p=["brackets",h].concat(d,m),y=e.slice(0,i),g=e.slice(c+1);e=y,e.push(p),e=e.concat(g)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),h=u[u.length-1],l=[c[2],c[3]],d=[h[4],h[5]],m=["word",u.map(p=>p[1]).join("")].concat(l,d);e.splice(f,u.length,m)}let a=e.findIndex(c=>Gf.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){Uf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),Vo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Ff(s)){this.mixin(e);return}super.unknownWord(e)}}});var Qo=w((y_,Ho)=>{var Yf=Xt();Ho.exports=class extends Yf{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Ko=w((g_,Ns)=>{var Vf=$e(),zf=jo(),jf=Qo();Ns.exports={parse(t,e){let s=new Vf(t,e),r=new zf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndex
Line truncated
|
||||
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Ms().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return E([n(a)]).process(o,u)},n};E.stringify=Np;E.parse=Ap;E.fromJSON=Ep;E.list=kp;E.comment=t=>new ya(t);E.atRule=t=>new da(t);E.decl=t=>new ga(t);E.rule=t=>new xa(t);E.root=t=>new va(t);E.document=t=>new wa(t);E.CssSyntaxError=bp;E.Declaration=ga;E.Container=_p;E.Processor=Ms;E.Document=wa;E.Comment=ya;E.Warning=Pp;E.AtRule=da;E.Result=Cp;E.Input=Sp;E.Rule=xa;E.Root=va;E.Node=Op;Tp.registerPostcss(E);_a.exports=E;E.default=E});var Ea=w((P_,ba)=>{var{Container:Rp}=lr(),Bs=class extends Rp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};ba.exports=Bs});var ka=w((R_,Ta)=>{"use strict";var cr=/[\t\n\f\r "#'()/;[\\\]{}]/g,fr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ip=/.[\r\n"'(/\\]/,Sa=/[\da-f]/i,pr=/[\n\f\r]/g;Ta.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,d,x=r.length,m=0,p=[],y=[],g;function v(){return m}function C(k){throw e.error("Unclosed "+k,m)}function q(){return y.length===0&&m>=x}function W(){let k=1,b=!1,S=!1;for(;k>0;)o+=1,r.length<=o&&C("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),b?!S&&i===b?(b=!1,S=!1):i===92?S=!S:S&&(S=!1):i===39||i===34?b=i:i===125?k-=1:i===35&&l===123&&(k+=1)}function se(k){if(y.length)return y.pop();if(m>=x)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(m),i){case 10:case 32:case 9:case 13:case 12:{o=m;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);d=["space",r.slice(m,o)],m=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);d=[S,S,m];break}case 44:{d=["word",",",m,m+1];break}case 40:{if(h=p.length?p.pop()[1]:"",l=r.charCodeAt(m+1),h==="url"&&l!==39&&l!==34){for(g=1,f=!1,o=m+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)g+=1;else if(l===41&&(g-=1,g===0))break;o+=1}a=r.slice(m,o+1),d=["brackets",a,m,o],m=o}else o=r.indexOf(")",m+1),a=r.slice(m,o+1),o===-1||Ip.test(a)?d=["(","(",m]:(d=["brackets",a,m,o],m=o);break}case 39:case 34:{for(u=i,o=m,f=!1;o<x&&(o++,o===x&&C("string"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&l===123&&W();d=["string",r.slice(m,o+1),m,o],m=o;break}case 64:{cr.lastIndex=m+1,cr.test(r),cr.lastIndex===0?o=r.length-1:o=cr.lastIndex-2,d=["at-word",r.slice(m,o+1),m,o],m=o;break}case 92:{for(o=m,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,Sa.test(r.charAt(o)))){for(;Sa.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}d=["word",r.slice(m,o+1),m,o],m=o;break}default:l=r.charCodeAt(m+1),i===35&&l===123?(o=m,W(),a=r.slice(m,o+1),d=["word",a,m,o],m=o):i===47&&l===42?(o=r.indexOf("*/",m+2)+1,o===0&&(n||b?o=r.length:C("comment")),d=["comment",r.slice(m,o+1),m,o],m=o):i===47&&l===47?(pr.lastIndex=m+1,pr.test(r),pr.lastIndex===0?o=r.length-1:o=pr.lastIndex-2,a=r.slice(m,o+1),d=["comment",a,m,o,"inline"],m=o):(fr.lastIndex=m+1,fr.test(r),fr.lastIndex===0?o=r.length-1:o=fr.lastIndex-2,d=["word",r.slice(m,o+1),m,o],p.push(d),m=o);break}return m++,d}function ye(k){y.push(k)}return{back:ye,endOfFile:q,nextToken:se,position:v}}});var Aa=w((I_,Oa)=>{var{Comment:Lp}=lr(),qp=ir(),Dp=Ea(),Mp=ka(),Us=class extends qp{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Lp;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=Mp(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
|
||||
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Dp;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let h=a;h>0;h--){let l=c[h][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Oa.exports=Us});var Na=w((L_,Ca)=>{var{Input:Bp}=lr(),Up=Aa();Ca.exports=function(e,s){let r=new Bp(e,s),n=new Up(r);return n.parse(),n.root}});var Ws=w(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function $p(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Fs.default=$p});var Gs=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Gp=Ws(),Ra=Yp(Gp);function Yp(t){return t&&t.__esModule?t:{default:t}}function bt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}bt.prototype=Object.create(Ra.default.prototype);bt.constructor=Ra.default;bt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};bt.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};$s.default=bt});var Da=w(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.parseMediaFeature=qa;Et.parseMediaQuery=Vs;Et.parseMediaList=jp;var Vp=Ws(),Ia=La(Vp),zp=Gs(),Ys=La(zp);function La(t){return t&&t.__esModule?t:{default:t}}function qa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f<c.length;f++){var h=c[f];if((h==="'"||h==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:h}),n++):s[n].mode==="string"&&s[n].character===h&&c[f-1]!=="\\"&&(s.pop(),n--)),h==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):h==="}"&&(s.pop(),n--),s[n].mode==="normal"&&h===":"){var l=c.substring(f+1);u={type:"value",before:/^(\s*)/.exec(l)[1],after:/(\s*)$/.exec(l)[1],value:l.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=h}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Vs(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=qa(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new Ys.default(i):new Ia.default(i)),i=o(),n=!1)}for(var c=0;c<s.length;c++)if(i=s[c],c>0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"
Line truncated
|
||||
`),u=o.length-1,u>0?(f=p+u,h=n-o[u].length):(f=p,h=m),e.push(["comment",a,p,y-m,f,n-h,y]),m=h,p=f,y=n):(Pr.lastIndex=y+1,Pr.test(s),Pr.lastIndex===0?n=s.length-1:n=Pr.lastIndex-2,e.push(["word",s.slice(y,n+1),p,y-m,p,n-m,y]),y=n);break}y++}return e}ku.exports=Rr.default});var Nu=w((Ir,Cu)=>{"use strict";Ir.__esModule=!0;var Td=(function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}})(),kd=Hs(),Od=L(kd),Ad=Qs(),rn=L(Ad),Cd=Ks(),Nd=L(Cd),Pd=ja(),Rd=L(Pd),Id=Qa(),sn=L(Id),Ld=Ja(),qd=L(Ld),Dd=eu(),Md=L(Dd),Bd=ru(),Ud=L(Bd),Fd=nu(),Wd=L(Fd),$d=ou(),Gd=L($d),Yd=uu(),Vd=L(Yd),zd=cu(),jd=L(zd),Hd=pu(),Qd=L(Hd),Kd=mu(),Xd=L(Kd),Jd=yu(),Zd=L(Jd),ey=wu(),ty=L(ey),ry=Ou(),Au=L(ry),sy=M(),ny=iy(sy);function iy(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function L(t){return t&&t.__esModule?t:{default:t}}function oy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ay=(function(){function t(e){oy(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new Rd.default;var s=new sn.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,Au.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,Au.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new jd.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new Xd.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new sn.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new Md.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new Zd.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===ny.PSEUDO){var r=new sn.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.column
Line truncated
|
||||
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var U=w((pb,qu)=>{"use strict";var dy=j(),He=class extends dy{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};He.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!He.prototype[e]&&(He.prototype[e]=function(s){return this.walkType(t,s)})};qu.exports=He});var Mu=w((mb,Du)=>{"use strict";var yy=U();Du.exports=class extends yy{constructor(e){super(e),this.type="root"}}});var Uu=w((yb,Bu)=>{"use strict";var gy=U();Bu.exports=class extends gy{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var $u=w((gb,Wu)=>{"use strict";var Fu=U(),qr=class extends Fu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Fu.registerWalker(qr);Wu.exports=qr});var Yu=w((wb,Gu)=>{"use strict";var wy=U(),vy=j(),Dr=class extends vy{constructor(e){super(e),this.type="colon"}};wy.registerWalker(Dr);Gu.exports=Dr});var zu=w((vb,Vu)=>{"use strict";var xy=U(),_y=j(),Mr=class extends _y{constructor(e){super(e),this.type="comma"}};xy.registerWalker(Mr);Vu.exports=Mr});var Hu=w((xb,ju)=>{"use strict";var by=U(),Ey=j(),Br=class extends Ey{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};by.registerWalker(Br);ju.exports=Br});var Xu=w((_b,Ku)=>{"use strict";var Qu=U(),Ur=class extends Qu{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Qu.registerWalker(Ur);Ku.exports=Ur});var Zu=w((bb,Ju)=>{"use strict";var Sy=U(),Ty=j(),Fr=class extends Ty{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Sy.registerWalker(Fr);Ju.exports=Fr});var tl=w((Eb,el)=>{"use strict";var ky=U(),Oy=j(),Wr=class extends Oy{constructor(e){super(e),this.type="operator"}};ky.registerWalker(Wr);el.exports=Wr});var sl=w((Sb,rl)=>{"use strict";var Ay=U(),Cy=j(),$r=class extends Cy{constructor(e){super(e),this.type="paren",this.parenType=""}};Ay.registerWalker($r);rl.exports=$r});var il=w((Tb,nl)=>{"use strict";var Ny=U(),Py=j(),Gr=class extends Py{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Ny.registerWalker(Gr);nl.exports=Gr});var al=w((kb,ol)=>{"use strict";var Ry=U(),Iy=j(),Yr=class extends Iy{constructor(e){super(e),this.type="word"}};Ry.registerWalker(Yr);ol.exports=Yr});var ll=w((Ob,ul)=>{"use strict";var Ly=U(),qy=j(),Vr=class extends qy{constructor(e){super(e),this.type="unicode-range"}};Ly.registerWalker(Vr);ul.exports=Vr});var fl=w((Ab,cl)=>{"use strict";var on=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred wh
Line truncated
|
||||
`,a+2);l=S!==-1?S-1:i}p=n.slice(a,l+1),x=p.split(`
|
||||
`),m=x.length-1,m>0?(g=u+m,v=l-x[m].length):(g=u,v=o),r.push(["comment",p,u,a-o,g,l-v,a]),o=v,u=g,a=l}else if(h===35&&!My.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((h===117||h===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,h=n.charCodeAt(l);while(l<i&&By.test(n.slice(l,l+1)));r.push(["unicoderange",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1}else if(h===47)l=a+1,r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else{let b=Dy;if(h>=48&&h<=57&&(b=Qe),b.lastIndex=a+1,b.test(n),b.lastIndex===0?l=n.length-1:l=b.lastIndex-2,b===Qe||h===46){let S=n.charCodeAt(l),fn=n.charCodeAt(l+1),pn=n.charCodeAt(l+2);(S===101||S===69)&&(fn===45||fn===43)&&pn>=48&&pn<=57&&(Qe.lastIndex=l+2,Qe.test(n),Qe.lastIndex===0?l=n.length-1:l=Qe.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var yl=w((Nb,dl)=>{"use strict";var an=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};dl.exports=an});var xl=w((Rb,vl)=>{"use strict";var Uy=Mu(),Fy=Uu(),Wy=$u(),$y=Yu(),Gy=zu(),Yy=Hu(),Vy=Xu(),zy=Zu(),jy=tl(),gl=sl(),Hy=il(),wl=al(),Qy=ll(),Ky=ml(),Xy=Hs(),Jy=Qs(),Zy=Ks(),eg=yl();function tg(t){return t.sort((e,s)=>e-s)}vl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new Uy;let n=new Fy;this.root.append(n),this.current=n,this.tokens=Ky(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new $y({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new Gy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new Yy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new eg(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new jy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new gl({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new wl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cu
Line truncated
|
||||
Expected it to be 'string' or 'object'.`;if(ae(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=Kl([...Nt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${r}.`}var Kr=class extends Error{name="InvalidDocError";constructor(e){super(Xl(e)),this.doc=e}},dn=Kr;function yn(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){return mn(s,i,n)}function n(i){switch(ae(i)){case Xe:return e(i.map(r));case oe:return e({...i,parts:i.parts.map(r)});case ge:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ie:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Pe:case ne:case At:case Ct:case Re:return e({...i,contents:r(i.contents)});case Ke:case kt:case Ot:case Ie:case H:case Le:return e(i);default:throw new dn(i)}}}function Jl(t){return t.type===H&&!t.hard?t.soft?"":" ":t.type===ge?t.flatContents:t}function gn(t){return yn(t,Jl)}function wn(t,e=vn){return yn(t,s=>typeof s=="string"?Y(e,s.split(`
|
||||
`)):s)}var F=G,we=G,xn=G,_n=G;function R(t){return F(t),{type:ne,contents:t}}function Zl(t,e){return _n(t),F(e),{type:Pe,contents:e,n:t}}function ue(t){return Zl(-1,t)}var ve={type:Le};function qe(t){return xn(t),{type:oe,parts:t}}function D(t,e={}){return F(t),we(e.expandedStates,!0),{type:ie,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Pt(t,e="",s={}){return F(t),e!==""&&F(e),{type:ge,breakContents:t,flatContents:e,groupId:s.groupId}}function Y(t,e){F(t),we(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}var A={type:H},I={type:H,soft:!0},ec={type:H,hard:!0},O=[ec,ve],Xr={type:H,hard:!0,literal:!0},vn=[Xr,ve];function Rt(t){return F(t),{type:Re,contents:t}}var It={type:Ie};function tc(t){return Array.isArray(t)&&t.length>0}var le=tc;var En=Object.freeze({character:"'",codePoint:39}),Sn=Object.freeze({character:'"',codePoint:34}),rc=Object.freeze({preferred:En,alternate:Sn}),sc=Object.freeze({preferred:Sn,alternate:En});function Tn(t,e){let{preferred:s,alternate:r}=e===!0||e==="'"?rc:sc,{length:n}=t,i=0,o=0;for(let u=0;u<n;u++){let a=t.charCodeAt(u);a===s.codePoint?i++:a===r.codePoint&&o++}return(i>o?r:s).character}var nc=/\\(["'\\])|(["'])/g;function ic(t,e){let s=e==='"'?"'":'"',r=T(0,t,nc,(n,i,o)=>i?i===s?s:n:o===e?"\\"+o:o);return e+r+e}var On=ic;function oc(t,e){G(/^(?<quote>["']).*\k<quote>$/s.test(t));let s=t.slice(1,-1),r;return e.parser==="json"||e.parser==="jsonc"||e.parser==="json-stringify"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?r='"':e.__isInHtmlAttribute?r="'":r=Tn(s,e.singleQuote),t.charAt(0)===r?t:On(s,r)}var Lt=oc;var Zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},An=Zr;function Cn(){}Cn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var Nn=Cn;var Je=null;function Ze(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Ze.prototype=null,e}return Je=Ze.prototype=t??Object.create(null),new Ze}var ac=10;for(let t=0;t<=ac;t++)Ze();function es(t){return Ze(t)}function uc(t,e="type"){es(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var Pn=uc;var Q=[["nodes"],["group"]],Rn={"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":Q[0],"media-query":Q[0],"media-type":[],"media-feature-expression":Q[0],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":Q[0],"selector-selector":Q[0],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":Q[0],"selector-universal":[],"selector-pseudo":Q[0],"selector-nesting":[],"selector-unknown":[],"value-value":Q[1],"value-root":Q[1],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":Q[1],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]};var lc=Pn(Rn),In=lc;function cc(t,e){let s=0;for(let r=0;r<t.line-1;++r)s=e.indexOf(`
|
||||
`,s)+1;return s+t.column}var ts=cc;function qt(t){return(e,s,r)=>{if(s===!1)return!1;let n=!!r?.backwards,{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Kw=qt(/\s/),Dt=qt(" "),Ln=qt(",; "),Mt=qt(/[^\n\r]/);function qn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Dn(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?qn(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return ts(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Mn(t,e){if(t.type==="css-comment"&&t.inline)return Mt(e,t.source.startOffset);if(t.type==="value-paren"&&typeof t.sourceIndex=="number")return t.sourceIndex+(t.value===")"?t.value.length:0);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let s=ts(t.source.end,e);return t.type==="value-word"?qn(t,s):s}if(le(t.nodes))return Mn($(0,t.nodes,-1),e);if(t.type==="css-atrule"&&typeof t.name=="string")return Dn(t,e)+1+t.name.length+t.raws.afterName.length+t.raws.params.length}return typeof t.sourceIndex=="number"&&typeof t.value=="string"?t.sourceIndex+t.value.length:null}function Bn(t,e){ss(t,e,0,!1)}function ss(t,e,s,r){if(r&&typeof t.type=="string")t.source??(t.source={}),t.source.startOffset=s,t.source.endOffset=s+e.length;else if(!(typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number")){if(t.source||typeof t.sourceIndex=="number"){t.source??(t.source={});let n=s+e.length;t.source.startOffset=Math.min(Dn(t,e)+s,n);let i=Mn(t,e);t.source.endOffset=typeof i=="number"?Math.min(i+s,n):i}}for(let n in t){let i=t[n];if(n==="source"||!i||typeof i!="object")continue;let o=Array.isArray(i)?i:[i];for(let u of o){if(!u||typeof u!="object")continue;let a=fc(t,u,s);a?ss(u,a.text,a.rootOffset,!0):ss(u,e,s,!1),Wn(u,t)}}mc(t),dc(t)}function fc(t,e,s){if(e.type==="value-root"||e.type==="value-unknown")return{rootOffset:Un(t),text:e.text||e.value||""};if(e.type==="media-query-list"||t.params===e)return{rootOffset:Fn(t),text:t.raws?.params||e.value||""};if(e.type?.startsWith("selector-")){let r=pc(t,e);if(typeof r=="string")return{rootOffset:hc(t,e,r,s),text:r}}}function Un(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function Fn(t){let e=t.source.startOffset;return t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),e}function pc(t,e){if(typeof e.raws?.selector=="string")return e.raws.selector;if(t.selector===e){if(t.mixin)return t.raws.identifier+t.name+t.raws.afterName+t.raws.params;if(typeof t.raws?.selector=="string")return t.raws.selector;if(t.customSelector&&typeof t.raws?.params=="string")return t.raws.params.slice(t.customSelector.length).trim();if(typeof t.raws?.params=="string")return t.raws.params;if(t.type==="css-decl"&&typeof t.raws?.value=="string"){let{value:s}=t.raws;return t.extend&&s.startsWith("extend(")?s.slice(7,-1):s}}}function hc(t,e,s,r){return typeof e.sourceIndex=="number"&&typeof e.raws?.selector=="string"?r+e.sourceIndex:t.mixin?t.source.startOffset:typeof t.raws?.selector=="string"?t.source.startOffset+rs(t.raws.selector,s):typeof t.raws?.params=="string"?Fn(t)+rs(t.raws.params,s):t.type==="css-decl"&&typeof t.raws?.value=="string"?Un(t)+rs(t.raws.value,s):r}function rs(t,e){let s=t.indexOf(e);return s===-1?0:s}function mc(t){var u,a;if(typeof t.type!="string")return;let e=typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number",s=t.source?.start&&t.source.end;if(e&&s)return;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i,o;for(let c in t){if(c==="source"||c==="raws"||c==="spaces")continue;let f=t[c],h=Array.isArray(f)?f:[f];for(let l of h)!l||typeof l!="object"||typeof l.source?.startOffset!="number"||typeof l.source?.endOffset!="number"||(l.source.startOffset<r&&(r=l.source.startOffset,i=l.source.start),l.source.endOffset>n&&(n=l.source.endOffset,o=l.source.end))}r!==Number.POSITIVE_INFINITY&&(t.source??(t.source={}),e||(t.source.startOffset=r,t.source.endOffset=n),(u=t.source).start??(u.start=i),(a=t.source).end??(a.end=o))}function Wn(t,e){typeof t.type!="string"||t.source||typeof e.source?.startOffset!="number"||typeof e.source?.endOffset!="number"||!yc(t)||(t.source={startOffset:e.source.startOffset,endOffset:e.source.startOffset,start:e.source.start,end:e.source.start})}function dc(t){if(!(typeof t.source?.startOffset!="number"||typeof t.source?.endOffset!="number"))for(let e in t){if(e==="source"||e==="raws"||e==="spaces")continue;let s=t[e],r=Array.isArray(s)?s:[s
Line truncated
|
||||
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
|
||||
`||u==="\r")return t;continue;case"url":if(u===")")e="initial";else if(u===`
|
||||
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":u==='"'||u==="'"||u==="*"?n=!0:(u===`
|
||||
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+T(0,t.slice(o,u),/["'*]/g," ")+t.slice(u);return t}var N=t=>t.source.startOffset,P=t=>t.source.endOffset;var Bt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function gc(t){return!!t?.[Bt]}var De=gc;function wc(t){return T(0,t,/[^\n]/g," ")}var Ut=wc;var et=3;function vc(t){let e=t.slice(0,et);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
|
||||
`,et);if(s===-1)return;let r=t.slice(et,s).trim(),n=t.indexOf(`
|
||||
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
|
||||
...`,s)),n===-1)return;let o=n+1+et,u=t.charAt(o+1);if(!/\s?/.test(u))return;let a=t.slice(0,o),c;return{language:i,explicitLanguage:r||null,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-et),raw:a,start:{line:1,column:0,index:0},end:{index:a.length,get line(){return c??(c=a.split(`
|
||||
`)),c.length},get column(){return c??(c=a.split(`
|
||||
`)),$(0,c,-1).length}},[Bt]:!0}}function xc(t){let e=vc(t);return e?{frontMatter:e,get content(){let{raw:s}=e;return Ut(s)+t.slice(s.length)}}:{content:t}}var xe=xc;var _c=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function ns(t,e,s){if(t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||De(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||s.type==="css-root"&&$(0,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&(delete e.params,t.extend&&Ec(t.selector)&&delete e.extend),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=bc(t.value)),t.type==="selector-combinator"&&(e.value=T(0,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=T(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=T(0,e.value,/;$/g,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:r}=e;/\s[a-z]$/i.test(r)&&(e.__prettier_attribute_selector_flag=$(0,r,-1),r=r.slice(0,-1)),r=r.trim(),r=r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/,"$<value>"),e.value=r,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=T(0,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&(r.value.endsWith("[")||r.value.endsWith("]"))||r.type==="value-word"&&(r.value.startsWith("]")||r.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(r=>r.value).join("")};if(t.type==="value-func"&&t.value==="if"&&t.group.type==="value-paren_group"&&t.group.groups.length===1&&t.group.groups[0].type==="value-comma_group"){let r=t.group.groups[0].groups,n=e.group.groups[0].groups;for(let i=r.length-1;i>=0;i--){let o=r[i];if(o.type==="value-word"&&typeof o.value=="string"&&o.value.endsWith(";")){if(o.value===";"){r[i-1]?.type==="value-number"&&n.splice(i-1,2,{type:"#node-placeholder"});continue}n[i]={type:"#node-placeholder"}}}}}ns.ignoredProperties=_c;function bc(t){return T(0,T(0,t,"'",'"'),/\\([^\da-f])/gi,"$1")}function Ec(t){return t?.nodes?.some(e=>e.nodes?.some(s=>s.type==="selector-pseudo"&&s.value===":extend"))}var Sc=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),is=Sc;var Tc=/\*\/$/,kc=/^\/\*\*?/,zn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Oc=/(^|\s+)\/\/([^\n\r]*)/g,Gn=/^(\r?\n)+/,Ac=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Yn=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Cc=/(\r?\n|^) *\* ?/g,jn=[];function Hn(t){let e=t.match(zn);return e?e[0].trimStart():""}function Qn(t){let s=t.match(zn)?.[0];return s==null?t:t.slice(s.length)}function Kn(t){t=T(0,t.replace(kc,"").replace(Tc,""),Cc,"$1");let s="";for(;s!==t;)s=t,t=T(0,t,Ac,`
|
||||
$1 $2
|
||||
`);t=t.replace(Gn,"").trimEnd();let r=Object.create(null),n=T(0,t,Yn,"").replace(Gn,"").trimEnd(),i;for(;i=Yn.exec(t);){let o=T(0,i[2],Oc,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...jn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Xn({comments:t="",pragmas:e={}}){let o=Object.keys(e),u=o.flatMap(c=>Vn(c,e[c])).map(c=>` * ${c}
|
||||
`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`/** ${Vn(o[0],c)[0]} */`}}let a=t.split(`
|
||||
`).map(c=>` * ${c}`).join(`
|
||||
`)+`
|
||||
`;return`/**
|
||||
`+(t?a:"")+(t&&o.length>0?` *
|
||||
`:"")+u+" */"}function Vn(t,e){return[...jn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Jn=["noformat","noprettier"],Zn=["format","prettier"],ei="format";function Nc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
||||
`);return e===-1?t:t.slice(0,e)}var ti=Nc;function os(t){let e=ti(t);e&&(t=t.slice(e.length+1));let s=Hn(t),{pragmas:r,comments:n}=Kn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function ri(t){let{pragmas:e}=os(t);return Zn.some(s=>is(e,s))}function si(t){let{pragmas:e}=os(t);return Jn.some(s=>is(e,s))}function ni(t){let{shebang:e,text:s,pragmas:r,comments:n}=os(t),i=Qn(s),o=Xn({pragmas:{[ei]:"",...r},comments:n.trimStart()});return(e?`${e}
|
||||
`:"")+o+(i.startsWith(`
|
||||
`)?`
|
||||
`:`
|
||||
|
||||
`)+i}var ii=t=>ri(xe(t).content),oi=t=>si(xe(t).content),ai=t=>{let{frontMatter:e,content:s}=xe(t);return(e?e.raw+`
|
||||
|
||||
`:"")+ni(s)};var Pc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function ui(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var Rc=new Set(["initial","inherit","unset","revert"]);function li(t){return Rc.has(t.toLowerCase())}function ci(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function Me(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function _e(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function fi(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let s=e.raws?.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))})}function be(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function pi(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(s=>s.type==="css-atrule")?.name==="import"}function hi(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function mi(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function di(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function yi(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function gi(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function wi(t){return t.type==="value-word"&&t.value==="in"}function Ft(t){return t.type==="value-operator"&&t.value==="*"}function Ee(t){return t?.type==="value-operator"&&t.value==="/"}function K(t){return t.type==="value-operator"&&t.value==="+"}function Se(t){return t.type==="value-operator"&&t.value==="-"}function Ic(t){return t.type==="value-operator"&&t.value==="%"}function tt(t){return Ft(t)||Ee(t)||K(t)||Se(t)||Ic(t)}function vi(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function xi(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function rt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function us(t){return t.raws?.params&&/^\(\s*\)$/.test(t.raws.params)}function Wt(t){return t.name.startsWith("prettier-placeholder")}function _i(t){return t.prop.startsWith("@prettier-placeholder")}function bi(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function Ei(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function Si(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function X(t){return t?.raws?.before===""}function $t(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function as(t){return t.type==="value-paren_group"&&t.groups?.[0]&&$t(t.groups[0])}function ls(t,e){if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0||s.type==="value-paren_group"&&s.open&&s.close&&s.groups.length===1&&s.groups[0].type!=="value-comma_group")return!1;let r=t.parent;if(r&&r.type==="value-func"&&r.value==="if")return!1;let n=t.grandparent;return!as(s)&&!(n&&as(n))?!1:t.findAncestor(o=>o.type==="css-decl")?.prop?.startsWith("$")?!0:as(n)?!r.groups.some(o=>tt(o)):n.type==="value-func"}function st(t){return t.type==="value-comment"&&t.inline}function Gt(t){return t.type==="value-word"&&t.value==="#"}function cs(t){return t.type==="value-word"&&t.value==="{"}function Yt(t){return t.type==="value-word"&&t.value==="}"}function nt(t){return["value-word","value-atword"].includes(t.type)}function Vt(t){return t?.type==="value-colon"}function Ti(t,e){if(!$t(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:Vt(s[r+1])}function ki(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function Oi(t){return t.type!=="value-func"?!1:Pc.has(t.value.toLowerCase())}function Be(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function ce(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function Ai(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,r=e.groups[s];if(r?.type==="value-word"&&r.value==="with")return!0}return!1}function it(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function Lc(t,e,s){let{node:r}=t,n=t.parent,i=t.grandparent,o=ui(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(p=>p.type==="css-atrule"),c=a&&rt(a,e),f=r.groups.some(p=>st(p)),h=t.map(s,"groups"),l=[""],d=_e(t,"url"),x=!1,m=!1;for(let p=0;
Line truncated
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function Fc(t,e,s){if(e===!1)return!1;let r=!!s?.backwards,n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===`
|
||||
`)return e-2;if(qi(n))return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(qi(n))return e+1}return e}var jt=Fc;function Wc(t,e,s={}){let r=Dt(t,s.backwards?e-1:e,s),n=jt(t,r,s);return r!==n}var Ht=Wc;function $c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var Di=$c;function Gc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Mt(t,e):e}var Mi=Gc;function Yc(t,e){let s=null,r=e;for(;r!==s;)s=r,r=Ln(t,r),r=Di(t,r),r=Dt(t,r);return r=Mi(t,r),r=jt(t,r),r!==!1&&Ht(t,r)}var Qt=Yc;function Vc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(N(t),N(e.close)).trimEnd().endsWith(","))}function zc(t,e){return mi(t.grandparent)&&Vc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&Li(e)&&t.callParent(()=>ls(t,e))?Pt(","):""}function Bi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:d})=>typeof d=="string"?d:s(),"groups");if(n&&hi(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let d=hs(t);we(i);let x=Hc(Y(",",i),2),m=Y(d?O:A,x);return R(d?[O,m]:D([jc(t)?I:"",qe(m)]))}let o=t.map(({node:d,isLast:x,index:m})=>{let p=i[m];$t(d)&&d.type==="value-comma_group"&&d.groups&&d.groups[0].type!=="value-paren_group"&&d.groups[2]?.type==="value-paren_group"&&ae(p)===ie&&ae(p.contents)===ne&&ae(p.contents.contents)===oe&&(p=D(ue(p)));let y=[p,x?zc(t,e):","];if(!x&&d.type==="value-comma_group"&&le(d.groups)){let g=$(0,d.groups,-1);!g.source&&g.close&&(g=g.close),g.source&&Qt(e.originalText,P(g))&&y.push(O)}return y},"groups"),u=Ti(r,n),a=Ai(r,n),c=ls(t,e),f=a||c&&!u,h=a||u,l=D([r.open?s("open"):"",R([I,Y(A,o)]),I,It,r.close?s("close"):""],{shouldBreak:f});return h?ue(l):l}function hs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function jc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function Hc(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function Qc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if(i?.type==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Ht(e.originalText,N(o),{backwards:!0})&&!De(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:O),Qt(e.originalText,P(n))&&!De(n)&&r.push(O))},"nodes"),r}var Ue=Qc;function Kc(t,e,s){let{node:r}=t;switch(r.type){case"css-root":{let n=Ue(t,e,s),i=r.raws.after.trim();return i.startsWith(";")&&(i=i.slice(1).trim()),[r.frontMatter?[s("frontMatter"),O,r.nodes.length>0?O:""]:"",n,i?` ${i}`:"",r.nodes.length>0?O:""]}case"css-comment":{let n=r.inline||r.raws.inline,i=e.originalText.slice(N(r),P(r));return n?i.trimEnd():i}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[r.selector?.type==="selector-unknown"&&Be(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?R([O,Ue(t,e,s)]):"",O,"}",di(r)?";":""]:";"];case"css-decl":{let n=t.parent,{between:i}=r.raws,o=i.trim(),u=o===":",a=i.endsWith(" ")&&u,c=typeof r.value=="string"&&/^ *$/.test(r.value),f=typeof r.value=="string"?r.value:s("value");return f=Ei(r)?gn(f):f,!u&&Be(o)&&!t.call(()=>hs(t),"value","group","group")&&(f=R([O,ue(f)])),[T(0,r.raws.before,/[\s;]/g,""),n.type==="css-atrule"&&n.variable||fi(t)?r.prop:Me(r.prop),o.startsWith("//")?" ":"",o,r.extend||c||!a&&r.isNested&&(ce(r.value.group.group)||ce(r.value.group.group.groups?.[0]))?"":" ",e.parser==="less"&&r.extend&&r.selector?r.selector.nodes.length>1?D(["extend(",R([I,s("selector")]),I,")"]):["extend(",s("selector"),")"]:"",f,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",r.nodes.length>0?R([I,Ue(t,e,s)]):"",I,"}"]:_i(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Pt(";"):";"]}case"css-atrule":{let n=t.parent,i=Wt(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",i?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),i?"":";"];if(r.variable)return["@",r.nam
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Parser } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
typescript: Parser;
|
||||
};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.typescript=e()}})(function(){"use strict";var Sp=Object.defineProperty;var hy=Object.getOwnPropertyDescriptor;var yy=Object.getOwnPropertyNames;var gy=Object.prototype.hasOwnProperty;var wd=(e,t)=>{for(var a in t)Sp(e,a,{get:t[a],enumerable:!0})},by=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let f of yy(t))!gy.call(e,f)&&f!==a&&Sp(e,f,{get:()=>t[f],enumerable:!(s=hy(t,f))||s.enumerable});return e};var vy=e=>by(Sp({},"__esModule",{value:!0}),e);var T3={};wd(T3,{parsers:()=>gd});var gd={};wd(gd,{typescript:()=>x3});var xy=()=>()=>{},La=xy;var ja=(e,t)=>(a,s,...f)=>a|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,f);var Ty=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Sy=ja("replaceAll",function(){if(typeof this=="string")return Ty}),hr=Sy;var Em="6.0";var Tt=[],wy=new Map;function s_(e){return e!==void 0?e.length:0}function Bn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let s=t(e[a],a);if(s)return s}}function ky(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let s=t(e[a],a);if(s!==void 0)return s}}function kd(e,t,a){let s=[];q.assertEqual(e.length,t.length);for(let f=0;f<e.length;f++)s.push(a(e[f],t[f],f));return s}function Kp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function Am(e,t,a){if(e!==void 0)for(let s=a??0;s<e.length;s++){let f=e[s];if(t(f,s))return f}}function wp(e,t,a){if(e===void 0)return-1;for(let s=a??0;s<e.length;s++)if(t(e[s],s))return s;return-1}function Ey(e,t,a=tf){if(e!==void 0){for(let s=0;s<e.length;s++)if(a(e[s],t))return!0}return!1}function $r(e,t){if(e!==void 0){let a=e.length,s=0;for(;s<a&&t(e[s]);)s++;if(s<a){let f=e.slice(0,s);for(s++;s<a;){let h=e[s];t(h)&&f.push(h),s++}return f}}return e}function jp(e,t){let a;if(e!==void 0){a=[];for(let s=0;s<e.length;s++)a.push(t(e[s],s))}return a}function Cm(e){let t=[];for(let a=0;a<e.length;a++){let s=e[a];s&&(Kr(s)?Dn(t,s):t.push(s))}return t}function Dm(e,t){let a;if(e!==void 0)for(let s=0;s<e.length;s++){let f=t(e[s],s);f&&(Kr(f)?a=Dn(a,f):a=An(a,f))}return a??Tt}function Ay(e,t){let a;if(e!==void 0)for(let s=0;s<e.length;s++){let f=e[s],h=t(f,s);(a||f!==h||Kr(h))&&(a||(a=e.slice(0,s)),Kr(h)?Dn(a,h):a.push(h))}return a??e}function Cy(e,t){let a=[];if(e!==void 0)for(let s=0;s<e.length;s++){let f=t(e[s],s);f!==void 0&&a.push(f)}return a}function nn(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Zp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function Dy(e,t,a=tf){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!a(e[s],t[s],s))return!1;return!0}function An(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function Jp(e,t){return t<0?e.length+t:t}function Dn(e,t,a,s){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,s);a=a===void 0?0:Jp(t,a),s=s===void 0?t.length:Jp(t,s);for(let f=a;f<s&&f<t.length;f++)t[f]!==void 0&&e.push(t[f]);return e}function Py(e,t,a){return Ey(e,t,a)?!1:(e.push(t),!0)}function Ny(e,t,a){return e!==void 0?(Py(e,t,a),e):[t]}function Iy(e,t){return e.length===0?Tt:e.slice().sort(t)}var C3=Array.prototype.at?(e,t)=>e?.at(t):(e,t)=>{if(e!==void 0&&(t=Jp(e,t),t<e.length))return e[t]};function ef(e){return e===void 0||e.length===0?void 0:e[0]}function Va(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Oy(e){return q.assert(e.length!==0),e[e.length-1]}function My(e){return e!==void 0&&e.length===1?e[0]:void 0}function Ly(e,t,a,s,f){return jy(e,a(t),a,s,f)}function jy(e,t,a,s,f){if(!nn(e))return-1;let h=f??0,b=e.length-1;for(;h<=b;){let v=h+(b-h>>1),l=a(e[v],v);switch(Math.sign(s(l,t))){case-1:h=v+1;break;case 0:return v;case 1:b=v-1;break}}return~h}function Jy(e,t,a,s,f){if(e&&e.length>0){let h=e.length;if(h>0){let b=s===void 0||s<0?0:s,v=f===void 0||b+f>h-1?h-1:b+f,l;for(arguments.length<=2?(l=e[b],b++):l=a;b<=v;)l=t(l,e[b],b),b++;return l}}return a}var Pm=Object.prototype.hasOwnProperty;function Or(e,t){return Pm.call(e,t)}function Ry(e){let t=[];for(let a in e)Pm.call(e,a)&&t.push(a);return t}function Uy(){let e=new Map;return e.add=By,e.remove=qy,e}function By(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function qy(e,t){let a=this.get(e);a!==void 0&&($y(a,t),a.length||this.delete(e))}function Kr(e){return Array.isArray(e)}function kp(e){return Kr(e)?e:[e]}function Fy(e,t){return e!==void 0&&t(e)?e:void 0}function Pr(e,t){return e!==void 0&&t(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(t)}'.`)}function Ha(e)Line truncated
|
||||
Node ${Lt(L.kind)} was unexpected.`,de||W)}e.failBadSyntaxKind=W;function k(L,se,de,Se){L||(se=se?`False expression: ${se}`:"False expression.",de&&(se+=`\r
|
||||
Verbose Debug Information: `+(typeof de=="string"?de:de())),y(se,Se||k))}e.assert=k;function C(L,se,de,Se,$e){if(L!==se){let Ze=de?Se?`${de} ${Se}`:de:"";y(`Expected ${L} === ${se}. ${Ze}`,$e||C)}}e.assertEqual=C;function R(L,se,de,Se){L>=se&&y(`Expected ${L} < ${se}. ${de||""}`,Se||R)}e.assertLessThan=R;function ue(L,se,de){L>se&&y(`Expected ${L} <= ${se}`,de||ue)}e.assertLessThanOrEqual=ue;function xe(L,se,de){L<se&&y(`Expected ${L} >= ${se}`,de||xe)}e.assertGreaterThanOrEqual=xe;function ge(L,se,de){L==null&&y(se,de||ge)}e.assertIsDefined=ge;function me(L,se,de){return ge(L,se,de||me),L}e.checkDefined=me;function I(L,se,de){for(let Se of L)ge(Se,se,de||I)}e.assertEachIsDefined=I;function ae(L,se,de){return I(L,se,de||ae),L}e.checkEachDefined=ae;function Le(L,se="Illegal value:",de){let Se=typeof L=="object"&&Or(L,"kind")&&Or(L,"pos")?"SyntaxKind: "+Lt(L.kind):JSON.stringify(L);return y(`${se} ${Se}`,de||Le)}e.assertNever=Le;function V(L,se,de,Se){H(1,"assertEachNode")&&k(se===void 0||Kp(L,se),de||"Unexpected node.",()=>`Node array did not pass test '${bn(se)}'.`,Se||V)}e.assertEachNode=V;function oe(L,se,de,Se){H(1,"assertNode")&&k(L!==void 0&&(se===void 0||se(L)),de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} did not pass test '${bn(se)}'.`,Se||oe)}e.assertNode=oe;function G(L,se,de,Se){H(1,"assertNotNode")&&k(L===void 0||se===void 0||!se(L),de||"Unexpected node.",()=>`Node ${Lt(L.kind)} should not have passed test '${bn(se)}'.`,Se||G)}e.assertNotNode=G;function mt(L,se,de,Se){H(1,"assertOptionalNode")&&k(se===void 0||L===void 0||se(L),de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} did not pass test '${bn(se)}'.`,Se||mt)}e.assertOptionalNode=mt;function ir(L,se,de,Se){H(1,"assertOptionalToken")&&k(se===void 0||L===void 0||L.kind===se,de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} was not a '${Lt(se)}' token.`,Se||ir)}e.assertOptionalToken=ir;function gn(L,se,de){H(1,"assertMissingNode")&&k(L===void 0,se||"Unexpected node.",()=>`Node ${Lt(L.kind)} was unexpected'.`,de||gn)}e.assertMissingNode=gn;function ar(L){}e.type=ar;function bn(L){if(typeof L!="function")return"";if(Or(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),de=/^function\s+([\w$]+)\s*\(/.exec(se);return de?de[1]:""}}e.getFunctionName=bn;function In(L){return`{ name: ${h_(L.escapedName)}; flags: ${ct(L.flags)}; declarations: ${jp(L.declarations,se=>Lt(se.kind))} }`}e.formatSymbol=In;function He(L=0,se,de){let Se=jr(se);if(L===0)return Se.length>0&&Se[0][0]===0?Se[0][1]:"0";if(de){let $e=[],Ze=L;for(let[_t,Pt]of Se){if(_t>L)break;_t!==0&&_t&L&&($e.push(Pt),Ze&=~_t)}if(Ze===0)return $e.join("|")}else for(let[$e,Ze]of Se)if($e===L)return Ze;return L.toString()}e.formatEnum=He;let sr=new Map;function jr(L){let se=sr.get(L);if(se)return se;let de=[];for(let $e in L){let Ze=L[$e];typeof Ze=="number"&&de.push([Ze,$e])}let Se=Iy(de,($e,Ze)=>Nm($e[0],Ze[0]));return sr.set(L,Se),Se}function Lt(L){return He(L,Ae,!1)}e.formatSyntaxKind=Lt;function qn(L){return He(L,jm,!1)}e.formatSnippetKind=qn;function On(L){return He(L,Mr,!1)}e.formatScriptKind=On;function jt(L){return He(L,rn,!0)}e.formatNodeFlags=jt;function gt(L){return He(L,Om,!0)}e.formatNodeCheckFlags=gt;function Ke(L){return He(L,rf,!0)}e.formatModifierFlags=Ke;function Fn(L){return He(L,Lm,!0)}e.formatTransformFlags=Fn;function Zt(L){return He(L,Jm,!0)}e.formatEmitFlags=Zt;function ct(L){return He(L,af,!0)}e.formatSymbolFlags=ct;function st(L){return He(L,an,!0)}e.formatTypeFlags=st;function qt(L){return He(L,Mm,!0)}e.formatSignatureFlags=qt;function Jt(L){return He(L,sf,!0)}e.formatObjectFlags=Jt;function lt(L){return He(L,Up,!0)}e.formatFlowFlags=lt;function _r(L){return He(L,Im,!0)}e.formatRelationComparisonResult=_r;function ht(L){return He(L,CheckMode,!0)}e.formatCheckMode=ht;function vn(L){return He(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=vn;function bt(L){return He(L,TypeFacts,!0)}e.formatTypeFacts=bt;let ln=!1,it;function Ft(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",de=this.flags&-2048;return`${se}${de?` (${lt(de)})`:""}`}},__debugFlowFlags:{get(){return He(this.flags,Up,!0)}},__debugToString:{value(){return xr(this)}}})}function sn(L){return ln&&(typeof Object.setPrototypeOf=="function"?(it||(it=Object.create(Object.prototype),Ft(it)),Object.setPrototypeOf(L,it)):Ft(L)),L}e.attachFlowNodeDebugInfo=sn;let or;function br(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function vr(L){ln&&(typeof Object.setPrototypeOf=="function"?(or||
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Le(this)}}}e.DebugTypeMapper=Jr;function Wn(L){return e.isDebugging?Object.setPrototypeOf(L,Jr.prototype):L}e.attachDebugPrototypeIfDebug=Wn;function Pe(L){return console.log(xr(L))}e.printControlFlowGraph=Pe;function xr(L){let se=-1;function de(u){return u.id||(u.id=se,se--),u.id}let Se;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Se||(Se={}));let $e;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})($e||($e={}));let Ze=2032,_t=882,Pt=Object.create(null),St=[],ut=[],Rr=ke(L,new Set);for(let u of St)u.text=at(u.flowNode,u.circular),he(u);let Tr=Ye(Rr),Mn=tt(Tr);return Xe(Rr,0),un();function Gn(u){return!!(u.flags&128)}function Ei(u){return!!(u.flags&12)&&!!u.antecedent}function U(u){return!!(u.flags&Ze)}function K(u){return!!(u.flags&_t)}function Z(u){let Me=[];for(let je of u.edges)je.source===u&&Me.push(je.target);return Me}function we(u){let Me=[];for(let je of u.edges)je.target===u&&Me.push(je.source);return Me}function ke(u,Me){let je=de(u),B=Pt[je];if(B&&Me.has(u))return B.circular=!0,B={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},St.push(B),B;if(Me.add(u),!B)if(Pt[je]=B={id:je,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},St.push(B),Ei(u))for(let ze of u.antecedent)Ee(B,ze,Me);else U(u)&&Ee(B,u.antecedent,Me);return Me.delete(u),B}function Ee(u,Me,je){let B=ke(Me,je),ze={source:u,target:B};ut.push(ze),u.edges.push(ze),B.edges.push(ze)}function he(u){if(u.level!==-1)return u.level;let Me=0;for(let je of we(u))Me=Math.max(Me,he(je)+1);return u.level=Me}function Ye(u){let Me=0;for(let je of Z(u))Me=Math.max(Me,Ye(je));return Me+1}function tt(u){let Me=O(Array(u),0);for(let je of St)Me[je.level]=Math.max(Me[je.level],je.text.length);return Me}function Xe(u,Me){if(u.lane===-1){u.lane=Me,u.endLane=Me;let je=Z(u);for(let B=0;B<je.length;B++){B>0&&Me++;let ze=je[B];Xe(ze,Me),ze.endLane>u.endLane&&(Me=ze.endLane)}u.endLane=Me}}function De(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function xn(u){let Me=bi(u);return qd(Me,u,!1)}function at(u,Me){let je=De(u.flags);if(Me&&(je=`${je}#${de(u)}`),Gn(u)){let B=[],{switchStatement:ze,clauseStart:_n,clauseEnd:Ge}=u.node;for(let Qe=_n;Qe<Ge;Qe++){let Nt=ze.caseBlock.clauses[Qe];Tv(Nt)?B.push("default"):B.push(xn(Nt.expression))}je+=` (${B.join(", ")})`}else K(u)&&u.node&&(je+=` (${xn(u.node)})`);return Me==="circularity"?`Circular(${je})`:je}function un(){let u=Mn.length,Me=Gy(St,0,Ge=>Ge.lane)+1,je=O(Array(Me),""),B=Mn.map(()=>Array(Me)),ze=Mn.map(()=>O(Array(Me),0));for(let Ge of St){B[Ge.level][Ge.lane]=Ge;let Qe=Z(Ge);for(let Et=0;Et<Qe.length;Et++){let It=Qe[Et],zt=8;It.lane===Ge.lane&&(zt|=4),Et>0&&(zt|=1),Et<Qe.length-1&&(zt|=2),ze[Ge.level][It.lane]|=zt}Qe.length===0&&(ze[Ge.level][Ge.lane]|=16);let Nt=we(Ge);for(let Et=0;Et<Nt.length;Et++){let It=Nt[Et],zt=4;Et>0&&(zt|=1),Et<Nt.length-1&&(zt|=2),ze[Ge.level-1][It.lane]|=zt}}for(let Ge=0;Ge<u;Ge++)for(let Qe=0;Qe<Me;Qe++){let Nt=Ge>0?ze[Ge-1][Qe]:0,Et=Qe>0?ze[Ge][Qe-1]:0,It=ze[Ge][Qe];It||(Nt&8&&(It|=12),Et&2&&(It|=3),ze[Ge][Qe]=It)}for(let Ge=0;Ge<u;Ge++)for(let Qe=0;Qe<je.length;Qe++){let Nt=ze[Ge][Qe],Et=Nt&4?"\u2500":" ",It=B[Ge][Qe];It?(_n(Qe,It.text),Ge<u-1&&(_n(Qe," "),_n(Qe,qe(Et,Mn[Ge]-It.text.length)))):Ge<u-1&&_n(Qe,qe(Et,Mn[Ge]+1)),_n(Qe,ei(Nt)),_n(Qe,Nt&8&&Ge<u-1&&!B[Ge+1][Qe]?"\u2500":" ")}return`
|
||||
${je.join(`
|
||||
`)}
|
||||
`;function _n(Ge,Qe){je[Ge]+=Qe}}function ei(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function O(u,Me){if(u.fill)u.fill(Me);else for(let je=0;je<u.length;je++)u[je]=Me;return u}function qe(u,Me){if(u.repeat)return Me>0?u.repeat(Me):"";let je="";for(;je.length<Me;)je+=u;return je}}e.formatControlFlowGraph=xr})(q||(q={}));var D3=Date.now,Ad=()=>{},Ky=()=>{},hl,Ae=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,Z=l;continue}l++}return q.assert(ke!==void 0),C=we,ke}function Lt(U){let K=l;if(l++,l>=H)return G(E.Unexpected_end_of_text),"";let Z=V(l);switch(l++,Z){case 48:if(l>=H||!hi(V(l)))return"\0";case 49:case 50:case 51:l<H&&Ap(V(l))&&l++;case 52:case 53:case 54:case 55:if(l<H&&Ap(V(l))&&l++,R|=2048,U&6){let Ee=parseInt(v.substring(K+1,l),8);return U&4&&!(U&32)&&Z!==48?G(E.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,K,l-K,"\\x"+Ee.toString(16).padStart(2,"0")):G(E.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,K,l-K,"\\x"+Ee.toString(16).padStart(2,"0")),String.fromCharCode(Ee)}return v.substring(K,l);case 56:case 57:return R|=2048,U&6?(U&4&&!(U&32)?G(E.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,K,l-K):G(E.Escape_sequence_0_is_not_allowed,K,l-K,v.substring(K,l)),String.fromCharCode(Z)):v.substring(K,l);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(l<H&&V(l)===123){l-=2;let Ee=qn(!!(U&6));return U&17||(R|=2048,U&6&&G(E.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,K,l-K)),Ee}for(;l<K+6;l++)if(!(l<H&&Ep(V(l))))return R|=2048,U&6&&G(E.Hexadecimal_digit_expected),v.substring(K,l);R|=1024;let we=parseInt(v.substring(K+2,l),16),ke=String.fromCharCode(we);if(U&16&&we>=55296&&we<=56319&&l+6<H&&v.substring(l,l+2)==="\\u"&&V(l+2)!==123){let Ee=l,he=l+2;for(;he<Ee+6;he++)if(!Ep(V(he)))return ke;let Ye=parseInt(v.substring(Ee+2,he),16);if(Ye>=56320&&Ye<=57343)return l=he,ke+String.fromCharCode(Ye)}return ke;case 120:for(;l<K+4;l++)if(!(l<H&&Ep(V(l))))return R|=2048,U&6&&G(E.Hexadecimal_digit_expected),v.substring(K,l);return R|=4096,String.fromCharCode(parseInt(v.substring(K+2,l),16));case 13:l<H&&V(l)===10&&l++;case 10:case 8232:case 8233:return"";default:return(U&16||U&4&&!(U&8)&&Nr(Z,e))&&G(E.This_character_cannot_be_escaped_in_a_regular_expression,l-2,2),String.fromCharCode(Z)}}function qn(U){let K=l;l+=3;let Z=l,we=In(1,!1),ke=we?parseInt(we,16):-1,Ee=!1;return ke<0?(U&&G(E.Hexadecimal_digit_expected),Ee=!0):ke>1114111&&(U&&G(E.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,Z,l-Z),Ee=!0),l>=H?(U&&G(E.Unexpected_end_of_text),Ee=!0):V(l)===125?l++:(U&&G(E.Unterminated_Unicode_escape_sequence),Ee=!0),Ee?(R|=2048,v.substring(K,l)):(R|=8,Od(ke))}function On(){if(l+5<H&&V(l+1)===117){let U=l;l+=2;let K=bn(4,!1);return l=U,K}return-1}function jt(){if(ae(l+1)===117&&ae(l+2)===123){let U=l;l+=3;let K=In(1,!1),Z=K?parseInt(K,16):-1;return l=U,Z}return-1}function gt(){let U="",K=l;for(;l<H;){let Z=ae(l);if(Nr(Z,e))l+=Wt(Z);else if(Z===92){if(Z=jt(),Z>=0&&Nr(Z,e)){U+=qn(!0),K=l;continue}if(Z=On(),!(Z>=0&&Nr(Z,e)))break;R|=1024,U+=v.substring(K,l),U+=Od(Z),l+=6,K=l}else break}return U+=v.substring(K,l),U}function Ke(){let U=C.length;if(U>=2&&U<=12){let K=C.charCodeAt(0);if(K>=97&&K<=122){let Z=lg.get(C);if(Z!==void 0)return k=Z}}return k=80}function Fn(U){let K="",Z=!1,we=!1;for(;;){let ke=V(l);if(ke===95){R|=512,Z?(Z=!1,we=!0):G(we?E.Multiple_consecutive_numeric_separators_are_not_permitted:E.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(Z=!0,!hi(ke)||ke-48>=U)break;K+=v[l],l++,we=!1}return V(l-1)===95&&G(E.Numeric_separators_are_not_allowed_here,l-1,1),K}function Zt(){return V(l)===110?(C+="n",R&384&&(C=Ub(C)+"n"),l++,10):(C=""+(R&128?parseInt(C.slice(2),2):R&256?parseInt(C.slice(2),8):+C),9)}function ct(){for(y=l,R=0;;){if(W=l,l>=H)return k=1;let U=ae(l);if(l===0&&U===35&&$m(v,l)){if(l=Qm(v,l),t)continue;return k=6}switch(U){case 10:case 13:if(R|=1,t){l++;continue}else return U===13&&l+1<H&&V(l+1)===10?l+=2:l++,k=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){l++;continue}else{for(;l<H&&o_(V(l));)l++;return k=5}case 33:return V(l+1)===61?V(l+2)===61?(l+=3,k=38):(l+=2,k=36):(l++,k=54);case 34:case 39:return C=sr(),k=11;case 96:return k=jr(!1);case 37:return V(l+1)===61?(l+=2,k=70):(l++,k=45);case 38:return V(l+1)===38?V(l+2)===61?(l+=3,k=77):(l+=2,k=56):V(l+1)===61?(l+=2,k=74):(l++,k=51);case 40:return l++,k=21;case 41:return l++,k=22;case 42:if(V(l+1)===61)return l+=2,k=67;if(V(l+1)===42)return V(l+2)===61?(l+=3,k=68):(l+=2,k=43);if(l++,xe&&(R&32768)===0&&R&1){R|=32768;continue}return k=42;case 43:return V(l+1)===43?(l+=2,k=46):V(l+1)===61?(l+=2,k=65):(l++,k=40);case 44:return l++,k=28;case 45:return V(l+1)===45?(l+=2,k=47):V(l+1)===61?(l+=2,k=66):(l++,k=41);case 46:return hi(V(l+1))?(ir(),k=9):V(l+1)===46&&V(l+2)===46?(l+=3,k=26):(l++,k=25);case 47:if(V(l+1)===47){for(l+=2;l<H&&!Cn(V(l));)l++;if(ue=ln(ue,v.slice(W,l),hg,W),t)continue;return k=2}if(V(l+1)===42){l+=2;let he=V(l)===42&&V(l+1)!==47,Ye=!1,tt=W;for(;l<H;){let Xe=V(l);if(Xe===42&&V(l+1)===47){l+=2,Ye=!0;break}l++,Cn(Xe)&&(tt=l,R|=1)}if(he&&st()&&(R|=2),ue=ln(ue,v.slice(tt,l),yg,tt),Ye||G(E.Asterisk_Slash_expected),t)continue;return Ye||(R|=4),k=3}return V(l+1)===61?(l+=2,k=69):(l++,k=44);case 48:if(l+2<H&&(V(l+1)===88||V(l+1)===120))return l+=2,C=In(1,!0),C||(G(E.Hexadecimal_digit_expected),C="0"),C="0x"+C,R|=64,k=Zt();if(l+2<H&&(V(l+1)===66||V(l+1)===98))return l+=2,C=Fn(2),C||(G(E.Binary_digit_expected),C="0"),C="0b"+C,R|=128,k=Zt();if(l+2<H&&(V(l+1)===79||V(l+1)===111))return l+=2,C=Fn(8),C||(G(E.Octal_digit_expected),C="0"),C="0o"+C,R|=256,k=Zt();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return k=ir();case 58:return l++,k=59;case 59:return l++,k=27;case 60:if(Qi(v,l)){if(l=Ra(v,l,G),t)continue;return k=7}return V(l+1)===60?V(l+2)===61?(l+=3,k=71):(l+=2,k=48):V(l+1)===61?(l+=2,k=33):a===1&&V(l+1)===47&&V(l+2)!==42?(l+=2,k=31):(l++,k=30);case 61:if(Qi(v,l)){if(l=Ra(v,l,G),t)continue;return k=7}retu
Line truncated
|
||||
`)),s}function Ya(e){let t=e.emitNode;return t&&t.flags||0}function C2(e,t,a){q.assertGreaterThanOrEqual(t,0),q.assertGreaterThanOrEqual(a,0),q.assertLessThanOrEqual(t,e.length),q.assertLessThanOrEqual(t+a,e.length)}function gl(e){return e.kind===245&&e.expression.kind===11}function Sf(e){return!!(Ya(e)&2097152)}function Fd(e){return Sf(e)&&Vf(e)}function D2(e){return et(e.name)&&!e.initializer}function zd(e){return Sf(e)&&es(e)&&Kp(e.declarationList.declarations,D2)}function P2(e,t){let a=e.kind===170||e.kind===169||e.kind===219||e.kind===220||e.kind===218||e.kind===261||e.kind===282?Zp(Ag(t,e.pos),qp(t,e.pos)):qp(t,e.pos);return $r(a,s=>s.end<=e.end&&t.charCodeAt(s.pos+1)===42&&t.charCodeAt(s.pos+2)===42&&t.charCodeAt(s.pos+3)!==47)}function N2(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function I2(e){return e&&e.kind===242&&Tf(e.parent)}function Vd(e){let t=e.kind;return(t===212||t===213)&&e.expression.kind===108}function aa(e){return!!e&&!!(e.flags&524288)}function O2(e){return!!e&&!!(e.flags&16777216)}function M2(e){for(;El(e,!0);)e=e.right;return e}function L2(e){return et(e)&&e.escapedText==="exports"}function j2(e){return et(e)&&e.escapedText==="module"}function b1(e){return(yr(e)||v1(e))&&j2(e.expression)&&b_(e)==="exports"}function wf(e){let t=R2(e);return t===5||aa(e)?t:0}function J2(e){return s_(e.arguments)===3&&yr(e.expression)&&et(e.expression.expression)&&Pn(e.expression.expression)==="Object"&&Pn(e.expression.name)==="defineProperty"&&Ol(e.arguments[1])&&g_(e.arguments[0],!0)}function v1(e){return Za(e)&&Ol(e.argumentExpression)}function k_(e,t){return yr(e)&&(!t&&e.expression.kind===110||et(e.name)&&g_(e.expression,!0))||x1(e,t)}function x1(e,t){return v1(e)&&(!t&&e.expression.kind===110||Df(e.expression)||k_(e.expression,!0))}function g_(e,t){return Df(e)||k_(e,t)}function R2(e){if(Bf(e)){if(!J2(e))return 0;let t=e.arguments[0];return L2(t)||b1(t)?8:k_(t)&&b_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!A1(e.left)||U2(M2(e))?0:g_(e.left.expression,!0)&&b_(e.left)==="prototype"&&Uf(q2(e))?6:B2(e.left)}function U2(e){return yv(e)&&sa(e.expression)&&e.expression.text==="0"}function kf(e){if(yr(e))return e.name;let t=Af(e.argumentExpression);return sa(t)||Il(t)?t:e}function b_(e){let t=kf(e);if(t){if(et(t))return t.escapedText;if(Il(t)||sa(t))return Ua(t.text)}}function B2(e){if(e.expression.kind===110)return 4;if(b1(e))return 2;if(g_(e.expression,!0)){if(hb(e.expression))return 3;let t=e;for(;!et(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&b_(t)==="exports")&&k_(e))return 1;if(g_(e,!0)||Za(e)&&tb(e))return 5}return 0}function q2(e){for(;ra(e.right);)e=e.right;return e.right}function F2(e){return Ll(e)&&ra(e.expression)&&wf(e.expression)!==0&&ra(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function z2(e){switch(e.kind){case 244:let t=Wp(e);return t&&t.initializer;case 173:return e.initializer;case 304:return e.initializer}}function Wp(e){return es(e)?ef(e.declarationList.declarations):void 0}function V2(e){return Si(e)&&e.body&&e.body.kind===268?e.body:void 0}function Ef(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function W2(e,t){let a;N2(e)&&x2(e)&&Zi(e.initializer)&&(a=Dn(a,Wd(e,e.initializer.jsDoc)));let s=e;for(;s&&s.parent;){if(Zi(s)&&(a=Dn(a,Wd(e,s.jsDoc))),s.kind===170){a=Dn(a,(t?Ug:Rg)(s));break}if(s.kind===169){a=Dn(a,(t?qg:Bg)(s));break}s=Y2(s)}return a||Tt}function Wd(e,t){let a=Oy(t);return Dm(t,s=>{if(s===a){let f=$r(s.tags,h=>G2(e,h));return s.tags===f?[s]:f}else return $r(s.tags,Pv)})}function G2(e,t){return!($f(t)||Mv(t))||!t.parent||!lh(t.parent)||!Ml(t.parent.parent)||t.parent.parent===e}function Y2(e){let t=e.parent;if(t.kind===304||t.kind===278||t.kind===173||t.kind===245&&e.kind===212||t.kind===254||V2(t)||El(e))return t;if(t.parent&&(Wp(t.parent)===e||El(t)))return t.parent;if(t.parent&&t.parent.parent&&(Wp(t.parent.parent)||z2(t.parent.parent)===e||F2(t.parent.parent)))return t.parent.parent}function Af(e,t){return Qf(e,t?-2147483647:1)}function H2(e){let t=X2(e);if(t&&aa(e)){let a=Fg(e);if(a)return a.class}return t}function X2(e){let t=Cf(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function $2(e){if(aa(e))return zg(e).map(t=>t.c
Line truncated
|
||||
`,te)+1)+4;function ne(Be){X||(X=$),Jn.push(Be),$+=Be.length}for(ze();Yi(5););Yi(4)&&(N=0,$=0);e:for(;;){switch(u()){case 60:vp(Jn),dr||(dr=O()),We(r($)),N=0,X=void 0;break;case 4:Jn.push(t.getTokenText()),N=0,$=0;break;case 42:let Be=t.getTokenText();N===1?(N=2,ne(Be)):(q.assert(N===0),N=1,$+=Be.length);break;case 5:q.assert(N!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();X!==void 0&&$+pt.length>X&&Jn.push(pt.slice(X-$)),$+=pt.length;break;case 1:break e;case 82:N=2,ne(t.getTokenValue());break;case 19:N=2;let hn=t.getTokenFullStart(),cn=t.getTokenEnd()-1,tn=c(cn);if(tn){fr||Vi(Jn),Hr.push(D(y.createJSDocText(Jn.join("")),fr??te,hn)),Hr.push(tn),Jn=[],fr=t.getTokenEnd();break}default:N=2,ne(t.getTokenText());break}N===2?_n(!1):ze()}let re=Jn.join("").trimEnd();Hr.length&&re.length&&Hr.push(D(y.createJSDocText(re),fr??te,dr)),Hr.length&&Ne&&q.assertIsDefined(dr,"having parsed tags implies that the end of the comment span should be set");let Oe=Ne&&Dt(Ne,Xt,Ot);return D(y.createJSDocComment(Hr.length?Dt(Hr,te,dr):re.length?re:void 0,Oe),te,Re)}function Vi(N){for(;N.length&&(N[0]===`
|
||||
`||N[0]==="\r");)N.shift()}function vp(N){for(;N.length;){let X=N[N.length-1].trimEnd();if(X==="")N.pop();else if(X.length<N[N.length-1].length){N[N.length-1]=X;break}else break}}function Qn(){for(;;){if(ze(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function wn(){if(!((u()===5||u()===4)&&Y(Qn)))for(;u()===5||u()===4;)ze()}function J(){if((u()===5||u()===4)&&Y(Qn))return"";let N=t.hasPrecedingLineBreak(),X=!1,$="";for(;N&&u()===42||u()===5||u()===4;)$+=t.getTokenText(),u()===4?(N=!0,X=!0,$=""):u()===42&&(N=!1),ze();return X?$:""}function r(N){q.assert(u()===60);let X=t.getTokenStart();ze();let $=pi(void 0),ne=J(),re;switch($.escapedText){case"author":re=K0(X,$,N,ne);break;case"implements":re=ey(X,$,N,ne);break;case"augments":case"extends":re=ty(X,$,N,ne);break;case"class":case"constructor":re=Gi(X,y.createJSDocClassTag,$,N,ne);break;case"public":re=Gi(X,y.createJSDocPublicTag,$,N,ne);break;case"private":re=Gi(X,y.createJSDocPrivateTag,$,N,ne);break;case"protected":re=Gi(X,y.createJSDocProtectedTag,$,N,ne);break;case"readonly":re=Gi(X,y.createJSDocReadonlyTag,$,N,ne);break;case"override":re=Gi(X,y.createJSDocOverrideTag,$,N,ne);break;case"deprecated":Wn=!0,re=Gi(X,y.createJSDocDeprecatedTag,$,N,ne);break;case"this":re=xd(X,$,N,ne);break;case"enum":re=ay(X,$,N,ne);break;case"arg":case"argument":case"param":return Wi(X,$,2,N);case"return":case"returns":re=X0(X,$,N,ne);break;case"template":re=Sd(X,$,N,ne);break;case"type":re=bd(X,$,N,ne);break;case"typedef":re=sy(X,$,N,ne);break;case"callback":re=oy(X,$,N,ne);break;case"overload":re=cy(X,$,N,ne);break;case"satisfies":re=ny(X,$,N,ne);break;case"see":re=$0(X,$,N,ne);break;case"exception":case"throws":re=Q0(X,$,N,ne);break;case"import":re=ry(X,$,N,ne);break;default:re=fe(X,$,N,ne);break}return re}function i(N,X,$,ne){return ne||($+=X-N),_($,ne.slice($))}function _(N,X){let $=O(),ne=[],re=[],Oe,Be=0,pt;function hn(Kn){pt||(pt=N),ne.push(Kn),N+=Kn.length}X!==void 0&&(X!==""&&hn(X),Be=1);let cn=u();e:for(;;){switch(cn){case 4:Be=0,ne.push(t.getTokenText()),N=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:q.assert(Be!==2&&Be!==3,"whitespace shouldn't come from the scanner while saving comment text");let Kn=t.getTokenText();pt!==void 0&&N+Kn.length>pt&&(ne.push(Kn.slice(pt-N)),Be=2),N+=Kn.length;break;case 19:Be=2;let _l=t.getTokenFullStart(),Ma=t.getTokenEnd()-1,ol=c(Ma);ol?(re.push(D(y.createJSDocText(ne.join("")),Oe??$,_l)),re.push(ol),ne=[],Oe=t.getTokenEnd()):hn(t.getTokenText());break;case 62:Be===3?Be=2:Be=3,hn(t.getTokenText());break;case 82:Be!==3&&(Be=2),hn(t.getTokenValue());break;case 42:if(Be===0){Be=1,N+=1;break}default:Be!==3&&(Be=2),hn(t.getTokenText());break}Be===2||Be===3?cn=_n(Be===3):cn=ze()}Vi(ne);let tn=ne.join("").trimEnd();if(re.length)return tn.length&&re.push(D(y.createJSDocText(tn),Oe??$)),Dt(re,$,t.getTokenEnd());if(tn.length)return tn}function c(N){let X=le(T);if(!X)return;ze(),wn();let $=d(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),ze();let re=X==="link"?y.createJSDocLink:X==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return D(re($,ne.join("")),N,t.getTokenEnd())}function d(){if(kt(u())){let N=O(),X=Ut();for(;Je(25);)X=D(y.createQualifiedName(X,u()===81?Yt(80,!1):Ut()),N);for(;u()===81;)It(),ze(),X=D(y.createJSDocMemberName(X,vt()),N);return X}}function T(){if(J(),u()===19&&ze()===60&&kt(ze())){let N=t.getTokenValue();if(F(N))return N}}function F(N){return N==="link"||N==="linkcode"||N==="linkplain"}function fe(N,X,$,ne){return D(y.createJSDocUnknownTag(X,i(N,O(),$,ne)),N)}function We(N){N&&(Ne?Ne.push(N):(Ne=[N],Xt=N.pos),Ot=N.end)}function Mt(){return J(),u()===19?m():void 0}function mr(){let N=Yi(23);N&&wn();let X=Yi(62),$=my();return X&&Hl(62),N&&(wn(),ft(64)&&At(),j(24)),{name:$,isBracketed:N}}function kn(N){switch(N.kind){case 151:return!0;case 189:return kn(N.elementType);default:return jf(N)&&et(N.typeName)&&N.typeName.escapedText==="Object"&&!N.typeArguments}}function Wi(N,X,$,ne){let re=Mt(),Oe=!re;J();let{name:Be,isBracketed:pt}=mr(),hn=J();Oe&&!Y(T)&&(re=Mt());let cn=i(N,O(),ne,hn),tn=H0(re,Be,$,ne);tn&&(re=tn,Oe=!0);let Kn=$===1?y.createJSDocPropertyTag(X,Be,pt,re,Oe,cn):y.createJSDocParameterTag(X,Be,pt,re,Oe,cn);return D(Kn,N)}function H0(N,X,$,ne){if(N&&kn(N.type)){let re=O(),Oe,Be;for(;Oe=le(()=>Tp($,ne,X));)Oe.kind===342||Oe.kind===349?Be=An(Be,Oe):Oe.kind===346&&un(Oe.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Be){let pt=D(y.createJSDocTypeLiteral(Be,N.type.kind===189),re);return D(y.createJSDocTypeExpression(pt),re)}}}function X0(N,X,$,ne){nn(Ne,Iv)&&at(X.pos,t.getTokenStart(),E._0_tag_already_specified,h_(X.escapedText));let re=Mt();return D(y.createJSDocReturnTag(X,re,i(N,O(),$,ne)),N)}function bd(N,X,$,ne){nn(Ne,$f)&&at(X.pos,t.getTokenStart(),E._0_tag_already_specified,h_(X.escapedText));let re=m(!0),Oe=$!==void 0&&ne!==void 0?i(N,O(),$,ne):void 0;return D(y.createJSDocTypeTag(X,re,Oe),N)}funct
Line truncated
|
||||
`&&f[s-1]==="\r"?s-1:s}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=Uy();return this.forEachChild(f),e;function t(h){let b=s(h);b&&e.add(b,h)}function a(h){let b=e.get(h);return b||e.set(h,b=[]),b}function s(h){let b=hf(h);return b&&(If(b)&&yr(b.expression)?b.expression.name.text:l1(b)?getNameFromPropertyName(b):void 0)}function f(h){switch(h.kind){case 263:case 219:case 175:case 174:let b=h,v=s(b);if(v){let y=a(v),W=Va(y);W&&b.parent===W.parent&&b.symbol===W.symbol?b.body&&!W.body&&(y[y.length-1]=b):y.push(b)}$t(h,f);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(h),$t(h,f);break;case 170:if(!E_(h,31))break;case 261:case 209:{let y=h;if(l2(y.name)){$t(y.name,f);break}y.initializer&&f(y.initializer)}case 307:case 173:case 172:t(h);break;case 279:let l=h;l.exportClause&&(rh(l.exportClause)?Bn(l.exportClause.elements,f):f(l.exportClause.name));break;case 273:let H=h.importClause;H&&(H.name&&t(H.name),H.namedBindings&&(H.namedBindings.kind===275?t(H.namedBindings):Bn(H.namedBindings.elements,f)));break;case 227:wf(h)!==0&&t(h);default:$t(h,f)}}}},b6=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(s=>s)}getLineAndCharacterOfPosition(e){return Hm(this,e)}};function v6(){return{getNodeConstructor:()=>Zf,getTokenConstructor:()=>xh,getIdentifierConstructor:()=>Th,getPrivateIdentifierConstructor:()=>Sh,getSourceFileConstructor:()=>g6,getSymbolConstructor:()=>m6,getTypeConstructor:()=>h6,getSignatureConstructor:()=>y6,getSourceMapSourceConstructor:()=>b6}}var x6=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],ox=[...x6,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];Eb(v6());var ts=new Proxy({},{get:()=>!0});var Eh=ts["4.8"];function nr(e,t=!1){if(e!=null){if(Eh){if(t||Rl(e)){let a=i1(e);return a?[...a]:void 0}return}return e.modifiers?.filter(a=>!Ka(a))}}function wi(e,t=!1){if(e!=null){if(Eh){if(t||Kf(e)){let a=yf(e);return a?[...a]:void 0}return}return e.decorators?.filter(Ka)}}var Ah={};var Ul=new Proxy({},{get:(e,t)=>t});var Ch=Ul,Dh=Ul;var A=Ch,Bt=Dh;var w6=ts["5.0"],ye=Ae,k6=new Set([ye.AmpersandAmpersandToken,ye.BarBarToken,ye.QuestionQuestionToken]),E6=new Set([Ae.AmpersandAmpersandEqualsToken,Ae.AmpersandEqualsToken,Ae.AsteriskAsteriskEqualsToken,Ae.AsteriskEqualsToken,Ae.BarBarEqualsToken,Ae.BarEqualsToken,Ae.CaretEqualsToken,Ae.EqualsToken,Ae.GreaterThanGreaterThanEqualsToken,Ae.GreaterThanGreaterThanGreaterThanEqualsToken,Ae.LessThanLessThanEqualsToken,Ae.MinusEqualsToken,Ae.PercentEqualsToken,Ae.PlusEqualsToken,Ae.QuestionQuestionEqualsToken,Ae.SlashEqualsToken]),A6=new Set([ye.AmpersandAmpersandToken,ye.AmpersandToken,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.BarBarToken,ye.BarToken,ye.CaretToken,ye.EqualsEqualsEqualsToken,ye.EqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken,ye.GreaterThanEqualsToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanToken,ye.InKeyword,ye.InstanceOfKeyword,ye.LessThanEqualsToken,ye.LessThanLessThanToken,ye.LessThanToken,ye.MinusToken,ye.PercentToken,ye.PlusToken,ye.SlashToken]);function C6(e){return E6.has(e.kind)}function D6(e){return k6.has(e.kind)}function P6(e){return A6.has(e.kind)}function gr(e){return rt(e)}function Ph(e){return e.kind!==ye.SemicolonClassElement}function Fe(e,t){return nr(t)?.some(s=>s.kind===e)===!0}function Nh(e){let t=nr(e);return t==null?null:t[t.length-1]??null}function Ih(e){return e.kind===ye.CommaToken}function N6(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}function I6(e){return e.kind===ye.JSDocComment}function Oh(e){if(C6(e))return{type:A.AssignmentExpression,operator:gr(e.kind)};if(D6(e))return{type:A.LogicalExpression,operator:gr(e.kind)};if(P6(e))return{type:A.BinaryExpression,operator:gr(e.kind)};throw new Error(`Unexpected binary operator ${rt(e.kind)}`)}function C_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Zr(e,t){let[a,s]=e.map(f=>C_(f,t));return{end:
Line truncated
|
||||
`))return[];let t=[];for(let a of`*${e.value}*`.split(`
|
||||
`)){if(a=a.trimStart(),!a.startsWith("*"))return[];t.push(a)}return t}var x0=new WeakMap;function K4(e){return is(x0,e,Q4)}function T0(e){x0.delete(e)}function dd(e){return K4(e).length>0}function S0(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let s=e[a];if(t&&Kt(s)===Qt(t)&&dd(s)&&dd(t)&&(e.splice(a+1,1),s.value+="*//*"+t.value,s.range=[Qt(s),Kt(t)],T0(s)),!y0(s)&&!rs(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}function Z4(e){return e!==null&&typeof e=="object"}var w0=Z4;var I_=null;function O_(e){if(I_!==null&&typeof I_.property){let t=I_;return I_=O_.prototype=null,t}return I_=O_.prototype=e??Object.create(null),new O_}var e3=10;for(let e=0;e<=e3;e++)O_();function md(e){return O_(e)}function t3(e,t="type"){md(e);function a(s){let f=s[t],h=e[f];if(!Array.isArray(h))throw Object.assign(new Error(`Missing visitor keys for '${f}'.`),{node:s});return h}return a}var k0=t3;var M=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],E0={ArrayExpression:M[0],AssignmentExpression:M[1],BinaryExpression:M[1],InterpreterDirective:[],Directive:M[2],DirectiveLiteral:[],BlockStatement:M[3],BreakStatement:M[4],CallExpression:M[5],CatchClause:["param","body"],ConditionalExpression:M[6],ContinueStatement:M[4],DebuggerStatement:[],DoWhileStatement:M[7],EmptyStatement:[],ExpressionStatement:M[8],File:["program"],ForInStatement:M[9],ForStatement:["init","test","update","body"],FunctionDeclaration:M[10],FunctionExpression:M[10],Identifier:["typeAnnotation","decorators"],IfStatement:M[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:M[1],MemberExpression:M[11],NewExpression:M[5],Program:M[3],ObjectExpression:M[12],ObjectMethod:M[13],ObjectProperty:M[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:M[15],SequenceExpression:M[16],ParenthesizedExpression:M[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:M[15],TryStatement:["block","handler","finalizer"],UnaryExpression:M[15],UpdateExpression:M[15],VariableDeclaration:["declarations"],VariableDeclarator:M[17],WhileStatement:M[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:M[18],ClassExpression:M[19],ClassDeclaration:M[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:M[20],ExportSpecifier:["local","exported"],ForOfStatement:M[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:M[21],ImportNamespaceSpecifier:M[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:M[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:M[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:M[15],AwaitExpression:M[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:M[22],OptionalMemberExpression:M[11],OptionalCallExpression:M[5],ClassProperty:M[23],ClassPrivateProperty:M[23],ClassPrivateMethod:M[13],PrivateName:M[24],StaticBlock:M[18],ImportAttribute:M[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:M[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:M[27],DeclareClass:["id","ty
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(N0,"").trimEnd();let s=Object.create(null),f=hr(0,e,I0,"").replace(N0,"").trimEnd(),h;for(;h=I0.exec(e);){let b=hr(0,h[2],c3,"");if(typeof s[h[1]]=="string"||Array.isArray(s[h[1]])){let v=s[h[1]];s[h[1]]=[...p3,...Array.isArray(v)?v:[v],b]}else s[h[1]]=b}return{comments:f,pragmas:s}}var L0=["noformat","noprettier"],j0=["format","prettier"];function f3(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var J0=f3;function R0(e){let t=J0(e);t&&(e=e.slice(t.length+1));let a=O0(e),{pragmas:s,comments:f}=M0(a);return{shebang:t,text:e,pragmas:s,comments:f}}function U0(e){let{pragmas:t}=R0(e);return j0.some(a=>yd(t,a))}function B0(e){let{pragmas:t}=R0(e);return L0.some(a=>yd(t,a))}function d3(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:U0,hasIgnorePragma:B0,locStart:Qt,locEnd:Kt,...e}}var q0=d3;var F0=/^[^"'`]*<\/|^[^/]{2}.*\/>/m;function m3(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var z0=m3;var V0="module",W0="commonjs",G0=[V0,W0];function Y0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return V0;if(/\.(?:cjs|cts)$/i.test(e))return W0}}var h3={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0,onUnsupportedTypeScriptVersion:"ignore"};function y3(e){let{message:t,location:a}=e;if(!a)return e;let{start:s,end:f}=a;return u0(t,{loc:{start:{line:s.line,column:s.column+1},end:{line:f.line,column:f.column+1}},cause:e})}var g3=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function b3(e,t){let a=[{...h3,filePath:t}],s=Y0(t);if(s?a=a.map(h=>({...h,sourceType:s})):a=G0.flatMap(h=>a.map(b=>({...b,sourceType:h}))),g3(t))return a;let f=F0.test(e);return[f,!f].flatMap(h=>a.map(b=>({...b,jsx:h})))}function v3(e,t){let a=t?.filepath;typeof a!="string"&&(a=void 0);let s=z0(e),f=b3(e,a),h;try{h=p0(f.map(b=>()=>l0(s,b)))}catch({errors:[b]}){throw y3(b)}return P0(h,{text:e,astType:"typescript"})}var x3=q0(v3);return vy(T3);});
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
var hy=Object.defineProperty;var Sd=(e,t)=>{for(var a in t)hy(e,a,{get:t[a],enumerable:!0})};var Y0={};Sd(Y0,{parsers:()=>yd});var yd={};Sd(yd,{typescript:()=>y3});var yy=()=>()=>{},La=yy;var ja=(e,t)=>(a,s,...f)=>a|1&&s==null?void 0:(t.call(s)??s[e]).apply(s,f);var gy=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},by=ja("replaceAll",function(){if(typeof this=="string")return gy}),hr=by;var km="6.0";var Tt=[],vy=new Map;function s_(e){return e!==void 0?e.length:0}function Bn(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let s=t(e[a],a);if(s)return s}}function xy(e,t){if(e!==void 0)for(let a=0;a<e.length;a++){let s=t(e[a],a);if(s!==void 0)return s}}function wd(e,t,a){let s=[];q.assertEqual(e.length,t.length);for(let f=0;f<e.length;f++)s.push(a(e[f],t[f],f));return s}function Qp(e,t){if(e!==void 0){for(let a=0;a<e.length;a++)if(!t(e[a],a))return!1}return!0}function Em(e,t,a){if(e!==void 0)for(let s=a??0;s<e.length;s++){let f=e[s];if(t(f,s))return f}}function Sp(e,t,a){if(e===void 0)return-1;for(let s=a??0;s<e.length;s++)if(t(e[s],s))return s;return-1}function Ty(e,t,a=ef){if(e!==void 0){for(let s=0;s<e.length;s++)if(a(e[s],t))return!0}return!1}function $r(e,t){if(e!==void 0){let a=e.length,s=0;for(;s<a&&t(e[s]);)s++;if(s<a){let f=e.slice(0,s);for(s++;s<a;){let h=e[s];t(h)&&f.push(h),s++}return f}}return e}function Lp(e,t){let a;if(e!==void 0){a=[];for(let s=0;s<e.length;s++)a.push(t(e[s],s))}return a}function Am(e){let t=[];for(let a=0;a<e.length;a++){let s=e[a];s&&(Kr(s)?Dn(t,s):t.push(s))}return t}function Cm(e,t){let a;if(e!==void 0)for(let s=0;s<e.length;s++){let f=t(e[s],s);f&&(Kr(f)?a=Dn(a,f):a=An(a,f))}return a??Tt}function Sy(e,t){let a;if(e!==void 0)for(let s=0;s<e.length;s++){let f=e[s],h=t(f,s);(a||f!==h||Kr(h))&&(a||(a=e.slice(0,s)),Kr(h)?Dn(a,h):a.push(h))}return a??e}function wy(e,t){let a=[];if(e!==void 0)for(let s=0;s<e.length;s++){let f=t(e[s],s);f!==void 0&&a.push(f)}return a}function nn(e,t){if(e!==void 0)if(t!==void 0){for(let a=0;a<e.length;a++)if(t(e[a]))return!0}else return e.length>0;return!1}function Kp(e,t){return t===void 0||t.length===0?e:e===void 0||e.length===0?t:[...e,...t]}function ky(e,t,a=ef){if(e===void 0||t===void 0)return e===t;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(!a(e[s],t[s],s))return!1;return!0}function An(e,t){return t===void 0?e:e===void 0?[t]:(e.push(t),e)}function jp(e,t){return t<0?e.length+t:t}function Dn(e,t,a,s){if(t===void 0||t.length===0)return e;if(e===void 0)return t.slice(a,s);a=a===void 0?0:jp(t,a),s=s===void 0?t.length:jp(t,s);for(let f=a;f<s&&f<t.length;f++)t[f]!==void 0&&e.push(t[f]);return e}function Ey(e,t,a){return Ty(e,t,a)?!1:(e.push(t),!0)}function Ay(e,t,a){return e!==void 0?(Ey(e,t,a),e):[t]}function Cy(e,t){return e.length===0?Tt:e.slice().sort(t)}var S3=Array.prototype.at?(e,t)=>e?.at(t):(e,t)=>{if(e!==void 0&&(t=jp(e,t),t<e.length))return e[t]};function Zp(e){return e===void 0||e.length===0?void 0:e[0]}function Va(e){return e===void 0||e.length===0?void 0:e[e.length-1]}function Dy(e){return q.assert(e.length!==0),e[e.length-1]}function Py(e){return e!==void 0&&e.length===1?e[0]:void 0}function Ny(e,t,a,s,f){return Iy(e,a(t),a,s,f)}function Iy(e,t,a,s,f){if(!nn(e))return-1;let h=f??0,b=e.length-1;for(;h<=b;){let v=h+(b-h>>1),l=a(e[v],v);switch(Math.sign(s(l,t))){case-1:h=v+1;break;case 0:return v;case 1:b=v-1;break}}return~h}function Oy(e,t,a,s,f){if(e&&e.length>0){let h=e.length;if(h>0){let b=s===void 0||s<0?0:s,v=f===void 0||b+f>h-1?h-1:b+f,l;for(arguments.length<=2?(l=e[b],b++):l=a;b<=v;)l=t(l,e[b],b),b++;return l}}return a}var Dm=Object.prototype.hasOwnProperty;function Or(e,t){return Dm.call(e,t)}function My(e){let t=[];for(let a in e)Dm.call(e,a)&&t.push(a);return t}function Ly(){let e=new Map;return e.add=jy,e.remove=Jy,e}function jy(e,t){let a=this.get(e);return a!==void 0?a.push(t):this.set(e,a=[t]),a}function Jy(e,t){let a=this.get(e);a!==void 0&&(Gy(a,t),a.length||this.delete(e))}function Kr(e){return Array.isArray(e)}function wp(e){return Kr(e)?e:[e]}function Ry(e,t){return e!==void 0&&t(e)?e:void 0}function Pr(e,t){return e!==void 0&&t(e)?e:q.fail(`Invalid cast. The supplied value ${e} did not pass the test '${q.getFunctionName(t)}'.`)}function Ha(e){}function Uy(){return!0}function xt(e){return e}function kd(e){let t;return()=>(e&&(t=e(),e=void 0),t)}function Zn(e){let t=new Map;return a=>{let s=`${typeof a}:${a}`,f=t.get(s);return f===void 0&&!t.has(s)&&(f=e(a),t.set(s,f)),f}}function ef(e,t){return e===t}function tf(e,t){return e===t||e!==void 0&&t!==void 0&&e.toUpperCase()===t.toUpperCase()}function By(e,t){return ef(e,t)}function qy(e,t){return e===t?0:e===void 0?-1:t===void 0?1:e<t?-1:1}function Pm(e,t){return qy(e,t)}function Fy(e,t,a){for(let s=0;s<e.length;s++)t=Math.max(t,a(e[s]));return t}function __(e,t,a){let s=Math.max(2,Math.floor(e.length*.34)),f=Math.floor(e.length*.4)+1,h;for(let b of t){let v=a(b);if(v!==void 0&&Math.abs(v.length-e.lLine truncated
|
||||
Node ${Lt(L.kind)} was unexpected.`,de||W)}e.failBadSyntaxKind=W;function k(L,se,de,Se){L||(se=se?`False expression: ${se}`:"False expression.",de&&(se+=`\r
|
||||
Verbose Debug Information: `+(typeof de=="string"?de:de())),y(se,Se||k))}e.assert=k;function C(L,se,de,Se,$e){if(L!==se){let Ze=de?Se?`${de} ${Se}`:de:"";y(`Expected ${L} === ${se}. ${Ze}`,$e||C)}}e.assertEqual=C;function R(L,se,de,Se){L>=se&&y(`Expected ${L} < ${se}. ${de||""}`,Se||R)}e.assertLessThan=R;function ue(L,se,de){L>se&&y(`Expected ${L} <= ${se}`,de||ue)}e.assertLessThanOrEqual=ue;function xe(L,se,de){L<se&&y(`Expected ${L} >= ${se}`,de||xe)}e.assertGreaterThanOrEqual=xe;function ge(L,se,de){L==null&&y(se,de||ge)}e.assertIsDefined=ge;function me(L,se,de){return ge(L,se,de||me),L}e.checkDefined=me;function I(L,se,de){for(let Se of L)ge(Se,se,de||I)}e.assertEachIsDefined=I;function ae(L,se,de){return I(L,se,de||ae),L}e.checkEachDefined=ae;function Le(L,se="Illegal value:",de){let Se=typeof L=="object"&&Or(L,"kind")&&Or(L,"pos")?"SyntaxKind: "+Lt(L.kind):JSON.stringify(L);return y(`${se} ${Se}`,de||Le)}e.assertNever=Le;function V(L,se,de,Se){H(1,"assertEachNode")&&k(se===void 0||Qp(L,se),de||"Unexpected node.",()=>`Node array did not pass test '${bn(se)}'.`,Se||V)}e.assertEachNode=V;function oe(L,se,de,Se){H(1,"assertNode")&&k(L!==void 0&&(se===void 0||se(L)),de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} did not pass test '${bn(se)}'.`,Se||oe)}e.assertNode=oe;function G(L,se,de,Se){H(1,"assertNotNode")&&k(L===void 0||se===void 0||!se(L),de||"Unexpected node.",()=>`Node ${Lt(L.kind)} should not have passed test '${bn(se)}'.`,Se||G)}e.assertNotNode=G;function mt(L,se,de,Se){H(1,"assertOptionalNode")&&k(se===void 0||L===void 0||se(L),de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} did not pass test '${bn(se)}'.`,Se||mt)}e.assertOptionalNode=mt;function ir(L,se,de,Se){H(1,"assertOptionalToken")&&k(se===void 0||L===void 0||L.kind===se,de||"Unexpected node.",()=>`Node ${Lt(L?.kind)} was not a '${Lt(se)}' token.`,Se||ir)}e.assertOptionalToken=ir;function gn(L,se,de){H(1,"assertMissingNode")&&k(L===void 0,se||"Unexpected node.",()=>`Node ${Lt(L.kind)} was unexpected'.`,de||gn)}e.assertMissingNode=gn;function ar(L){}e.type=ar;function bn(L){if(typeof L!="function")return"";if(Or(L,"name"))return L.name;{let se=Function.prototype.toString.call(L),de=/^function\s+([\w$]+)\s*\(/.exec(se);return de?de[1]:""}}e.getFunctionName=bn;function In(L){return`{ name: ${h_(L.escapedName)}; flags: ${ct(L.flags)}; declarations: ${Lp(L.declarations,se=>Lt(se.kind))} }`}e.formatSymbol=In;function He(L=0,se,de){let Se=jr(se);if(L===0)return Se.length>0&&Se[0][0]===0?Se[0][1]:"0";if(de){let $e=[],Ze=L;for(let[_t,Pt]of Se){if(_t>L)break;_t!==0&&_t&L&&($e.push(Pt),Ze&=~_t)}if(Ze===0)return $e.join("|")}else for(let[$e,Ze]of Se)if($e===L)return Ze;return L.toString()}e.formatEnum=He;let sr=new Map;function jr(L){let se=sr.get(L);if(se)return se;let de=[];for(let $e in L){let Ze=L[$e];typeof Ze=="number"&&de.push([Ze,$e])}let Se=Cy(de,($e,Ze)=>Pm($e[0],Ze[0]));return sr.set(L,Se),Se}function Lt(L){return He(L,Ae,!1)}e.formatSyntaxKind=Lt;function qn(L){return He(L,Lm,!1)}e.formatSnippetKind=qn;function On(L){return He(L,Mr,!1)}e.formatScriptKind=On;function jt(L){return He(L,rn,!0)}e.formatNodeFlags=jt;function gt(L){return He(L,Im,!0)}e.formatNodeCheckFlags=gt;function Ke(L){return He(L,nf,!0)}e.formatModifierFlags=Ke;function Fn(L){return He(L,Mm,!0)}e.formatTransformFlags=Fn;function Zt(L){return He(L,jm,!0)}e.formatEmitFlags=Zt;function ct(L){return He(L,rf,!0)}e.formatSymbolFlags=ct;function st(L){return He(L,an,!0)}e.formatTypeFlags=st;function qt(L){return He(L,Om,!0)}e.formatSignatureFlags=qt;function Jt(L){return He(L,af,!0)}e.formatObjectFlags=Jt;function lt(L){return He(L,Rp,!0)}e.formatFlowFlags=lt;function _r(L){return He(L,Nm,!0)}e.formatRelationComparisonResult=_r;function ht(L){return He(L,CheckMode,!0)}e.formatCheckMode=ht;function vn(L){return He(L,SignatureCheckMode,!0)}e.formatSignatureCheckMode=vn;function bt(L){return He(L,TypeFacts,!0)}e.formatTypeFacts=bt;let ln=!1,it;function Ft(L){"__debugFlowFlags"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(){let se=this.flags&2?"FlowStart":this.flags&4?"FlowBranchLabel":this.flags&8?"FlowLoopLabel":this.flags&16?"FlowAssignment":this.flags&32?"FlowTrueCondition":this.flags&64?"FlowFalseCondition":this.flags&128?"FlowSwitchClause":this.flags&256?"FlowArrayMutation":this.flags&512?"FlowCall":this.flags&1024?"FlowReduceLabel":this.flags&1?"FlowUnreachable":"UnknownFlow",de=this.flags&-2048;return`${se}${de?` (${lt(de)})`:""}`}},__debugFlowFlags:{get(){return He(this.flags,Rp,!0)}},__debugToString:{value(){return xr(this)}}})}function sn(L){return ln&&(typeof Object.setPrototypeOf=="function"?(it||(it=Object.create(Object.prototype),Ft(it)),Object.setPrototypeOf(L,it)):Ft(L)),L}e.attachFlowNodeDebugInfo=sn;let or;function br(L){"__tsDebuggerDisplay"in L||Object.defineProperties(L,{__tsDebuggerDisplay:{value(se){return se=String(se).replace(/(?:,[\s\w]+:[^,]+)+\]$/,"]"),`NodeArray ${se}`}}})}function vr(L){ln&&(typeof Object.setPrototypeOf=="function"?(or||
Line truncated
|
||||
`).join(`
|
||||
`)}
|
||||
m2: ${this.mapper2.__debugToString().split(`
|
||||
`).join(`
|
||||
`)}`;default:return Le(this)}}}e.DebugTypeMapper=Jr;function Wn(L){return e.isDebugging?Object.setPrototypeOf(L,Jr.prototype):L}e.attachDebugPrototypeIfDebug=Wn;function Pe(L){return console.log(xr(L))}e.printControlFlowGraph=Pe;function xr(L){let se=-1;function de(u){return u.id||(u.id=se,se--),u.id}let Se;(u=>{u.lr="\u2500",u.ud="\u2502",u.dr="\u256D",u.dl="\u256E",u.ul="\u256F",u.ur="\u2570",u.udr="\u251C",u.udl="\u2524",u.dlr="\u252C",u.ulr="\u2534",u.udlr="\u256B"})(Se||(Se={}));let $e;(u=>{u[u.None=0]="None",u[u.Up=1]="Up",u[u.Down=2]="Down",u[u.Left=4]="Left",u[u.Right=8]="Right",u[u.UpDown=3]="UpDown",u[u.LeftRight=12]="LeftRight",u[u.UpLeft=5]="UpLeft",u[u.UpRight=9]="UpRight",u[u.DownLeft=6]="DownLeft",u[u.DownRight=10]="DownRight",u[u.UpDownLeft=7]="UpDownLeft",u[u.UpDownRight=11]="UpDownRight",u[u.UpLeftRight=13]="UpLeftRight",u[u.DownLeftRight=14]="DownLeftRight",u[u.UpDownLeftRight=15]="UpDownLeftRight",u[u.NoChildren=16]="NoChildren"})($e||($e={}));let Ze=2032,_t=882,Pt=Object.create(null),St=[],ut=[],Rr=ke(L,new Set);for(let u of St)u.text=at(u.flowNode,u.circular),he(u);let Tr=Ye(Rr),Mn=tt(Tr);return Xe(Rr,0),un();function Gn(u){return!!(u.flags&128)}function Ei(u){return!!(u.flags&12)&&!!u.antecedent}function U(u){return!!(u.flags&Ze)}function K(u){return!!(u.flags&_t)}function Z(u){let Me=[];for(let je of u.edges)je.source===u&&Me.push(je.target);return Me}function we(u){let Me=[];for(let je of u.edges)je.target===u&&Me.push(je.source);return Me}function ke(u,Me){let je=de(u),B=Pt[je];if(B&&Me.has(u))return B.circular=!0,B={id:-1,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:"circularity"},St.push(B),B;if(Me.add(u),!B)if(Pt[je]=B={id:je,flowNode:u,edges:[],text:"",lane:-1,endLane:-1,level:-1,circular:!1},St.push(B),Ei(u))for(let ze of u.antecedent)Ee(B,ze,Me);else U(u)&&Ee(B,u.antecedent,Me);return Me.delete(u),B}function Ee(u,Me,je){let B=ke(Me,je),ze={source:u,target:B};ut.push(ze),u.edges.push(ze),B.edges.push(ze)}function he(u){if(u.level!==-1)return u.level;let Me=0;for(let je of we(u))Me=Math.max(Me,he(je)+1);return u.level=Me}function Ye(u){let Me=0;for(let je of Z(u))Me=Math.max(Me,Ye(je));return Me+1}function tt(u){let Me=O(Array(u),0);for(let je of St)Me[je.level]=Math.max(Me[je.level],je.text.length);return Me}function Xe(u,Me){if(u.lane===-1){u.lane=Me,u.endLane=Me;let je=Z(u);for(let B=0;B<je.length;B++){B>0&&Me++;let ze=je[B];Xe(ze,Me),ze.endLane>u.endLane&&(Me=ze.endLane)}u.endLane=Me}}function De(u){if(u&2)return"Start";if(u&4)return"Branch";if(u&8)return"Loop";if(u&16)return"Assignment";if(u&32)return"True";if(u&64)return"False";if(u&128)return"SwitchClause";if(u&256)return"ArrayMutation";if(u&512)return"Call";if(u&1024)return"ReduceLabel";if(u&1)return"Unreachable";throw new Error}function xn(u){let Me=bi(u);return Bd(Me,u,!1)}function at(u,Me){let je=De(u.flags);if(Me&&(je=`${je}#${de(u)}`),Gn(u)){let B=[],{switchStatement:ze,clauseStart:_n,clauseEnd:Ge}=u.node;for(let Qe=_n;Qe<Ge;Qe++){let Nt=ze.caseBlock.clauses[Qe];gv(Nt)?B.push("default"):B.push(xn(Nt.expression))}je+=` (${B.join(", ")})`}else K(u)&&u.node&&(je+=` (${xn(u.node)})`);return Me==="circularity"?`Circular(${je})`:je}function un(){let u=Mn.length,Me=Fy(St,0,Ge=>Ge.lane)+1,je=O(Array(Me),""),B=Mn.map(()=>Array(Me)),ze=Mn.map(()=>O(Array(Me),0));for(let Ge of St){B[Ge.level][Ge.lane]=Ge;let Qe=Z(Ge);for(let Et=0;Et<Qe.length;Et++){let It=Qe[Et],zt=8;It.lane===Ge.lane&&(zt|=4),Et>0&&(zt|=1),Et<Qe.length-1&&(zt|=2),ze[Ge.level][It.lane]|=zt}Qe.length===0&&(ze[Ge.level][Ge.lane]|=16);let Nt=we(Ge);for(let Et=0;Et<Nt.length;Et++){let It=Nt[Et],zt=4;Et>0&&(zt|=1),Et<Nt.length-1&&(zt|=2),ze[Ge.level-1][It.lane]|=zt}}for(let Ge=0;Ge<u;Ge++)for(let Qe=0;Qe<Me;Qe++){let Nt=Ge>0?ze[Ge-1][Qe]:0,Et=Qe>0?ze[Ge][Qe-1]:0,It=ze[Ge][Qe];It||(Nt&8&&(It|=12),Et&2&&(It|=3),ze[Ge][Qe]=It)}for(let Ge=0;Ge<u;Ge++)for(let Qe=0;Qe<je.length;Qe++){let Nt=ze[Ge][Qe],Et=Nt&4?"\u2500":" ",It=B[Ge][Qe];It?(_n(Qe,It.text),Ge<u-1&&(_n(Qe," "),_n(Qe,qe(Et,Mn[Ge]-It.text.length)))):Ge<u-1&&_n(Qe,qe(Et,Mn[Ge]+1)),_n(Qe,ei(Nt)),_n(Qe,Nt&8&&Ge<u-1&&!B[Ge+1][Qe]?"\u2500":" ")}return`
|
||||
${je.join(`
|
||||
`)}
|
||||
`;function _n(Ge,Qe){je[Ge]+=Qe}}function ei(u){switch(u){case 3:return"\u2502";case 12:return"\u2500";case 5:return"\u256F";case 9:return"\u2570";case 6:return"\u256E";case 10:return"\u256D";case 7:return"\u2524";case 11:return"\u251C";case 13:return"\u2534";case 14:return"\u252C";case 15:return"\u256B"}return" "}function O(u,Me){if(u.fill)u.fill(Me);else for(let je=0;je<u.length;je++)u[je]=Me;return u}function qe(u,Me){if(u.repeat)return Me>0?u.repeat(Me):"";let je="";for(;je.length<Me;)je+=u;return je}}e.formatControlFlowGraph=xr})(q||(q={}));var w3=Date.now,Ed=()=>{},Hy=()=>{},hl,Ae=(e=>(e[e.Unknown=0]="Unknown",e[e.EndOfFileToken=1]="EndOfFileToken",e[e.SingleLineCommentTrivia=2]="SingleLineCommentTrivia",e[e.MultiLineCommentTrivia=3]="MultiLineCommentTrivia",e[e.NewLineTrivia=4]="NewLineTrivia",e[e.WhitespaceTrivia=5]="WhitespaceTrivia",e[e.ShebangTrivia=6]="ShebangTrivia",e[e.ConflictMarkerTrivia=7]="ConflictMarkerTrivia",e[e.NonTextFileMarkerTrivia=8]="NonTextFileMarkerTrivia",e[e.NumericLiteral=9]="NumericLiteral",e[e.BigIntLiteral=10]="BigIntLiteral",e[e.StringLiteral=11]="StringLiteral",e[e.JsxText=12]="JsxText",e[e.JsxTextAllWhiteSpaces=13]="JsxTextAllWhiteSpaces",e[e.RegularExpressionLiteral=14]="RegularExpressionLiteral",e[e.NoSubstitutionTemplateLiteral=15]="NoSubstitutionTemplateLiteral",e[e.TemplateHead=16]="TemplateHead",e[e.TemplateMiddle=17]="TemplateMiddle",e[e.TemplateTail=18]="TemplateTail",e[e.OpenBraceToken=19]="OpenBraceToken",e[e.CloseBraceToken=20]="CloseBraceToken",e[e.OpenParenToken=21]="OpenParenToken",e[e.CloseParenToken=22]="CloseParenToken",e[e.OpenBracketToken=23]="OpenBracketToken",e[e.CloseBracketToken=24]="CloseBracketToken",e[e.DotToken=25]="DotToken",e[e.DotDotDotToken=26]="DotDotDotToken",e[e.SemicolonToken=27]="SemicolonToken",e[e.CommaToken=28]="CommaToken",e[e.QuestionDotToken=29]="QuestionDotToken",e[e.LessThanToken=30]="LessThanToken",e[e.LessThanSlashToken=31]="LessThanSlashToken",e[e.GreaterThanToken=32]="GreaterThanToken",e[e.LessThanEqualsToken=33]="LessThanEqualsToken",e[e.GreaterThanEqualsToken=34]="GreaterThanEqualsToken",e[e.EqualsEqualsToken=35]="EqualsEqualsToken",e[e.ExclamationEqualsToken=36]="ExclamationEqualsToken",e[e.EqualsEqualsEqualsToken=37]="EqualsEqualsEqualsToken",e[e.ExclamationEqualsEqualsToken=38]="ExclamationEqualsEqualsToken",e[e.EqualsGreaterThanToken=39]="EqualsGreaterThanToken",e[e.PlusToken=40]="PlusToken",e[e.MinusToken=41]="MinusToken",e[e.AsteriskToken=42]="AsteriskToken",e[e.AsteriskAsteriskToken=43]="AsteriskAsteriskToken",e[e.SlashToken=44]="SlashToken",e[e.PercentToken=45]="PercentToken",e[e.PlusPlusToken=46]="PlusPlusToken",e[e.MinusMinusToken=47]="MinusMinusToken",e[e.LessThanLessThanToken=48]="LessThanLessThanToken",e[e.GreaterThanGreaterThanToken=49]="GreaterThanGreaterThanToken",e[e.GreaterThanGreaterThanGreaterThanToken=50]="GreaterThanGreaterThanGreaterThanToken",e[e.AmpersandToken=51]="AmpersandToken",e[e.BarToken=52]="BarToken",e[e.CaretToken=53]="CaretToken",e[e.ExclamationToken=54]="ExclamationToken",e[e.TildeToken=55]="TildeToken",e[e.AmpersandAmpersandToken=56]="AmpersandAmpersandToken",e[e.BarBarToken=57]="BarBarToken",e[e.QuestionToken=58]="QuestionToken",e[e.ColonToken=59]="ColonToken",e[e.AtToken=60]="AtToken",e[e.QuestionQuestionToken=61]="QuestionQuestionToken",e[e.BacktickToken=62]="BacktickToken",e[e.HashToken=63]="HashToken",e[e.EqualsToken=64]="EqualsToken",e[e.PlusEqualsToken=65]="PlusEqualsToken",e[e.MinusEqualsToken=66]="MinusEqualsToken",e[e.AsteriskEqualsToken=67]="AsteriskEqualsToken",e[e.AsteriskAsteriskEqualsToken=68]="AsteriskAsteriskEqualsToken",e[e.SlashEqualsToken=69]="SlashEqualsToken",e[e.PercentEqualsToken=70]="PercentEqualsToken",e[e.LessThanLessThanEqualsToken=71]="LessThanLessThanEqualsToken",e[e.GreaterThanGreaterThanEqualsToken=72]="GreaterThanGreaterThanEqualsToken",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=73]="GreaterThanGreaterThanGreaterThanEqualsToken",e[e.AmpersandEqualsToken=74]="AmpersandEqualsToken",e[e.BarEqualsToken=75]="BarEqualsToken",e[e.BarBarEqualsToken=76]="BarBarEqualsToken",e[e.AmpersandAmpersandEqualsToken=77]="AmpersandAmpersandEqualsToken",e[e.QuestionQuestionEqualsToken=78]="QuestionQuestionEqualsToken",e[e.CaretEqualsToken=79]="CaretEqualsToken",e[e.Identifier=80]="Identifier",e[e.PrivateIdentifier=81]="PrivateIdentifier",e[e.JSDocCommentTextToken=82]="JSDocCommentTextToken",e[e.BreakKeyword=83]="BreakKeyword",e[e.CaseKeyword=84]="CaseKeyword",e[e.CatchKeyword=85]="CatchKeyword",e[e.ClassKeyword=86]="ClassKeyword",e[e.ConstKeyword=87]="ConstKeyword",e[e.ContinueKeyword=88]="ContinueKeyword",e[e.DebuggerKeyword=89]="DebuggerKeyword",e[e.DefaultKeyword=90]="DefaultKeyword",e[e.DeleteKeyword=91]="DeleteKeyword",e[e.DoKeyword=92]="DoKeyword",e[e.ElseKeyword=93]="ElseKeyword",e[e.EnumKeyword=94]="EnumKeyword",e[e.ExportKeyword=95]="ExportKeyword",e[e.ExtendsKeyword=96]="ExtendsKeyword",e[e.FalseKeyword=97]="FalseKeyword",e[e.FinallyKeyword=98]="FinallyKey
Line truncated
|
||||
`,Z=l;continue}l++}return q.assert(ke!==void 0),C=we,ke}function Lt(U){let K=l;if(l++,l>=H)return G(E.Unexpected_end_of_text),"";let Z=V(l);switch(l++,Z){case 48:if(l>=H||!hi(V(l)))return"\0";case 49:case 50:case 51:l<H&&Ep(V(l))&&l++;case 52:case 53:case 54:case 55:if(l<H&&Ep(V(l))&&l++,R|=2048,U&6){let Ee=parseInt(v.substring(K+1,l),8);return U&4&&!(U&32)&&Z!==48?G(E.Octal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class_If_this_was_intended_as_an_escape_sequence_use_the_syntax_0_instead,K,l-K,"\\x"+Ee.toString(16).padStart(2,"0")):G(E.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0,K,l-K,"\\x"+Ee.toString(16).padStart(2,"0")),String.fromCharCode(Ee)}return v.substring(K,l);case 56:case 57:return R|=2048,U&6?(U&4&&!(U&32)?G(E.Decimal_escape_sequences_and_backreferences_are_not_allowed_in_a_character_class,K,l-K):G(E.Escape_sequence_0_is_not_allowed,K,l-K,v.substring(K,l)),String.fromCharCode(Z)):v.substring(K,l);case 98:return"\b";case 116:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 39:return"'";case 34:return'"';case 117:if(l<H&&V(l)===123){l-=2;let Ee=qn(!!(U&6));return U&17||(R|=2048,U&6&&G(E.Unicode_escape_sequences_are_only_available_when_the_Unicode_u_flag_or_the_Unicode_Sets_v_flag_is_set,K,l-K)),Ee}for(;l<K+6;l++)if(!(l<H&&kp(V(l))))return R|=2048,U&6&&G(E.Hexadecimal_digit_expected),v.substring(K,l);R|=1024;let we=parseInt(v.substring(K+2,l),16),ke=String.fromCharCode(we);if(U&16&&we>=55296&&we<=56319&&l+6<H&&v.substring(l,l+2)==="\\u"&&V(l+2)!==123){let Ee=l,he=l+2;for(;he<Ee+6;he++)if(!kp(V(he)))return ke;let Ye=parseInt(v.substring(Ee+2,he),16);if(Ye>=56320&&Ye<=57343)return l=he,ke+String.fromCharCode(Ye)}return ke;case 120:for(;l<K+4;l++)if(!(l<H&&kp(V(l))))return R|=2048,U&6&&G(E.Hexadecimal_digit_expected),v.substring(K,l);return R|=4096,String.fromCharCode(parseInt(v.substring(K+2,l),16));case 13:l<H&&V(l)===10&&l++;case 10:case 8232:case 8233:return"";default:return(U&16||U&4&&!(U&8)&&Nr(Z,e))&&G(E.This_character_cannot_be_escaped_in_a_regular_expression,l-2,2),String.fromCharCode(Z)}}function qn(U){let K=l;l+=3;let Z=l,we=In(1,!1),ke=we?parseInt(we,16):-1,Ee=!1;return ke<0?(U&&G(E.Hexadecimal_digit_expected),Ee=!0):ke>1114111&&(U&&G(E.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive,Z,l-Z),Ee=!0),l>=H?(U&&G(E.Unexpected_end_of_text),Ee=!0):V(l)===125?l++:(U&&G(E.Unterminated_Unicode_escape_sequence),Ee=!0),Ee?(R|=2048,v.substring(K,l)):(R|=8,Id(ke))}function On(){if(l+5<H&&V(l+1)===117){let U=l;l+=2;let K=bn(4,!1);return l=U,K}return-1}function jt(){if(ae(l+1)===117&&ae(l+2)===123){let U=l;l+=3;let K=In(1,!1),Z=K?parseInt(K,16):-1;return l=U,Z}return-1}function gt(){let U="",K=l;for(;l<H;){let Z=ae(l);if(Nr(Z,e))l+=Wt(Z);else if(Z===92){if(Z=jt(),Z>=0&&Nr(Z,e)){U+=qn(!0),K=l;continue}if(Z=On(),!(Z>=0&&Nr(Z,e)))break;R|=1024,U+=v.substring(K,l),U+=Id(Z),l+=6,K=l}else break}return U+=v.substring(K,l),U}function Ke(){let U=C.length;if(U>=2&&U<=12){let K=C.charCodeAt(0);if(K>=97&&K<=122){let Z=sg.get(C);if(Z!==void 0)return k=Z}}return k=80}function Fn(U){let K="",Z=!1,we=!1;for(;;){let ke=V(l);if(ke===95){R|=512,Z?(Z=!1,we=!0):G(we?E.Multiple_consecutive_numeric_separators_are_not_permitted:E.Numeric_separators_are_not_allowed_here,l,1),l++;continue}if(Z=!0,!hi(ke)||ke-48>=U)break;K+=v[l],l++,we=!1}return V(l-1)===95&&G(E.Numeric_separators_are_not_allowed_here,l-1,1),K}function Zt(){return V(l)===110?(C+="n",R&384&&(C=Lb(C)+"n"),l++,10):(C=""+(R&128?parseInt(C.slice(2),2):R&256?parseInt(C.slice(2),8):+C),9)}function ct(){for(y=l,R=0;;){if(W=l,l>=H)return k=1;let U=ae(l);if(l===0&&U===35&&Xm(v,l)){if(l=$m(v,l),t)continue;return k=6}switch(U){case 10:case 13:if(R|=1,t){l++;continue}else return U===13&&l+1<H&&V(l+1)===10?l+=2:l++,k=4;case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8203:case 8239:case 8287:case 12288:case 65279:if(t){l++;continue}else{for(;l<H&&o_(V(l));)l++;return k=5}case 33:return V(l+1)===61?V(l+2)===61?(l+=3,k=38):(l+=2,k=36):(l++,k=54);case 34:case 39:return C=sr(),k=11;case 96:return k=jr(!1);case 37:return V(l+1)===61?(l+=2,k=70):(l++,k=45);case 38:return V(l+1)===38?V(l+2)===61?(l+=3,k=77):(l+=2,k=56):V(l+1)===61?(l+=2,k=74):(l++,k=51);case 40:return l++,k=21;case 41:return l++,k=22;case 42:if(V(l+1)===61)return l+=2,k=67;if(V(l+1)===42)return V(l+2)===61?(l+=3,k=68):(l+=2,k=43);if(l++,xe&&(R&32768)===0&&R&1){R|=32768;continue}return k=42;case 43:return V(l+1)===43?(l+=2,k=46):V(l+1)===61?(l+=2,k=65):(l++,k=40);case 44:return l++,k=28;case 45:return V(l+1)===45?(l+=2,k=47):V(l+1)===61?(l+=2,k=66):(l++,k=41);case 46:return hi(V(l+1))?(ir(),k=9):V(l+1)===46&&V(l+2)===46?(l+=3,k=26):(l++,k=25);case 47:if(V(l+1)===47){for(l+=2;l<H&&!Cn(V(l));)l++;if(ue=ln(ue,v.slice(W,l),pg,W),t)continue;return k=2}if(V(l+1)===42){l+=2;let he=V(l)===42&&V(l+1)!==47,Ye=!1,tt=W;for(;l<H;){let Xe=V(l);if(Xe===42&&V(l+1)===47){l+=2,Ye=!0;break}l++,Cn(Xe)&&(tt=l,R|=1)}if(he&&st()&&(R|=2),ue=ln(ue,v.slice(tt,l),fg,tt),Ye||G(E.Asterisk_Slash_expected),t)continue;return Ye||(R|=4),k=3}return V(l+1)===61?(l+=2,k=69):(l++,k=44);case 48:if(l+2<H&&(V(l+1)===88||V(l+1)===120))return l+=2,C=In(1,!0),C||(G(E.Hexadecimal_digit_expected),C="0"),C="0x"+C,R|=64,k=Zt();if(l+2<H&&(V(l+1)===66||V(l+1)===98))return l+=2,C=Fn(2),C||(G(E.Binary_digit_expected),C="0"),C="0b"+C,R|=128,k=Zt();if(l+2<H&&(V(l+1)===79||V(l+1)===111))return l+=2,C=Fn(8),C||(G(E.Octal_digit_expected),C="0"),C="0o"+C,R|=256,k=Zt();case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return k=ir();case 58:return l++,k=59;case 59:return l++,k=27;case 60:if(Qi(v,l)){if(l=Ra(v,l,G),t)continue;return k=7}return V(l+1)===60?V(l+2)===61?(l+=3,k=71):(l+=2,k=48):V(l+1)===61?(l+=2,k=33):a===1&&V(l+1)===47&&V(l+2)!==42?(l+=2,k=31):(l++,k=30);case 61:if(Qi(v,l)){if(l=Ra(v,l,G),t)continue;return k=7}retu
Line truncated
|
||||
`)),s}function Ya(e){let t=e.emitNode;return t&&t.flags||0}function w2(e,t,a){q.assertGreaterThanOrEqual(t,0),q.assertGreaterThanOrEqual(a,0),q.assertLessThanOrEqual(t,e.length),q.assertLessThanOrEqual(t+a,e.length)}function gl(e){return e.kind===245&&e.expression.kind===11}function Tf(e){return!!(Ya(e)&2097152)}function qd(e){return Tf(e)&&zf(e)}function k2(e){return et(e.name)&&!e.initializer}function Fd(e){return Tf(e)&&es(e)&&Qp(e.declarationList.declarations,k2)}function E2(e,t){let a=e.kind===170||e.kind===169||e.kind===219||e.kind===220||e.kind===218||e.kind===261||e.kind===282?Kp(Sg(t,e.pos),Bp(t,e.pos)):Bp(t,e.pos);return $r(a,s=>s.end<=e.end&&t.charCodeAt(s.pos+1)===42&&t.charCodeAt(s.pos+2)===42&&t.charCodeAt(s.pos+3)!==47)}function A2(e){if(e)switch(e.kind){case 209:case 307:case 170:case 304:case 173:case 172:case 305:case 261:return!0}return!1}function C2(e){return e&&e.kind===242&&xf(e.parent)}function zd(e){let t=e.kind;return(t===212||t===213)&&e.expression.kind===108}function aa(e){return!!e&&!!(e.flags&524288)}function D2(e){return!!e&&!!(e.flags&16777216)}function P2(e){for(;El(e,!0);)e=e.right;return e}function N2(e){return et(e)&&e.escapedText==="exports"}function I2(e){return et(e)&&e.escapedText==="module"}function g1(e){return(yr(e)||b1(e))&&I2(e.expression)&&b_(e)==="exports"}function Sf(e){let t=M2(e);return t===5||aa(e)?t:0}function O2(e){return s_(e.arguments)===3&&yr(e.expression)&&et(e.expression.expression)&&Pn(e.expression.expression)==="Object"&&Pn(e.expression.name)==="defineProperty"&&Ol(e.arguments[1])&&g_(e.arguments[0],!0)}function b1(e){return Za(e)&&Ol(e.argumentExpression)}function k_(e,t){return yr(e)&&(!t&&e.expression.kind===110||et(e.name)&&g_(e.expression,!0))||v1(e,t)}function v1(e,t){return b1(e)&&(!t&&e.expression.kind===110||Cf(e.expression)||k_(e.expression,!0))}function g_(e,t){return Cf(e)||k_(e,t)}function M2(e){if(Uf(e)){if(!O2(e))return 0;let t=e.arguments[0];return N2(t)||g1(t)?8:k_(t)&&b_(t)==="prototype"?9:7}return e.operatorToken.kind!==64||!E1(e.left)||L2(P2(e))?0:g_(e.left.expression,!0)&&b_(e.left)==="prototype"&&Rf(J2(e))?6:j2(e.left)}function L2(e){return fv(e)&&sa(e.expression)&&e.expression.text==="0"}function wf(e){if(yr(e))return e.name;let t=Ef(e.argumentExpression);return sa(t)||Il(t)?t:e}function b_(e){let t=wf(e);if(t){if(et(t))return t.escapedText;if(Il(t)||sa(t))return Ua(t.text)}}function j2(e){if(e.expression.kind===110)return 4;if(g1(e))return 2;if(g_(e.expression,!0)){if(pb(e.expression))return 3;let t=e;for(;!et(t.expression);)t=t.expression;let a=t.expression;if((a.escapedText==="exports"||a.escapedText==="module"&&b_(t)==="exports")&&k_(e))return 1;if(g_(e,!0)||Za(e)&&Q2(e))return 5}return 0}function J2(e){for(;ra(e.right);)e=e.right;return e.right}function R2(e){return Ll(e)&&ra(e.expression)&&Sf(e.expression)!==0&&ra(e.expression.right)&&(e.expression.right.operatorToken.kind===57||e.expression.right.operatorToken.kind===61)?e.expression.right.right:void 0}function U2(e){switch(e.kind){case 244:let t=Vp(e);return t&&t.initializer;case 173:return e.initializer;case 304:return e.initializer}}function Vp(e){return es(e)?Zp(e.declarationList.declarations):void 0}function B2(e){return Si(e)&&e.body&&e.body.kind===268?e.body:void 0}function kf(e){switch(e.kind){case 220:case 227:case 242:case 253:case 180:case 297:case 264:case 232:case 176:case 177:case 186:case 181:case 252:case 260:case 247:case 213:case 243:case 1:case 267:case 307:case 278:case 279:case 282:case 245:case 250:case 251:case 249:case 263:case 219:case 185:case 178:case 80:case 246:case 273:case 272:case 182:case 265:case 318:case 324:case 257:case 175:case 174:case 268:case 203:case 271:case 211:case 170:case 218:case 212:case 304:case 173:case 172:case 254:case 241:case 179:case 305:case 306:case 256:case 258:case 259:case 266:case 169:case 261:case 244:case 248:case 255:return!0;default:return!1}}function q2(e,t){let a;A2(e)&&y2(e)&&Zi(e.initializer)&&(a=Dn(a,Vd(e,e.initializer.jsDoc)));let s=e;for(;s&&s.parent;){if(Zi(s)&&(a=Dn(a,Vd(e,s.jsDoc))),s.kind===170){a=Dn(a,(t?Lg:Mg)(s));break}if(s.kind===169){a=Dn(a,(t?Jg:jg)(s));break}s=z2(s)}return a||Tt}function Vd(e,t){let a=Dy(t);return Cm(t,s=>{if(s===a){let f=$r(s.tags,h=>F2(e,h));return s.tags===f?[s]:f}else return $r(s.tags,Ev)})}function F2(e,t){return!(Xf(t)||Pv(t))||!t.parent||!ch(t.parent)||!Ml(t.parent.parent)||t.parent.parent===e}function z2(e){let t=e.parent;if(t.kind===304||t.kind===278||t.kind===173||t.kind===245&&e.kind===212||t.kind===254||B2(t)||El(e))return t;if(t.parent&&(Vp(t.parent)===e||El(t)))return t.parent;if(t.parent&&t.parent.parent&&(Vp(t.parent.parent)||U2(t.parent.parent)===e||R2(t.parent.parent)))return t.parent.parent}function Ef(e,t){return $f(e,t?-2147483647:1)}function V2(e){let t=W2(e);if(t&&aa(e)){let a=Rg(e);if(a)return a.class}return t}function W2(e){let t=Af(e.heritageClauses,96);return t&&t.types.length>0?t.types[0]:void 0}function G2(e){if(aa(e))return Ug(e).map(t=>t.c
Line truncated
|
||||
`,te)+1)+4;function ne(Be){X||(X=$),Jn.push(Be),$+=Be.length}for(ze();Yi(5););Yi(4)&&(N=0,$=0);e:for(;;){switch(u()){case 60:vp(Jn),dr||(dr=O()),We(r($)),N=0,X=void 0;break;case 4:Jn.push(t.getTokenText()),N=0,$=0;break;case 42:let Be=t.getTokenText();N===1?(N=2,ne(Be)):(q.assert(N===0),N=1,$+=Be.length);break;case 5:q.assert(N!==2,"whitespace shouldn't come from the scanner while saving top-level comment text");let pt=t.getTokenText();X!==void 0&&$+pt.length>X&&Jn.push(pt.slice(X-$)),$+=pt.length;break;case 1:break e;case 82:N=2,ne(t.getTokenValue());break;case 19:N=2;let hn=t.getTokenFullStart(),cn=t.getTokenEnd()-1,tn=c(cn);if(tn){fr||Vi(Jn),Hr.push(D(y.createJSDocText(Jn.join("")),fr??te,hn)),Hr.push(tn),Jn=[],fr=t.getTokenEnd();break}default:N=2,ne(t.getTokenText());break}N===2?_n(!1):ze()}let re=Jn.join("").trimEnd();Hr.length&&re.length&&Hr.push(D(y.createJSDocText(re),fr??te,dr)),Hr.length&&Ne&&q.assertIsDefined(dr,"having parsed tags implies that the end of the comment span should be set");let Oe=Ne&&Dt(Ne,Xt,Ot);return D(y.createJSDocComment(Hr.length?Dt(Hr,te,dr):re.length?re:void 0,Oe),te,Re)}function Vi(N){for(;N.length&&(N[0]===`
|
||||
`||N[0]==="\r");)N.shift()}function vp(N){for(;N.length;){let X=N[N.length-1].trimEnd();if(X==="")N.pop();else if(X.length<N[N.length-1].length){N[N.length-1]=X;break}else break}}function Qn(){for(;;){if(ze(),u()===1)return!0;if(!(u()===5||u()===4))return!1}}function wn(){if(!((u()===5||u()===4)&&Y(Qn)))for(;u()===5||u()===4;)ze()}function J(){if((u()===5||u()===4)&&Y(Qn))return"";let N=t.hasPrecedingLineBreak(),X=!1,$="";for(;N&&u()===42||u()===5||u()===4;)$+=t.getTokenText(),u()===4?(N=!0,X=!0,$=""):u()===42&&(N=!1),ze();return X?$:""}function r(N){q.assert(u()===60);let X=t.getTokenStart();ze();let $=pi(void 0),ne=J(),re;switch($.escapedText){case"author":re=K0(X,$,N,ne);break;case"implements":re=ey(X,$,N,ne);break;case"augments":case"extends":re=ty(X,$,N,ne);break;case"class":case"constructor":re=Gi(X,y.createJSDocClassTag,$,N,ne);break;case"public":re=Gi(X,y.createJSDocPublicTag,$,N,ne);break;case"private":re=Gi(X,y.createJSDocPrivateTag,$,N,ne);break;case"protected":re=Gi(X,y.createJSDocProtectedTag,$,N,ne);break;case"readonly":re=Gi(X,y.createJSDocReadonlyTag,$,N,ne);break;case"override":re=Gi(X,y.createJSDocOverrideTag,$,N,ne);break;case"deprecated":Wn=!0,re=Gi(X,y.createJSDocDeprecatedTag,$,N,ne);break;case"this":re=vd(X,$,N,ne);break;case"enum":re=ay(X,$,N,ne);break;case"arg":case"argument":case"param":return Wi(X,$,2,N);case"return":case"returns":re=X0(X,$,N,ne);break;case"template":re=Td(X,$,N,ne);break;case"type":re=gd(X,$,N,ne);break;case"typedef":re=sy(X,$,N,ne);break;case"callback":re=oy(X,$,N,ne);break;case"overload":re=cy(X,$,N,ne);break;case"satisfies":re=ny(X,$,N,ne);break;case"see":re=$0(X,$,N,ne);break;case"exception":case"throws":re=Q0(X,$,N,ne);break;case"import":re=ry(X,$,N,ne);break;default:re=fe(X,$,N,ne);break}return re}function i(N,X,$,ne){return ne||($+=X-N),_($,ne.slice($))}function _(N,X){let $=O(),ne=[],re=[],Oe,Be=0,pt;function hn(Kn){pt||(pt=N),ne.push(Kn),N+=Kn.length}X!==void 0&&(X!==""&&hn(X),Be=1);let cn=u();e:for(;;){switch(cn){case 4:Be=0,ne.push(t.getTokenText()),N=0;break;case 60:t.resetTokenState(t.getTokenEnd()-1);break e;case 1:break e;case 5:q.assert(Be!==2&&Be!==3,"whitespace shouldn't come from the scanner while saving comment text");let Kn=t.getTokenText();pt!==void 0&&N+Kn.length>pt&&(ne.push(Kn.slice(pt-N)),Be=2),N+=Kn.length;break;case 19:Be=2;let _l=t.getTokenFullStart(),Ma=t.getTokenEnd()-1,ol=c(Ma);ol?(re.push(D(y.createJSDocText(ne.join("")),Oe??$,_l)),re.push(ol),ne=[],Oe=t.getTokenEnd()):hn(t.getTokenText());break;case 62:Be===3?Be=2:Be=3,hn(t.getTokenText());break;case 82:Be!==3&&(Be=2),hn(t.getTokenValue());break;case 42:if(Be===0){Be=1,N+=1;break}default:Be!==3&&(Be=2),hn(t.getTokenText());break}Be===2||Be===3?cn=_n(Be===3):cn=ze()}Vi(ne);let tn=ne.join("").trimEnd();if(re.length)return tn.length&&re.push(D(y.createJSDocText(tn),Oe??$)),Dt(re,$,t.getTokenEnd());if(tn.length)return tn}function c(N){let X=le(T);if(!X)return;ze(),wn();let $=d(),ne=[];for(;u()!==20&&u()!==4&&u()!==1;)ne.push(t.getTokenText()),ze();let re=X==="link"?y.createJSDocLink:X==="linkcode"?y.createJSDocLinkCode:y.createJSDocLinkPlain;return D(re($,ne.join("")),N,t.getTokenEnd())}function d(){if(kt(u())){let N=O(),X=Ut();for(;Je(25);)X=D(y.createQualifiedName(X,u()===81?Yt(80,!1):Ut()),N);for(;u()===81;)It(),ze(),X=D(y.createJSDocMemberName(X,vt()),N);return X}}function T(){if(J(),u()===19&&ze()===60&&kt(ze())){let N=t.getTokenValue();if(F(N))return N}}function F(N){return N==="link"||N==="linkcode"||N==="linkplain"}function fe(N,X,$,ne){return D(y.createJSDocUnknownTag(X,i(N,O(),$,ne)),N)}function We(N){N&&(Ne?Ne.push(N):(Ne=[N],Xt=N.pos),Ot=N.end)}function Mt(){return J(),u()===19?m():void 0}function mr(){let N=Yi(23);N&&wn();let X=Yi(62),$=my();return X&&Hl(62),N&&(wn(),ft(64)&&At(),j(24)),{name:$,isBracketed:N}}function kn(N){switch(N.kind){case 151:return!0;case 189:return kn(N.elementType);default:return Lf(N)&&et(N.typeName)&&N.typeName.escapedText==="Object"&&!N.typeArguments}}function Wi(N,X,$,ne){let re=Mt(),Oe=!re;J();let{name:Be,isBracketed:pt}=mr(),hn=J();Oe&&!Y(T)&&(re=Mt());let cn=i(N,O(),ne,hn),tn=H0(re,Be,$,ne);tn&&(re=tn,Oe=!0);let Kn=$===1?y.createJSDocPropertyTag(X,Be,pt,re,Oe,cn):y.createJSDocParameterTag(X,Be,pt,re,Oe,cn);return D(Kn,N)}function H0(N,X,$,ne){if(N&&kn(N.type)){let re=O(),Oe,Be;for(;Oe=le(()=>Tp($,ne,X));)Oe.kind===342||Oe.kind===349?Be=An(Be,Oe):Oe.kind===346&&un(Oe.tagName,E.A_JSDoc_template_tag_may_not_follow_a_typedef_callback_or_overload_tag);if(Be){let pt=D(y.createJSDocTypeLiteral(Be,N.type.kind===189),re);return D(y.createJSDocTypeExpression(pt),re)}}}function X0(N,X,$,ne){nn(Ne,Cv)&&at(X.pos,t.getTokenStart(),E._0_tag_already_specified,h_(X.escapedText));let re=Mt();return D(y.createJSDocReturnTag(X,re,i(N,O(),$,ne)),N)}function gd(N,X,$,ne){nn(Ne,Xf)&&at(X.pos,t.getTokenStart(),E._0_tag_already_specified,h_(X.escapedText));let re=m(!0),Oe=$!==void 0&&ne!==void 0?i(N,O(),$,ne):void 0;return D(y.createJSDocTypeTag(X,re,Oe),N)}funct
Line truncated
|
||||
`&&f[s-1]==="\r"?s-1:s}getNamedDeclarations(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations}computeNamedDeclarations(){let e=Ly();return this.forEachChild(f),e;function t(h){let b=s(h);b&&e.add(b,h)}function a(h){let b=e.get(h);return b||e.set(h,b=[]),b}function s(h){let b=mf(h);return b&&(Nf(b)&&yr(b.expression)?b.expression.name.text:c1(b)?getNameFromPropertyName(b):void 0)}function f(h){switch(h.kind){case 263:case 219:case 175:case 174:let b=h,v=s(b);if(v){let y=a(v),W=Va(y);W&&b.parent===W.parent&&b.symbol===W.symbol?b.body&&!W.body&&(y[y.length-1]=b):y.push(b)}$t(h,f);break;case 264:case 232:case 265:case 266:case 267:case 268:case 272:case 282:case 277:case 274:case 275:case 178:case 179:case 188:t(h),$t(h,f);break;case 170:if(!E_(h,31))break;case 261:case 209:{let y=h;if(s2(y.name)){$t(y.name,f);break}y.initializer&&f(y.initializer)}case 307:case 173:case 172:t(h);break;case 279:let l=h;l.exportClause&&(nh(l.exportClause)?Bn(l.exportClause.elements,f):f(l.exportClause.name));break;case 273:let H=h.importClause;H&&(H.name&&t(H.name),H.namedBindings&&(H.namedBindings.kind===275?t(H.namedBindings):Bn(H.namedBindings.elements,f)));break;case 227:Sf(h)!==0&&t(h);default:$t(h,f)}}}},m6=class{constructor(e,t,a){this.fileName=e,this.text=t,this.skipTrivia=a||(s=>s)}getLineAndCharacterOfPosition(e){return Ym(this,e)}};function h6(){return{getNodeConstructor:()=>Kf,getTokenConstructor:()=>vh,getIdentifierConstructor:()=>xh,getPrivateIdentifierConstructor:()=>Th,getSourceFileConstructor:()=>d6,getSymbolConstructor:()=>u6,getTypeConstructor:()=>p6,getSignatureConstructor:()=>f6,getSourceMapSourceConstructor:()=>m6}}var y6=["getSemanticDiagnostics","getSuggestionDiagnostics","getCompilerOptionsDiagnostics","getSemanticClassifications","getEncodedSemanticClassifications","getCodeFixesAtPosition","getCombinedCodeFix","applyCodeActionCommand","organizeImports","getEditsForFileRename","getEmitOutput","getApplicableRefactors","getEditsForRefactor","prepareCallHierarchy","provideCallHierarchyIncomingCalls","provideCallHierarchyOutgoingCalls","provideInlayHints","getSupportedCodeFixes","getPasteEdits"],rx=[...y6,"getCompletionsAtPosition","getCompletionEntryDetails","getCompletionEntrySymbol","getSignatureHelpItems","getQuickInfoAtPosition","getDefinitionAtPosition","getDefinitionAndBoundSpan","getImplementationAtPosition","getTypeDefinitionAtPosition","getReferencesAtPosition","findReferences","getDocumentHighlights","getNavigateToItems","getRenameInfo","findRenameLocations","getApplicableRefactors","preparePasteEditsForFile"];Tb(h6());var ts=new Proxy({},{get:()=>!0});var kh=ts["4.8"];function nr(e,t=!1){if(e!=null){if(kh){if(t||Rl(e)){let a=r1(e);return a?[...a]:void 0}return}return e.modifiers?.filter(a=>!Ka(a))}}function wi(e,t=!1){if(e!=null){if(kh){if(t||Qf(e)){let a=hf(e);return a?[...a]:void 0}return}return e.decorators?.filter(Ka)}}var Eh={};var Ul=new Proxy({},{get:(e,t)=>t});var Ah=Ul,Ch=Ul;var A=Ah,Bt=Ch;var v6=ts["5.0"],ye=Ae,x6=new Set([ye.AmpersandAmpersandToken,ye.BarBarToken,ye.QuestionQuestionToken]),T6=new Set([Ae.AmpersandAmpersandEqualsToken,Ae.AmpersandEqualsToken,Ae.AsteriskAsteriskEqualsToken,Ae.AsteriskEqualsToken,Ae.BarBarEqualsToken,Ae.BarEqualsToken,Ae.CaretEqualsToken,Ae.EqualsToken,Ae.GreaterThanGreaterThanEqualsToken,Ae.GreaterThanGreaterThanGreaterThanEqualsToken,Ae.LessThanLessThanEqualsToken,Ae.MinusEqualsToken,Ae.PercentEqualsToken,Ae.PlusEqualsToken,Ae.QuestionQuestionEqualsToken,Ae.SlashEqualsToken]),S6=new Set([ye.AmpersandAmpersandToken,ye.AmpersandToken,ye.AsteriskAsteriskToken,ye.AsteriskToken,ye.BarBarToken,ye.BarToken,ye.CaretToken,ye.EqualsEqualsEqualsToken,ye.EqualsEqualsToken,ye.ExclamationEqualsEqualsToken,ye.ExclamationEqualsToken,ye.GreaterThanEqualsToken,ye.GreaterThanGreaterThanGreaterThanToken,ye.GreaterThanGreaterThanToken,ye.GreaterThanToken,ye.InKeyword,ye.InstanceOfKeyword,ye.LessThanEqualsToken,ye.LessThanLessThanToken,ye.LessThanToken,ye.MinusToken,ye.PercentToken,ye.PlusToken,ye.SlashToken]);function w6(e){return T6.has(e.kind)}function k6(e){return x6.has(e.kind)}function E6(e){return S6.has(e.kind)}function gr(e){return rt(e)}function Dh(e){return e.kind!==ye.SemicolonClassElement}function Fe(e,t){return nr(t)?.some(s=>s.kind===e)===!0}function Ph(e){let t=nr(e);return t==null?null:t[t.length-1]??null}function Nh(e){return e.kind===ye.CommaToken}function A6(e){return e.kind===ye.SingleLineCommentTrivia||e.kind===ye.MultiLineCommentTrivia}function C6(e){return e.kind===ye.JSDocComment}function Ih(e){if(w6(e))return{type:A.AssignmentExpression,operator:gr(e.kind)};if(k6(e))return{type:A.LogicalExpression,operator:gr(e.kind)};if(E6(e))return{type:A.BinaryExpression,operator:gr(e.kind)};throw new Error(`Unexpected binary operator ${rt(e.kind)}`)}function C_(e,t){let a=t.getLineAndCharacterOfPosition(e);return{column:a.character,line:a.line+1}}function Zr(e,t){let[a,s]=e.map(f=>C_(f,t));return{end:
Line truncated
|
||||
`))return[];let t=[];for(let a of`*${e.value}*`.split(`
|
||||
`)){if(a=a.trimStart(),!a.startsWith("*"))return[];t.push(a)}return t}var v0=new WeakMap;function H4(e){return is(v0,e,Y4)}function x0(e){v0.delete(e)}function fd(e){return H4(e).length>0}function T0(e){if(e.length<2)return;let t;for(let a=e.length-1;a>=0;a--){let s=e[a];if(t&&Kt(s)===Qt(t)&&fd(s)&&fd(t)&&(e.splice(a+1,1),s.value+="*//*"+t.value,s.range=[Qt(s),Kt(t)],x0(s)),!h0(s)&&!rs(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}function X4(e){return e!==null&&typeof e=="object"}var S0=X4;var I_=null;function O_(e){if(I_!==null&&typeof I_.property){let t=I_;return I_=O_.prototype=null,t}return I_=O_.prototype=e??Object.create(null),new O_}var $4=10;for(let e=0;e<=$4;e++)O_();function dd(e){return O_(e)}function Q4(e,t="type"){dd(e);function a(s){let f=s[t],h=e[f];if(!Array.isArray(h))throw Object.assign(new Error(`Missing visitor keys for '${f}'.`),{node:s});return h}return a}var w0=Q4;var M=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],k0={ArrayExpression:M[0],AssignmentExpression:M[1],BinaryExpression:M[1],InterpreterDirective:[],Directive:M[2],DirectiveLiteral:[],BlockStatement:M[3],BreakStatement:M[4],CallExpression:M[5],CatchClause:["param","body"],ConditionalExpression:M[6],ContinueStatement:M[4],DebuggerStatement:[],DoWhileStatement:M[7],EmptyStatement:[],ExpressionStatement:M[8],File:["program"],ForInStatement:M[9],ForStatement:["init","test","update","body"],FunctionDeclaration:M[10],FunctionExpression:M[10],Identifier:["typeAnnotation","decorators"],IfStatement:M[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:M[1],MemberExpression:M[11],NewExpression:M[5],Program:M[3],ObjectExpression:M[12],ObjectMethod:M[13],ObjectProperty:M[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:M[15],SequenceExpression:M[16],ParenthesizedExpression:M[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:M[15],TryStatement:["block","handler","finalizer"],UnaryExpression:M[15],UpdateExpression:M[15],VariableDeclaration:["declarations"],VariableDeclarator:M[17],WhileStatement:M[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:M[18],ClassExpression:M[19],ClassDeclaration:M[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:M[20],ExportSpecifier:["local","exported"],ForOfStatement:M[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:M[21],ImportNamespaceSpecifier:M[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:M[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:M[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:M[15],AwaitExpression:M[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:M[22],OptionalMemberExpression:M[11],OptionalCallExpression:M[5],ClassProperty:M[23],ClassPrivateProperty:M[23],ClassPrivateMethod:M[13],PrivateName:M[24],StaticBlock:M[18],ImportAttribute:M[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:M[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:M[27],DeclareClass:["id","ty
Line truncated
|
||||
$1 $2
|
||||
`);e=e.replace(P0,"").trimEnd();let s=Object.create(null),f=hr(0,e,N0,"").replace(P0,"").trimEnd(),h;for(;h=N0.exec(e);){let b=hr(0,h[2],a3,"");if(typeof s[h[1]]=="string"||Array.isArray(s[h[1]])){let v=s[h[1]];s[h[1]]=[...o3,...Array.isArray(v)?v:[v],b]}else s[h[1]]=b}return{comments:f,pragmas:s}}var M0=["noformat","noprettier"],L0=["format","prettier"];function c3(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
|
||||
`);return t===-1?e:e.slice(0,t)}var j0=c3;function J0(e){let t=j0(e);t&&(e=e.slice(t.length+1));let a=I0(e),{pragmas:s,comments:f}=O0(a);return{shebang:t,text:e,pragmas:s,comments:f}}function R0(e){let{pragmas:t}=J0(e);return L0.some(a=>hd(t,a))}function U0(e){let{pragmas:t}=J0(e);return M0.some(a=>hd(t,a))}function l3(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:R0,hasIgnorePragma:U0,locStart:Qt,locEnd:Kt,...e}}var B0=l3;var q0=/^[^"'`]*<\/|^[^/]{2}.*\/>/m;function u3(e){return e.charAt(0)==="#"&&e.charAt(1)==="!"?"//"+e.slice(2):e}var F0=u3;var z0="module",V0="commonjs",W0=[z0,V0];function G0(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/i.test(e))return z0;if(/\.(?:cjs|cts)$/i.test(e))return V0}}var p3={loc:!0,range:!0,comment:!0,tokens:!1,loggerFn:!1,project:!1,jsDocParsingMode:"none",suppressDeprecatedPropertyWarnings:!0,onUnsupportedTypeScriptVersion:"ignore"};function f3(e){let{message:t,location:a}=e;if(!a)return e;let{start:s,end:f}=a;return l0(t,{loc:{start:{line:s.line,column:s.column+1},end:{line:f.line,column:f.column+1}},cause:e})}var d3=e=>e&&/\.(?:js|mjs|cjs|jsx|ts|mts|cts|tsx)$/i.test(e);function m3(e,t){let a=[{...p3,filePath:t}],s=G0(t);if(s?a=a.map(h=>({...h,sourceType:s})):a=W0.flatMap(h=>a.map(b=>({...b,sourceType:h}))),d3(t))return a;let f=q0.test(e);return[f,!f].flatMap(h=>a.map(b=>({...b,jsx:h})))}function h3(e,t){let a=t?.filepath;typeof a!="string"&&(a=void 0);let s=F0(e),f=m3(e,a),h;try{h=u0(f.map(b=>()=>c0(s,b)))}catch({errors:[b]}){throw f3(b)}return D0(h,{text:e,astType:"typescript"})}var y3=B0(h3);export{Y0 as default,yd as parsers};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Parser, Printer } from "../index.js";
|
||||
|
||||
export declare const parsers: {
|
||||
yaml: Parser;
|
||||
};
|
||||
|
||||
export declare const printers: {
|
||||
yaml: Printer;
|
||||
};
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.yaml=e()}})(function(){"use strict";var Wn=Object.defineProperty;var co=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var uo=Object.prototype.hasOwnProperty;var Vs=(t,e)=>{for(var n in e)Wn(t,n,{get:e[n],enumerable:!0})},po=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of fo(e))!uo.call(t,r)&&r!==n&&Wn(t,r,{get:()=>e[r],enumerable:!(s=co(e,r))||s.enumerable});return t};var mo=t=>po(Wn({},"__esModule",{value:!0}),t);var Ja={};Vs(Ja,{languages:()=>Ar,options:()=>Tr,parsers:()=>Us,printers:()=>Ha});var Kt=(t,e)=>(n,s,...r)=>n|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,r);function ho(t){return this[t<0?this.length+t:t]}var go=Kt("at",function(){if(Array.isArray(this)||typeof this=="string")return ho}),j=go;var yo=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},wo=Kt("replaceAll",function(){if(typeof this=="string")return yo}),Yt=wo;var bo=()=>{},ft=bo;var ut="string",pt="array",Ut="cursor",jt="indent",Fe="align",Vt="trim",Ke="group",Ye="fill",Ue="if-break",Gt="indent-if-break",je="line-suffix",Qt="line-suffix-boundary",we="line",Ht="label",Ve="break-parent",Jt=new Set([Ut,jt,Fe,Vt,Ke,Ye,Ue,Gt,je,Qt,we,Ht,Ve]);function Wt(t,e,n){if(!t.has(e)){let s=n(e);t.set(e,s)}return t.get(e)}function ko(t){if(typeof t=="string")return ut;if(Array.isArray(t))return pt;if(!t)return;let{type:e}=t;if(Jt.has(e))return e}var Xt=ko;var So=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Eo(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(Xt(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let s=So([...Jt].map(r=>`'${r}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${s}.`}var Xn=class extends Error{name="InvalidDocError";constructor(e){super(Eo(e)),this.doc=e}},Gs=Xn;function Co(t,e){if(typeof t=="string")return e(t);let n=new Map;return s(t);function s(i){return Wt(n,i,r)}function r(i){switch(Xt(i)){case pt:return e(i.map(s));case Ye:return e({...i,parts:i.parts.map(s)});case Ue:return e({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case Ke:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(s),a=o[0]):a=s(a),e({...i,contents:a,expandedStates:o})}case Fe:case jt:case Gt:case Ht:case je:return e({...i,contents:s(i.contents)});case ut:case Ut:case Vt:case Qt:case we:case Ve:return e(i);default:throw new Gs(i)}}}function Qs(t,e=mt){return Co(t,n=>typeof n=="string"?R(e,n.split(`
|
||||
`)):n)}var ne=ft,zt=ft,Hs=ft,Js=ft;function ht(t,e){return Js(t),ne(e),{type:Fe,contents:e,n:t}}function zn(t){return ht(Number.NEGATIVE_INFINITY,t)}function Ws(t){return ht({type:"root"},t)}function Xs(t){return ht(-1,t)}var dt={type:Ve};function Zt(t){return Hs(t),{type:Ye,parts:t}}function Ge(t,e={}){return ne(t),zt(e.expandedStates,!0),{type:Ke,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Zn(t,e){return Ge(t[0],{...e,expandedStates:t})}function gt(t,e="",n={}){return ne(t),e!==""&&ne(e),{type:Ue,breakContents:t,flatContents:e,groupId:n.groupId}}function R(t,e){ne(t),zt(e);let n=[];for(let s=0;s<e.length;s++)s!==0&&n.push(t),n.push(e[s]);return n}var be={type:we},en={type:we,soft:!0},No={type:we,hard:!0},O=[No,dt],Ao={type:we,hard:!0,literal:!0},mt=[Ao,dt];function zs(t){return ne(t),{type:je,contents:t}}function tn(t){return(e,n,s)=>{if(n===!1)return!1;let r=!!s?.backwards,{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;r?o--:o++}return o===-1||o===i?o:!1}}var rc=tn(/\s/),es=tn(" "),ic=tn(",; "),oc=tn(/[^\n\r]/);var Zs=t=>t===`
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function To(t,e,n){if(e===!1)return!1;let s=!!n?.backwards,r=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&r===`
|
||||
`)return e-2;if(Zs(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(Zs(r))return e+1}return e}var ts=To;function Oo(t,e){let n=e-1;n=es(t,n,{backwards:!0}),n=ts(t,n,{backwards:!0}),n=es(t,n,{backwards:!0});let s=ts(t,n,{backwards:!0});return n!==s}var ns=Oo;var ss=class extends Error{name="UnexpectedNodeError";constructor(e,n,s="type"){super(`Unexpected ${n} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},er=ss;function tr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async s=>{let r=await s(e.originalText,{parser:"json"});return r?[r,O]:void 0}}tr.getVisitorKeys=()=>[];var nr=tr;var yt=null;function wt(t){if(yt!==null&&typeof yt.property){let e=yt;return yt=wt.prototype=null,e}return yt=wt.prototype=t??Object.create(null),new wt}var _o=10;for(let t=0;t<=_o;t++)wt();function rs(t){return wt(t)}function Io(t,e="type"){rs(t);function n(s){let r=s[e],i=t[r];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return i}return n}var sr=Io;var P=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],rr={root:P[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:P[0],documentBody:P[0],directive:P[1],alias:P[1],blockLiteral:P[1],blockFolded:P[0],plain:P[0],quoteSingle:P[1],quoteDouble:P[1],mapping:P[0],mappingItem:P[2],mappingKey:P[3],mappingValue:P[3],sequence:P[0],sequenceItem:P[3],flowMapping:P[0],flowMappingItem:P[2],flowSequence:P[0],flowSequenceItem:P[3],comment:P[1],tag:P[4],anchor:P[4]};var Lo=sr(rr),ir=Lo;var bt=t=>t.position.start.offset,or=t=>t.position.end.offset;var ar="format";var lr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,cr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,fr=/^\s*@(?:format|prettier)\s*$/;var ur=t=>fr.test(t),pr=t=>cr.test(t),mr=t=>lr.test(t),hr=t=>`# @${ar}
|
||||
|
||||
${t}`;function is(t,e){switch(t.type){case"comment":if(ur(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break;case"blockLiteral":case"blockFolded":t.chomping==="keep"?e.value=t.value.split(`
|
||||
`).map(n=>n.replace(/[ \t]+$/,"")).join(`
|
||||
`):(t.chomping==="clip"||t.chomping==="strip")&&(e.value=t.value.trimEnd());break}}is.ignoredProperties=new Set(["position"]);function Po(t){return Array.isArray(t)&&t.length>0}var Qe=Po;function J(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function os(t,e,n){return e("children"in t?{...t,children:t.children.map(s=>os(s,e,t))}:t,n)}function He(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function gr(t,e){let n=0,s=e.length;for(let r=t.position.end.offset-1;r<s;r++){let i=e[r];if(i===`
|
||||
`&&n++,n===1&&/\S/.test(i))return!1;if(n===2)return!0}return!1}function nn(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let s=1;s<n;s++){let r=t.stack[s],i=t.stack[s-1];if(Array.isArray(i)&&typeof r=="number"&&r!==i.length-1)return!1}return!0}function sn(t){return Qe(t.children)?sn(j(0,t.children,-1)):t}function dr(t){return t.value.trim()==="prettier-ignore"}function yr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return F(n)&&dr(j(0,n.endComments,-1))}return ce(e)&&dr(j(0,e.leadingComments,-1))}function Je(t){return!Qe(t.children)&&!vo(t)}function vo(t){return ce(t)||Oe(t)||as(t)||W(t)||F(t)}function ce(t){return Qe(t?.leadingComments)}function Oe(t){return Qe(t?.middleComments)}function as(t){return t?.indicatorComment}function W(t){return t?.trailingComment}function F(t){return Qe(t?.endComments)}function wr(t){return t?t.split(/(?<!^| ) (?! |$)/):[]}function br(t,e,n){let s=e.split(`
|
||||
`).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return s.map(i=>i?[i]:[]);let r=[];for(let[i,o]of s.entries()){let a=wr(o);i>0&&s[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&j(0,j(0,r,-1),-1).endsWith("\\"))?r[r.length-1]=[...j(0,r,-1),...a]:r.push(a)}return n.proseWrap==="never"?r.map(i=>[i.join(" ")]):r}function kr(t,{parentIndent:e,isLastDescendant:n,options:s}){let r=t.position.start.line===t.position.end.line?"":s.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(r==="")return[];let i;if(t.indent===null){let c=r.match(/^(?<leadingSpace> *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=r.split(`
|
||||
`).map(c=>c.slice(i));if(s.proseWrap==="preserve"||t.type==="blockLiteral")return l(o.map(c=>c?[c]:[]));let a=[];for(let[c,u]of o.entries()){let f=wr(u);c>0&&f.length>0&&o[c-1].length>0&&!/^\s/.test(f[0])&&!/^\s|\s$/.test(j(0,a,-1))?a[a.length-1]=[...j(0,a,-1),...f]:a.push(f)}return a=a.map(c=>{let u=[];for(let f of c)u.length>0&&/\s$/.test(j(0,u,-1))?u[u.length-1]+=" "+f:u.push(f);return u}),s.proseWrap==="never"&&(a=a.map(c=>[c.join(" ")])),l(a);function l(c){if(t.chomping==="keep")return r.endsWith(`
|
||||
`)&&j(0,c,-1).length===0?c.slice(0,-1):c;let u=0;for(let f=c.length-1;f>=0&&c[f].every(p=>p.replace(/[ \t]+$/,"")==="");f--)u++;return u===0?c:u>=2&&!n?c.slice(0,-(u-1)):c.slice(0,-u)}}function kt(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var Do=new WeakMap;function rn(t,e){let{node:n,root:s}=t,r=Wt(Do,s,()=>new Set);return!r.has(n.position.end.offset)&&(r.add(n.position.end.offset),gr(n,e)&&!ls(t.parent))?en:""}function ls(t){return F(t)&&!J(t,["documentHead","documentBody","flowMapping","flowSequence"])}function K(t,e){return ht(" ".repeat(t),e)}function xo(t,e,n){let{node:s}=t,r=t.ancestors.filter(c=>c.type==="sequence"||c.type==="mapping").length,i=nn(t),o=[s.type==="blockFolded"?">":"|"];s.indent!==null&&o.push(s.indent.toString()),s.chomping!=="clip"&&o.push(s.chomping==="keep"?"+":"-"),as(s)&&o.push(" ",n("indicatorComment"));let a=kr(s,{parentIndent:r,isLastDescendant:i,options:e}),l=[];for(let[c,u]of a.entries())c===0&&l.push(O),l.push(Zt(R(be,u))),c!==a.length-1?l.push(u.length===0?O:Ws(mt)):s.chomping==="keep"&&i&&l.push(zn(u.length===0?O:mt));return s.indent===null?o.push(Xs(K(e.tabWidth,l))):o.push(zn(K(s.indent-1+r,l))),o}var Sr=xo;function on(t,e,n){let{node:s}=t,r=s.type==="flowMapping",i=r?"{":"[",o=r?"}":"]",a=en;r&&s.children.length>0&&e.bracketSpacing&&(a=be);let l=j(0,s.children,-1),c=l?.type==="flowMappingItem"&&Je(l.key)&&Je(l.value);return[i,K(e.tabWidth,[a,Mo(t,e,n),e.trailingComma==="none"?"":gt(","),F(s)?[O,R(O,t.map(n,"endComments"))]:""]),c?"":a,o]}function Mo(t,e,n){return t.map(({isLast:s,node:r,next:i})=>[n(),s?"":[",",be,r.position.start.line!==i.position.start.line?rn(t,e.originalText):""]],"children")}function $o(t,e,n){let{node:s,parent:r}=t,{key:i,value:o}=s,a=Je(i),l=Je(o);if(a&&l)return": ";let c=n("key"),u=Bo(s)?" ":"";if(l)return s.type==="flowMappingItem"&&r.type==="flowMapping"?c:s.type==="mappingItem"&&an(i.content,e)&&!W(i.content)&&r.tag?.value!=="tag:yaml.org,2002:set"?[c,u,":"]:["? ",K(2,c)];let f=n("value");if(a)return[": ",K(2,f)];if(ce(o)||!kt(i.content))return["? ",K(2,c),O,...t.map(()=>[n(),O],"value","leadingComments"),": ",K(2,f)];if(Ro(i.content)&&!ce(i.content)&&!Oe(i.content)&&!W(i.content)&&!F(i)&&!ce(o.content)&&!Oe(o.content)&&!F(o)&&an(o.content,e)&&an(i.content,e))return[c,u,": ",f];let p=Symbol("mappingKey"),h=Ge([gt("? "),Ge(K(2,c),{id:p})]),g=[O,": ",K(2,f)],m=[u,":"];F(o)&&o.content&&J(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?m.push(" "):ce(o.content)||F(o)&&o.content&&!J(o.content,["mapping","sequence"])||r.type==="mapping"&&W(i.content)&&kt(o.content)||J(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?m.push(O):o.content?m.push(be):W(o)&&m.push(" "),m.push(f);let d=K(e.tabWidth,m);return an(i.content,e)&&!ce(i.content)&&!Oe(i.content)&&!W(i.content)&&!F(i)?Zn([[c,d]]):Zn([[h,gt(g,d,{groupId:p})]])}function an(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Bo(t){return t.key.content?.type==="alias"}function Ro(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Er=$o;function qo(t){return os(t,Fo)}function Fo(t){switch(t.type){case"document":He(t,"head",()=>t.children[0]),He(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":He(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":He(t,"key",()=>t.children[0]),He(t,"value",()=>t.children[1]);break}return t}var Cr=qo;function Ko(t,e,n){let{node:s}=t,r=[];s.type!=="mappingValue"&&ce(s)&&r.push([R(O,t.map(n,"leadingComments")),O]);let{tag:i,anchor:o}=s;i&&r.push(n("tag")),i&&o&&r.push(" "),o&&r.push(n("anchor"));let a="";return J(s,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!nn(t)&&(a=rn(t,e.originalText)),(i||o)&&(J(s,["sequence","mapping"])&&!Oe(s)?r.push(O):r.push(" ")),Oe(s)&&r.push([s.middleComments.length===1?"":O,R(O,t.map(n,"middleComments")),O]),yr(t)?r.push(Qs(e.originalText.slice(s.position.start.offset,s.position.end.offset).trimEnd())):r.push(Ge(Yo(t,e,n))),W(s)&&!J(s,["document","documentHead"])&&r.push(zs([s.type==="mappingValue"&&!s.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&kt(s)?"":dt,n("trailingComment")])),ls(s)&&r.push(K(s.type==="sequenceItem"?2:0,[O,R(O,t.map(({node:l})=>[ns(e.originalText,bt(l))?O:"",n()],"endComments"))])),r.push(a),r}function Yo(t,e,n){let{node:s}=t;switch(s.type){case"root":{let r=sn(s),i=!(J(r,["blockLiteral","blockFolded"])&&r.chomping==="keep"),o=[];return t.each(({node:a,isFirst:l})=>{l||o.push(O),o.push(n()),jo(t)&&(i&&o.push(O),o.push("..."),W(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(O),o}case"document":{let r=[];return Vo(t)&&((s.head.children.length>0||s.head.endComments.length>0)&&r.push(n("head")),W(s.head)?r.push(["---"," ",n(["head","trailingComment"])]):r.push("---")),Uo(s)&&r.push(n("body")),R(O,r)}case"documentHead":return R(O,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:r,endComments:i}=s,o="";if(r.length>0&&i.length>0){let a=sn(s);if(J(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[O,O]);else{let l=j(0,r,-1);o=J(l,["mapping"])&&ns(e.originalText,bt(i[0]))?[O,O]:O}}return[R(O,t.map(n,"children")),o,R(O,t.map(n,"endComments"))]}case"directive":return["%",R(" ",[s.name,...s.parameters])];case"comment":return["#",s.value];case"alias":return["*",s.value];case"tag":return e.originalText.slice(s.position.start.offset,s.position.end.offset);case"anchor":return["&",s.value];case"plain":return St(s.type,e.originalText.slice(s.position.start.offset,s.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(s.position.start.offset+1,s.position.end.offset-1);if(s.type==="quoteSingle"&&o.includes("\\")||s.type==="quoteDouble"&&/\\[^"]/.test(o)){let l=s.type==="quoteDouble"?'"':"'";return[l,St(s.type,o,e),l]}if(o.includes('"'))return["'",St(s.type,s.type==="quoteDouble"?Yt(0,Yt(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',St(s.type,s.type==="quoteSingle"?Yt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,St(s.type,o,e),a]}case"blockFolded":case"blockLiteral":return Sr(t,e,n);case"mapping":case"sequence":return R(O,t.map(n,"children"));case"sequenceItem":return["- ",K(2,s.content?n("content"):"")];case"mappingKey":case"mappingValue":return s.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Er(t,e,n);case"flowMapping":return on(t,e,n);case"flowSequence":return on(t,e,n);case"flowSequenceItem":return n("content");default:throw new er(s,"YAML")}}function Uo(t){return t.body.children.length>0||F(t.body)}function jo(t){let e=t.node;if(e.documentEndMarker||W(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||F(n.head)}function Vo(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||F(e.head)||W(e.head)}function St(t,e,n){let s=br(t,e,n);return R(O,s.map(r=>Zt(R(be,r))))}var Go={preprocess:Cr,embed:nr,print:Ko,massageAstNode:is,insertPragma:hr,getVisitorKeys:ir},Nr=Go;var Ar=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var ln={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces bet
Line truncated
|
||||
`)}};me.defaultYaml={explicit:!1,version:"1.2"};me.defaultTags={"!!":"tag:yaml.org,2002:"};function dn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function us(t){let e=new Set;return pe(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function ps(t,e){for(let n=1;;++n){let s=`${t}${n}`;if(!e.has(s))return s}}function Zr(t,e){let n=[],s=new Map,r=null;return{onAnchor:i=>{n.push(i),r??(r=us(t));let o=ps(e,r);return r.add(o),o},setAnchors:()=>{for(let i of n){let o=s.get(i);if(typeof o=="object"&&o.anchor&&(N(o.node)||I(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:s}}function Ie(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let r=0,i=s.length;r<i;++r){let o=s[r],a=Ie(t,s,String(r),o);a===void 0?delete s[r]:a!==o&&(s[r]=a)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let i=s.get(r),o=Ie(t,s,r,i);o===void 0?s.delete(r):o!==i&&s.set(r,o)}else if(s instanceof Set)for(let r of Array.from(s)){let i=Ie(t,s,r,r);i===void 0?s.delete(r):i!==r&&(s.delete(r),s.add(i))}else for(let[r,i]of Object.entries(s)){let o=Ie(t,s,r,i);o===void 0?delete s[r]:o!==i&&(s[r]=o)}return t.call(e,n,s)}function B(t,e,n){if(Array.isArray(t))return t.map((s,r)=>B(s,String(r),n));if(t&&typeof t.toJSON=="function"){if(!n||!mn(t))return t.toJSON(e,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(t,s),n.onCreate=i=>{s.res=i,delete n.onCreate};let r=t.toJSON(e,n);return n.onCreate&&n.onCreate(r),r}return typeof t=="bigint"&&!n?.keep?Number(t):t}var Le=class{constructor(e){Object.defineProperty(this,V,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){if(!fe(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=B(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof i=="function"?Ie(i,{"":a},"",a):a}};var Ce=class extends Le{constructor(e){super(un),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],pe(e,{Node:(i,o)=>{(Z(o)||mn(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let r;for(let i of s){if(i===this)break;i.anchor===this.source&&(r=i)}return r}toJSON(e,n){if(!n)return{source:this.source};let{anchors:s,doc:r,maxAliasCount:i}=n,o=this.resolve(r,n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(o);if(a||(B(o,null,n),a=s.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=gn(r,o,s)),a.count*a.aliasCount>i)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,s){let r=`*${this.source}`;if(e){if(dn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${r} `}return r}};function gn(t,e,n){if(Z(e)){let s=e.resolve(t),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}else if(I(e)){let s=0;for(let r of e.items){let i=gn(t,r,n);i>s&&(s=i)}return s}else if(T(e)){let s=gn(t,e.key,n),r=gn(t,e.value,n);return Math.max(s,r)}return 1}var yn=t=>!t||typeof t!="function"&&typeof t!="object",y=class extends Le{constructor(e){super(z),this.value=e}toJSON(e,n){return n?.keep?this.value:B(this.value,e,n)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var na="tag:yaml.org,2002:";function sa(t,e,n){if(e){let s=n.filter(i=>i.tag===e),r=s.find(i=>!i.format)??s[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return n.find(s=>s.identify?.(t)&&!s.format)}function Ne(t,e,n){if(fe(t)&&(t=t.contents),_(t))return t;if(T(t)){let f=n.schema[re].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(s&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=r(t)),new Ce(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=na+e.slice(2));let c=sa(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new y(t
Line truncated
|
||||
`)?te(n,e):n.includes(`
|
||||
`)?`
|
||||
`+te(n,e):(t.endsWith(" ")?"":" ")+n;var ms="flow",wn="block",Tt="quoted";function Ot(t,e,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return t;r<i&&(i=0);let l=Math.max(1+i,1+r-e.length);if(t.length<=l)return t;let c=[],u={},f=r-e.length;typeof s=="number"&&(s>r-Math.max(2,i)?c.push(0):f=r-s);let p,h,g=!1,m=-1,d=-1,b=-1;n===wn&&(m=ti(t,m,e.length),m!==-1&&(f=m+l));for(let S;S=t[m+=1];){if(n===Tt&&S==="\\"){switch(d=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}b=m}if(S===`
|
||||
`)n===wn&&(m=ti(t,m,e.length)),f=m+e.length+l,p=void 0;else{if(S===" "&&h&&h!==" "&&h!==`
|
||||
`&&h!==" "){let E=t[m+1];E&&E!==" "&&E!==`
|
||||
`&&E!==" "&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=void 0;else if(n===Tt){for(;h===" "||h===" ";)h=S,S=t[m+=1],g=!0;let E=m>b+1?m-2:d-1;if(u[E])return t;c.push(E),u[E]=!0,f=E+l,p=void 0}else g=!0}h=S}if(g&&a&&a(),c.length===0)return t;o&&o();let k=t.slice(0,c[0]);for(let S=0;S<c.length;++S){let E=c[S],C=c[S+1]||t.length;E===0?k=`
|
||||
${e}${t.slice(0,C)}`:(n===Tt&&u[E]&&(k+=`${t[E]}\\`),k+=`
|
||||
${e}${t.slice(E+1,C)}`)}return k}function ti(t,e,n){let s=e,r=e+1,i=t[r];for(;i===" "||i===" ";)if(e<r+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
|
||||
`);s=e,r=e+1,i=t[r]}return s}var kn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Sn=t=>/^(%|---|\.\.\.)/m.test(t);function ra(t,e,n){if(!e||e<0)return!1;let s=e-n,r=t.length;if(r<=s)return!1;for(let i=0,o=0;i<r;++i)if(t[i]===`
|
||||
`){if(i-o>s)return!0;if(o=i+1,r-o<=s)return!1}return!0}function _t(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=e,r=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Sn(t)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<r)l+=1;else{for(o+=n.slice(a,l)+`
|
||||
|
||||
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
|
||||
`,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:Ot(o,i,Tt,kn(e,!1))}function hs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(t))return _t(t,e);let n=e.indent||(Sn(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?s:Ot(s,n,ms,kn(e,!1))}function et(t,e){let{singleQuote:n}=e.options,s;if(n===!1)s=_t;else{let r=t.includes('"'),i=t.includes("'");r&&!i?s=hs:i&&!r?s=_t:s=n?hs:_t}return s(t,e)}var ds;try{ds=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{ds=/\n+(?!\n|$)/g}function bn({comment:t,type:e,value:n},s,r,i){let{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return et(n,s);let c=s.indent||(s.forceBlockIndent||Sn(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===y.BLOCK_FOLDED?!1:e===y.BLOCK_LITERAL?!0:!ra(n,l,c.length);if(!n)return u?`|
|
||||
`:`>
|
||||
`;let f,p;for(p=n.length;p>0;--p){let C=n[p-1];if(C!==`
|
||||
`&&C!==" "&&C!==" ")break}let h=n.substring(p),g=h.indexOf(`
|
||||
`);g===-1?f="-":n===h||g!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
||||
`&&(h=h.slice(0,-1)),h=h.replace(ds,`$&${c}`));let m=!1,d,b=-1;for(d=0;d<n.length;++d){let C=n[d];if(C===" ")m=!0;else if(C===`
|
||||
`)b=d;else break}let k=n.substring(0,b<d?b+1:d);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let E=(m?c?"2":"1":"")+f;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let C=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,L=kn(s,!0);o!=="folded"&&e!==y.BLOCK_FOLDED&&(L.onOverflow=()=>{A=!0});let w=Ot(`${k}${C}${h}`,c,wn,L);if(!A)return`>${E}
|
||||
${c}${w}`}return n=n.replace(/\n+/g,`$&${c}`),`|${E}
|
||||
${c}${k}${n}${h}`}function ia(t,e,n,s){let{type:r,value:i}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
|
||||
`)||u&&/[[\]{},]/.test(i))return et(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
|
||||
`)?et(i,e):bn(t,e,n,s);if(!a&&!u&&r!==y.PLAIN&&i.includes(`
|
||||
`))return bn(t,e,n,s);if(Sn(i)){if(l==="")return e.forceBlockIndent=!0,bn(t,e,n,s);if(a&&l===c)return et(i,e)}let f=i.replace(/\n+/g,`$&
|
||||
${l}`);if(o){let p=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(p)||h?.some(p))return et(i,e)}return a?f:Ot(f,l,ms,kn(e,!1))}function $e(t,e,n,s){let{implicitKey:r,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=y.QUOTE_DOUBLE);let l=u=>{switch(u){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return r||i?et(o.value,e):bn(o,e,n,s);case y.QUOTE_DOUBLE:return _t(o.value,e);case y.QUOTE_SINGLE:return hs(o.value,e);case y.PLAIN:return ia(o,e,n,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,p=r&&u||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function En(t,e){let n=Object.assign({blockQuote:!0,commentString:ei,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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function oa(t,e){if(e.tag){let r=t.filter(i=>i.tag===e.tag);if(r.length>0)return r.find(i=>i.format===e.format)??r[0]}let n,s;if(N(e)){s=e.value;let r=t.filter(i=>i.identify?.(s));if(r.length>1){let i=r.filter(o=>o.test);i.length>0&&(r=i)}n=r.find(i=>i.format===e.format)??r.find(i=>!i.format)}else s=e,n=t.find(r=>r.nodeClass&&s instanceof r.nodeClass);if(!n){let r=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${r} value`)}return n}function aa(t,e,{anchors:n,doc:s}){if(!s.directives)return"";let r=[],i=(N(t)||I(t))&&t.anchor;i&&dn(i)&&(n.add(i),r.push(`&${i}`));let o=t.tag??(e.default?null:e.tag);return o&&r.push(s.directives.tagString(o)),r.join(" ")}function Ae(t,e,n,s){if(T(t))return t.toString(e,n,s);if(Z(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let r,i=_(t)?t:e.doc.createNode(t,{onTagObj:l=>r=l});r??(r=oa(e.doc.schema.tags,i));let o=aa(i,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(i,e,n,s):N(i)?$e(i,e,n,s):i.toString(e,n,s);return o?N(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
||||
${e.indent}${a}`:a}function ni({key:t,value:e},n,s,r){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,p=_(t)&&t.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(I(t)||!_(t)&&typeof t=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let h=!f&&(!t||p&&e==null&&!n.inFlow||I(t)||(N(t)?t.type===y.BLOCK_FOLDED||t.type===y.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let g=!1,m=!1,d=Ae(t,n,()=>g=!0,()=>m=!0);if(!h&&!n.inFlow&&d.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||e==null)return g&&s&&s(),d===""?"?":h?`? ${d}`:d}else if(i&&!f||e==null&&h)return d=`? ${d}`,p&&!g?d+=he(d,n.indent,c(p)):m&&r&&r(),d;g&&(p=null),h?(p&&(d+=he(d,n.indent,c(p))),d=`? ${d}
|
||||
${a}:`):(d=`${d}:`,p&&(d+=he(d,n.indent,c(p))));let b,k,S;_(e)?(b=!!e.spaceBefore,k=e.commentBefore,S=e.comment):(b=!1,k=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!p&&N(e)&&(n.indentAtStart=d.length+1),m=!1,!u&&l.length>=2&&!n.inFlow&&!h&&ee(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let E=!1,C=Ae(e,n,()=>E=!0,()=>m=!0),A=" ";if(p||b||k){if(A=b?`
|
||||
`:"",k){let L=c(k);A+=`
|
||||
${te(L,n.indent)}`}C===""&&!n.inFlow?A===`
|
||||
`&&S&&(A=`
|
||||
|
||||
`):A+=`
|
||||
${n.indent}`}else if(!h&&I(e)){let L=C[0],w=C.indexOf(`
|
||||
`),M=w!==-1,Te=n.inFlow??e.flow??e.items.length===0;if(M||!Te){let qe=!1;if(M&&(L==="&"||L==="!")){let $=C.indexOf(" ");L==="&"&&$!==-1&&$<w&&C[$+1]==="!"&&($=C.indexOf(" ",$+1)),($===-1||w<$)&&(qe=!0)}qe||(A=`
|
||||
${n.indent}`)}}else(C===""||C[0]===`
|
||||
`)&&(A="");return d+=A+C,n.inFlow?E&&s&&s():S&&!E?d+=he(d,n.indent,c(S)):m&&r&&r(),d}function gs(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Cn="<<",ie={identify:t=>t===Cn||typeof t=="symbol"&&t.description===Cn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new y(Symbol(Cn)),{addToJSMap:ws}),stringify:()=>Cn},si=(t,e)=>(ie.identify(e)||N(e)&&(!e.type||e.type===y.PLAIN)&&ie.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===ie.tag&&n.default);function ws(t,e,n){let s=ri(t,n);if(ee(s))for(let r of s.items)ys(t,e,r);else if(Array.isArray(s))for(let r of s)ys(t,e,r);else ys(t,e,s)}function ys(t,e,n){let s=ri(t,n);if(!G(s))throw new Error("Merge sources must be maps or map aliases");let r=s.toJSON(null,t,Map);for(let[i,o]of r)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function ri(t,e){return t&&Z(e)?e.resolve(t.doc,t):e}function Nn(t,e,{key:n,value:s}){if(_(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(si(t,n))ws(t,e,s);else{let r=B(n,"",t);if(e instanceof Map)e.set(r,B(s,r,t));else if(e instanceof Set)e.add(r);else{let i=la(n,r,t),o=B(s,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function la(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(_(t)&&n?.doc){let s=En(n.doc,{});s.anchors=new Set;for(let i of n.anchors.keys())s.anchors.add(i.anchor);s.inFlow=!0,s.inStringifyKey=!0;let r=t.toString(s);if(!n.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),gs(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(e)}function tt(t,e,n){let s=Ne(t,void 0,n),r=Ne(e,void 0,n);return new D(s,r)}var D=class t{constructor(e,n=null){Object.defineProperty(this,V,{value:fs}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return _(n)&&(n=n.clone(e)),_(s)&&(s=s.clone(e)),new t(n,s)}toJSON(e,n){let s=n?.mapAsMap?new Map:{};return Nn(n,s,this)}toString(e,n,s){return e?.doc?ni(this,e,n,s):JSON.stringify(this)}};function Tn(t,e,n){return(e.inFlow??t.flow?fa:ca)(t,e,n)}function ca({comment:t,items:e},n,{blockItemPrefix:s,flowChars:r,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null}),f=!1,p=[];for(let g=0;g<e.length;++g){let m=e[g],d=null;if(_(m))!f&&m.spaceBefore&&p.push(""),An(n,p,m.commentBefore,f),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(!f&&k.spaceBefore&&p.push(""),An(n,p,k.commentBefore,f))}f=!1;let b=Ae(m,u,()=>d=null,()=>f=!0);d&&(b+=he(b,i,c(d))),f&&d&&(f=!1),p.push(s+b)}let h;if(p.length===0)h=r.start+r.end;else{h=p[0];for(let g=1;g<p.length;++g){let m=p[g];h+=m?`
|
||||
${l}${m}`:`
|
||||
`}}return t?(h+=`
|
||||
`+te(c(t),l),a&&a()):f&&o&&o(),h}function fa({items:t},e,{flowChars:n,itemIndent:s}){let{indent:r,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;s+=i;let l=Object.assign({},e,{indent:s,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<t.length;++g){let m=t[g],d=null;if(_(m))m.spaceBefore&&f.push(""),An(e,f,m.commentBefore,!1),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(k.spaceBefore&&f.push(""),An(e,f,k.commentBefore,!1),k.comment&&(c=!0));let S=_(m.value)?m.value:null;S?(S.comment&&(d=S.comment),S.commentBefore&&(c=!0)):m.value==null&&k?.comment&&(d=k.comment)}d&&(c=!0);let b=Ae(m,l,()=>d=null);c||(c=f.length>u||b.includes(`
|
||||
`)),g<t.length-1?b+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((k,S)=>k+S.length+2,2)+(b.length+2)>e.options.lineWidth)),c&&(b+=",")),d&&(b+=he(b,s,a(d))),f.push(b),u=f.length}let{start:p,end:h}=n;if(f.length===0)return p+h;if(!c){let g=f.reduce((m,d)=>m+d.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=p;for(let m of f)g+=m?`
|
||||
${i}${r}${m}`:`
|
||||
`;return`${g}
|
||||
${r}${h}`}else return`${p}${o}${f.join(" ")}${o}${h}`}function An({indent:t,options:{commentString:e}},n,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){let i=te(e(s),t);n.push(i.trimStart())}}function Pe(t,e){let n=N(e)?e.value:e;for(let s of t)if(T(s)&&(s.key===e||s.key===n||N(s.key)&&s.key.value===n))return s}var x=class extends ze{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(re,e),this.items=[]}static from(e,n,s){let{keepUndefined:r,replacer:i}=s,o=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||r)&&o.items.push(tt(l,c,s))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;T(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new D(e,e?.value):s=new D(e.key,e.value);let r=Pe(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${s.key} already set`);N(r.value)&&yn(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let o=this.items.findIndex(a=>i(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let n=Pe(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=Pe(this.items,e)?.value;return(!n&&N(r)?r.value:r)??void 0}has(e){return!!Pe(this.items,e)}set(e,n){this.add(new D(e,n),!0)}toJSON(e,n,s){let r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let i of this.items)Nn(n,r,i);return r}toString(e,n,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!T(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Tn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}};var oe={collection:"map",default:!0,nodeClass:x,tag:"tag:yaml.org,2002:map",resolve(t,e){return G(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>x.from(t,e,n)};var Y=class extends ze{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ee,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=On(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let s=On(e);if(typeof s!="number")return;let r=this.items[s];return!n&&N(r)?r.value:r}has(e){let n=On(e);return typeof n=="number"&&n<this.items.length}set(e,n){let s=On(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[s];N(r)&&yn(n)?r.value=n:this.items[s]=n}toJSON(e,n){let s=[];n?.onCreate&&n.onCreate(s);let r=0;for(let i of this.items)s.push(B(i,String(r++),n));return s}toString(e,n,s){return e?Tn(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof r=="function"){let l=n instanceof Set?a:String(o++);a=r.call(n,l,a)}i.items.push(Ne(a,void 0,s))}}return i}};function On(t){let e=N(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var ae={collection:"seq",default:!0,nodeClass:Y,tag:"tag:yaml.org,2002:seq",resolve(t,e){return ee(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>Y.from(t,e,n)};var ve={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),$e(t,e,n,s)}};var Be={identify:t=>t==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:t},e)=>typeof t=="string"&&Be.test.test(t)?t:e.options.nullStr};var It={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new y(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&It.test.test(t)){let s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function U({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);let r=typeof s=="number"?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}var _n={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},In={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+
Line truncated
|
||||
`:" ")}return $e({comment:t,type:e,value:a},s,r,i)}};function ks(t,e){if(ee(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!T(s)){if(G(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");let r=s.items[0]||new D(new y(null));if(s.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${s.commentBefore}
|
||||
${r.key.commentBefore}`:s.commentBefore),s.comment){let i=r.value??r.key;i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment}s=r}t.items[n]=T(s)?s:new D(s)}}else e("Expected a sequence for this tag");return t}function Ss(t,e,n){let{replacer:s}=n,r=new Y(t);r.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(tt(a,l,n))}return r}var Pt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:ks,createNode:Ss};var nt=class t extends Y{constructor(){super(),this.add=x.prototype.add.bind(this),this.delete=x.prototype.delete.bind(this),this.get=x.prototype.get.bind(this),this.has=x.prototype.has.bind(this),this.set=x.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let s=new Map;n?.onCreate&&n.onCreate(s);for(let r of this.items){let i,o;if(T(r)?(i=B(r.key,"",n),o=B(r.value,i,n)):i=B(r,"",n),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,n,s){let r=Ss(e,n,s),i=new this;return i.items=r.items,i}};nt.tag="tag:yaml.org,2002:omap";var vt={collection:"seq",identify:t=>t instanceof Map,nodeClass:nt,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=ks(t,e),s=[];for(let{key:r}of n.items)N(r)&&(s.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):s.push(r.value));return Object.assign(new nt,n)},createNode:(t,e,n)=>nt.from(t,e,n)};function ci({value:t,source:e},n){return e&&(t?Es:Cs).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var Es={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(!0),stringify:ci},Cs={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(!1),stringify:ci};var fi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:U},ui={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():U(t)}},pi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new y(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:U};var Dt=t=>typeof t=="bigint"||Number.isInteger(t);function $n(t,e,n,{intAsBigInt:s}){let r=t[0];if((r==="-"||r==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return r==="-"?BigInt(-1)*o:o}let i=parseInt(t,n);return r==="-"?-1*i:i}function Ns(t,e,n){let{value:s}=t;if(Dt(s)){let r=s.toString(e);return s<0?"-"+n+r.substr(1):n+r}return U(t)}var mi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>$n(t,2,2,n),stringify:t=>Ns(t,2,"0b")},hi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>$n(t,1,8,n),stringify:t=>Ns(t,8,"0")},di={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>$n(t,0,10,n),stringify:U},gi={identify:Dt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>$n(t,2,16,n),stringify:t=>Ns(t,16,"0x")};var st=class t extends x{constructor(e){super(e),this.tag=t.tag}add(e){let n;T(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new D(e.key,null):n=new D(e,null),Pe(this.items,n.key)||this.items.push(n)}get(e,n){let s=Pe(this.items,e);return!n&&T(s)?N(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=Pe(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new D(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof r=="function"&&(o=r.call(n,o,o)),i.items.push(tt(o,null,s));return i}};st.tag="tag:yaml.org,2002:set";var xt={collection:"map",identify:t=>t instanceof Set,nodeClass:st,default
Line truncated
|
||||
`)?(n.push("..."),n.push(te(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(te(i(l),"")))}return n.join(`
|
||||
`)+`
|
||||
`}var De=class t{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,V,{value:pn});let r=null;typeof n=="function"||Array.isArray(n)?r=n:s===void 0&&n&&(s=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new me({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,r,s)}clone(){let e=Object.create(t.prototype,{[V]:{value:pn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=_(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){it(this.contents)&&this.contents.add(e)}addIn(e,n){it(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let s=us(this);e.anchor=!n||s.has(n)?ps(n||"a",s):n}return new Ce(e.anchor)}createNode(e,n,s){let r;if(typeof n=="function")e=n.call({"":e},"",e),r=n;else if(Array.isArray(n)){let d=k=>typeof k=="number"||k instanceof String||k instanceof Number,b=n.filter(d).map(String);b.length>0&&(n=n.concat(b)),r=n}else s===void 0&&n&&(s=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:p,sourceObjects:h}=Zr(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:h},m=Ne(e,u,g);return a&&I(m)&&(m.flow=!0),p(),m}createPair(e,n,s={}){let r=this.createNode(e,null,s),i=this.createNode(n,null,s);return new D(r,i)}delete(e){return it(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ze(e)?this.contents==null?!1:(this.contents=null,!0):it(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return I(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return Ze(e)?!n&&N(this.contents)?this.contents.value:this.contents:I(this.contents)?this.contents.getIn(e,n):void 0}has(e){return I(this.contents)?this.contents.has(e):!1}hasIn(e){return Ze(e)?this.contents!==void 0:I(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=At(this.schema,[e],n):it(this.contents)&&this.contents.set(e,n)}setIn(e,n){Ze(e)?this.contents=n:this.contents==null?this.contents=At(this.schema,Array.from(e),n):it(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new me({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new me({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new Mt(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=B(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?Ie(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return Si(this,e)}};function it(t){if(I(t))return!0;throw new Error("Expected a YAML collection as document contents")}var $t=class extends Error{constructor(e,n,s,r){super(),this.name=e,this.code=s,this.message=r,this.pos=n}},de=class extends $t{constructor(e,n,s){super("YAMLParseError",e,n,s)}},Bt=class extends $t{constructor(e,n,s){super("YAMLWarning",e,n,s)}};function ge(t,{flow:e,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",p="",h=!1,g=!1,m=null,d=null,b=null,k=null,S=null,E=null,C=null;for(let w of t)switch(g&&(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma"&&i(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(c&&w.type!=="comment"&&w.type!=="newline"&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),w.type){ca
Line truncated
|
||||
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(xe(e.key)||xe(e.value))return!0}return!1;default:return!0}}function Rt(t,e,n){if(e?.type==="flow-collection"){let s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&xe(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Fn(t,e,n){let{uniqueKeys:s}=t.options;if(s===!1)return!1;let r=typeof s=="function"?s:(i,o)=>i===o||N(i)&&N(o)&&i.value===o.value;return e.some(i=>r(i.key,n))}var Ei="All mapping items must start at the same column";function Ci({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??x,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(let u of s.items){let{start:f,key:p,sep:h,value:g}=u,m=ge(f,{indicator:"explicit-key-ind",next:p??h?.[0],offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0}),d=!m.found;if(d){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&r(l,"BAD_INDENT",Ei)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
|
||||
`+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||xe(p))&&r(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==s.indent&&r(l,"BAD_INDENT",Ei);n.atKey=!0;let b=m.end,k=p?t(n,p,m,r):e(n,b,f,null,m,r);n.schema.compat&&Rt(s.indent,p,r),n.atKey=!1,Fn(n,a.items,k)&&r(b,"DUPLICATE_KEY","Map keys must be unique");let S=ge(h??[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:r,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=S.end,S.found){d&&(g?.type==="block-map"&&!S.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<S.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let E=g?t(n,g,S,r):e(n,l,h,null,S,r);n.schema.compat&&Rt(s.indent,g,r),l=E.range[2];let C=new D(k,E);n.options.keepSourceTokens&&(C.srcToken=u),a.items.push(C)}else{d&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
|
||||
`+S.comment:k.comment=S.comment);let E=new D(k);n.options.keepSourceTokens&&(E.srcToken=u),a.items.push(E)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function Ni({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??Y,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(let{start:u,value:f}of s.items){let p=ge(u,{indicator:"seq-item-ind",next:f,offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||f)f?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let h=f?t(n,f,p,r):e(n,p.end,u,null,p,r);n.schema.compat&&Rt(s.indent,f,r),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}function ye(t,e,n,s){let r="";if(t){let i=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:r,offset:e}}var Os="Block collections are not allowed within flow collections",_s=t=>t&&(t.type==="block-map"||t.type==="block-seq");function Ai({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=s.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?x:Y),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=s.offset+s.start.source.length;for(let d=0;d<s.items.length;++d){let b=s.items[d],{start:k,key:S,sep:E,value:C}=b,A=ge(k,{flow:a,indicator:"explicit-key-ind",next:S??E?.[0],offset:f,onError:r,parentIndent:s.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!E&&!C){d===0&&A.comma?r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):d<s.items.length-1&&r(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
||||
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&n.options.strict&&xe(S)&&r(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(d===0)A.comma&&r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||r(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let L="";e:for(let w of k)switch(w.type){case"comma":case"space":break;case"comment":L=w.source.substring(1);break e;default:break e}if(L){let w=c.items[c.items.length-1];T(w)&&(w=w.value??w.key),w.comment?w.comment+=`
|
||||
`+L:w.comment=L,A.comment=A.comment.substring(L.length+1)}}if(!o&&!E&&!A.found){let L=C?t(n,C,A,r):e(n,A.end,E,null,A,r);c.items.push(L),f=L.range[2],_s(C)&&r(L.range,"BLOCK_IN_FLOW",Os)}else{n.atKey=!0;let L=A.end,w=S?t(n,S,A,r):e(n,L,k,null,A,r);_s(S)&&r(w.range,"BLOCK_IN_FLOW",Os),n.atKey=!1;let M=ge(E??[],{flow:a,indicator:"map-value-ind",next:C,offset:w.range[2],onError:r,parentIndent:s.indent,startOnNewline:!1});if(M.found){if(!o&&!A.found&&n.options.strict){if(E)for(let $ of E){if($===M.found)break;if($.type==="newline"){r($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<M.found.offset-1024&&r(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else C&&("source"in C&&C.source?.[0]===":"?r(C,"MISSING_CHAR",`Missing space after : in ${a}`):r(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Te=C?t(n,C,M,r):M.found?e(n,M.end,E,null,M,r):null;Te?_s(C)&&r(Te.range,"BLOCK_IN_FLOW",Os):M.comment&&(w.comment?w.comment+=`
|
||||
`+M.comment:w.comment=M.comment);let qe=new D(w,Te);if(n.options.keepSourceTokens&&(qe.srcToken=b),o){let $=c;Fn(n,$.items,w)&&r(L,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(qe)}else{let $=new x(n.schema);$.flow=!0,$.items.push(qe);let js=(Te??w).range;$.range=[w.range[0],js[1],js[2]],c.items.push($)}f=Te?Te.range[2]:M.end}}let p=o?"}":"]",[h,...g]=s.end,m=f;if(h?.source===p)m=h.offset+h.source.length;else{let d=a[0].toUpperCase()+a.substring(1),b=u?`${d} must end with a ${p}`:`${d} in block collection must be sufficiently indented and end with a ${p}`;r(f,u?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){let d=ye(g,m,n.options.strict,r);d.comment&&(c.comment?c.comment+=`
|
||||
`+d.comment:c.comment=d.comment),c.range=[s.offset,m,d.offset]}else c.range=[s.offset,m,m];return c}function Is(t,e,n,s,r,i){let o=n.type==="block-map"?Ci(t,e,n,s,i):n.type==="block-seq"?Ni(t,e,n,s,i):Ai(t,e,n,s,i),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Ti(t,e,n,s,r){let i=s.tag,o=i?e.directives.tagName(i.source,p=>r(i,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:h}=s,g=p&&i?p.offset>i.offset?p:i:p??i;g&&(!h||h.offset<g.offset)&&r(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===x.tagName&&a==="map"||o===Y.tagName&&a==="seq")return Is(t,e,n,r,o);let l=e.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=e.schema.knownTags[o];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Is(t,e,n,r,o)}let c=Is(t,e,n,r,o,l),u=l.resolve?.(c,p=>r(i,"TAG_RESOLVE_FAILED",p),e.options)??c,f=_(u)?u:new y(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function Ls(t,e,n){let s=e.offset,r=ha(e,t.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[s,s,s]};let i=r.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=e.source?da(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let d=o[m][1];if(d===""||d==="\r")a=m;else break}if(a===0){let m=r.chomp==="+"&&o.length>0?`
|
||||
`.repeat(Math.max(1,o.length-1)):"",d=s+r.length;return e.source&&(d+=e.source.length),{value:m,type:i,comment:r.comment,range:[s,d,d]}}let l=e.indent+r.indent,c=e.offset+r.length,u=0;for(let m=0;m<a;++m){let[d,b]=o[m];if(b===""||b==="\r")r.indent===0&&d.length>l&&(l=d.length);else{d.length<l&&n(c+d.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=d.length),u=m,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=d.length+b.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",p="",h=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
|
||||
`;for(let m=u;m<a;++m){let[d,b]=o[m];c+=d.length+b.length+1;let k=b[b.length-1]==="\r";if(k&&(b=b.slice(0,-1)),b&&d.length<l){let E=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-b.length-(k?2:1),"BAD_INDENT",E),d=""}i===y.BLOCK_LITERAL?(f+=p+d.slice(l)+b,p=`
|
||||
`):d.length>l||b[0]===" "?(p===" "?p=`
|
||||
`:!h&&p===`
|
||||
`&&(p=`
|
||||
|
||||
`),f+=p+d.slice(l)+b,p=`
|
||||
`,h=!0):b===""?p===`
|
||||
`?f+=`
|
||||
`:p=`
|
||||
`:(f+=p+b,p=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
|
||||
`+o[m][0].slice(l);f[f.length-1]!==`
|
||||
`&&(f+=`
|
||||
`);break;default:f+=`
|
||||
`}let g=s+r.length+e.source.length;return{value:f,type:i,comment:r.comment,range:[s,g,g]}}function ha({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],i=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let h=r[p];if(!a&&(h==="-"||h==="+"))a=h;else{let g=Number(h);!o&&g?o=g:l===-1&&(l=t+p)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",f=r.length;for(let p=1;p<e.length;++p){let h=e[p];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let g=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",g);let m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:f}}function da(t){let e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function Ps(t,e,n){let{offset:s,type:r,source:i,end:o}=t,a,l,c=(p,h,g)=>n(s+p,h,g);switch(r){case"scalar":a=y.PLAIN,l=ga(i,c);break;case"single-quoted-scalar":a=y.QUOTE_SINGLE,l=ya(i,c);break;case"double-quoted-scalar":a=y.QUOTE_DOUBLE,l=wa(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}let u=s+i.length,f=ye(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[s,u,f.offset]}}function ga(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Oi(t)}function ya(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Oi(t.slice(1,-1)).replace(/''/g,"'")}function Oi(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(t);if(!s)return t;let r=s[1],i=" ",o=e.lastIndex;for(n.lastIndex=o;s=n.exec(t);)s[1]===""?i===`
|
||||
`?r+=i:i=`
|
||||
`:(r+=i+s[1],i=" "),o=n.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(t),r+i+(s?.[1]??"")}function wa(t,e){let n="";for(let s=1;s<t.length-1;++s){let r=t[s];if(!(r==="\r"&&t[s+1]===`
|
||||
`))if(r===`
|
||||
`){let{fold:i,offset:o}=ba(t,s);n+=i,s=o}else if(r==="\\"){let i=t[++s],o=ka[i];if(o)n+=o;else if(i===`
|
||||
`)for(i=t[s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="\r"&&t[s+1]===`
|
||||
`)for(i=t[++s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=Sa(t,s+1,a,e),s+=a}else{let a=t.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(r===" "||r===" "){let i=s,o=t[s+1];for(;o===" "||o===" ";)o=t[++s+1];o!==`
|
||||
`&&!(o==="\r"&&t[s+2]===`
|
||||
`)&&(n+=s>i?t.slice(i,s+1):r)}else n+=r}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function ba(t,e){let n="",s=t[e+1];for(;(s===" "||s===" "||s===`
|
||||
`||s==="\r")&&!(s==="\r"&&t[e+2]!==`
|
||||
`);)s===`
|
||||
`&&(n+=`
|
||||
`),e+=1,s=t[e+1];return n||(n=" "),{fold:n,offset:e}}var ka={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Sa(t,e,n,s){let r=t.substr(e,n),o=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function vs(t,e,n,s){let{value:r,type:i,comment:o,range:a}=e.type==="block-scalar"?Ls(t,e,s):Ps(e,t.options.strict,s),l=n?t.directives.tagName(n.source,f=>s(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[z]:l?c=Ea(t.schema,r,l,n,s):e.type==="scalar"?c=Ca(t,r,e,s):c=t.schema[z];let u;try{let f=c.resolve(r,p=>s(n??e,"TAG_RESOLVE_FAILED",p),t.options);u=N(f)?f:new y(f)}catch(f){let p=f instanceof Error?f.message:String(f);s(n??e,"TAG_RESOLVE_FAILED",p),u=new y(r)}return u.range=a,u.source=r,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Ea(t,e,n,s,r){if(n==="!")return t[z];let i=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(e))return a;let o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[z])}function Ca({atKey:t,directives:e,schema:n},s,r,i){let o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(s))||n[z];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(s))??n[z];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;i(r,"TAG_RESOLVE_FAILED",u,!0)}}return o}function _i(t,e,n){if(e){n??(n=e.length);for(let s=n-1;s>=0;--s){let r=e[s];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=e[++s];r?.type==="space";)t+=r.source.length,r=e[++s];break}}return t}var Na={composeNode:Ds,composeEmptyNode:Kn};function Ds(t,e,n,s){let r=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=Aa(t,e,s),(a||l)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=vs(t,e,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Ti(Na,t,e,n,s),a&&(c.anchor=a.source.substring(1))}catch(f){let p=f instanceof Error?f.message:String(f);s(e,"RESOURCE_EXHAUSTION",p)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Kn(t,e.offset,void 0,null,n,s)),a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&t.options.stringKeys&&(!N(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Kn(t,e,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:_i(e,n,s),indent:-1,source:""},f=vs(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function Aa({options:t},{offset:e,source:n,end:s},r){let i=new Ce(n.substring(1));i.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+n.length,a=ye(s,o,t.strict,r);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function Ii(t,e,{offset:n,start:s,value:r,end:i},o){let a=Object.assign({_directives:e},t),l=new De(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=ge(s,{indicator:"doc-start",next:r??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?Ds(c,r,u,o):Kn(c,u.end,s,null,u,o);let f=l.contents.range[2],p=ye(i,f,!1,o);return p.comment&&(l.comment=p.comment),l.range=[n,f,p.offset],l}function qt(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Li(t){let e="",n=!1,s=!1;for(let r=0;r<t.length;++r){let i=t[r];switch(i[0]){case"#":e+=(e===""?"":s?`
|
||||
|
||||
`:`
|
||||
`)+(i.substring(1)||" "),n=!0,s=!1;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:e,afterEmptyLine:s}}var ot=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,r,i)=>{let o=qt(n);i?this.warnings.push(new Bt(o,s,r)):this.errors.push(new de(o,s,r))},this.directives=new me({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:s,afterEmptyLine:r}=Li(this.prelude);if(s){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
||||
${s}`:s;else if(r||e.directives.docStart||!i)e.commentBefore=s;else if(I(i)&&!i.flow&&i.items.length>0){let o=i.items[0];T(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
|
||||
${a}`:s}else{let o=i.commentBefore;i.commentBefore=o?`${s}
|
||||
${o}`:s}}if(n){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Li(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,s=-1){for(let r of e)yield*this.next(r);yield*this.end(n,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,s,r)=>{let i=qt(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=Ii(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new de(qt(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new de(qt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;let n=ye(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
|
||||
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new de(qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new De(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};var xs=Symbol("break visit"),Ta=Symbol("skip children"),Pi=Symbol("remove item");function Re(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),vi(Object.freeze([]),t,e)}Re.BREAK=xs;Re.SKIP=Ta;Re.REMOVE=Pi;Re.itemAtPath=(t,e)=>{let n=t;for(let[s,r]of e){let i=n?.[s];if(i&&"items"in i)n=i.items[r];else return}return n};Re.parentCollection=(t,e)=>{let n=Re.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],r=n?.[s];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function vi(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(let r of["key","value"]){let i=e[r];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=vi(Object.freeze(t.concat([[r,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===xs)return xs;a===Pi&&(i.items.splice(o,1),o-=1)}}typeof s=="function"&&r==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}var Ms="\uFEFF",$s="",Bs="",Yn="";function Di(t){switch(t){case Ms:return"byte-order-mark";case $s:return"doc-mode";case Bs:return"flow-error-end";case Yn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
||||
`:case`\r
|
||||
`: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(t[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 le(t){switch(t){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}var xi=new Set("0123456789ABCDEFabcdef"),_a=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Un=new Set(",[]{}"),Ia=new Set(` ,[]{}
|
||||
\r `),Rs=t=>!t||Ia.has(t),Ft=class{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(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
||||
`?!0:n==="\r"?this.buffer[e+1]===`
|
||||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+e];if(n==="\r"){let r=this.buffer[s+e+1];if(r===`
|
||||
`||!r&&!this.atEnd)return e+s+1}return n===`
|
||||
`||s>=this.indentNext||!n&&!this.atEnd?e+s:-1}if(n==="-"||n==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&le(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){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 e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Ms&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,s=e.indexOf("#");for(;s!==-1;){let i=e[s-1];if(i===" "||i===" "){n=s-1;break}else s=e.indexOf("#",s+1)}for(;;){let i=e[n-1];if(i===" "||i===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield $s,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&le(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!le(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&le(n)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.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(Rs),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,s=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&le(r[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Bs,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"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(Rs),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||le(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let s=this.buffer.substring(0,n),r=s.indexOf(`
|
||||
`,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=s.indexOf(`
|
||||
`,i)}r!==-1&&(n=r-(s[r-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 e=this.pos;for(;;){let n=this.buffer[++e];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=>le(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
|
||||
`:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
||||
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
||||
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(s=this.buffer[r];s===" ";)s=this.buffer[++r];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
||||
`;)s=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
|
||||
`&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield Yn,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,s=this.pos-1,r;for(;r=this.buffer[++s];)if(r===":"){let i=this.buffer[s+1];if(le(i)||e&&Un.has(i))break;n=s}else if(le(r)){let i=this.buffer[s+1];if(r==="\r"&&(i===`
|
||||
`?(s+=1,r=`
|
||||
`,i=this.buffer[s+1]):n=s),i==="#"||e&&Un.has(i))break;if(r===`
|
||||
`){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&Un.has(r))break;n=s}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Yn,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(Rs),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,s=this.charAt(1);if(le(s)||n&&Un.has(s)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!le(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(_a.has(n))n=this.buffer[++e];else if(n==="%"&&xi.has(this.buffer[e+1])&&xi.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||||
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var at=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,s=this.lineStarts.length;for(;n<s;){let i=n+s>>1;this.lineStarts[i]<e?n=i+1:s=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let r=this.lineStarts[n-1];return{line:n,col:e-r+1}}}};function Me(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Mi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Bi(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function jn(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function lt(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Vn(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function $i(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Me(e.start,"explicit-key-ind")&&!Me(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Bi(e.value)?e.value.end?Vn(e.value.end,e.sep):e.value.end=e.sep:Vn(e.start,e.sep),delete e.sep)}var ct=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ft,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,n))yield*this.next(s);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=Di(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&$i(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];r.value?s.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=s.items[s.items.length-1];!r||r.value?s.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Mi(r.start)===-1&&(n.indent===0||r.start.every(i=>i.type!=="comment"||i.
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Vn(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Me(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Bi(n.key)&&!Me(n.sep,"newline")){let o=lt(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Me(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=lt(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Me(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Me(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){Vn(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Me(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.p
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=jn(e),s=lt(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=jn(e),s=lt(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Ri(t,e,n){let s=t.srcToken;if(!s||s.type!=="flow-collection")throw new Error("Expected flow-collection CST node for flow sequence");let r=t.items.map((o,a)=>{let l=s.items[a];if(Pa(o,l))return Se(se(o.items),l,e,Ct);if(T(o))return Se(o,l,e,Ct);{let c=[];for(let f of q(l.start)){if(ke(f)){c.push(f);continue}if(f.type==="comma")continue;throw new Error(`Unexpected token type in sequence item start: ${f.type}`)}let u=e.transformNode(o,{tokens:c});return Hr(X(u.position.start,u.position.end),u)}});if(t.items.length<s.items.length)for(let o=t.items.length;o<s.items.length;o++){let a=s.items[o];for(let l of v(a.start,e)){if(l.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${l.type}`)}}let i=null;for(let o of q(s.end)){if(o.type==="comment"){e.transformComment(o);continue}if(o.type==="flow-seq-end"){i=o;continue}throw new Error(`Unexpected token type in flow seq end: ${o.type}`)}if(!i)throw new Error("Expected flow-seq-end token");return Qr(e.transformRange([s.start.offset,i.offset+i.source.length]),e.transformContentProperties(t,n.tokens),r)}function Pa(t,e){if(t.srcToken)return!1;if(!G(t))return!1;return t.items.length!==1?!1:t.items[0].srcToken===e}function Qn(t,e,n){return{type:"mapping",position:t,leadingComments:[],...e,children:n}}function Hn(t,e,n){return{type:"mappingItem",position:t,leadingComments:[],children:[e,n]}}function qi(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-map")throw new Error("Expected block mapping srcToken");let r=t.items.map((i,o)=>{let a=s.items[o];return Se(i,a,e,Hn)});if(t.items.length<s.items.length)for(let i=t.items.length;i<s.items.length;i++){let o=s.items[i];for(let a of v(o.start,e))throw new Error(`Unexpected token type in collection item start: ${a.type}`)}return Qn(X(r[0].position.start,se(r).position.end),e.transformContentProperties(t,n.tokens),r)}function qs(t,e,n){return{type:"plain",position:t,leadingComments:[],trailingComment:null,...e,value:n}}function Fi(t,e,n){for(let s=e;s>=0;s--)if(n.test(t[s]))return s;return-1}function Ki(t,e,n){if(t.range[0]===t.range[1]){let r=Fi(e.text,t.range[0]-1,/\S/u)+1;return qs(e.transformRange([r,r]),e.transformContentProperties(t,n.tokens),"")}let s=t.srcToken;if(!s||s.type!=="scalar")throw new Error("Expected plain scalar srcToken");for(let r of v(s.end,e))throw new Error(`Unexpected token type in plain scalar end: ${r.type}`);return qs(e.transformRange(t.range),e.transformContentProperties(t,n.tokens),t.source)}function Yi(t){return{...t,type:"quoteDouble"}}function Ui(t,e,n){return{type:"quoteValue",position:t,...e,leadingComments:[],trailingComment:null,value:n}}function Jn(t,e,n,s){for(let r of v(e.end,n))throw new Error(`Unexpected token type in quote value end: ${r.type}`);return Ui(n.transformRange(t.range),n.transformContentProperties(t,s.tokens),t.source)}function ji(t,e,n){let s=t.srcToken;if(!s||s.type!=="double-quoted-scalar")throw new Error("Expected double-quoted scalar srcToken");return Yi(Jn(t,s,e,n))}function Vi(t){return{...t,type:"quoteSingle"}}function Gi(t,e,n){let s=t.srcToken;if(!s||s.type!=="single-quoted-scalar")throw new Error("Expected single-quoted scalar srcToken");return Vi(Jn(t,s,e,n))}function Qi(t,e,n){return{type:"sequence",position:t,leadingComments:[],endComments:[],...e,children:n}}function Hi(t,e){return{type:"sequenceItem",position:t,leadingComments:[],trailingComment:null,endComments:[],children:
Line truncated
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
var Oo=Object.defineProperty;var Qt=(t,e)=>{for(var n in e)Oo(t,n,{get:e[n],enumerable:!0})};var To={};Qt(To,{__parsePrettierYamlConfig:()=>fl,languages:()=>vr,options:()=>Dr,parsers:()=>Xs,printers:()=>cl});var Ht=(t,e)=>(n,s,...r)=>n|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,r);function _o(t){return this[t<0?this.length+t:t]}var Io=Ht("at",function(){if(Array.isArray(this)||typeof this=="string")return _o}),V=Io;var Lo=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},Po=Ht("replaceAll",function(){if(typeof this=="string")return Lo}),Jt=Po;var vo=()=>{},dt=vo;var gt="string",yt="array",Wt="cursor",Xt="indent",Ue="align",zt="trim",je="group",Ve="fill",Ge="if-break",Zt="indent-if-break",Qe="line-suffix",en="line-suffix-boundary",ke="line",tn="label",He="break-parent",nn=new Set([Wt,Xt,Ue,zt,je,Ve,Ge,Zt,Qe,en,ke,tn,He]);function sn(t,e,n){if(!t.has(e)){let s=n(e);t.set(e,s)}return t.get(e)}function Do(t){if(typeof t=="string")return gt;if(Array.isArray(t))return yt;if(!t)return;let{type:e}=t;if(nn.has(e))return e}var rn=Do;var xo=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Mo(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||||
Expected it to be 'string' or 'object'.`;if(rn(t))throw new Error("doc is valid.");let n=Object.prototype.toString.call(t);if(n!=="[object Object]")return`Unexpected doc '${n}'.`;let s=xo([...nn].map(r=>`'${r}'`));return`Unexpected doc.type '${t.type}'.
|
||||
Expected it to be ${s}.`}var os=class extends Error{name="InvalidDocError";constructor(e){super(Mo(e)),this.doc=e}},Zs=os;function $o(t,e){if(typeof t=="string")return e(t);let n=new Map;return s(t);function s(i){return sn(n,i,r)}function r(i){switch(rn(i)){case yt:return e(i.map(s));case Ve:return e({...i,parts:i.parts.map(s)});case Ge:return e({...i,breakContents:s(i.breakContents),flatContents:s(i.flatContents)});case je:{let{expandedStates:o,contents:a}=i;return o?(o=o.map(s),a=o[0]):a=s(a),e({...i,contents:a,expandedStates:o})}case Ue:case Xt:case Zt:case tn:case Qe:return e({...i,contents:s(i.contents)});case gt:case Wt:case zt:case en:case ke:case He:return e(i);default:throw new Zs(i)}}}function er(t,e=wt){return $o(t,n=>typeof n=="string"?R(e,n.split(`
|
||||
`)):n)}var re=dt,on=dt,tr=dt,nr=dt;function bt(t,e){return nr(t),re(e),{type:Ue,contents:e,n:t}}function as(t){return bt(Number.NEGATIVE_INFINITY,t)}function sr(t){return bt({type:"root"},t)}function rr(t){return bt(-1,t)}var kt={type:He};function an(t){return tr(t),{type:Ve,parts:t}}function Je(t,e={}){return re(t),on(e.expandedStates,!0),{type:je,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function ls(t,e){return Je(t[0],{...e,expandedStates:t})}function St(t,e="",n={}){return re(t),e!==""&&re(e),{type:Ge,breakContents:t,flatContents:e,groupId:n.groupId}}function R(t,e){re(t),on(e);let n=[];for(let s=0;s<e.length;s++)s!==0&&n.push(t),n.push(e[s]);return n}var Se={type:ke},ln={type:ke,soft:!0},Bo={type:ke,hard:!0},O=[Bo,kt],Ro={type:ke,hard:!0,literal:!0},wt=[Ro,kt];function ir(t){return re(t),{type:Qe,contents:t}}function cn(t){return(e,n,s)=>{if(n===!1)return!1;let r=!!s?.backwards,{length:i}=e,o=n;for(;o>=0&&o<i;){let a=e.charAt(o);if(t instanceof RegExp){if(!t.test(a))return o}else if(!t.includes(a))return o;r?o--:o++}return o===-1||o===i?o:!1}}var bc=cn(/\s/),cs=cn(" "),kc=cn(",; "),Sc=cn(/[^\n\r]/);var or=t=>t===`
|
||||
`||t==="\r"||t==="\u2028"||t==="\u2029";function qo(t,e,n){if(e===!1)return!1;let s=!!n?.backwards,r=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&r===`
|
||||
`)return e-2;if(or(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===`
|
||||
`)return e+2;if(or(r))return e+1}return e}var fs=qo;function Fo(t,e){let n=e-1;n=cs(t,n,{backwards:!0}),n=fs(t,n,{backwards:!0}),n=cs(t,n,{backwards:!0});let s=fs(t,n,{backwards:!0});return n!==s}var us=Fo;var ps=class extends Error{name="UnexpectedNodeError";constructor(e,n,s="type"){super(`Unexpected ${n} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},ar=ps;function lr(t,e){let{node:n}=t;if(n.type==="root"&&e.filepath&&/(?:[/\\]|^)\.(?:prettier|stylelint|lintstaged)rc$/.test(e.filepath))return async s=>{let r=await s(e.originalText,{parser:"json"});return r?[r,O]:void 0}}lr.getVisitorKeys=()=>[];var cr=lr;var Et=null;function Ct(t){if(Et!==null&&typeof Et.property){let e=Et;return Et=Ct.prototype=null,e}return Et=Ct.prototype=t??Object.create(null),new Ct}var Ko=10;for(let t=0;t<=Ko;t++)Ct();function ms(t){return Ct(t)}function Yo(t,e="type"){ms(t);function n(s){let r=s[e],i=t[r];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return i}return n}var fr=Yo;var P=[["children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["key","value","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["content","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],["indicatorComment","leadingComments","middleComments","trailingComment","endComments"]],ur={root:P[0],document:["head","body","children","anchor","tag","indicatorComment","leadingComments","middleComments","trailingComment","endComments"],documentHead:P[0],documentBody:P[0],directive:P[1],alias:P[1],blockLiteral:P[1],blockFolded:P[0],plain:P[0],quoteSingle:P[1],quoteDouble:P[1],mapping:P[0],mappingItem:P[2],mappingKey:P[3],mappingValue:P[3],sequence:P[0],sequenceItem:P[3],flowMapping:P[0],flowMappingItem:P[2],flowSequence:P[0],flowSequenceItem:P[3],comment:P[1],tag:P[4],anchor:P[4]};var Uo=fr(ur),pr=Uo;var Nt=t=>t.position.start.offset,mr=t=>t.position.end.offset;var hr="format";var dr=/^\s*#[^\S\n]*@(?:noformat|noprettier)\s*?(?:\n|$)/,gr=/^\s*#[^\S\n]*@(?:format|prettier)\s*?(?:\n|$)/,yr=/^\s*@(?:format|prettier)\s*$/;var wr=t=>yr.test(t),br=t=>gr.test(t),kr=t=>dr.test(t),Sr=t=>`# @${hr}
|
||||
|
||||
${t}`;function hs(t,e){switch(t.type){case"comment":if(wr(t.value))return null;break;case"quoteDouble":case"quoteSingle":e.type="quote";break;case"document":e.directivesEndMarker||delete e.directivesEndMarker,e.documentEndMarker||delete e.documentEndMarker;break;case"blockLiteral":case"blockFolded":t.chomping==="keep"?e.value=t.value.split(`
|
||||
`).map(n=>n.replace(/[ \t]+$/,"")).join(`
|
||||
`):(t.chomping==="clip"||t.chomping==="strip")&&(e.value=t.value.trimEnd());break}}hs.ignoredProperties=new Set(["position"]);function jo(t){return Array.isArray(t)&&t.length>0}var We=jo;function X(t,e){return typeof t?.type=="string"&&e.includes(t.type)}function ds(t,e,n){return e("children"in t?{...t,children:t.children.map(s=>ds(s,e,t))}:t,n)}function Xe(t,e,n){Object.defineProperty(t,e,{get:n,enumerable:!1})}function Cr(t,e){let n=0,s=e.length;for(let r=t.position.end.offset-1;r<s;r++){let i=e[r];if(i===`
|
||||
`&&n++,n===1&&/\S/.test(i))return!1;if(n===2)return!0}return!1}function fn(t){let{node:e}=t;switch(e.type){case"tag":case"anchor":case"comment":return!1}let n=t.stack.length;for(let s=1;s<n;s++){let r=t.stack[s],i=t.stack[s-1];if(Array.isArray(i)&&typeof r=="number"&&r!==i.length-1)return!1}return!0}function un(t){return We(t.children)?un(V(0,t.children,-1)):t}function Er(t){return t.value.trim()==="prettier-ignore"}function Nr(t){let{node:e}=t;if(e.type==="documentBody"){let n=t.parent.head;return K(n)&&Er(V(0,n.endComments,-1))}return pe(e)&&Er(V(0,e.leadingComments,-1))}function ze(t){return!We(t.children)&&!Vo(t)}function Vo(t){return pe(t)||Pe(t)||gs(t)||z(t)||K(t)}function pe(t){return We(t?.leadingComments)}function Pe(t){return We(t?.middleComments)}function gs(t){return t?.indicatorComment}function z(t){return t?.trailingComment}function K(t){return We(t?.endComments)}function Ar(t){return t?t.split(/(?<!^| ) (?! |$)/):[]}function Tr(t,e,n){let s=e.split(`
|
||||
`).map((i,o,a)=>o===0&&o===a.length-1?i:o!==0&&o!==a.length-1?i.trim():o===0?i.trimEnd():i.trimStart());if(n.proseWrap==="preserve")return s.map(i=>i?[i]:[]);let r=[];for(let[i,o]of s.entries()){let a=Ar(o);i>0&&s[i-1].length>0&&a.length>0&&!(t==="quoteDouble"&&V(0,V(0,r,-1),-1).endsWith("\\"))?r[r.length-1]=[...V(0,r,-1),...a]:r.push(a)}return n.proseWrap==="never"?r.map(i=>[i.join(" ")]):r}function Or(t,{parentIndent:e,isLastDescendant:n,options:s}){let r=t.position.start.line===t.position.end.line?"":s.originalText.slice(t.position.start.offset,t.position.end.offset).match(/^[^\n]*\n(.*)$/s)[1];if(r==="")return[];let i;if(t.indent===null){let c=r.match(/^(?<leadingSpace> *)[^\n\r ]/m);i=c?c.groups.leadingSpace.length:Number.POSITIVE_INFINITY}else i=t.indent-1+e;let o=r.split(`
|
||||
`).map(c=>c.slice(i));if(s.proseWrap==="preserve"||t.type==="blockLiteral")return l(o.map(c=>c?[c]:[]));let a=[];for(let[c,u]of o.entries()){let f=Ar(u);c>0&&f.length>0&&o[c-1].length>0&&!/^\s/.test(f[0])&&!/^\s|\s$/.test(V(0,a,-1))?a[a.length-1]=[...V(0,a,-1),...f]:a.push(f)}return a=a.map(c=>{let u=[];for(let f of c)u.length>0&&/\s$/.test(V(0,u,-1))?u[u.length-1]+=" "+f:u.push(f);return u}),s.proseWrap==="never"&&(a=a.map(c=>[c.join(" ")])),l(a);function l(c){if(t.chomping==="keep")return r.endsWith(`
|
||||
`)&&V(0,c,-1).length===0?c.slice(0,-1):c;let u=0;for(let f=c.length-1;f>=0&&c[f].every(p=>p.replace(/[ \t]+$/,"")==="");f--)u++;return u===0?c:u>=2&&!n?c.slice(0,-(u-1)):c.slice(0,-u)}}function At(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1}}var Go=new WeakMap;function pn(t,e){let{node:n,root:s}=t,r=sn(Go,s,()=>new Set);return!r.has(n.position.end.offset)&&(r.add(n.position.end.offset),Cr(n,e)&&!ys(t.parent))?ln:""}function ys(t){return K(t)&&!X(t,["documentHead","documentBody","flowMapping","flowSequence"])}function Y(t,e){return bt(" ".repeat(t),e)}function Qo(t,e,n){let{node:s}=t,r=t.ancestors.filter(c=>c.type==="sequence"||c.type==="mapping").length,i=fn(t),o=[s.type==="blockFolded"?">":"|"];s.indent!==null&&o.push(s.indent.toString()),s.chomping!=="clip"&&o.push(s.chomping==="keep"?"+":"-"),gs(s)&&o.push(" ",n("indicatorComment"));let a=Or(s,{parentIndent:r,isLastDescendant:i,options:e}),l=[];for(let[c,u]of a.entries())c===0&&l.push(O),l.push(an(R(Se,u))),c!==a.length-1?l.push(u.length===0?O:sr(wt)):s.chomping==="keep"&&i&&l.push(as(u.length===0?O:wt));return s.indent===null?o.push(rr(Y(e.tabWidth,l))):o.push(as(Y(s.indent-1+r,l))),o}var _r=Qo;function mn(t,e,n){let{node:s}=t,r=s.type==="flowMapping",i=r?"{":"[",o=r?"}":"]",a=ln;r&&s.children.length>0&&e.bracketSpacing&&(a=Se);let l=V(0,s.children,-1),c=l?.type==="flowMappingItem"&&ze(l.key)&&ze(l.value);return[i,Y(e.tabWidth,[a,Ho(t,e,n),e.trailingComma==="none"?"":St(","),K(s)?[O,R(O,t.map(n,"endComments"))]:""]),c?"":a,o]}function Ho(t,e,n){return t.map(({isLast:s,node:r,next:i})=>[n(),s?"":[",",Se,r.position.start.line!==i.position.start.line?pn(t,e.originalText):""]],"children")}function Jo(t,e,n){let{node:s,parent:r}=t,{key:i,value:o}=s,a=ze(i),l=ze(o);if(a&&l)return": ";let c=n("key"),u=Wo(s)?" ":"";if(l)return s.type==="flowMappingItem"&&r.type==="flowMapping"?c:s.type==="mappingItem"&&hn(i.content,e)&&!z(i.content)&&r.tag?.value!=="tag:yaml.org,2002:set"?[c,u,":"]:["? ",Y(2,c)];let f=n("value");if(a)return[": ",Y(2,f)];if(pe(o)||!At(i.content))return["? ",Y(2,c),O,...t.map(()=>[n(),O],"value","leadingComments"),": ",Y(2,f)];if(Xo(i.content)&&!pe(i.content)&&!Pe(i.content)&&!z(i.content)&&!K(i)&&!pe(o.content)&&!Pe(o.content)&&!K(o)&&hn(o.content,e)&&hn(i.content,e))return[c,u,": ",f];let p=Symbol("mappingKey"),h=Je([St("? "),Je(Y(2,c),{id:p})]),g=[O,": ",Y(2,f)],m=[u,":"];K(o)&&o.content&&X(o.content,["flowMapping","flowSequence"])&&o.content.children.length===0?m.push(" "):pe(o.content)||K(o)&&o.content&&!X(o.content,["mapping","sequence"])||r.type==="mapping"&&z(i.content)&&At(o.content)||X(o.content,["mapping","sequence"])&&o.content.tag===null&&o.content.anchor===null?m.push(O):o.content?m.push(Se):z(o)&&m.push(" "),m.push(f);let d=Y(e.tabWidth,m);return hn(i.content,e)&&!pe(i.content)&&!Pe(i.content)&&!z(i.content)&&!K(i)?ls([[c,d]]):ls([[h,St(g,d,{groupId:p})]])}function hn(t,e){if(!t)return!0;switch(t.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1}if(e.proseWrap==="preserve")return t.position.start.line===t.position.end.line;if(/\\$/m.test(e.originalText.slice(t.position.start.offset,t.position.end.offset)))return!1;switch(e.proseWrap){case"never":return!t.value.includes(`
|
||||
`);case"always":return!/[\n ]/.test(t.value);default:return!1}}function Wo(t){return t.key.content?.type==="alias"}function Xo(t){if(!t)return!0;switch(t.type){case"plain":case"quoteDouble":case"quoteSingle":return t.position.start.line===t.position.end.line;case"alias":return!0;default:return!1}}var Ir=Jo;function zo(t){return ds(t,Zo)}function Zo(t){switch(t.type){case"document":Xe(t,"head",()=>t.children[0]),Xe(t,"body",()=>t.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":Xe(t,"content",()=>t.children[0]);break;case"mappingItem":case"flowMappingItem":Xe(t,"key",()=>t.children[0]),Xe(t,"value",()=>t.children[1]);break}return t}var Lr=zo;function ea(t,e,n){let{node:s}=t,r=[];s.type!=="mappingValue"&&pe(s)&&r.push([R(O,t.map(n,"leadingComments")),O]);let{tag:i,anchor:o}=s;i&&r.push(n("tag")),i&&o&&r.push(" "),o&&r.push(n("anchor"));let a="";return X(s,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!fn(t)&&(a=pn(t,e.originalText)),(i||o)&&(X(s,["sequence","mapping"])&&!Pe(s)?r.push(O):r.push(" ")),Pe(s)&&r.push([s.middleComments.length===1?"":O,R(O,t.map(n,"middleComments")),O]),Nr(t)?r.push(er(e.originalText.slice(s.position.start.offset,s.position.end.offset).trimEnd())):r.push(Je(ta(t,e,n))),z(s)&&!X(s,["document","documentHead"])&&r.push(ir([s.type==="mappingValue"&&!s.content?"":" ",t.parent.type==="mappingKey"&&t.getParentNode(2).type==="mapping"&&At(s)?"":kt,n("trailingComment")])),ys(s)&&r.push(Y(s.type==="sequenceItem"?2:0,[O,R(O,t.map(({node:l})=>[us(e.originalText,Nt(l))?O:"",n()],"endComments"))])),r.push(a),r}function ta(t,e,n){let{node:s}=t;switch(s.type){case"root":{let r=un(s),i=!(X(r,["blockLiteral","blockFolded"])&&r.chomping==="keep"),o=[];return t.each(({node:a,isFirst:l})=>{l||o.push(O),o.push(n()),sa(t)&&(i&&o.push(O),o.push("..."),z(a)&&o.push(" ",n("trailingComment")))},"children"),i&&o.push(O),o}case"document":{let r=[];return ra(t)&&((s.head.children.length>0||s.head.endComments.length>0)&&r.push(n("head")),z(s.head)?r.push(["---"," ",n(["head","trailingComment"])]):r.push("---")),na(s)&&r.push(n("body")),R(O,r)}case"documentHead":return R(O,[...t.map(n,"children"),...t.map(n,"endComments")]);case"documentBody":{let{children:r,endComments:i}=s,o="";if(r.length>0&&i.length>0){let a=un(s);if(X(a,["blockFolded","blockLiteral"]))a.chomping!=="keep"&&(o=[O,O]);else{let l=V(0,r,-1);o=X(l,["mapping"])&&us(e.originalText,Nt(i[0]))?[O,O]:O}}return[R(O,t.map(n,"children")),o,R(O,t.map(n,"endComments"))]}case"directive":return["%",R(" ",[s.name,...s.parameters])];case"comment":return["#",s.value];case"alias":return["*",s.value];case"tag":return e.originalText.slice(s.position.start.offset,s.position.end.offset);case"anchor":return["&",s.value];case"plain":return Tt(s.type,e.originalText.slice(s.position.start.offset,s.position.end.offset),e);case"quoteDouble":case"quoteSingle":{let o=e.originalText.slice(s.position.start.offset+1,s.position.end.offset-1);if(s.type==="quoteSingle"&&o.includes("\\")||s.type==="quoteDouble"&&/\\[^"]/.test(o)){let l=s.type==="quoteDouble"?'"':"'";return[l,Tt(s.type,o,e),l]}if(o.includes('"'))return["'",Tt(s.type,s.type==="quoteDouble"?Jt(0,Jt(0,o,'\\"','"'),"'","'".repeat(2)):o,e),"'"];if(o.includes("'"))return['"',Tt(s.type,s.type==="quoteSingle"?Jt(0,o,"''","'"):o,e),'"'];let a=e.singleQuote?"'":'"';return[a,Tt(s.type,o,e),a]}case"blockFolded":case"blockLiteral":return _r(t,e,n);case"mapping":case"sequence":return R(O,t.map(n,"children"));case"sequenceItem":return["- ",Y(2,s.content?n("content"):"")];case"mappingKey":case"mappingValue":return s.content?n("content"):"";case"mappingItem":case"flowMappingItem":return Ir(t,e,n);case"flowMapping":return mn(t,e,n);case"flowSequence":return mn(t,e,n);case"flowSequenceItem":return n("content");default:throw new ar(s,"YAML")}}function na(t){return t.body.children.length>0||K(t.body)}function sa(t){let e=t.node;if(e.documentEndMarker||z(e))return!0;if(t.isLast)return!1;let n=t.next;return n.head.children.length>0||K(n.head)}function ra(t){let e=t.node;return e.directivesEndMarker||e.head.children.length>0||K(e.head)||z(e.head)}function Tt(t,e,n){let s=Tr(t,e,n);return R(O,s.map(r=>an(R(Se,r))))}var ia={preprocess:Lr,embed:cr,print:ea,massageAstNode:hs,insertPragma:Sr,getVisitorKeys:pr},Pr=ia;var vr=[{name:"YAML",type:"data",aceMode:"yaml",extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".clangd",".gemrc","CITATION.cff","glide.lock","pixi.lock",".prettierrc",".stylelintrc",".lintstagedrc"],tmScope:"source.yaml",aliases:["yml"],codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","dockercompose","github-actions-workflow","home-assistant"],linguistLanguageId:407}];var dn={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces bet
Line truncated
|
||||
`)}};he.defaultYaml={explicit:!1,version:"1.2"};he.defaultTags={"!!":"tag:yaml.org,2002:"};function Sn(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function ks(t){let e=new Set;return ae(t,{Value(n,s){s.anchor&&e.add(s.anchor)}}),e}function Ss(t,e){for(let n=1;;++n){let s=`${t}${n}`;if(!e.has(s))return s}}function oi(t,e){let n=[],s=new Map,r=null;return{onAnchor:i=>{n.push(i),r??(r=ks(t));let o=Ss(e,r);return r.add(o),o},setAnchors:()=>{for(let i of n){let o=s.get(i);if(typeof o=="object"&&o.anchor&&(C(o.node)||I(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=i,a}}},sourceObjects:s}}function De(t,e,n,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let r=0,i=s.length;r<i;++r){let o=s[r],a=De(t,s,String(r),o);a===void 0?delete s[r]:a!==o&&(s[r]=a)}else if(s instanceof Map)for(let r of Array.from(s.keys())){let i=s.get(r),o=De(t,s,r,i);o===void 0?s.delete(r):o!==i&&s.set(r,o)}else if(s instanceof Set)for(let r of Array.from(s)){let i=De(t,s,r,r);i===void 0?s.delete(r):i!==r&&(s.delete(r),s.add(i))}else for(let[r,i]of Object.entries(s)){let o=De(t,s,r,i);o===void 0?delete s[r]:o!==i&&(s[r]=o)}return t.call(e,n,s)}function B(t,e,n){if(Array.isArray(t))return t.map((s,r)=>B(s,String(r),n));if(t&&typeof t.toJSON=="function"){if(!n||!kn(t))return t.toJSON(e,n);let s={aliasCount:0,count:1,res:void 0};n.anchors.set(t,s),n.onCreate=i=>{s.res=i,delete n.onCreate};let r=t.toJSON(e,n);return n.onCreate&&n.onCreate(r),r}return typeof t=="bigint"&&!n?.keep?Number(t):t}var xe=class{constructor(e){Object.defineProperty(this,G,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:n,maxAliasCount:s,onAnchor:r,reviver:i}={}){if(!ne(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},a=B(this,"",o);if(typeof r=="function")for(let{count:l,res:c}of o.anchors.values())r(c,l);return typeof i=="function"?De(i,{"":a},"",a):a}};var de=class extends xe{constructor(e){super(wn),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;n?.aliasResolveCache?s=n.aliasResolveCache:(s=[],ae(e,{Node:(i,o)=>{(H(o)||kn(o))&&s.push(o)}}),n&&(n.aliasResolveCache=s));let r;for(let i of s){if(i===this)break;i.anchor===this.source&&(r=i)}return r}toJSON(e,n){if(!n)return{source:this.source};let{anchors:s,doc:r,maxAliasCount:i}=n,o=this.resolve(r,n);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=s.get(o);if(a||(B(o,null,n),a=s.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=En(r,o,s)),a.count*a.aliasCount>i)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,n,s){let r=`*${this.source}`;if(e){if(Sn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${r} `}return r}};function En(t,e,n){if(H(e)){let s=e.resolve(t),r=n&&s&&n.get(s);return r?r.count*r.aliasCount:0}else if(I(e)){let s=0;for(let r of e.items){let i=En(t,r,n);i>s&&(s=i)}return s}else if(T(e)){let s=En(t,e.key,n),r=En(t,e.value,n);return Math.max(s,r)}return 1}var Cn=t=>!t||typeof t!="function"&&typeof t!="object",y=class extends xe{constructor(e){super(ee),this.value=e}toJSON(e,n){return n?.keep?this.value:B(this.value,e,n)}toString(){return String(this.value)}};y.BLOCK_FOLDED="BLOCK_FOLDED";y.BLOCK_LITERAL="BLOCK_LITERAL";y.PLAIN="PLAIN";y.QUOTE_DOUBLE="QUOTE_DOUBLE";y.QUOTE_SINGLE="QUOTE_SINGLE";var da="tag:yaml.org,2002:";function ga(t,e,n){if(e){let s=n.filter(i=>i.tag===e),r=s.find(i=>!i.format)??s[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return n.find(s=>s.identify?.(t)&&!s.format)}function Ae(t,e,n){if(ne(t)&&(t=t.contents),_(t))return t;if(T(t)){let f=n.schema[oe].createNode?.(n.schema,null,n);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:s,onAnchor:r,onTagObj:i,schema:o,sourceObjects:a}=n,l;if(s&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=r(t)),new de(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=da+e.slice(2));let c=ga(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new y(
Line truncated
|
||||
`)?se(n,e):n.includes(`
|
||||
`)?`
|
||||
`+se(n,e):(t.endsWith(" ")?"":" ")+n;var Es="flow",Nn="block",vt="quoted";function Dt(t,e,n="flow",{indentAtStart:s,lineWidth:r=80,minContentWidth:i=20,onFold:o,onOverflow:a}={}){if(!r||r<0)return t;r<i&&(i=0);let l=Math.max(1+i,1+r-e.length);if(t.length<=l)return t;let c=[],u={},f=r-e.length;typeof s=="number"&&(s>r-Math.max(2,i)?c.push(0):f=r-s);let p,h,g=!1,m=-1,d=-1,b=-1;n===Nn&&(m=li(t,m,e.length),m!==-1&&(f=m+l));for(let S;S=t[m+=1];){if(n===vt&&S==="\\"){switch(d=m,t[m+1]){case"x":m+=3;break;case"u":m+=5;break;case"U":m+=9;break;default:m+=1}b=m}if(S===`
|
||||
`)n===Nn&&(m=li(t,m,e.length)),f=m+e.length+l,p=void 0;else{if(S===" "&&h&&h!==" "&&h!==`
|
||||
`&&h!==" "){let E=t[m+1];E&&E!==" "&&E!==`
|
||||
`&&E!==" "&&(p=m)}if(m>=f)if(p)c.push(p),f=p+l,p=void 0;else if(n===vt){for(;h===" "||h===" ";)h=S,S=t[m+=1],g=!0;let E=m>b+1?m-2:d-1;if(u[E])return t;c.push(E),u[E]=!0,f=E+l,p=void 0}else g=!0}h=S}if(g&&a&&a(),c.length===0)return t;o&&o();let k=t.slice(0,c[0]);for(let S=0;S<c.length;++S){let E=c[S],N=c[S+1]||t.length;E===0?k=`
|
||||
${e}${t.slice(0,N)}`:(n===vt&&u[E]&&(k+=`${t[E]}\\`),k+=`
|
||||
${e}${t.slice(E+1,N)}`)}return k}function li(t,e,n){let s=e,r=e+1,i=t[r];for(;i===" "||i===" ";)if(e<r+n)i=t[++e];else{do i=t[++e];while(i&&i!==`
|
||||
`);s=e,r=e+1,i=t[r]}return s}var Tn=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),On=t=>/^(%|---|\.\.\.)/m.test(t);function ya(t,e,n){if(!e||e<0)return!1;let s=e-n,r=t.length;if(r<=s)return!1;for(let i=0,o=0;i<r;++i)if(t[i]===`
|
||||
`){if(i-o>s)return!0;if(o=i+1,r-o<=s)return!1}return!0}function xt(t,e){let n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;let{implicitKey:s}=e,r=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(On(t)?" ":""),o="",a=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(o+=n.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{o+=n.slice(a,l);let u=n.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case"n":if(s||n[l+2]==='"'||n.length<r)l+=1;else{for(o+=n.slice(a,l)+`
|
||||
|
||||
`;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)o+=`
|
||||
`,l+=2;o+=i,n[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,s?o:Dt(o,i,vt,Tn(e,!1))}function Cs(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(t))return xt(t,e);let n=e.indent||(On(t)?" ":""),s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?s:Dt(s,n,Es,Tn(e,!1))}function st(t,e){let{singleQuote:n}=e.options,s;if(n===!1)s=xt;else{let r=t.includes('"'),i=t.includes("'");r&&!i?s=Cs:i&&!r?s=xt:s=n?Cs:xt}return s(t,e)}var Ns;try{Ns=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{Ns=/\n+(?!\n|$)/g}function An({comment:t,type:e,value:n},s,r,i){let{blockQuote:o,commentString:a,lineWidth:l}=s.options;if(!o||/\n[\t ]+$/.test(n))return st(n,s);let c=s.indent||(s.forceBlockIndent||On(n)?" ":""),u=o==="literal"?!0:o==="folded"||e===y.BLOCK_FOLDED?!1:e===y.BLOCK_LITERAL?!0:!ya(n,l,c.length);if(!n)return u?`|
|
||||
`:`>
|
||||
`;let f,p;for(p=n.length;p>0;--p){let N=n[p-1];if(N!==`
|
||||
`&&N!==" "&&N!==" ")break}let h=n.substring(p),g=h.indexOf(`
|
||||
`);g===-1?f="-":n===h||g!==h.length-1?(f="+",i&&i()):f="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
||||
`&&(h=h.slice(0,-1)),h=h.replace(Ns,`$&${c}`));let m=!1,d,b=-1;for(d=0;d<n.length;++d){let N=n[d];if(N===" ")m=!0;else if(N===`
|
||||
`)b=d;else break}let k=n.substring(0,b<d?b+1:d);k&&(n=n.substring(k.length),k=k.replace(/\n+/g,`$&${c}`));let E=(m?c?"2":"1":"")+f;if(t&&(E+=" "+a(t.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let N=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),A=!1,L=Tn(s,!0);o!=="folded"&&e!==y.BLOCK_FOLDED&&(L.onOverflow=()=>{A=!0});let w=Dt(`${k}${N}${h}`,c,Nn,L);if(!A)return`>${E}
|
||||
${c}${w}`}return n=n.replace(/\n+/g,`$&${c}`),`|${E}
|
||||
${c}${k}${n}${h}`}function wa(t,e,n,s){let{type:r,value:i}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&i.includes(`
|
||||
`)||u&&/[[\]{},]/.test(i))return st(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return a||u||!i.includes(`
|
||||
`)?st(i,e):An(t,e,n,s);if(!a&&!u&&r!==y.PLAIN&&i.includes(`
|
||||
`))return An(t,e,n,s);if(On(i)){if(l==="")return e.forceBlockIndent=!0,An(t,e,n,s);if(a&&l===c)return st(i,e)}let f=i.replace(/\n+/g,`$&
|
||||
${l}`);if(o){let p=m=>m.default&&m.tag!=="tag:yaml.org,2002:str"&&m.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(p)||h?.some(p))return st(i,e)}return a?f:Dt(f,l,Es,Tn(e,!1))}function Te(t,e,n,s){let{implicitKey:r,inFlow:i}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==y.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=y.QUOTE_DOUBLE);let l=u=>{switch(u){case y.BLOCK_FOLDED:case y.BLOCK_LITERAL:return r||i?st(o.value,e):An(o,e,n,s);case y.QUOTE_DOUBLE:return xt(o.value,e);case y.QUOTE_SINGLE:return Cs(o.value,e);case y.PLAIN:return wa(o,e,n,s);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,p=r&&u||f;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}function _n(t,e){let n=Object.assign({blockQuote:!0,commentString:ai,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,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),s;switch(n.collectionStyle){case"block":s=!1;break;case"flow":s=!0;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function ba(t,e){if(e.tag){let r=t.filter(i=>i.tag===e.tag);if(r.length>0)return r.find(i=>i.format===e.format)??r[0]}let n,s;if(C(e)){s=e.value;let r=t.filter(i=>i.identify?.(s));if(r.length>1){let i=r.filter(o=>o.test);i.length>0&&(r=i)}n=r.find(i=>i.format===e.format)??r.find(i=>!i.format)}else s=e,n=t.find(r=>r.nodeClass&&s instanceof r.nodeClass);if(!n){let r=s?.constructor?.name??(s===null?"null":typeof s);throw new Error(`Tag not resolved for ${r} value`)}return n}function ka(t,e,{anchors:n,doc:s}){if(!s.directives)return"";let r=[],i=(C(t)||I(t))&&t.anchor;i&&Sn(i)&&(n.add(i),r.push(`&${i}`));let o=t.tag??(e.default?null:e.tag);return o&&r.push(s.directives.tagString(o)),r.join(" ")}function Oe(t,e,n,s){if(T(t))return t.toString(e,n,s);if(H(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let r,i=_(t)?t:e.doc.createNode(t,{onTagObj:l=>r=l});r??(r=ba(e.doc.schema.tags,i));let o=ka(i,r,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof r.stringify=="function"?r.stringify(i,e,n,s):C(i)?Te(i,e,n,s):i.toString(e,n,s);return o?C(i)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
||||
${e.indent}${a}`:a}function ci({key:t,value:e},n,s,r){let{allNullValues:i,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=n,p=_(t)&&t.comment||null;if(f){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(I(t)||!_(t)&&typeof t=="object"){let L="With simple keys, collection cannot be used as a key value";throw new Error(L)}}let h=!f&&(!t||p&&e==null&&!n.inFlow||I(t)||(C(t)?t.type===y.BLOCK_FOLDED||t.type===y.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(f||!i),indent:a+l});let g=!1,m=!1,d=Oe(t,n,()=>g=!0,()=>m=!0);if(!h&&!n.inFlow&&d.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||e==null)return g&&s&&s(),d===""?"?":h?`? ${d}`:d}else if(i&&!f||e==null&&h)return d=`? ${d}`,p&&!g?d+=ge(d,n.indent,c(p)):m&&r&&r(),d;g&&(p=null),h?(p&&(d+=ge(d,n.indent,c(p))),d=`? ${d}
|
||||
${a}:`):(d=`${d}:`,p&&(d+=ge(d,n.indent,c(p))));let b,k,S;_(e)?(b=!!e.spaceBefore,k=e.commentBefore,S=e.comment):(b=!1,k=null,S=null,e&&typeof e=="object"&&(e=o.createNode(e))),n.implicitKey=!1,!h&&!p&&C(e)&&(n.indentAtStart=d.length+1),m=!1,!u&&l.length>=2&&!n.inFlow&&!h&&J(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let E=!1,N=Oe(e,n,()=>E=!0,()=>m=!0),A=" ";if(p||b||k){if(A=b?`
|
||||
`:"",k){let L=c(k);A+=`
|
||||
${se(L,n.indent)}`}N===""&&!n.inFlow?A===`
|
||||
`&&S&&(A=`
|
||||
|
||||
`):A+=`
|
||||
${n.indent}`}else if(!h&&I(e)){let L=N[0],w=N.indexOf(`
|
||||
`),M=w!==-1,Le=n.inFlow??e.flow??e.items.length===0;if(M||!Le){let Ye=!1;if(M&&(L==="&"||L==="!")){let $=N.indexOf(" ");L==="&"&&$!==-1&&$<w&&N[$+1]==="!"&&($=N.indexOf(" ",$+1)),($===-1||w<$)&&(Ye=!0)}Ye||(A=`
|
||||
${n.indent}`)}}else(N===""||N[0]===`
|
||||
`)&&(A="");return d+=A+N,n.inFlow?E&&s&&s():S&&!E?d+=ge(d,n.indent,c(S)):m&&r&&r(),d}function In(t,e){(t==="debug"||t==="warn")&&console.warn(e)}var Ln="<<",le={identify:t=>t===Ln||typeof t=="symbol"&&t.description===Ln,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new y(Symbol(Ln)),{addToJSMap:Ts}),stringify:()=>Ln},fi=(t,e)=>(le.identify(e)||C(e)&&(!e.type||e.type===y.PLAIN)&&le.identify(e.value))&&t?.doc.schema.tags.some(n=>n.tag===le.tag&&n.default);function Ts(t,e,n){let s=ui(t,n);if(J(s))for(let r of s.items)As(t,e,r);else if(Array.isArray(s))for(let r of s)As(t,e,r);else As(t,e,s)}function As(t,e,n){let s=ui(t,n);if(!U(s))throw new Error("Merge sources must be maps or map aliases");let r=s.toJSON(null,t,Map);for(let[i,o]of r)e instanceof Map?e.has(i)||e.set(i,o):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function ui(t,e){return t&&H(e)?e.resolve(t.doc,t):e}function Pn(t,e,{key:n,value:s}){if(_(n)&&n.addToJSMap)n.addToJSMap(t,e,s);else if(fi(t,n))Ts(t,e,s);else{let r=B(n,"",t);if(e instanceof Map)e.set(r,B(s,r,t));else if(e instanceof Set)e.add(r);else{let i=Sa(n,r,t),o=B(s,i,t);i in e?Object.defineProperty(e,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[i]=o}}return e}function Sa(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if(_(t)&&n?.doc){let s=_n(n.doc,{});s.anchors=new Set;for(let i of n.anchors.keys())s.anchors.add(i.anchor);s.inFlow=!0,s.inStringifyKey=!0;let r=t.toString(s);if(!n.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),In(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(e)}function rt(t,e,n){let s=Ae(t,void 0,n),r=Ae(e,void 0,n);return new v(s,r)}var v=class t{constructor(e,n=null){Object.defineProperty(this,G,{value:bs}),this.key=e,this.value=n}clone(e){let{key:n,value:s}=this;return _(n)&&(n=n.clone(e)),_(s)&&(s=s.clone(e)),new t(n,s)}toJSON(e,n){let s=n?.mapAsMap?new Map:{};return Pn(n,s,this)}toString(e,n,s){return e?.doc?ci(this,e,n,s):JSON.stringify(this)}};function Dn(t,e,n){return(e.inFlow??t.flow?Ca:Ea)(t,e,n)}function Ea({comment:t,items:e},n,{blockItemPrefix:s,flowChars:r,itemIndent:i,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:i,type:null}),f=!1,p=[];for(let g=0;g<e.length;++g){let m=e[g],d=null;if(_(m))!f&&m.spaceBefore&&p.push(""),vn(n,p,m.commentBefore,f),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(!f&&k.spaceBefore&&p.push(""),vn(n,p,k.commentBefore,f))}f=!1;let b=Oe(m,u,()=>d=null,()=>f=!0);d&&(b+=ge(b,i,c(d))),f&&d&&(f=!1),p.push(s+b)}let h;if(p.length===0)h=r.start+r.end;else{h=p[0];for(let g=1;g<p.length;++g){let m=p[g];h+=m?`
|
||||
${l}${m}`:`
|
||||
`}}return t?(h+=`
|
||||
`+se(c(t),l),a&&a()):f&&o&&o(),h}function Ca({items:t},e,{flowChars:n,itemIndent:s}){let{indent:r,indentStep:i,flowCollectionPadding:o,options:{commentString:a}}=e;s+=i;let l=Object.assign({},e,{indent:s,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<t.length;++g){let m=t[g],d=null;if(_(m))m.spaceBefore&&f.push(""),vn(e,f,m.commentBefore,!1),m.comment&&(d=m.comment);else if(T(m)){let k=_(m.key)?m.key:null;k&&(k.spaceBefore&&f.push(""),vn(e,f,k.commentBefore,!1),k.comment&&(c=!0));let S=_(m.value)?m.value:null;S?(S.comment&&(d=S.comment),S.commentBefore&&(c=!0)):m.value==null&&k?.comment&&(d=k.comment)}d&&(c=!0);let b=Oe(m,l,()=>d=null);c||(c=f.length>u||b.includes(`
|
||||
`)),g<t.length-1?b+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((k,S)=>k+S.length+2,2)+(b.length+2)>e.options.lineWidth)),c&&(b+=",")),d&&(b+=ge(b,s,a(d))),f.push(b),u=f.length}let{start:p,end:h}=n;if(f.length===0)return p+h;if(!c){let g=f.reduce((m,d)=>m+d.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=p;for(let m of f)g+=m?`
|
||||
${i}${r}${m}`:`
|
||||
`;return`${g}
|
||||
${r}${h}`}else return`${p}${o}${f.join(" ")}${o}${h}`}function vn({indent:t,options:{commentString:e}},n,s,r){if(s&&r&&(s=s.replace(/^\n+/,"")),s){let i=se(e(s),t);n.push(i.trimStart())}}function Me(t,e){let n=C(e)?e.value:e;for(let s of t)if(T(s)&&(s.key===e||s.key===n||C(s.key)&&s.key.value===n))return s}var x=class extends tt{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(oe,e),this.items=[]}static from(e,n,s){let{keepUndefined:r,replacer:i}=s,o=new this(e),a=(l,c)=>{if(typeof i=="function")c=i.call(n,l,c);else if(Array.isArray(i)&&!i.includes(l))return;(c!==void 0||r)&&o.items.push(rt(l,c,s))};if(n instanceof Map)for(let[l,c]of n)a(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))a(l,n[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,n){let s;T(e)?s=e:!e||typeof e!="object"||!("key"in e)?s=new v(e,e?.value):s=new v(e.key,e.value);let r=Me(this.items,s.key),i=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${s.key} already set`);C(r.value)&&Cn(s.value)?r.value.value=s.value:r.value=s.value}else if(i){let o=this.items.findIndex(a=>i(s,a)<0);o===-1?this.items.push(s):this.items.splice(o,0,s)}else this.items.push(s)}delete(e){let n=Me(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){let r=Me(this.items,e)?.value;return(!n&&C(r)?r.value:r)??void 0}has(e){return!!Me(this.items,e)}set(e,n){this.add(new v(e,n),!0)}toJSON(e,n,s){let r=s?new s:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let i of this.items)Pn(n,r,i);return r}toString(e,n,s){if(!e)return JSON.stringify(this);for(let r of this.items)if(!T(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Dn(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:s,onComment:n})}};var ce={collection:"map",default:!0,nodeClass:x,tag:"tag:yaml.org,2002:map",resolve(t,e){return U(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>x.from(t,e,n)};var F=class extends tt{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Ne,e),this.items=[]}add(e){this.items.push(e)}delete(e){let n=xn(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){let s=xn(e);if(typeof s!="number")return;let r=this.items[s];return!n&&C(r)?r.value:r}has(e){let n=xn(e);return typeof n=="number"&&n<this.items.length}set(e,n){let s=xn(e);if(typeof s!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[s];C(r)&&Cn(n)?r.value=n:this.items[s]=n}toJSON(e,n){let s=[];n?.onCreate&&n.onCreate(s);let r=0;for(let i of this.items)s.push(B(i,String(r++),n));return s}toString(e,n,s){return e?Dn(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:s,onComment:n}):JSON.stringify(this)}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof r=="function"){let l=n instanceof Set?a:String(o++);a=r.call(n,l,a)}i.items.push(Ae(a,void 0,s))}}return i}};function xn(t){let e=C(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}var fe={collection:"seq",default:!0,nodeClass:F,tag:"tag:yaml.org,2002:seq",resolve(t,e){return J(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>F.from(t,e,n)};var $e={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,s){return e=Object.assign({actualString:!0},e),Te(t,e,n,s)}};var Ke={identify:t=>t==null,createNode:()=>new y(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new y(null),stringify:({source:t},e)=>typeof t=="string"&&Ke.test.test(t)?t:e.options.nullStr};var Mt={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new y(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Mt.test.test(t)){let s=t[0]==="t"||t[0]==="T";if(e===s)return t}return e?n.options.trueStr:n.options.falseStr}};function j({format:t,minFractionDigits:e,tag:n,value:s}){if(typeof s=="bigint")return String(s);let r=typeof s=="number"?s:Number(s);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(s,-0)?"-0":JSON.stringify(s);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let o=i.indexOf(".");o<0&&(o=i.length,i+=".");let a=e-(i.length-o-1);for(;a-- >0;)i+="0"}return i}var Mn={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:j},$n={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(
Line truncated
|
||||
`:" ")}return Te({comment:t,type:e,value:a},s,r,i)}};function _s(t,e){if(J(t))for(let n=0;n<t.items.length;++n){let s=t.items[n];if(!T(s)){if(U(s)){s.items.length>1&&e("Each pair must have its own sequence indicator");let r=s.items[0]||new v(new y(null));if(s.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${s.commentBefore}
|
||||
${r.key.commentBefore}`:s.commentBefore),s.comment){let i=r.value??r.key;i.comment=i.comment?`${s.comment}
|
||||
${i.comment}`:s.comment}s=r}t.items[n]=T(s)?s:new v(s)}}else e("Expected a sequence for this tag");return t}function Is(t,e,n){let{replacer:s}=n,r=new F(t);r.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof s=="function"&&(o=s.call(e,String(i++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;r.items.push(rt(a,l,n))}return r}var Bt={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:_s,createNode:Is};var it=class t extends F{constructor(){super(),this.add=x.prototype.add.bind(this),this.delete=x.prototype.delete.bind(this),this.get=x.prototype.get.bind(this),this.has=x.prototype.has.bind(this),this.set=x.prototype.set.bind(this),this.tag=t.tag}toJSON(e,n){if(!n)return super.toJSON(e);let s=new Map;n?.onCreate&&n.onCreate(s);for(let r of this.items){let i,o;if(T(r)?(i=B(r.key,"",n),o=B(r.value,i,n)):i=B(r,"",n),s.has(i))throw new Error("Ordered maps must not include duplicate keys");s.set(i,o)}return s}static from(e,n,s){let r=Is(e,n,s),i=new this;return i.items=r.items,i}};it.tag="tag:yaml.org,2002:omap";var Rt={collection:"seq",identify:t=>t instanceof Map,nodeClass:it,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let n=_s(t,e),s=[];for(let{key:r}of n.items)C(r)&&(s.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):s.push(r.value));return Object.assign(new it,n)},createNode:(t,e,n)=>it.from(t,e,n)};function gi({value:t,source:e},n){return e&&(t?Ls:Ps).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}var Ls={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new y(!0),stringify:gi},Ps={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new y(!1),stringify:gi};var yi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:j},wi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():j(t)}},bi={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new y(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){let s=t.substring(n+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:j};var qt=t=>typeof t=="bigint"||Number.isInteger(t);function Un(t,e,n,{intAsBigInt:s}){let r=t[0];if((r==="-"||r==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return r==="-"?BigInt(-1)*o:o}let i=parseInt(t,n);return r==="-"?-1*i:i}function vs(t,e,n){let{value:s}=t;if(qt(s)){let r=s.toString(e);return s<0?"-"+n+r.substr(1):n+r}return j(t)}var ki={identify:qt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>Un(t,2,2,n),stringify:t=>vs(t,2,"0b")},Si={identify:qt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>Un(t,1,8,n),stringify:t=>vs(t,8,"0")},Ei={identify:qt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>Un(t,0,10,n),stringify:j},Ci={identify:qt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>Un(t,2,16,n),stringify:t=>vs(t,16,"0x")};var ot=class t extends x{constructor(e){super(e),this.tag=t.tag}add(e){let n;T(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new v(e.key,null):n=new v(e,null),Me(this.items,n.key)||this.items.push(n)}get(e,n){let s=Me(this.items,e);return!n&&T(s)?C(s.key)?s.key.value:s.key:s}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let s=Me(this.items,e);s&&!n?this.items.splice(this.items.indexOf(s),1):!s&&n&&this.items.push(new v(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,s){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,s);throw new Error("Set items must all have null values")}static from(e,n,s){let{replacer:r}=s,i=new this(e);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof r=="function"&&(o=r.call(n,o,o)),i.items.push(rt(o,null,s));return i}};ot.tag="tag:yaml.org,2002:set";var Ft={collection:"map",identify:t=>t instanceof Set,nodeClass:ot,default
Line truncated
|
||||
`)?(n.push("..."),n.push(se(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&n[n.length-1]!==""&&n.push(""),n.push(se(i(l),"")))}return n.join(`
|
||||
`)+`
|
||||
`}var ye=class t{constructor(e,n,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,G,{value:bn});let r=null;typeof n=="function"||Array.isArray(n)?r=n:s===void 0&&n&&(s=n,n=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:o}=i;s?._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new he({version:o}),this.setSchema(o,s),this.contents=e===void 0?null:this.createNode(e,r,s)}clone(){let e=Object.create(t.prototype,{[G]:{value:bn}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=_(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ct(this.contents)&&this.contents.add(e)}addIn(e,n){ct(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){let s=ks(this);e.anchor=!n||s.has(n)?Ss(n||"a",s):n}return new de(e.anchor)}createNode(e,n,s){let r;if(typeof n=="function")e=n.call({"":e},"",e),r=n;else if(Array.isArray(n)){let d=k=>typeof k=="number"||k instanceof String||k instanceof Number,b=n.filter(d).map(String);b.length>0&&(n=n.concat(b)),r=n}else s===void 0&&n&&(s=n,n=void 0);let{aliasDuplicateObjects:i,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:p,sourceObjects:h}=oi(this,o||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:h},m=Ae(e,u,g);return a&&I(m)&&(m.flow=!0),p(),m}createPair(e,n,s={}){let r=this.createNode(e,null,s),i=this.createNode(n,null,s);return new v(r,i)}delete(e){return ct(this.contents)?this.contents.delete(e):!1}deleteIn(e){return nt(e)?this.contents==null?!1:(this.contents=null,!0):ct(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return I(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return nt(e)?!n&&C(this.contents)?this.contents.value:this.contents:I(this.contents)?this.contents.getIn(e,n):void 0}has(e){return I(this.contents)?this.contents.has(e):!1}hasIn(e){return nt(e)?this.contents!==void 0:I(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Pt(this.schema,[e],n):ct(this.contents)&&this.contents.set(e,n)}setIn(e,n){nt(e)?this.contents=n:this.contents==null?this.contents=Pt(this.schema,Array.from(e),n):ct(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new he({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new he({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(s)this.schema=new lt(Object.assign(s,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:s,maxAliasCount:r,onAnchor:i,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=B(this.contents,n??"",a);if(typeof i=="function")for(let{count:c,res:u}of a.anchors.values())i(u,c);return typeof o=="function"?De(o,{"":l},"",l):l}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return _i(this,e)}};function ct(t){if(I(t))return!0;throw new Error("Expected a YAML collection as document contents")}var ft=class extends Error{constructor(e,n,s,r){super(),this.name=e,this.code=s,this.message=r,this.pos=n}},te=class extends ft{constructor(e,n,s){super("YAMLParseError",e,n,s)}},ut=class extends ft{constructor(e,n,s){super("YAMLWarning",e,n,s)}},Kt=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>e.linePos(a));let{line:s,col:r}=n.linePos[0];n.message+=` at line ${s}, column ${r}`;let i=r-1,o=t.substring(e.lineStarts[s-1],e.lineStarts[s]).replace(/[\n\r]+$/,"");if(i>=60&&o.length>80){let a=Math.min(i-39,o.length-79);o="\u2026"+o.substring(a),i-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),s>1&&/^ *$/.test(o.substring(0,i))){let a=t.substring(e.lineStarts[s-2],e.lineStarts[s-1]);a.length>80&&(a=a.substring(0,79)+`\Line truncated
|
||||
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=n.linePos[1];l?.line===s&&l.col>r&&(a=Math.max(1,Math.min(l.col-r,80-i)));let c=" ".repeat(i)+"^".repeat(a);n.message+=`:
|
||||
|
||||
${o}
|
||||
${c}
|
||||
`}};function we(t,{flow:e,indicator:n,next:s,offset:r,onError:i,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",p="",h=!1,g=!1,m=null,d=null,b=null,k=null,S=null,E=null,N=null;for(let w of t)switch(g&&(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma"&&i(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),m&&(c&&w.type!=="comment"&&w.type!=="newline"&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),w.type){case"space":!e&&(n!=="doc-start"||s?.type!=="flow-collection")&&w.source.includes(" ")&&(m=w),u=!0;break;case"comment":{u||i(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let M=w.source.substring(1)||" ";f?f+=p+M:f=M,p="",c=!1;break}case"newline":c?f?f+=w.source:(!E||n!=="seq-item-ind")&&(l=!0):p+=w.source,c=!0,h=!0,(d||b)&&(k=w),u=!0;break;case"anchor":d&&i(w,"MULTIPLE_ANCHORS","A node can have at most one anchor"),w.source.endsWith(":")&&i(w.offset+w.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),d=w,N??(N=w.offset),c=!1,u=!1,g=!0;break;case"tag":{b&&i(w,"MULTIPLE_TAGS","A node can have at most one tag"),b=w,N??(N=w.offset),c=!1,u=!1,g=!0;break}case n:(d||b)&&i(w,"BAD_PROP_ORDER",`Anchors and tags must be after the ${w.source} indicator`),E&&i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.source} in ${e??"collection"}`),E=w,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(e){S&&i(w,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),S=w,c=!1,u=!1;break}default:i(w,"UNEXPECTED_TOKEN",`Unexpected ${w.type} token`),c=!1,u=!1}let A=t[t.length-1],L=A?A.offset+A.source.length:r;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=o||s?.type==="block-map"||s?.type==="block-seq")&&i(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:S,found:E,spaceBefore:l,comment:f,hasNewline:h,anchor:d,tag:b,newlineAfterProp:k,end:L,start:N??L}}function Be(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
||||
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let n of e.start)if(n.type==="newline")return!0;if(e.sep){for(let n of e.sep)if(n.type==="newline")return!0}if(Be(e.key)||Be(e.value))return!0}return!1;default:return!0}}function Yt(t,e,n){if(e?.type==="flow-collection"){let s=e.end[0];s.indent===t&&(s.source==="]"||s.source==="}")&&Be(e)&&n(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Qn(t,e,n){let{uniqueKeys:s}=t.options;if(s===!1)return!1;let r=typeof s=="function"?s:(i,o)=>i===o||C(i)&&C(o)&&i.value===o.value;return e.some(i=>r(i.key,n))}var Ii="All mapping items must start at the same column";function Li({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??x,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=s.offset,c=null;for(let u of s.items){let{start:f,key:p,sep:h,value:g}=u,m=we(f,{indicator:"explicit-key-ind",next:p??h?.[0],offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0}),d=!m.found;if(d){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&r(l,"BAD_INDENT",Ii)),!m.anchor&&!m.tag&&!h){c=m.end,m.comment&&(a.comment?a.comment+=`
|
||||
`+m.comment:a.comment=m.comment);continue}(m.newlineAfterProp||Be(p))&&r(p??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else m.found?.indent!==s.indent&&r(l,"BAD_INDENT",Ii);n.atKey=!0;let b=m.end,k=p?t(n,p,m,r):e(n,b,f,null,m,r);n.schema.compat&&Yt(s.indent,p,r),n.atKey=!1,Qn(n,a.items,k)&&r(b,"DUPLICATE_KEY","Map keys must be unique");let S=we(h??[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:r,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=S.end,S.found){d&&(g?.type==="block-map"&&!S.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&m.start<S.found.offset-1024&&r(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let E=g?t(n,g,S,r):e(n,l,h,null,S,r);n.schema.compat&&Yt(s.indent,g,r),l=E.range[2];let N=new v(k,E);n.options.keepSourceTokens&&(N.srcToken=u),a.items.push(N)}else{d&&r(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),S.comment&&(k.comment?k.comment+=`
|
||||
`+S.comment:k.comment=S.comment);let E=new v(k);n.options.keepSourceTokens&&(E.srcToken=u),a.items.push(E)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[s.offset,l,c??l],a}function Pi({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=i?.nodeClass??F,a=new o(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=s.offset,c=null;for(let{start:u,value:f}of s.items){let p=we(u,{indicator:"seq-item-ind",next:f,offset:l,onError:r,parentIndent:s.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||f)f?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(a.comment=p.comment);continue}let h=f?t(n,f,p,r):e(n,p.end,u,null,p,r);n.schema.compat&&Yt(s.indent,f,r),l=h.range[2],a.items.push(h)}return a.range=[s.offset,l,c??l],a}function be(t,e,n,s){let r="";if(t){let i=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":i=!0;break;case"comment":{n&&!i&&s(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=o+u:r=u,o="";break}case"newline":r&&(o+=l),i=!0;break;default:s(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:r,offset:e}}var Ms="Block collections are not allowed within flow collections",$s=t=>t&&(t.type==="block-map"||t.type==="block-seq");function vi({composeNode:t,composeEmptyNode:e},n,s,r,i){let o=s.start.source==="{",a=o?"flow map":"flow sequence",l=i?.nodeClass??(o?x:F),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=s.offset+s.start.source.length;for(let d=0;d<s.items.length;++d){let b=s.items[d],{start:k,key:S,sep:E,value:N}=b,A=we(k,{flow:a,indicator:"explicit-key-ind",next:S??E?.[0],offset:f,onError:r,parentIndent:s.indent,startOnNewline:!1});if(!A.found){if(!A.anchor&&!A.tag&&!E&&!N){d===0&&A.comma?r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):d<s.items.length-1&&r(A.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),A.comment&&(c.comment?c.comment+=`
|
||||
`+A.comment:c.comment=A.comment),f=A.end;continue}!o&&n.options.strict&&Be(S)&&r(S,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(d===0)A.comma&&r(A.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(A.comma||r(A.start,"MISSING_CHAR",`Missing , between ${a} items`),A.comment){let L="";e:for(let w of k)switch(w.type){case"comma":case"space":break;case"comment":L=w.source.substring(1);break e;default:break e}if(L){let w=c.items[c.items.length-1];T(w)&&(w=w.value??w.key),w.comment?w.comment+=`
|
||||
`+L:w.comment=L,A.comment=A.comment.substring(L.length+1)}}if(!o&&!E&&!A.found){let L=N?t(n,N,A,r):e(n,A.end,E,null,A,r);c.items.push(L),f=L.range[2],$s(N)&&r(L.range,"BLOCK_IN_FLOW",Ms)}else{n.atKey=!0;let L=A.end,w=S?t(n,S,A,r):e(n,L,k,null,A,r);$s(S)&&r(w.range,"BLOCK_IN_FLOW",Ms),n.atKey=!1;let M=we(E??[],{flow:a,indicator:"map-value-ind",next:N,offset:w.range[2],onError:r,parentIndent:s.indent,startOnNewline:!1});if(M.found){if(!o&&!A.found&&n.options.strict){if(E)for(let $ of E){if($===M.found)break;if($.type==="newline"){r($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}A.start<M.found.offset-1024&&r(M.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else N&&("source"in N&&N.source?.[0]===":"?r(N,"MISSING_CHAR",`Missing space after : in ${a}`):r(M.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Le=N?t(n,N,M,r):M.found?e(n,M.end,E,null,M,r):null;Le?$s(N)&&r(Le.range,"BLOCK_IN_FLOW",Ms):M.comment&&(w.comment?w.comment+=`
|
||||
`+M.comment:w.comment=M.comment);let Ye=new v(w,Le);if(n.options.keepSourceTokens&&(Ye.srcToken=b),o){let $=c;Qn(n,$.items,w)&&r(L,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(Ye)}else{let $=new x(n.schema);$.flow=!0,$.items.push(Ye);let zs=(Le??w).range;$.range=[w.range[0],zs[1],zs[2]],c.items.push($)}f=Le?Le.range[2]:M.end}}let p=o?"}":"]",[h,...g]=s.end,m=f;if(h?.source===p)m=h.offset+h.source.length;else{let d=a[0].toUpperCase()+a.substring(1),b=u?`${d} must end with a ${p}`:`${d} in block collection must be sufficiently indented and end with a ${p}`;r(f,u?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){let d=be(g,m,n.options.strict,r);d.comment&&(c.comment?c.comment+=`
|
||||
`+d.comment:c.comment=d.comment),c.range=[s.offset,m,d.offset]}else c.range=[s.offset,m,m];return c}function Bs(t,e,n,s,r,i){let o=n.type==="block-map"?Li(t,e,n,s,i):n.type==="block-seq"?Pi(t,e,n,s,i):vi(t,e,n,s,i),a=o.constructor;return r==="!"||r===a.tagName?(o.tag=a.tagName,o):(r&&(o.tag=r),o)}function Di(t,e,n,s,r){let i=s.tag,o=i?e.directives.tagName(i.source,p=>r(i,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:h}=s,g=p&&i?p.offset>i.offset?p:i:p??i;g&&(!h||h.offset<g.offset)&&r(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!i||!o||o==="!"||o===x.tagName&&a==="map"||o===F.tagName&&a==="seq")return Bs(t,e,n,r,o);let l=e.schema.tags.find(p=>p.tag===o&&p.collection===a);if(!l){let p=e.schema.knownTags[o];if(p?.collection===a)e.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${a} collection, but expects ${p.collection??"scalar"}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Bs(t,e,n,r,o)}let c=Bs(t,e,n,r,o,l),u=l.resolve?.(c,p=>r(i,"TAG_RESOLVE_FAILED",p),e.options)??c,f=_(u)?u:new y(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}function Hn(t,e,n){let s=e.offset,r=Oa(e,t.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[s,s,s]};let i=r.mode===">"?y.BLOCK_FOLDED:y.BLOCK_LITERAL,o=e.source?_a(e.source):[],a=o.length;for(let m=o.length-1;m>=0;--m){let d=o[m][1];if(d===""||d==="\r")a=m;else break}if(a===0){let m=r.chomp==="+"&&o.length>0?`
|
||||
`.repeat(Math.max(1,o.length-1)):"",d=s+r.length;return e.source&&(d+=e.source.length),{value:m,type:i,comment:r.comment,range:[s,d,d]}}let l=e.indent+r.indent,c=e.offset+r.length,u=0;for(let m=0;m<a;++m){let[d,b]=o[m];if(b===""||b==="\r")r.indent===0&&d.length>l&&(l=d.length);else{d.length<l&&n(c+d.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=d.length),u=m,l===0&&!t.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=d.length+b.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let f="",p="",h=!1;for(let m=0;m<u;++m)f+=o[m][0].slice(l)+`
|
||||
`;for(let m=u;m<a;++m){let[d,b]=o[m];c+=d.length+b.length+1;let k=b[b.length-1]==="\r";if(k&&(b=b.slice(0,-1)),b&&d.length<l){let E=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-b.length-(k?2:1),"BAD_INDENT",E),d=""}i===y.BLOCK_LITERAL?(f+=p+d.slice(l)+b,p=`
|
||||
`):d.length>l||b[0]===" "?(p===" "?p=`
|
||||
`:!h&&p===`
|
||||
`&&(p=`
|
||||
|
||||
`),f+=p+d.slice(l)+b,p=`
|
||||
`,h=!0):b===""?p===`
|
||||
`?f+=`
|
||||
`:p=`
|
||||
`:(f+=p+b,p=" ",h=!1)}switch(r.chomp){case"-":break;case"+":for(let m=a;m<o.length;++m)f+=`
|
||||
`+o[m][0].slice(l);f[f.length-1]!==`
|
||||
`&&(f+=`
|
||||
`);break;default:f+=`
|
||||
`}let g=s+r.length+e.source.length;return{value:f,type:i,comment:r.comment,range:[s,g,g]}}function Oa({offset:t,props:e},n,s){if(e[0].type!=="block-scalar-header")return s(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=e[0],i=r[0],o=0,a="",l=-1;for(let p=1;p<r.length;++p){let h=r[p];if(!a&&(h==="-"||h==="+"))a=h;else{let g=Number(h);!o&&g?o=g:l===-1&&(l=t+p)}}l!==-1&&s(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",f=r.length;for(let p=1;p<e.length;++p){let h=e[p];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":n&&!c&&s(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":s(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let g=`Unexpected token in block scalar header: ${h.type}`;s(h,"UNEXPECTED_TOKEN",g);let m=h.source;m&&typeof m=="string"&&(f+=m.length)}}}return{mode:i,indent:o,chomp:a,comment:u,length:f}}function _a(t){let e=t.split(/\n( *)/),n=e[0],s=n.match(/^( *)/),i=[s?.[1]?[s[1],n.slice(s[1].length)]:["",n]];for(let o=1;o<e.length;o+=2)i.push([e[o],e[o+1]]);return i}function Jn(t,e,n){let{offset:s,type:r,source:i,end:o}=t,a,l,c=(p,h,g)=>n(s+p,h,g);switch(r){case"scalar":a=y.PLAIN,l=Ia(i,c);break;case"single-quoted-scalar":a=y.QUOTE_SINGLE,l=La(i,c);break;case"double-quoted-scalar":a=y.QUOTE_DOUBLE,l=Pa(i,c);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[s,s+i.length,s+i.length]}}let u=s+i.length,f=be(o,u,e,n);return{value:l,type:a,comment:f.comment,range:[s,u,f.offset]}}function Ia(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),xi(t)}function La(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),xi(t.slice(1,-1)).replace(/''/g,"'")}function xi(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=e.exec(t);if(!s)return t;let r=s[1],i=" ",o=e.lastIndex;for(n.lastIndex=o;s=n.exec(t);)s[1]===""?i===`
|
||||
`?r+=i:i=`
|
||||
`:(r+=i+s[1],i=" "),o=n.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,s=a.exec(t),r+i+(s?.[1]??"")}function Pa(t,e){let n="";for(let s=1;s<t.length-1;++s){let r=t[s];if(!(r==="\r"&&t[s+1]===`
|
||||
`))if(r===`
|
||||
`){let{fold:i,offset:o}=va(t,s);n+=i,s=o}else if(r==="\\"){let i=t[++s],o=Da[i];if(o)n+=o;else if(i===`
|
||||
`)for(i=t[s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="\r"&&t[s+1]===`
|
||||
`)for(i=t[++s+1];i===" "||i===" ";)i=t[++s+1];else if(i==="x"||i==="u"||i==="U"){let a=i==="x"?2:i==="u"?4:8;n+=xa(t,s+1,a,e),s+=a}else{let a=t.substr(s-1,2);e(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),n+=a}}else if(r===" "||r===" "){let i=s,o=t[s+1];for(;o===" "||o===" ";)o=t[++s+1];o!==`
|
||||
`&&!(o==="\r"&&t[s+2]===`
|
||||
`)&&(n+=s>i?t.slice(i,s+1):r)}else n+=r}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function va(t,e){let n="",s=t[e+1];for(;(s===" "||s===" "||s===`
|
||||
`||s==="\r")&&!(s==="\r"&&t[e+2]!==`
|
||||
`);)s===`
|
||||
`&&(n+=`
|
||||
`),e+=1,s=t[e+1];return n||(n=" "),{fold:n,offset:e}}var Da={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function xa(t,e,n,s){let r=t.substr(e,n),o=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,n+2);return s(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Rs(t,e,n,s){let{value:r,type:i,comment:o,range:a}=e.type==="block-scalar"?Hn(t,e,s):Jn(e,t.options.strict,s),l=n?t.directives.tagName(n.source,f=>s(n,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[ee]:l?c=Ma(t.schema,r,l,n,s):e.type==="scalar"?c=$a(t,r,e,s):c=t.schema[ee];let u;try{let f=c.resolve(r,p=>s(n??e,"TAG_RESOLVE_FAILED",p),t.options);u=C(f)?f:new y(f)}catch(f){let p=f instanceof Error?f.message:String(f);s(n??e,"TAG_RESOLVE_FAILED",p),u=new y(r)}return u.range=a,u.source=r,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Ma(t,e,n,s,r){if(n==="!")return t[ee];let i=[];for(let a of t.tags)if(!a.collection&&a.tag===n)if(a.default&&a.test)i.push(a);else return a;for(let a of i)if(a.test?.test(e))return a;let o=t.knownTags[n];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(r(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[ee])}function $a({atKey:t,directives:e,schema:n},s,r,i){let o=n.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(s))||n[ee];if(n.compat){let a=n.compat.find(l=>l.default&&l.test?.test(s))??n[ee];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;i(r,"TAG_RESOLVE_FAILED",u,!0)}}return o}function Mi(t,e,n){if(e){n??(n=e.length);for(let s=n-1;s>=0;--s){let r=e[s];switch(r.type){case"space":case"comment":case"newline":t-=r.source.length;continue}for(r=e[++s];r?.type==="space";)t+=r.source.length,r=e[++s];break}}return t}var Ba={composeNode:qs,composeEmptyNode:Wn};function qs(t,e,n,s){let r=t.atKey,{spaceBefore:i,comment:o,anchor:a,tag:l}=n,c,u=!0;switch(e.type){case"alias":c=Ra(t,e,s),(a||l)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Rs(t,e,l,s),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Di(Ba,t,e,n,s),a&&(c.anchor=a.source.substring(1))}catch(f){let p=f instanceof Error?f.message:String(f);s(e,"RESOURCE_EXHAUSTION",p)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Wn(t,e.offset,void 0,null,n,s)),a&&c.anchor===""&&s(a,"BAD_ALIAS","Anchor cannot be an empty string"),r&&t.options.stringKeys&&(!C(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Wn(t,e,n,s,{spaceBefore:r,comment:i,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Mi(e,n,s),indent:-1,source:""},f=Rs(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=l),f}function Ra({options:t},{offset:e,source:n,end:s},r){let i=new de(n.substring(1));i.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+n.length,a=be(s,o,t.strict,r);return i.range=[e,o,a.offset],a.comment&&(i.comment=a.comment),i}function $i(t,e,{offset:n,start:s,value:r,end:i},o){let a=Object.assign({_directives:e},t),l=new ye(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=we(s,{indicator:"doc-start",next:r??i?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?qs(c,r,u,o):Wn(c,u.end,s,null,u,o);let f=l.contents.range[2],p=be(i,f,!1,o);return p.comment&&(l.comment=p.comment),l.range=[n,f,p.offset],l}function Ut(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Bi(t){let e="",n=!1,s=!1;for(let r=0;r<t.length;++r){let i=t[r];switch(i[0]){case"#":e+=(e===""?"":s?`
|
||||
|
||||
`:`
|
||||
`)+(i.substring(1)||" "),n=!0,s=!1;break;case"%":t[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(s=!0),n=!1}}return{comment:e,afterEmptyLine:s}}var _e=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,s,r,i)=>{let o=Ut(n);i?this.warnings.push(new ut(o,s,r)):this.errors.push(new te(o,s,r))},this.directives=new he({version:e.version||"1.2"}),this.options=e}decorate(e,n){let{comment:s,afterEmptyLine:r}=Bi(this.prelude);if(s){let i=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
||||
${s}`:s;else if(r||e.directives.docStart||!i)e.commentBefore=s;else if(I(i)&&!i.flow&&i.items.length>0){let o=i.items[0];T(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${s}
|
||||
${a}`:s}else{let o=i.commentBefore;i.commentBefore=o?`${s}
|
||||
${o}`:s}}if(n){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Bi(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,s=-1){for(let r of e)yield*this.next(r);yield*this.end(n,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,s,r)=>{let i=Ut(e);i[0]+=n,this.onError(i,"BAD_DIRECTIVE",s,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let n=$i(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new te(Ut(e),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){let s="Unexpected doc-end without preceding document";this.errors.push(new te(Ut(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;let n=be(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let s=this.doc.comment;this.doc.comment=s?`${s}
|
||||
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new te(Ut(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let s=Object.assign({_directives:this.directives},this.options),r=new ye(void 0,s);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};var Us={};Qt(Us,{BOM:()=>jt,DOCUMENT:()=>Vt,FLOW_END:()=>Gt,SCALAR:()=>pt,createScalarToken:()=>qi,isCollection:()=>Ka,isScalar:()=>Ya,prettyToken:()=>Ua,resolveAsScalar:()=>Ri,setScalarValue:()=>Fi,stringify:()=>Yi,tokenType:()=>Ys,visit:()=>Re});function Ri(t,e=!0,n){if(t){let s=(r,i,o)=>{let a=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(a,i,o);else throw new te([a,a+1],i,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Jn(t,e,s);case"block-scalar":return Hn({options:{strict:e}},t,s)}}return null}function qi(t,e){let{implicitKey:n=!1,indent:s,inFlow:r=!1,offset:i=-1,type:o="PLAIN"}=e,a=Te({type:o,value:t},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:s,source:`
|
||||
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
|
||||
`),u=a.substring(0,c),f=a.substring(c+1)+`
|
||||
`,p=[{type:"block-scalar-header",offset:i,indent:s,source:u}];return Ki(p,l)||p.push({type:"newline",offset:-1,indent:s,source:`
|
||||
`}),{type:"block-scalar",offset:i,indent:s,props:p,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:s,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:s,source:a,end:l};default:return{type:"scalar",offset:i,indent:s,source:a,end:l}}}function Fi(t,e,n={}){let{afterKey:s=!1,implicitKey:r=!1,inFlow:i=!1,type:o}=n,a="indent"in t?t.indent:null;if(s&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Te({type:o,value:e},{implicitKey:r||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":qa(t,l);break;case'"':Fs(t,l,"double-quoted-scalar");break;case"'":Fs(t,l,"single-quoted-scalar");break;default:Fs(t,l,"scalar")}}function qa(t,e){let n=e.indexOf(`
|
||||
`),s=e.substring(0,n),r=e.substring(n+1)+`
|
||||
`;if(t.type==="block-scalar"){let i=t.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=s,t.source=r}else{let{offset:i}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:i,indent:o,source:s}];Ki(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
||||
`});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:r})}}function Ki(t,e){if(e)for(let n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Fs(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{let s=t.props.slice(1),r=e.length;t.props[0].type==="block-scalar-header"&&(r-=t.props[0].source.length);for(let i of s)i.offset+=r;delete t.props,Object.assign(t,{type:n,source:e,end:s});break}case"block-map":case"block-seq":{let r={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
||||
`};delete t.items,Object.assign(t,{type:n,source:e,end:[r]});break}default:{let s="indent"in t?t.indent:-1,r="end"in t&&Array.isArray(t.end)?t.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(t))i!=="type"&&i!=="offset"&&delete t[i];Object.assign(t,{type:n,indent:s,source:e,end:r})}}}var Yi=t=>"type"in t?zn(t):Xn(t);function zn(t){switch(t.type){case"block-scalar":{let e="";for(let n of t.props)e+=zn(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(let n of t.items)e+=Xn(n);return e}case"flow-collection":{let e=t.start.source;for(let n of t.items)e+=Xn(n);for(let n of t.end)e+=n.source;return e}case"document":{let e=Xn(t);if(t.end)for(let n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let n of t.end)e+=n.source;return e}}}function Xn({start:t,key:e,sep:n,value:s}){let r="";for(let i of t)r+=i.source;if(e&&(r+=zn(e)),n)for(let i of n)r+=i.source;return s&&(r+=zn(s)),r}var Ks=Symbol("break visit"),Fa=Symbol("skip children"),Ui=Symbol("remove item");function Re(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),ji(Object.freeze([]),t,e)}Re.BREAK=Ks;Re.SKIP=Fa;Re.REMOVE=Ui;Re.itemAtPath=(t,e)=>{let n=t;for(let[s,r]of e){let i=n?.[s];if(i&&"items"in i)n=i.items[r];else return}return n};Re.parentCollection=(t,e)=>{let n=Re.itemAtPath(t,e.slice(0,-1)),s=e[e.length-1][0],r=n?.[s];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function ji(t,e,n){let s=n(e,t);if(typeof s=="symbol")return s;for(let r of["key","value"]){let i=e[r];if(i&&"items"in i){for(let o=0;o<i.items.length;++o){let a=ji(Object.freeze(t.concat([[r,o]])),i.items[o],n);if(typeof a=="number")o=a-1;else{if(a===Ks)return Ks;a===Ui&&(i.items.splice(o,1),o-=1)}}typeof s=="function"&&r==="key"&&(s=s(e,t))}}return typeof s=="function"?s(e,t):s}var jt="\uFEFF",Vt="",Gt="",pt="",Ka=t=>!!t&&"items"in t,Ya=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function Ua(t){switch(t){case jt:return"<BOM>";case Vt:return"<DOC>";case Gt:return"<FLOW_END>";case pt:return"<SCALAR>";default:return JSON.stringify(t)}}function Ys(t){switch(t){case jt:return"byte-order-mark";case Vt:return"doc-mode";case Gt:return"flow-error-end";case pt:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
||||
`:case`\r
|
||||
`: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(t[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 ue(t){switch(t){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}var Vi=new Set("0123456789ABCDEFabcdef"),ja=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zn=new Set(",[]{}"),Va=new Set(` ,[]{}
|
||||
\r `),js=t=>!t||Va.has(t),mt=class{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(e,n=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!n;let s=this.next??"stream";for(;s&&(n||this.hasChars(1));)s=yield*this.parseNext(s)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
||||
`?!0:n==="\r"?this.buffer[e+1]===`
|
||||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let s=0;for(;n===" ";)n=this.buffer[++s+e];if(n==="\r"){let r=this.buffer[s+e+1];if(r===`
|
||||
`||!r&&!this.atEnd)return e+s+1}return n===`
|
||||
`||s>=this.indentNext||!n&&!this.atEnd?e+s:-1}if(n==="-"||n==="."){let s=this.buffer.substr(e,3);if((s==="---"||s==="...")&&ue(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){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 e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===jt&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,s=e.indexOf("#");for(;s!==-1;){let i=e[s-1];if(i===" "||i===" "){n=s-1;break}else s=e.indexOf("#",s+1)}for(;;){let i=e[n-1];if(i===" "||i===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Vt,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&ue(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!ue(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&ue(n)){let s=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=s,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.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(js),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,s=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=s=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((s!==-1&&s<this.indentNext&&r[0]!=="#"||s===0&&(r.startsWith("---")||r.startsWith("..."))&&ue(r[3]))&&!(s===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Gt,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"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(js),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||ue(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let i=0;for(;this.buffer[n-1-i]==="\\";)i+=1;if(i%2===0)break;n=this.buffer.indexOf('"',n+1)}let s=this.buffer.substring(0,n),r=s.indexOf(`
|
||||
`,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=s.indexOf(`
|
||||
`,i)}r!==-1&&(n=r-(s[r-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 e=this.pos;for(;;){let n=this.buffer[++e];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=>ue(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,s;e:for(let i=this.pos;s=this.buffer[i];++i)switch(s){case" ":n+=1;break;case`
|
||||
`:e=i,n=0;break;case"\r":{let o=this.buffer[i+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
||||
`)break}default:break e}if(!s&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
||||
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(s=this.buffer[r];s===" ";)s=this.buffer[++r];if(s===" "){for(;s===" "||s===" "||s==="\r"||s===`
|
||||
`;)s=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let i=e-1,o=this.buffer[i];o==="\r"&&(o=this.buffer[--i]);let a=i;for(;o===" ";)o=this.buffer[--i];if(o===`
|
||||
`&&i>=this.pos&&i+1+n>a)e=i;else break}while(!0);return yield pt,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,n=this.pos-1,s=this.pos-1,r;for(;r=this.buffer[++s];)if(r===":"){let i=this.buffer[s+1];if(ue(i)||e&&Zn.has(i))break;n=s}else if(ue(r)){let i=this.buffer[s+1];if(r==="\r"&&(i===`
|
||||
`?(s+=1,r=`
|
||||
`,i=this.buffer[s+1]):n=s),i==="#"||e&&Zn.has(i))break;if(r===`
|
||||
`){let o=this.continueScalar(s+1);if(o===-1)break;s=Math.max(s,o-2)}}else{if(e&&Zn.has(r))break;n=s}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield pt,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){let s=this.buffer.slice(this.pos,e);return s?(yield s,this.pos+=s.length,s.length):(n&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(js),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,s=this.charAt(1);if(ue(s)||n&&Zn.has(s)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,n=this.buffer[e];for(;!ue(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(ja.has(n))n=this.buffer[++e];else if(n==="%"&&Vi.has(this.buffer[e+1])&&Vi.has(this.buffer[e+2]))n=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||||
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let n=this.pos-1,s;do s=this.buffer[++n];while(s===" "||e&&s===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let n=this.pos,s=this.buffer[n];for(;!e(s);)s=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};var qe=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,s=this.lineStarts.length;for(;n<s;){let i=n+s>>1;this.lineStarts[i]<e?n=i+1:s=i}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};let r=this.lineStarts[n-1];return{line:n,col:e-r+1}}}};function Fe(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Gi(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Hi(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function es(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ht(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function ts(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let n=0;n<e.length;++n)t.push(e[n])}function Qi(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!Fe(e.start,"explicit-key-ind")&&!Fe(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Hi(e.value)?e.value.end?ts(e.value.end,e.sep):e.value.end=e.sep:ts(e.start,e.sep),delete e.sep)}var Ie=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new mt,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let s of this.lexer.lex(e,n))yield*this.next(s);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let n=Ys(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let s=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in s?s.indent:0:n.type==="flow-collection"&&s.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Qi(n),s.type){case"document":s.value=n;break;case"block-scalar":s.props.push(n);break;case"block-map":{let r=s.items[s.items.length-1];if(r.value){s.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=s.items[s.items.length-1];r.value?s.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=s.items[s.items.length-1];!r||r.value?s.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Gi(r.start)===-1&&(n.indent===0||r.start.every(i=>i.type!=="comment"||i.
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ts(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let s=!this.onKeyLine&&this.indent===e.indent,r=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&n.sep&&!n.value){let o=[];for(let a=0;a<n.sep.length;++a){let l=n.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(i=n.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Fe(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Hi(n.key)&&!Fe(n.sep,"newline")){let o=ht(n.start),a=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(Fe(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let o=ht(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Fe(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);r||n.value?(e.items.push({start:i,key:o,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(o):(Object.assign(n,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!n.explicitKey&&n.sep&&!Fe(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&e.items.push({start:i});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){let s="end"in n.value?n.value.end:void 0;(Array.isArray(s)?s[s.length-1]:void 0)?.type==="comment"?s?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){let r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){ts(r,n.start),r.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Fe(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){let s=this.startBlockValue(e);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?e.items.p
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=es(e),s=ht(n);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=es(e),s=ht(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};function Ji(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new qe||null,prettyErrors:e}}function Wi(t,e={}){let{lineCounter:n,prettyErrors:s}=Ji(e),r=new Ie(n?.addNewLine),i=new _e(e),o=Array.from(i.compose(r.parse(t)));if(s&&n)for(let a of o)a.errors.forEach(Kt(t,n)),a.warnings.forEach(Kt(t,n));return o.length>0?o:Object.assign([],{empty:!0},i.streamInfo())}function Vs(t,e={}){let{lineCounter:n,prettyErrors:s}=Ji(e),r=new Ie(n?.addNewLine),i=new _e(e),o=null;for(let a of i.compose(r.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new te(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&n&&(o.errors.forEach(Kt(t,n)),o.warnings.forEach(Kt(t,n))),o}function Xi(t,e,n){let s;typeof e=="function"?s=e:n===void 0&&e&&typeof e=="object"&&(n=e);let r=Vs(t,n);if(!r)return null;if(r.warnings.forEach(i=>In(r.options.logLevel,i)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:s},n))}function zi(t,e,n){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){let r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(t===void 0){let{keepUndefined:r}=n??e??{};if(!r)return}return ne(t)&&!s?t.toString(n):new ye(t,s,n).toString(n)}var Zi=Gs;function eo(t,e,n){let s=t.srcToken;if(!s||s.type!=="flow-collection")throw new Error("Expected flow-collection CST node for flow sequence");let r=t.items.map((o,a)=>{let l=s.items[a];if(Ga(o,l))return Ce(ie(o.items),l,e,_t);if(T(o))return Ce(o,l,e,_t);{let c=[];for(let f of q(l.start)){if(Ee(f)){c.push(f);continue}if(f.type==="comma")continue;throw new Error(`Unexpected token type in sequence item start: ${f.type}`)}let u=e.transformNode(o,{tokens:c});return ti(Z(u.position.start,u.position.end),u)}});if(t.items.length<s.items.length)for(let o=t.items.length;o<s.items.length;o++){let a=s.items[o];for(let l of D(a.start,e)){if(l.type==="comma")continue;throw new Error(`Unexpected token type in collection item start: ${l.type}`)}}let i=null;for(let o of q(s.end)){if(o.type==="comment"){e.transformComment(o);continue}if(o.type==="flow-seq-end"){i=o;continue}throw new Error(`Unexpected token type in flow seq end: ${o.type}`)}if(!i)throw new Error("Expected flow-seq-end token");return ei(e.transformRange([s.start.offset,i.offset+i.source.length]),e.transformContentProperties(t,n.tokens),r)}function Ga(t,e){if(t.srcToken)return!1;if(!U(t))return!1;return t.items.length!==1?!1:t.items[0].srcToken===e}function ss(t,e,n){return{type:"mapping",position:t,leadingComments:[],...e,children:n}}function rs(t,e,n){return{type:"mappingItem",position:t,leadingComments:[],children:[e,n]}}function to(t,e,n){let s=t.srcToken;if(!s||s.type!=="block-map")throw new Error("Expected block mapping srcToken");let r=t.items.map((i,o)=>{let a=s.items[o];return Ce(i,a,e,rs)});if(t.items.length<s.items.length)for(let i=t.items.length;i<s.items.length;i++){let o=s.items[i];for(let a of D(o.start,e))throw new Error(`Unexpected token type in collection item start: ${a.type}`)}return ss(Z(r[0].position.start,ie(r).position.end),e.transformContentProperties(t,n.tokens),r)}function Qs(t,e,n){return{type:"plain",position:t,leadingComments:[],trailingComment:null,...e,value:n}}function no(t,e,n){for(let s=e;s
Line truncated
|
||||
Reference in new issue
Block a user