ui-thing 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import{a as he,b as an,f as me}from"./chunk-QMEJXGGM.js";var xr=he(Qn=>{"use str
5
5
  `,++e,m===13&&n.charCodeAt(e)===10&&++e,++s,u=t=e):i.unterminated(a,o,l):++e}return{pos:e,str:c,firstInvalidLoc:p,lineStart:t,curLine:s,containsInvalid:!!p}}function tl(r,n,e,t){return r==="template"?n===96||n===36&&e.charCodeAt(t+1)===123:n===(r==="double"?34:39)}function nl(r,n,e,t,s,i){let a=!s;n++;let o=c=>({pos:n,ch:c,lineStart:e,curLine:t}),l=r.charCodeAt(n++);switch(l){case 110:return o(`
6
6
  `);case 114:return o("\r");case 120:{let c;return{code:c,pos:n}=Ts(r,n,e,t,2,!1,a,i),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:n}=gi(r,n,e,t,a,i),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:r.charCodeAt(n)===10&&++n;case 10:e=n,++t;case 8232:case 8233:return o("");case 56:case 57:if(s)return o(null);i.strictNumericEscape(n-1,e,t);default:if(l>=48&&l<=55){let c=n-1,u=r.slice(c,n+2).match(/^[0-7]+/)[0],f=parseInt(u,8);f>255&&(u=u.slice(0,-1),f=parseInt(u,8)),n+=u.length-1;let m=r.charCodeAt(n);if(u!=="0"||m===56||m===57){if(s)return o(null);i.strictNumericEscape(c,e,t)}return o(String.fromCharCode(f))}return o(String.fromCharCode(l))}}function Ts(r,n,e,t,s,i,a,o){let l=n,c;return{n:c,pos:n}=bi(r,n,e,t,16,s,i,!1,o,!a),c===null&&(a?o.invalidEscapeSequence(l,e,t):n=l-1),{code:c,pos:n}}function bi(r,n,e,t,s,i,a,o,l,c){let p=n,u=s===16?Xr.hex:Xr.decBinOct,f=s===16?fn.hex:s===10?fn.dec:s===8?fn.oct:fn.bin,m=!1,d=0;for(let g=0,h=i??1/0;g<h;++g){let v=r.charCodeAt(n),w;if(v===95&&o!=="bail"){let E=r.charCodeAt(n-1),x=r.charCodeAt(n+1);if(o){if(Number.isNaN(x)||!f(x)||u.has(E)||u.has(x)){if(c)return{n:null,pos:n};l.unexpectedNumericSeparator(n,e,t)}}else{if(c)return{n:null,pos:n};l.numericSeparatorInEscapeSequence(n,e,t)}++n;continue}if(v>=97?w=v-97+10:v>=65?w=v-65+10:el(v)?w=v-48:w=1/0,w>=s){if(w<=9&&c)return{n:null,pos:n};if(w<=9&&l.invalidDigit(n,e,t,s))w=0;else if(a)w=0,m=!0;else break}++n,d=d*s+w}return n===p||i!=null&&n-p!==i||m?{n:null,pos:n}:{n:d,pos:n}}function gi(r,n,e,t,s,i){let a=r.charCodeAt(n),o;if(a===123){if(++n,{code:o,pos:n}=Ts(r,n,e,t,r.indexOf("}",n)-n,!0,s,i),++n,o!==null&&o>1114111)if(s)i.invalidCodePoint(n,e,t);else return{code:null,pos:n}}else({code:o,pos:n}=Ts(r,n,e,t,4,!1,s,i));return{code:o,pos:n}}function Ft(r,n,e){return new ke(e,r-n,r)}var sl=new Set([103,109,115,105,121,117,100,118]),Ae=class{constructor(n){this.type=n.type,this.value=n.value,this.start=n.start,this.end=n.end,this.loc=new dt(n.startLoc,n.endLoc)}},ws=class extends xs{constructor(n,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,s,i,a)=>this.options.errorRecovery?(this.raise(b.InvalidDigit,Ft(t,s,i),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(b.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(b.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(b.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(b.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,s,i)=>{this.recordStrictModeErrors(b.StrictNumericEscape,Ft(t,s,i))},unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedString,Ft(t-1,s,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(b.StrictNumericEscape),unterminated:(t,s,i)=>{throw this.raise(b.UnterminatedTemplate,Ft(t,s,i))}}),this.state=new Ps,this.state.init(n),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(n){this.tokens.length=this.state.tokensLength,this.tokens.push(n),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ae(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(n){return this.match(n)?(this.next(),!0):!1}match(n){return this.state.type===n}createLookaheadState(n){return{pos:n.pos,value:null,type:n.type,start:n.start,end:n.end,context:[this.curContext()],inType:n.inType,startLoc:n.startLoc,lastTokEndLoc:n.lastTokEndLoc,curLine:n.curLine,lineStart:n.lineStart,curPosition:n.curPosition}}lookahead(){let n=this.state;this.state=this.createLookaheadState(n),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=n,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(n){return us.lastIndex=n,us.test(this.input)?us.lastIndex:n}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(n){return bn.lastIndex=n,bn.test(this.input)?bn.lastIndex:n}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(n){let e=this.input.charCodeAt(n);if((e&64512)===55296&&++n<this.input.length){let t=this.input.charCodeAt(n);(t&64512)===56320&&(e=65536+((e&1023)<<10)+(t&1023))}return e}setStrict(n){this.state.strict=n,n&&(this.state.strictErrors.forEach(([e,t])=>this.raise(e,t)),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(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(n){let e;this.isLookahead||(e=this.state.curPosition());let t=this.state.pos,s=this.input.indexOf(n,t+2);if(s===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition());for(this.state.pos=s+n.length,dn.lastIndex=t+2;dn.test(this.input)&&dn.lastIndex<=s;)++this.state.curLine,this.state.lineStart=dn.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(t+2,s),start:t,end:s+n.length,loc:new dt(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(i),i}skipLineComment(n){let e=this.state.pos,t;this.isLookahead||(t=this.state.curPosition());let s=this.input.charCodeAt(this.state.pos+=n);if(this.state.pos<this.length)for(;!Rt(s)&&++this.state.pos<this.length;)s=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+n,i),start:e,end:i,loc:new dt(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(o),o}skipSpace(){let n=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let t=this.input.charCodeAt(this.state.pos);switch(t){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let s=this.skipBlockComment("*/");s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}case 47:{let s=this.skipLineComment(2);s!==void 0&&(this.addComment(s),this.options.attachComment&&e.push(s));break}default:break e}break;default:if(Zo(t))++this.state.pos;else if(t===45&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===45&&this.input.charCodeAt(s+2)===62&&(n===0||this.state.lineStart>n)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else if(t===60&&!this.inModule&&this.options.annexB){let s=this.state.pos;if(this.input.charCodeAt(s+1)===33&&this.input.charCodeAt(s+2)===45&&this.input.charCodeAt(s+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),this.options.attachComment&&e.push(i))}else break e}else break e}}if(e.length>0){let t=this.state.pos,s={start:n,end:t,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(n,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let t=this.state.type;this.state.type=n,this.state.value=e,this.isLookahead||this.updateContext(t)}replaceToken(n){this.state.type=n,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let n=this.state.pos+1,e=this.codePointAtPos(n);if(e>=48&&e<=57)throw this.raise(b.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?b.RecordExpressionHashIncorrectStartSyntaxType:b.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else _e(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let n=this.input.charCodeAt(this.state.pos+1);if(n>=48&&n<=57){this.readNumber(!0);return}n===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let n=this.input.charCodeAt(this.state.pos+1);if(n!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!Rt(n)&&++this.state.pos<this.length;)n=this.input.charCodeAt(this.state.pos);let t=this.input.slice(e+2,this.state.pos);return this.finishToken(28,t),!0}readToken_mult_modulo(n){let e=n===42?55:54,t=1,s=this.input.charCodeAt(this.state.pos+1);n===42&&s===42&&(t++,s=this.input.charCodeAt(this.state.pos+2),e=57),s===61&&!this.state.inType&&(t++,e=n===37?33:30),this.finishOp(e,t)}readToken_pipe_amp(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(n===124?41:42,2);return}if(n===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(n===124?43:45,1)}readToken_caret(){let n=this.input.charCodeAt(this.state.pos+1);n===61&&!this.state.inType?this.finishOp(32,2):n===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===n){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===60){if(this.input.charCodeAt(n+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:n}=this.state,e=this.input.charCodeAt(n+1);if(e===62){let t=this.input.charCodeAt(n+2)===62?3:2;if(this.input.charCodeAt(n+t)===61){this.finishOp(30,t+1);return}this.finishOp(52,t);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(n){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(n===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(n===61?29:35,1)}readToken_question(){let n=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);n===63?e===61?this.finishOp(30,3):this.finishOp(40,2):n===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(n){switch(n){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(b.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(n);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(n);return;case 124:case 38:this.readToken_pipe_amp(n);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(n);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(n);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(_e(n)){this.readWord(n);return}}throw this.raise(b.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(n)})}finishOp(n,e){let t=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(n,t)}readRegexp(){let n=this.state.startLoc,e=this.state.start+1,t,s,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(b.UnterminatedRegExp,re(n,1));let c=this.input.charCodeAt(i);if(Rt(c))throw this.raise(b.UnterminatedRegExp,re(n,1));if(t)t=!1;else{if(c===91)s=!0;else if(c===93&&s)s=!1;else if(c===47&&!s)break;t=c===92}}let a=this.input.slice(e,i);++i;let o="",l=()=>re(n,i+2-e);for(;i<this.length;){let c=this.codePointAtPos(i),p=String.fromCharCode(c);if(sl.has(c))c===118?o.includes("u")&&this.raise(b.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(b.IncompatibleRegExpUVFlags,l()),o.includes(p)&&this.raise(b.DuplicateRegExpFlags,l());else if(pt(c)||c===92)this.raise(b.MalformedRegExpFlags,l());else break;++i,o+=p}this.state.pos=i,this.finishToken(137,{pattern:a,flags:o})}readInt(n,e,t=!1,s=!0){let{n:i,pos:a}=bi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,e,t,s,this.errorHandlers_readInt,!1);return this.state.pos=a,i}readRadixNumber(n){let e=this.state.curPosition(),t=!1;this.state.pos+=2;let s=this.readInt(n);s==null&&this.raise(b.InvalidDigit,re(e,2),{radix:n});let i=this.input.charCodeAt(this.state.pos);if(i===110)++this.state.pos,t=!0;else if(i===109)throw this.raise(b.InvalidDecimal,e);if(_e(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());if(t){let a=this.input.slice(e.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,a);return}this.finishToken(134,s)}readNumber(n){let e=this.state.pos,t=this.state.curPosition(),s=!1,i=!1,a=!1,o=!1,l=!1;!n&&this.readInt(10)===null&&this.raise(b.InvalidNumber,this.state.curPosition());let c=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(c){let m=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(b.StrictOctalLiteral,t),!this.state.strict){let d=m.indexOf("_");d>0&&this.raise(b.ZeroDigitNumericSeparator,re(t,d))}l=c&&!/[89]/.test(m)}let p=this.input.charCodeAt(this.state.pos);if(p===46&&!l&&(++this.state.pos,this.readInt(10),s=!0,p=this.input.charCodeAt(this.state.pos)),(p===69||p===101)&&!l&&(p=this.input.charCodeAt(++this.state.pos),(p===43||p===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(b.InvalidOrMissingExponent,t),s=!0,o=!0,p=this.input.charCodeAt(this.state.pos)),p===110&&((s||c)&&this.raise(b.InvalidBigIntLiteral,t),++this.state.pos,i=!0),p===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||c)&&this.raise(b.InvalidDecimal,t),++this.state.pos,a=!0),_e(this.codePointAtPos(this.state.pos)))throw this.raise(b.NumberIdentifier,this.state.curPosition());let u=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(135,u);return}if(a){this.finishToken(136,u);return}let f=l?parseInt(u,8):parseFloat(u);this.finishToken(134,f)}readCodePoint(n){let{code:e,pos:t}=gi(this.input,this.state.pos,this.state.lineStart,this.state.curLine,n,this.errorHandlers_readCodePoint);return this.state.pos=t,e}readString(n){let{str:e,pos:t,curLine:s,lineStart:i}=Qr(n===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=t+1,this.state.lineStart=i,this.state.curLine=s,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let n=this.input[this.state.pos],{str:e,firstInvalidLoc:t,pos:s,curLine:i,lineStart:a}=Qr("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=i,t&&(this.state.firstInvalidTemplateEscapePos=new ke(t.curLine,t.pos-t.lineStart,t.pos)),this.input.codePointAt(s)===96?this.finishToken(24,t?null:n+e+"`"):(this.state.pos++,this.finishToken(25,t?null:n+e+"${"))}recordStrictModeErrors(n,e){let t=e.index;this.state.strict&&!this.state.strictErrors.has(t)?this.raise(n,e):this.state.strictErrors.set(t,[n,e])}readWord1(n){this.state.containsEsc=!1;let e="",t=this.state.pos,s=this.state.pos;for(n!==void 0&&(this.state.pos+=n<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(pt(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,e+=this.input.slice(s,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===t?_e:pt;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(b.MissingUnicodeEscape,this.state.curPosition()),s=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(b.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(l)),s=this.state.pos}else break}return e+this.input.slice(s,this.state.pos)}readWord(n){let e=this.readWord1(n),t=Fs.get(e);t!==void 0?this.finishToken(t,He(t)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:n}=this.state;Vs(n)&&this.state.containsEsc&&this.raise(b.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:He(n)})}raise(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=n(s,t);if(!this.options.errorRecovery)throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(n,e,t={}){let s=e instanceof ke?e:e.loc.start,i=s.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let l=a[o];if(l.loc.index===i)return a[o]=n(s,t);if(l.loc.index<i)break}return this.raise(n,e,t)}updateContext(n){}unexpected(n,e){throw this.raise(b.UnexpectedToken,n??this.state.startLoc,{expected:e?He(e):null})}expectPlugin(n,e){if(this.hasPlugin(n))return!0;throw this.raise(b.MissingPlugin,e??this.state.startLoc,{missingPlugin:[n]})}expectOnePlugin(n){if(!n.some(e=>this.hasPlugin(e)))throw this.raise(b.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:n})}errorBuilder(n){return(e,t,s)=>{this.raise(n,Ft(e,t,s))}}},Cs=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Ss=class{constructor(n){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=n}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Cs)}exit(){let n=this.stack.pop(),e=this.current();for(let[t,s]of Array.from(n.undefinedPrivateNames))e?e.undefinedPrivateNames.has(t)||e.undefinedPrivateNames.set(t,s):this.parser.raise(b.InvalidPrivateFieldResolution,s,{identifierName:t})}declarePrivateName(n,e,t){let{privateNames:s,loneAccessors:i,undefinedPrivateNames:a}=this.current(),o=s.has(n);if(e&3){let l=o&&i.get(n);if(l){let c=l&4,p=e&4,u=l&3,f=e&3;o=u===f||c!==p,o||i.delete(n)}else o||i.set(n,e)}o&&this.parser.raise(b.PrivateNameRedeclaration,t,{identifierName:n}),s.add(n),a.delete(n)}usePrivateName(n,e){let t;for(t of this.stack)if(t.privateNames.has(n))return;t?t.undefinedPrivateNames.set(n,e):this.parser.raise(b.InvalidPrivateFieldResolution,e,{identifierName:n})}},ft=class{constructor(n=0){this.type=n}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},xn=class extends ft{constructor(n){super(n),this.declarationErrors=new Map}recordDeclarationError(n,e){let t=e.index;this.declarationErrors.set(t,[n,e])}clearDeclarationError(n){this.declarationErrors.delete(n)}iterateErrors(n){this.declarationErrors.forEach(n)}},Is=class{constructor(n){this.parser=void 0,this.stack=[new ft],this.parser=n}enter(n){this.stack.push(n)}exit(){this.stack.pop()}recordParameterInitializerError(n,e){let t=e.loc.start,{stack:s}=this,i=s.length-1,a=s[i];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(n,t);else return;a=s[--i]}this.parser.raise(n,t)}recordArrowParameterBindingError(n,e){let{stack:t}=this,s=t[t.length-1],i=e.loc.start;if(s.isCertainlyParameterDeclaration())this.parser.raise(n,i);else if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(n,i);else return}recordAsyncArrowParametersError(n){let{stack:e}=this,t=e.length-1,s=e[t];for(;s.canBeArrowParameterDeclaration();)s.type===2&&s.recordDeclarationError(b.AwaitBindingIdentifier,n),s=e[--t]}validateAsPattern(){let{stack:n}=this,e=n[n.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([t,s])=>{this.parser.raise(t,s);let i=n.length-2,a=n[i];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(s.index),a=n[--i]})}};function rl(){return new ft(3)}function il(){return new xn(1)}function al(){return new xn(2)}function yi(){return new ft}var Es=class{constructor(){this.stacks=[]}enter(n){this.stacks.push(n)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function gn(r,n){return(r?2:0)|(n?1:0)}var As=class extends ws{addExtra(n,e,t,s=!0){if(!n)return;let i=n.extra=n.extra||{};s?i[e]=t:Object.defineProperty(i,e,{enumerable:s,value:t})}isContextual(n){return this.state.type===n&&!this.state.containsEsc}isUnparsedContextual(n,e){let t=n+e.length;if(this.input.slice(n,t)===e){let s=this.input.charCodeAt(t);return!(pt(s)||(s&64512)===55296)}return!1}isLookaheadContextual(n){let e=this.nextTokenStart();return this.isUnparsedContextual(e,n)}eatContextual(n){return this.isContextual(n)?(this.next(),!0):!1}expectContextual(n,e){if(!this.eatContextual(n)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,n)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return mi.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Jr.lastIndex=this.state.end,Jr.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(n=!0){(n?this.isLineTerminator():this.eat(13))||this.raise(b.MissingSemicolon,this.state.lastTokEndLoc)}expect(n,e){this.eat(n)||this.unexpected(e,n)}tryParse(n,e=this.state.clone()){let t={node:null};try{let s=n((i=null)=>{throw t.node=i,t});if(this.state.errors.length>e.errors.length){let i=this.state;return this.state=e,this.state.tokensLength=i.tokensLength,{node:s,error:i.errors[e.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:s,error:null,thrown:!1,aborted:!1,failState:null}}catch(s){let i=this.state;if(this.state=e,s instanceof SyntaxError)return{node:null,error:s,thrown:!0,aborted:!1,failState:i};if(s===t)return{node:t.node,error:null,thrown:!1,aborted:!0,failState:i};throw s}}checkExpressionErrors(n,e){if(!n)return!1;let{shorthandAssignLoc:t,doubleProtoLoc:s,privateKeyLoc:i,optionalParametersLoc:a}=n,o=!!t||!!s||!!a||!!i;if(!e)return o;t!=null&&this.raise(b.InvalidCoverInitializedName,t),s!=null&&this.raise(b.DuplicateProto,s),i!=null&&this.raise(b.UnexpectedPrivateField,i),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return oi(this.state.type)}isPrivateName(n){return n.type==="PrivateName"}getPrivateNameSV(n){return n.id.name}hasPropertyAsPrivateName(n){return(n.type==="MemberExpression"||n.type==="OptionalMemberExpression")&&this.isPrivateName(n.property)}isObjectProperty(n){return n.type==="ObjectProperty"}isObjectMethod(n){return n.type==="ObjectMethod"}initializeScopes(n=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let t=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let s=this.inModule;this.inModule=n;let i=this.scope,a=this.getScopeHandler();this.scope=new a(this,n);let o=this.prodParam;this.prodParam=new Es;let l=this.classScope;this.classScope=new Ss(this);let c=this.expressionScope;return this.expressionScope=new Is(this),()=>{this.state.labels=e,this.exportedIdentifiers=t,this.inModule=s,this.scope=i,this.prodParam=o,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let n=0;this.inModule&&(n|=2),this.scope.enter(1),this.prodParam.enter(n)}checkDestructuringPrivate(n){let{privateKeyLoc:e}=n;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ut=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ht=class{constructor(n,e,t){this.type="",this.start=e,this.end=0,this.loc=new dt(t),n!=null&&n.options.ranges&&(this.range=[e,0]),n!=null&&n.filename&&(this.loc.filename=n.filename)}},qs=ht.prototype;qs.__clone=function(){let r=new ht(void 0,this.start,this.loc.start),n=Object.keys(this);for(let e=0,t=n.length;e<t;e++){let s=n[e];s!=="leadingComments"&&s!=="trailingComments"&&s!=="innerComments"&&(r[s]=this[s])}return r};function ol(r){return Be(r)}function Be(r){let{type:n,start:e,end:t,loc:s,range:i,extra:a,name:o}=r,l=Object.create(qs);return l.type=n,l.start=e,l.end=t,l.loc=s,l.range=i,l.extra=a,l.name=o,n==="Placeholder"&&(l.expectedNode=r.expectedNode),l}function ll(r){let{type:n,start:e,end:t,loc:s,range:i,extra:a}=r;if(n==="Placeholder")return ol(r);let o=Object.create(qs);return o.type=n,o.start=e,o.end=t,o.loc=s,o.range=i,r.raw!==void 0?o.raw=r.raw:o.extra=a,o.value=r.value,o}var ks=class extends As{startNode(){let n=this.state.startLoc;return new ht(this,n.index,n)}startNodeAt(n){return new ht(this,n.index,n)}startNodeAtNode(n){return this.startNodeAt(n.loc.start)}finishNode(n,e){return this.finishNodeAt(n,e,this.state.lastTokEndLoc)}finishNodeAt(n,e,t){return n.type=e,n.end=t.index,n.loc.end=t,this.options.ranges&&(n.range[1]=t.index),this.options.attachComment&&this.processComment(n),n}resetStartLocation(n,e){n.start=e.index,n.loc.start=e,this.options.ranges&&(n.range[0]=e.index)}resetEndLocation(n,e=this.state.lastTokEndLoc){n.end=e.index,n.loc.end=e,this.options.ranges&&(n.range[1]=e.index)}resetStartLocationFromNode(n,e){this.resetStartLocation(n,e.loc.start)}},cl=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),L=Re`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:r})=>`Cannot overwrite reserved type ${r}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:r,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:n})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:n})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:n,explicitType:e})=>`Enum \`${r}\` has type \`${e}\`, so the initializer of \`${n}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:n,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${e}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:r,suggestion:n})=>`\`declare export ${r}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function pl(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function Yr(r){return r.importKind==="type"||r.importKind==="typeof"}var ul={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function dl(r,n){let e=[],t=[];for(let s=0;s<r.length;s++)(n(r[s],s,r)?e:t).push(r[s]);return[e,t]}var fl=/\*?\s*@((?:no)?flow)\b/,hl=r=>class extends r{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return ys}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(this.flowPragma===void 0){let t=fl.exec(e.value);if(t)if(t[1]==="flow")this.flowPragma="flow";else if(t[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>t.index+1&&this.raise(L.UnexpectedSpaceBetweenModuloChecks,t),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,s=null;return this.match(54)?(this.state.inType=e,s=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(s=this.flowParsePredicate())),[t,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return s.params=a.params,s.rest=a.rest,s.this=a._this,this.expect(11),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(L.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,t);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),s=t.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(L.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(o)):(this.expectContextual(125,L.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),s.push(o)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,a=!1;return s.forEach(o=>{pl(o)?(i==="CommonJS"&&this.raise(L.AmbiguousDeclareModuleKind,o),i="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(L.DuplicateDeclareModuleExports,o),i==="ES"&&this.raise(L.AmbiguousDeclareModuleKind,o),i="CommonJS",a=!0)}),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!t){let s=this.state.value;throw this.raise(L.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:ul[s]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(L.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,t,s){cl.has(e)&&this.raise(s?L.AssignReservedType:L.UnexpectedReservedType,t,{reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return s.name=a.name,s.variance=i,s.bound=a.typeAnnotation,this.match(29)?(this.eat(29),s.default=this.flowParseType()):e&&this.raise(L.MissingTypeParamDefault,t),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);t.params.push(i),i.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=s,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,s){return e.static=t,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let s=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:s,allowProto:i,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,p,u=!1;for(t&&this.match(6)?(this.expect(6),c=9,p=!0):(this.expect(5),c=8,p=!1),l.exact=p;!this.match(c);){let m=!1,d=null,g=null,h=this.startNode();if(i&&this.isContextual(118)){let w=this.lookahead();w.type!==14&&w.type!==17&&(this.next(),d=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let w=this.lookahead();w.type!==14&&w.type!==17&&(this.next(),m=!0)}let v=this.flowParseVariance();if(this.eat(0))d!=null&&this.unexpected(d),this.eat(0)?(v&&this.unexpected(v.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(h,m))):l.indexers.push(this.flowParseObjectTypeIndexer(h,m,v));else if(this.match(10)||this.match(47))d!=null&&this.unexpected(d),v&&this.unexpected(v.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(h,m));else{let w="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();oi(x.type)&&(w=this.state.value,this.next())}let E=this.flowParseObjectTypeProperty(h,m,d,v,w,s,a??!p);E===null?(u=!0,g=this.state.lastTokStartLoc):l.properties.push(E)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(L.UnexpectedExplicitInexactInObject,g)}this.expect(c),s&&(l.inexact=u);let f=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,t,s,i,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(L.InexactInsideExact,this.state.lastTokStartLoc):this.raise(L.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(L.InexactVariance,i),null):(o||this.raise(L.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(L.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=s!=null,e.kind=a;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,s!=null&&this.unexpected(s),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(L.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(c=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=c,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t=e.kind==="get"?0:1,s=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?L.GetterMayNotHaveThisParam:L.SetterMayNotHaveThisParam,e.value.this),s!==t&&this.raise(e.kind==="get"?b.BadGetterArity:b.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(b.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){var s;(s=e)!=null||(e=this.state.startLoc);let i=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let a=this.startNodeAt(e);a.qualification=i,a.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(a,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,t){let s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,s=!1,i=null,a=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!e&&this.raise(L.ThisParamMustBeFirst,a),t=this.parseIdentifier(l),this.eat(17)&&(s=!0,l&&this.raise(L.ThisParamMayNotBeOptional,a)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),a.name=t,a.optional=s,a.typeAnnotation=i,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:s}}flowIdentToTypeAnnotation(e,t,s){switch(s.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(e,s)}}flowParsePrimaryType(){let e=this.state.startLoc,t=this.startNode(),s,i,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=o,i;case 47:return t.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),t.params=s.params,t.rest=s.rest,t.this=s._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),this.finishNode(t,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(B(this.state.type)||this.match(78)){let l=this.lookahead().type;a=l!==17&&l!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?s=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):s=this.flowParseFunctionTypeParams(),t.params=s.params,t.rest=s.rest,t.this=s._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(L.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Vs(this.state.type)){let l=He(this.state.type);return this.next(),super.createIdentifier(t,l)}else if(B(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(e),a=this.eat(18);s=s||a,this.expect(0),!a&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=a,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,s=!1){if(t){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s));return}super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(xe(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let t=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,s){if(t.type==="Identifier"){if(t.name==="declare"){if(this.match(80)||B(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(B(this.state.type)){if(t.name==="interface")return this.flowParseInterface(e);if(t.name==="type")return this.flowParseTypeAlias(e);if(t.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){let{type:e}=this.state;return Kr(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return Kr(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(s),e}this.expect(17);let i=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(t),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[p,u]=this.getArrowLikeExpressions(l);if(c||u.length>0){let f=[...a];if(u.length>0){this.state=i,this.state.noArrowAt=f;for(let m=0;m<u.length;m++)f.push(u[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[p,u]=this.getArrowLikeExpressions(l)}c&&p.length>1&&this.raise(L.AmbiguousConditionalArrow,i.startLoc),c&&p.length===1&&(this.state=i,f.push(p[0].start),this.state.noArrowAt=f,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let s=[e],i=[];for(;s.length!==0;){let a=s.pop();a.type==="ArrowFunctionExpression"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):i.push(a),s.push(a.body)):a.type==="ConditionalExpression"&&(s.push(a.consequent),s.push(a.alternate))}return t?(i.forEach(a=>this.finishArrowValidation(a)),[i,[]]):dl(i,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var t;this.toAssignableList(e.params,(t=e.extra)==null?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let s;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),s=t(),this.state.noArrowParamsConversionAt.pop()):s=t(),s}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}else if(this.isContextual(131)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}else if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&e.exportKind==="type"&&this.unexpected(t),s}parseClassId(e,t,s){super.parseClassId(e,t,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&(t.type!=="ClassProperty"&&t.type!=="ClassPrivateProperty"&&t.type!=="PropertyDefinition"?this.raise(L.DeclareClassElement,i):t.value&&this.raise(L.DeclareClassFieldInitializer,t.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(b.InvalidIdentifier,this.state.curPosition(),{identifierName:t}),this.finishToken(132,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);e===123&&t===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?t===46?this.finishOp(18,2):this.finishOp(17,1):Jo(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,t){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,s)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var s;let a=e[i];a&&a.type==="TypeCastExpression"&&!((s=a.extra)!=null&&s.parenthesized)&&(e.length>1||!t)&&this.raise(L.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,t,s,i){let a=super.parseArrayLike(e,t,s,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,t,s){return e==="TypeCastExpression"||super.isValidLVal(e,t,s)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,s,i,a,o){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,a,o),t.params&&a){let l=t.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}else if(t.type==="MethodDefinition"&&a&&t.value.params){let l=t.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(L.ThisParamBannedInConstructor,t)}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let t=e.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,t.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let s=t[0];this.isThisParam(s)&&e.kind==="get"?this.raise(L.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(L.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let p=super.parseObjPropValue(e,t,s,i,a,o,l);return c&&((p.value||p).typeParameters=c),p}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(L.PatternIsOptional,e),this.isThisParam(e)&&this.raise(L.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(L.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(L.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(L.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(L.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,t,s){t.local=Yr(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let t=this.lookaheadCharCode();return t===123||t===42}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){if(super.applyImportPhase(e,t,s,i),t){if(!s&&this.match(65))return;e.exportKind=s==="type"?s:"value"}else s==="type"&&this.match(55)&&this.unexpected(),e.importKind=s==="type"||s==="typeof"?s:"value"}parseImportSpecifier(e,t,s,i,a){let o=e.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let u=this.parseIdentifier(!0);l!==null&&!xe(this.state.type)?(e.imported=u,e.importKind=l,e.local=Be(u)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&xe(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(t)throw this.raise(b.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=Be(e.imported))}let p=Yr(e);return s&&p&&this.raise(L.ImportTypeShorthandOnlyInPureImport,e),(s||p)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!s&&!p&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,t){let s=e.kind;s!=="get"&&s!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=s}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var s;let i=null,a;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(i=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,t),i),!a.error)return a.node;let{context:c}=this.state,p=c[c.length-1];(p===V.j_oTag||p===V.j_expr)&&c.pop()}if((s=a)!=null&&s.error||this.match(47)){var o,l;i=i||this.state.clone();let c,p=this.tryParse(f=>{var m;c=this.flowParseTypeParameterDeclaration();let d=this.forwardNoArrowParamsConversionAt(c,()=>{let h=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(h,c),h});(m=d.extra)!=null&&m.parenthesized&&f();let g=this.maybeUnwrapTypeCastExpression(d);return g.type!=="ArrowFunctionExpression"&&f(),g.typeParameters=c,this.resetStartLocationFromNode(g,c),d},i),u=null;if(p.node&&this.maybeUnwrapTypeCastExpression(p.node).type==="ArrowFunctionExpression"){if(!p.error&&!p.aborted)return p.node.async&&this.raise(L.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),p.node;u=p.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(u)return this.state=p.failState,u;throw(l=a)!=null&&l.thrown?a.error:p.thrown?p.error:this.raise(L.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(()=>{let s=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=s,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(L.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,t,s,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,t,s){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(t.index)!==-1){this.next();let i=this.startNodeAt(t);i.callee=e,i.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(i,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let i=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(t)||l(),i);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,t,s),i);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();let a=this.startNodeAt(t);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),a.arguments=this.parseCallExpressionArguments(11,!1),a.optional=!0,this.finishCallExpression(a,!0)}else if(!s&&this.shouldParseTypes()&&this.match(47)){let a=this.startNodeAt(t);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11,!1),i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),!!this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===42&&t===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(e===124&&t===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,t){let s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(L.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(L.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return s===58&&i===58?t+2:this.input.slice(t+e,t+e+12)==="flow-include"?t+12:s===58&&i!==58?t:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(b.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(L.EnumBooleanMemberNotInitialized,e,{memberName:s,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?t.explicitType==="symbol"?L.EnumInvalidMemberInitializerSymbolType:L.EnumInvalidMemberInitializerPrimaryType:L.EnumInvalidMemberInitializerUnknownType,e,t)}flowEnumErrorNumberMemberNotInitialized(e,t){this.raise(L.EnumNumberMemberNotInitialized,e,t)}flowEnumErrorStringMemberInconsistentlyInitialized(e,t){this.raise(L.EnumStringMemberInconsistentlyInitialized,e,t)}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let s=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 133:{let s=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,t=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:t,init:s}}flowEnumCheckExplicitTypeMismatch(e,t,s){let{explicitType:i}=t;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),p=l.name;if(p==="")continue;/^[a-z]/.test(p)&&this.raise(L.EnumInvalidMemberName,l,{memberName:p,suggestion:p[0].toUpperCase()+p.slice(1),enumName:e}),s.has(p)&&this.raise(L.EnumDuplicateMemberName,l,{memberName:p,enumName:e}),s.add(p);let u={enumName:e,explicitType:t,memberName:p};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"boolean"),o.init=c.value,i.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"number"),o.init=c.value,i.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,u,"string"),o.init=c.value,i.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,u);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,u);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,u);break;default:i.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:a}}flowEnumStringMembers(e,t,{enumName:s}){if(e.length===0)return t;if(t.length===0)return e;if(t.length>e.length){for(let i of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return t}else{for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!B(this.state.type))throw this.raise(L.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:t}=this.state;return this.next(),t!=="boolean"&&t!=="number"&&t!=="string"&&t!=="symbol"&&this.raise(L.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let s=t.name,i=t.loc.start,a=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:s,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let p=o.booleanMembers.length,u=o.numberMembers.length,f=o.stringMembers.length,m=o.defaultedMembers.length;if(!p&&!u&&!f&&!m)return c();if(!p&&!u)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!u&&!f&&p>=m){for(let d of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!p&&!f&&u>=m){for(let d of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(d.loc.start,{enumName:s,memberName:d.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(L.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let t=this.input.charCodeAt(e+1);return t!==60&&t!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},ml={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Xe=Re`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:r,HTMLEntity:n})=>`Unexpected token \`${r}\`. Did you mean \`${n}\` or \`{'${r}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function $e(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function ct(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return ct(r.object)+"."+ct(r.property);throw new Error("Node had unexpected type: "+r.type)}var bl=r=>class extends r{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Xe.UnterminatedJsxContent,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:if(this.state.pos===this.state.start){s===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(s);return}e+=this.input.slice(t,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;case 62:case 125:default:Rt(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,t===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=e?`
7
7
  `:`\r
8
- `):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):Rt(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}t+=this.input.slice(s,this.state.pos++),this.finishToken(133,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let t=10;this.codePointAtPos(this.state.pos)===120&&(t=16,++this.state.pos);let s=this.readInt(t,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(s){let i=this.input.slice(e,this.state.pos),a=ml[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(pt(e)||e===45);this.finishToken(140,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(140)?e.name=this.state.value:Vs(this.state.type)?e.name=He(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let s=this.startNodeAt(e);s.object=t,s.property=this.jsxParseIdentifier(),t=this.finishNode(s,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(V.brace),this.next(),e=this.jsxParseExpressionContainer(e,V.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Xe.AttributeIsEmpty,e),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Xe.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(V.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();e.expression=s}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(V.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(V.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(143);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(143),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(143),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 142:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 141:s.push(this.parseExprAtom());break;case 5:{let o=this.startNode();this.setContext(V.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(o)):s.push(this.jsxParseExpressionContainer(o,V.j_expr));break}default:this.unexpected()}$e(i)&&!$e(a)&&a!==null?this.raise(Xe.MissingClosingTagFragment,a):!$e(i)&&$e(a)?this.raise(Xe.MissingClosingTagElement,a,{openingTagName:ct(i.name)}):!$e(i)&&!$e(a)&&ct(a.name)!==ct(i.name)&&this.raise(Xe.MissingClosingTagElement,a,{openingTagName:ct(i.name)})}if($e(i)?(t.openingFragment=i,t.closingFragment=a):(t.openingElement=i,t.closingElement=a),t.children=s,this.match(47))throw this.raise(Xe.UnwrappedAdjacentJSXElements,this.state.startLoc);return $e(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(141)?this.parseLiteral(this.state.value,"JSXText"):this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===V.j_expr){this.jsxReadToken();return}if(t===V.j_oTag||t===V.j_cTag){if(_e(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(143);return}if((e===34||e===39)&&t===V.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:s}=this.state;if(s===56&&e===142)t.splice(-2,2,V.j_cTag),this.state.canStartJSXElement=!1;else if(s===142)t.push(V.j_oTag);else if(s===143){let i=t[t.length-1];i===V.j_oTag&&e===56||i===V.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===V.j_expr):(this.setContext(V.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Lo(s)}},Ns=class extends Bt{constructor(...n){super(...n),this.tsNames=new Map}},Ds=class extends jt{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new Ns(n)}enter(n){n==256&&this.importsStack.push(new Set),super.enter(n)}exit(){let n=super.exit();return n==256&&this.importsStack.pop(),n}hasImport(n,e){let t=this.importsStack.length;if(this.importsStack[t-1].has(n))return!0;if(!e&&t>1){for(let s=0;s<t-1;s++)if(this.importsStack[s].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(b.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let s=this.currentScope(),i=s.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(s,n),s.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&s.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let s=n.tsNames.get(e);if((s&2)>0){if(t&256){let i=!!(t&512),a=(s&4)>0;return i!==a}return!0}return t&128&&(s&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(s&1)>0?!0:super.isRedeclaredInScope(n,e,t)}checkLocalExport(n){let{name:e}=n;if(this.hasImport(e))return;let t=this.scopeStack.length;for(let s=t-1;s>=0;s--){let a=this.scopeStack[s].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(n)}},gl=(r,n)=>Object.hasOwnProperty.call(r,n)&&r[n],vi=r=>r.type==="ParenthesizedExpression"?vi(r.expression):r,Ms=class extends ks{toAssignable(n,e=!1){var t,s;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=vi(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(b.InvalidParenthesizedAssignment,n):this.raise(b.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let o=0,l=n.properties.length,c=l-1;o<l;o++){var a;let p=n.properties[o],u=o===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(a=n.extra)!=null&&a.trailingCommaLoc&&this.raise(b.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=n;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":n.type="ArrayPattern",this.toAssignableList(n.elements,(s=n.extra)==null?void 0:s.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(b.MissingEqInAssignment,n.left.loc.end),n.type="AssignmentPattern",delete n.operator,this.toAssignable(n.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e);break}}toAssignableObjectExpressionProp(n,e,t){if(n.type==="ObjectMethod")this.raise(n.kind==="get"||n.kind==="set"?b.PatternHasAccessor:b.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let s=n.argument;this.checkToRestConversion(s,!1),this.toAssignable(s,t),e||this.raise(b.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let s=n.length-1;for(let i=0;i<=s;i++){let a=n[i];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,t)}else this.toAssignable(a,t);a.type==="RestElement"&&(i<s?this.raise(b.RestTrailingComma,a):e&&this.raise(b.RestTrailingComma,e))}}}isAssignable(n,e){switch(n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=n.properties.length-1;return n.properties.every((s,i)=>s.type!=="ObjectMethod"&&(i===t||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(n.value);case"SpreadElement":return this.isAssignable(n.argument);case"ArrayExpression":return n.elements.every(t=>t===null||this.isAssignable(t));case"AssignmentExpression":return n.operator==="=";case"ParenthesizedExpression":return this.isAssignable(n.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(n,e){return n}toReferencedListDeep(n,e){this.toReferencedList(n,e);for(let t of n)t?.type==="ArrayExpression"&&this.toReferencedListDeep(t.elements)}parseSpread(n){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(n,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let n=this.startNode();return this.next(),n.argument=this.parseBindingAtom(),this.finishNode(n,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let n=this.startNode();return this.next(),n.elements=this.parseBindingList(3,93,1),this.finishNode(n,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(n,e,t){let s=t&1,i=[],a=!0;for(;!this.eat(n);)if(a?a=!1:this.expect(12),s&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),t)),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,o))}}return i}parseBindingRestProperty(n){return this.next(),n.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(n,"RestElement")}parseBindingProperty(){let n=this.startNode(),{type:e,startLoc:t}=this.state;return e===21?this.parseBindingRestProperty(n):(e===138?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1))}parseAssignableListItem(n,e){let t=this.parseMaybeDefault();this.parseAssignableListItemTypes(t,n);let s=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),s}parseAssignableListItemTypes(n,e){return n}parseMaybeDefault(n,e){var t,s;if((t=n)!=null||(n=this.state.startLoc),e=(s=e)!=null?s:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(n);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(n,e,t){return gl({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},n)}isOptionalMemberExpression(n){return n.type==="OptionalMemberExpression"}checkLVal(n,{in:e,binding:t=64,checkClashes:s=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:a=!1}){var o;let l=n.type;if(this.isObjectMethod(n))return;let c=this.isOptionalMemberExpression(n);if(c||l==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",n.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(b.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:d}=n;s&&(s.has(d)?this.raise(b.ParamDupe,n):s.add(d));return}let p=this.isValidLVal(l,!(a||(o=n.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let d=t===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(d,n,{ancestor:e});return}let[u,f]=Array.isArray(p)?p:[p,l==="ParenthesizedExpression"],m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e;for(let d of[].concat(n[u]))d&&this.checkLVal(d,{in:m,binding:t,checkClashes:s,strictModeChanged:i,hasParenthesizedAncestor:f})}checkIdentifier(n,e,t=!1){this.state.strict&&(t?fi(n.name,this.inModule):di(n.name))&&(e===64?this.raise(b.StrictEvalArguments,n,{referenceName:n.name}):this.raise(b.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(b.LetInLexicalBinding,n),e&64||this.declareNameFromIdentifier(n,e)}declareNameFromIdentifier(n,e){this.scope.declareName(n.name,e,n.loc.start)}checkToRestConversion(n,e){switch(n.type){case"ParenthesizedExpression":this.checkToRestConversion(n.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}},yl=(r,n)=>Object.hasOwnProperty.call(r,n)&&r[n];function vl(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function Zr(r){if(!r)throw new Error("Assert fail")}var k=Re`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`});function xl(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ei(r){return r==="private"||r==="public"||r==="protected"}function Pl(r){return r==="in"||r==="out"}var Tl=r=>class extends r{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return Ds}tsIsIdentifier(){return B(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!B(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let s=this.state.value;if(e.indexOf(s)!==-1){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:s,errorTemplate:i=k.InvalidModifierOnTypeMember},a){let o=(c,p,u,f)=>{p===u&&a[f]&&this.raise(k.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},l=(c,p,u,f)=>{(a[u]&&p===f||a[f]&&p===u)&&this.raise(k.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),s);if(!p)break;ei(p)?a.accessibility?this.raise(k.DuplicateAccessibilityModifier,c,{modifier:p}):(o(c,p,p,"override"),o(c,p,p,"static"),o(c,p,p,"readonly"),a.accessibility=p):Pl(p)?(a[p]&&this.raise(k.DuplicateModifier,c,{modifier:p}),a[p]=!0,o(c,p,"in","out")):(Object.hasOwnProperty.call(a,p)?this.raise(k.DuplicateModifier,c,{modifier:p}):(o(c,p,"static","readonly"),o(c,p,"static","override"),o(c,p,"override","readonly"),o(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),a[p]=!0),t!=null&&t.includes(p)&&this.raise(i,c,{modifier:p})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return vl(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=t();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;s&&this.expect(12);return}return i&&(i.value=o),a}tsParseBracketedList(e,t,s,i,a){i||(s?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,t,a);return s?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),t.params.length===0&&this.raise(k.EmptyTypeParameters,t),s.value!==-1&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let s=e===19,i="parameters",a="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),s?t[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:s}=t;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,t,{type:s})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),B(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let s=e;if(this.match(10)||this.match(47)){t&&this.raise(k.ReadonlyForMethodSignature,e);let i=s;i.kind&&this.match(47)&&this.raise(k.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(i.kind==="get")i[a].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(i[a][0])&&this.raise(k.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[a].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{let l=i[a][0];this.isThisParam(l)&&this.raise(k.AccesorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(k.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(k.SetAccesorCannotHaveRestParameter,this.state.curPosition())}i[o]&&this.raise(k.SetAccesorCannotHaveReturnType,i[o])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=s;t&&(i.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let s=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(s,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(s=>{let{type:i}=s;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&s.optional)&&this.raise(k.OptionalTypeBeforeRequired,s),t||(t=i==="TSNamedTupleMember"&&s.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),s,i,a,o,c=xe(this.state.type)?this.lookaheadCharCode():null;if(c===58)s=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(c===63){a=!0;let p=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),o=this.tsParseType()):(s=!1,o=f,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),s=this.eat(14);if(s){let p;i?(p=this.startNodeAtNode(i),p.optional=a,p.label=i,p.elementType=o,this.eat(17)&&(p.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(o),p.optional=a,this.raise(k.InvalidTupleMemberLabel,o),p.label=o,p.elementType=this.tsParseType()),o=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAtNode(o);p.typeAnnotation=o,o=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=o,o=this.finishNode(p,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let s=this.startNode();return e==="TSConstructorType"&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),t=this.lookahead();return t.type!==134&&t.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(B(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":xl(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Bo(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){let i=this.startNode(),a=this.eat(s),o=[];do o.push(t());while(this.eat(s));return o.length===1&&!a?o[0]:(i.types=o,this.finishNode(i,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(B(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(s.parameterName=l,s.asserts=!0,s.typeAnnotation=null,l=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(l,s),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let o=this.tsParseTypeAnnotation(!1);return s.parameterName=a,s.typeAnnotation=o,s.asserts=i,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!B(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Zr(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return s.length||this.raise(k.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),B(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(s,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),e.body=s}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,s){e.isExport=s||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,i),e.moduleReference=i,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){let t=this.tryParse(s=>e()||s());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),s=e();if(s!==void 0&&s!==!1)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,s;return this.isContextual(100)&&(t=74,s="let"),this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,s||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(B(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,s){switch(t.name){case"declare":{let i=this.tsTryParseDeclare(e);return i&&(i.declare=!0),i}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let i=e;return i.global=!0,i.id=t,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,s)}}tsParseDeclaration(e,t,s,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(80)||B(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(B(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let s=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(e);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=t,!!s)return super.parseArrowExpression(s,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(k.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===V.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return jo(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let s=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,o=i.override,l=i.readonly;!(e&4)&&(a||l||o)&&this.raise(k.UnexpectedParameterModifier,s);let c=this.parseMaybeDefault();this.parseAssignableListItemTypes(c,e);let p=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let u=this.startNodeAt(s);return t.length&&(u.decorators=t),a&&(u.accessibility=a),l&&(u.readonly=l),o&&(u.override=o),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,u),u.parameter=p,this.finishNode(u,"TSParameterProperty")}return t.length&&(c.decorators=t),p}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!=="Identifier"&&t.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(t=>{t?.type==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,s,i){let a=super.parseArrayLike(e,t,s,i);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(t);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(s)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(t);if(f)return f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(vn(this.state.type)){let f=super.parseTaggedTemplateExpression(e,t,i);return f.typeParameters=c,f}if(!s&&this.eat(10)){let f=this.startNodeAt(t);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,i.optionalChainMember&&(f.optional=a),this.finishCallExpression(f,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&ms(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:s}=e;s.type==="TSInstantiationExpression"&&!((t=s.extra)!=null&&t.parenthesized)&&(e.typeParameters=s.typeParameters,e.callee=s.expression)}parseExprOp(e,t,s){let i;if(mn(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(t);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind=s==="type"?"type":"value":e.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let t;if(B(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let s=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,s,!0)}else if(this.eat(29)){let s=e;return s.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExportAssignment")}else if(this.eatContextual(93)){let s=e;return this.expectContextual(128),s.id=this.parseIdentifier(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration")}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,t,s||i);if(!i)return a;for(let{id:o,init:l}of a.declarations)l&&(t!=="const"||o.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,l):Cl(l,this.hasPlugin("estree"))||this.raise(k.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(s=>ei(s)?e.accessibility===s:!!e[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,s){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},t);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,t,s,i){let a=this.tsTryParseIndexSignature(t);if(a){e.body.push(a),t.abstract&&this.raise(k.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(k.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(k.IndexSignatureHasDeclare,t),t.override&&this.raise(k.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(k.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,s){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,s):void 0)||super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,s);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(s,i.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=B(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(a,t),a.declare=!0),a):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(113))return;super.parseClassId(e,t,s,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(t.start,t.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(k.PrivateElementHasAbstract,e),e.accessibility&&this.raise(k.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(k.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(k.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(k.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,s,i,a,o)}pushClassPrivateMethod(e,t,s,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,s,i,a,o,l)}parseFunctionParams(e,t){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var s,i,a,o,l;let c,p,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(c=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!p.error)return p.node;let{context:d}=this.state,g=d[d.length-1];(g===V.j_oTag||g===V.j_expr)&&d.pop()}if(!((s=p)!=null&&s.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let f,m=this.tryParse(d=>{var g,h;f=this.tsParseTypeParameters(this.tsParseConstModifier);let v=super.parseMaybeAssign(e,t);return(v.type!=="ArrowFunctionExpression"||(g=v.extra)!=null&&g.parenthesized)&&d(),((h=f)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(v,f),v.typeParameters=f,v},c);if(!m.error&&!m.aborted)return f&&this.reportReservedArrowTypeParam(f),m.node;if(!p&&(Zr(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!u.error))return u.node;if((i=p)!=null&&i.node)return this.state=p.failState,p.node;if(m.node)return this.state=m.failState,f&&this.reportReservedArrowTypeParam(f),m.node;if((a=u)!=null&&a.node)return this.state=u.failState,u.node;throw((o=p)==null?void 0:o.error)||m.error||((l=u)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(s=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),i});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(t&2))return e;this.eat(17)&&(e.optional=!0);let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,e):this.raise(k.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,s){return yl({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(s!==64||!t)&&["expression",!0],TSSatisfiesExpression:(s!==64||!t)&&["expression",!0],TSTypeAssertion:(s!==64||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,s)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(t=>this.isAssignable(t,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,s){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,s)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,s,i,a,o,l){let c=super.parseMethod(e,t,s,i,a,o,l);if(c.abstract&&(this.hasPlugin("estree")?!!c.value.body:!!c.body)){let{key:u}=c;this.raise(k.AbstractMethodHasImplementation,c,{methodName:u.type==="Identifier"&&!c.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,s,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,a){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,s){let i=t?"imported":"local",a=t?"local":"exported",o=e[i],l,c=!1,p=!0,u=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let d=this.parseIdentifier();xe(this.state.type)?(c=!0,o=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=d,p=!1)}else xe(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=m)}else xe(this.state.type)&&(c=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&s&&this.raise(t?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,u),e[i]=o,e[a]=l;let f=t?"importKind":"exportKind";e[f]=c?"type":"value",p&&this.eatContextual(93)&&(e[a]=t?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=Be(e[i])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function wl(r){if(r.type!=="MemberExpression")return!1;let{computed:n,property:e}=r;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Pi(r.object)}function Cl(r,n){var e;let{type:t}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:s}=r;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(xi(r,n)||Sl(r,n)||t==="TemplateLiteral"&&r.expressions.length===0||wl(r))}function xi(r,n){return n?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Sl(r,n){if(r.type==="UnaryExpression"){let{operator:e,argument:t}=r;if(e==="-"&&xi(t,n))return!0}return!1}function Pi(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:Pi(r.object)}var ti=Re`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Il=r=>class extends r{parsePlaceholder(e){if(this.match(144)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let s=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=t,s?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,s,i){e!==void 0&&super.checkReservedWord(e,t,s,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s){return e==="Placeholder"||super.isValidLVal(e,t,s)}toAssignable(e,t){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!(super.chStartsBindingIdentifier(e,t)||this.lookahead().type===144)}verifyBreakContinue(e,t){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var s;if(t.type!=="Placeholder"||(s=t.extra)!=null&&s.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let i=e;return i.label=this.finishPlaceholder(t,"Identifier"),this.next(),i.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(i,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,s){let i=t?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(s||!t)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,i);throw this.raise(ti.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,t){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let i=this.startNode();return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(He(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var s;return(s=e.specifiers)!=null&&s.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(s=>s.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(ti.UnexpectedSpace,this.state.lastTokEndLoc)}},El=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),B(this.state.type)){let s=this.parseIdentifierName(),i=this.createIdentifier(t,s);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function Y(r,n){let[e,t]=typeof n=="string"?[n,{}]:n,s=Object.keys(t),i=s.length===0;return r.some(a=>{if(typeof a=="string")return i&&a===e;{let[o,l]=a;if(o!==e)return!1;for(let c of s)if(l[c]!==t[c])return!1;return!0}})}function qe(r,n,e){let t=r.find(s=>Array.isArray(s)?s[0]===n:s===n);return t&&Array.isArray(t)&&t.length>1?t[1][e]:null}var ni=["minimal","fsharp","hack","smart"],si=["^^","@@","^","%","#"],ri=["hash","bar"];function Al(r){if(Y(r,"decorators")){if(Y(r,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=qe(r,"decorators","decoratorsBeforeExport");if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=qe(r,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Y(r,"flow")&&Y(r,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Y(r,"placeholders")&&Y(r,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Y(r,"pipelineOperator")){let n=qe(r,"pipelineOperator","proposal");if(!ni.includes(n)){let t=ni.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}let e=Y(r,["recordAndTuple",{syntaxType:"hash"}]);if(n==="hack"){if(Y(r,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Y(r,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=qe(r,"pipelineOperator","topicToken");if(!si.includes(t)){let s=si.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(t==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(n==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Y(r,"moduleAttributes")){if(Y(r,"importAssertions")||Y(r,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(qe(r,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Y(r,"importAssertions")&&Y(r,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Y(r,"recordAndTuple")&&qe(r,"recordAndTuple","syntaxType")!=null&&!ri.includes(qe(r,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+ri.map(n=>`'${n}'`).join(", "));if(Y(r,"asyncDoExpressions")&&!Y(r,"doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(Y(r,"optionalChainingAssign")&&qe(r,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Ti={estree:ko,jsx:bl,flow:hl,typescript:Tl,v8intrinsic:El,placeholders:Il},kl=Object.keys(Ti),ds={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Nl(r){if(r==null)return Object.assign({},ds);if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let n={};for(let t of Object.keys(ds)){var e;n[t]=(e=r[t])!=null?e:ds[t]}return n}var Ls=class extends Ms{checkProto(n,e,t,s){if(n.type==="SpreadElement"||this.isObjectMethod(n)||n.computed||n.shorthand)return;let i=n.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,i);return}t.used&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,i)),t.used=!0}}shouldExitDescending(n,e){return n.type==="ArrowFunctionExpression"&&n.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let n=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),n.comments=this.comments,n.errors=this.state.errors,this.options.tokens&&(n.tokens=this.tokens),n}parseExpression(n,e){return n?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(n){let e=this.state.startLoc,t=this.parseMaybeAssign(n);if(this.match(12)){let s=this.startNodeAt(e);for(s.expressions=[t];this.eat(12);)s.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return t}parseMaybeAssignDisallowIn(n,e){return this.disallowInAnd(()=>this.parseMaybeAssign(n,e))}parseMaybeAssignAllowIn(n,e){return this.allowInAnd(()=>this.parseMaybeAssign(n,e))}setOptionalParametersError(n,e){var t;n.optionalParametersLoc=(t=e?.loc)!=null?t:this.state.startLoc}parseMaybeAssign(n,e){let t=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,t)),o}let s;n?s=!1:(n=new ut,s=!0);let{type:i}=this.state;(i===10||B(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(n);if(e&&(a=e.call(this,a,t)),Oo(this.state.type)){let o=this.startNodeAt(t),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;let c=t.index;n.doubleProtoLoc!=null&&n.doubleProtoLoc.index>=c&&(n.doubleProtoLoc=null),n.shorthandAssignLoc!=null&&n.shorthandAssignLoc.index>=c&&(n.shorthandAssignLoc=null),n.privateKeyLoc!=null&&n.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(n),n.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(o,"AssignmentExpression")}),o}else s&&this.checkExpressionErrors(n,!0);return a}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprOps(n);return this.shouldExitDescending(s,t)?s:this.parseConditional(s,e,n)}parseConditional(n,e,t){if(this.eat(17)){let s=this.startNodeAt(e);return s.test=n,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return n}parseMaybeUnaryOrPrivate(n){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(n)}parseExprOps(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(s,t)?s:this.parseExprOp(s,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=mn(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let s=this.state.type;if(Uo(s)&&(this.prodParam.hasIn||!this.match(58))){let i=mn(s);if(i>t){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let a=this.startNodeAt(e);a.left=n,a.operator=this.state.value;let o=s===41||s===42,l=s===40;if(l&&(i=mn(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(s,i);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||o&&p===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,t)}}return n}parseExprOpRightExpr(n,e){let t=this.state.startLoc;switch(n){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,Vo(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return wo.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,s=this.isContextual(96);if(s&&this.isAwaitAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),a=this.startNode();if(Ro(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(b.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(b.DeletePrivateField,a)}if(!i)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,i,n);if(s){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?ms(l):ms(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,t),this.parseAwait(t)}return o}parseUpdate(n,e,t){if(e){let a=n;return this.checkLVal(a.argument,{in:this.finishNode(a,"UpdateExpression")}),n}let s=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;_o(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(s);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(a,"UpdateExpression")})}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprAtom(n);return this.shouldExitDescending(s,t)?s:this.parseSubscripts(s,e)}parseSubscripts(n,e,t){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,s),s.maybeAsyncArrow=!1;while(!s.stop);return n}parseSubscript(n,e,t,s){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,s);if(vn(i))return this.parseTaggedTemplateExpression(n,e,s);let a=!1;if(i===18){if(t&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return s.stop=!0,n;s.optionalChainMember=a=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,s,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(n,e,s,o,a):(s.stop=!0,n)}}parseMember(n,e,t,s,i){let a=this.startNodeAt(e);return a.object=n,a.computed=s,s?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(n.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),t.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(n,e,t,s){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,s){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(al()),a=new ut),c&&(o.optional=s),s?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,n.type==="Import",n.type!=="Super",o,a);let p=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!s?(t.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(n,e){this.toReferencedListDeep(n.arguments,e)}parseTaggedTemplateExpression(n,e,t){let s=this.startNodeAt(e);return s.tag=n,s.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(n){return n.type==="Identifier"&&n.name==="async"&&this.state.lastTokEndLoc.index===n.end&&!this.canInsertSemicolon()&&n.end-n.start===5&&n.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(n,e){if(n.callee.type==="Import")if(n.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),n.arguments.length===0||n.arguments.length>2)this.raise(b.ImportCallArity,n,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,s,i){let a=[],o=!0,l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,i,t))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(n,e){var t;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(n,e.arguments,!0,(t=e.extra)==null?void 0:t.trailingCommaLoc),e.innerComments&&Vt(n,e.innerComments),e.callee.trailingComments&&Vt(n,e.callee.trailingComments),n}parseNoCallExpr(){let n=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),n,!0)}parseExprAtom(n){let e,t=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,n);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,n);case 68:return this.parseFunctionOrFunctionSent();case 26:t=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(t,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let i=e.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,i)}case 138:return this.raise(b.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);this.unexpected();break}case 47:{let i=this.input.codePointAt(this.nextTokenStart());_e(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(B(s)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(B(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(n,e){let t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.state.type=n,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=re(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(e,t,n,s)}finishTopicReference(n,e,t,s){if(this.testTopicReferenceConfiguration(t,e,s)){let i=t==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(t==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,i)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:He(s)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:He(t)}]);case"smart":return t===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(gn(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(n,e,!0)}parseDo(n,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),n.async=e,this.next();let t=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),n.body=this.parseBlock(),this.prodParam.exit()):n.body=this.parseBlock(),this.state.labels=t,this.finishNode(n,"DoExpression")}parseSuper(){let n=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,n):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(re(this.state.startLoc,1)),t=this.state.value;return this.next(),n.id=this.createIdentifier(e,t),this.finishNode(n,"PrivateName")}parseFunctionOrFunctionSent(){let n=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(n,e,"sent")}return this.parseFunction(n)}parseMetaProperty(n,e,t){n.meta=e;let s=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||s)&&this.raise(b.UnsupportedMetaProperty,n.property,{target:e.name,onlyValidPropertyName:t}),this.finishNode(n,"MetaProperty")}parseImportMetaProperty(n){let e=this.createIdentifier(this.startNodeAtNode(n),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(t||this.unexpected(),this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),n.phase=t?"source":"defer",this.parseImportCall(n)}return this.parseMetaProperty(n,e,"meta")}parseLiteralAtNode(n,e,t){return this.addExtra(t,"rawValue",n),this.addExtra(t,"raw",this.input.slice(t.start,this.state.end)),t.value=n,this.next(),this.finishNode(t,e)}parseLiteral(n,e){let t=this.startNode();return this.parseLiteralAtNode(n,e,t)}parseStringLiteral(n){return this.parseLiteral(n,"StringLiteral")}parseNumericLiteral(n){return this.parseLiteral(n,"NumericLiteral")}parseBigIntLiteral(n){return this.parseLiteral(n,"BigIntLiteral")}parseDecimalLiteral(n){return this.parseLiteral(n,"DecimalLiteral")}parseRegExpLiteral(n){let e=this.parseLiteral(n.value,"RegExpLiteral");return e.pattern=n.pattern,e.flags=n.flags,e}parseBooleanLiteral(n){let e=this.startNode();return e.value=n,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let n=this.startNode();return this.next(),this.finishNode(n,"NullLiteral")}parseParenAndDistinguishExpression(n){let e=this.state.startLoc,t;this.next(),this.expressionScope.enter(il());let s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new ut,c=!0,p,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let d=this.state.startLoc;if(p=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),d)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(t=this.startNodeAt(a),t.expressions=o,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,f)):t=o[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",n.index),this.takeSurroundingComments(e,n.index,this.state.lastTokEndLoc.index),e;let t=this.startNodeAt(n);return t.expression=e,this.finishNode(t,"ParenthesizedExpression")}shouldParseArrow(n){return!this.canInsertSemicolon()}parseArrow(n){if(this.eat(19))return n}parseParenItem(n,e){return n}parseNewOrNewTarget(){let n=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"new");this.next();let t=this.parseMetaProperty(n,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,t),t}return this.parseNew(n)}parseNew(n){if(this.parseNewCallee(n),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),n.arguments=e}else n.arguments=[];return this.finishNode(n,"NewExpression")}parseNewCallee(n){let e=this.match(83),t=this.parseNoCallExpr();n.callee=t,e&&(t.type==="Import"||t.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:s,value:i}=this.state,a=e+1,o=this.startNodeAt(re(t,1));i===null&&(n||this.raise(b.InvalidEscapeSequenceTemplate,re(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=s+c;o.value={raw:this.input.slice(a,p).replace(/\r\n?/g,`
8
+ `):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(b.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):Rt(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}t+=this.input.slice(s,this.state.pos++),this.finishToken(133,t)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let t=10;this.codePointAtPos(this.state.pos)===120&&(t=16,++this.state.pos);let s=this.readInt(t,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(s){let i=this.input.slice(e,this.state.pos),a=ml[i];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(pt(e)||e===45);this.finishToken(140,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(140)?e.name=this.state.value:Vs(this.state.type)?e.name=He(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if(t.type==="JSXNamespacedName")return t;for(;this.eat(16);){let s=this.startNodeAt(e);s.object=t,s.property=this.jsxParseIdentifier(),t=this.finishNode(s,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(V.brace),this.next(),e=this.jsxParseExpressionContainer(e,V.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Xe.AttributeIsEmpty,e),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Xe.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(V.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();e.expression=s}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(V.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(V.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(143);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(143),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(143)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(143),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 142:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 141:s.push(this.parseExprAtom());break;case 5:{let o=this.startNode();this.setContext(V.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(o)):s.push(this.jsxParseExpressionContainer(o,V.j_expr));break}default:this.unexpected()}$e(i)&&!$e(a)&&a!==null?this.raise(Xe.MissingClosingTagFragment,a):!$e(i)&&$e(a)?this.raise(Xe.MissingClosingTagElement,a,{openingTagName:ct(i.name)}):!$e(i)&&!$e(a)&&ct(a.name)!==ct(i.name)&&this.raise(Xe.MissingClosingTagElement,a,{openingTagName:ct(i.name)})}if($e(i)?(t.openingFragment=i,t.closingFragment=a):(t.openingElement=i,t.closingElement=a),t.children=s,this.match(47))throw this.raise(Xe.UnwrappedAdjacentJSXElements,this.state.startLoc);return $e(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(141)?this.parseLiteral(this.state.value,"JSXText"):this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t===V.j_expr){this.jsxReadToken();return}if(t===V.j_oTag||t===V.j_cTag){if(_e(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(143);return}if((e===34||e===39)&&t===V.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(e)}updateContext(e){let{context:t,type:s}=this.state;if(s===56&&e===142)t.splice(-2,2,V.j_cTag),this.state.canStartJSXElement=!1;else if(s===142)t.push(V.j_oTag);else if(s===143){let i=t[t.length-1];i===V.j_oTag&&e===56||i===V.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===V.j_expr):(this.setContext(V.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Lo(s)}},Ns=class extends Bt{constructor(...n){super(...n),this.tsNames=new Map}},Ds=class extends jt{constructor(...n){super(...n),this.importsStack=[]}createScope(n){return this.importsStack.push(new Set),new Ns(n)}enter(n){n==256&&this.importsStack.push(new Set),super.enter(n)}exit(){let n=super.exit();return n==256&&this.importsStack.pop(),n}hasImport(n,e){let t=this.importsStack.length;if(this.importsStack[t-1].has(n))return!0;if(!e&&t>1){for(let s=0;s<t-1;s++)if(this.importsStack[s].has(n))return!0}return!1}declareName(n,e,t){if(e&4096){this.hasImport(n,!0)&&this.parser.raise(b.VarRedeclaration,t,{identifierName:n}),this.importsStack[this.importsStack.length-1].add(n);return}let s=this.currentScope(),i=s.tsNames.get(n)||0;if(e&1024){this.maybeExportDefined(s,n),s.tsNames.set(n,i|16);return}super.declareName(n,e,t),e&2&&(e&1||(this.checkRedeclarationInScope(s,n,e,t),this.maybeExportDefined(s,n)),i=i|1),e&256&&(i=i|2),e&512&&(i=i|4),e&128&&(i=i|8),i&&s.tsNames.set(n,i)}isRedeclaredInScope(n,e,t){let s=n.tsNames.get(e);if((s&2)>0){if(t&256){let i=!!(t&512),a=(s&4)>0;return i!==a}return!0}return t&128&&(s&8)>0?n.names.get(e)&2?!!(t&1):!1:t&2&&(s&1)>0?!0:super.isRedeclaredInScope(n,e,t)}checkLocalExport(n){let{name:e}=n;if(this.hasImport(e))return;let t=this.scopeStack.length;for(let s=t-1;s>=0;s--){let a=this.scopeStack[s].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(n)}},gl=(r,n)=>hasOwnProperty.call(r,n)&&r[n],vi=r=>r.type==="ParenthesizedExpression"?vi(r.expression):r,Ms=class extends ks{toAssignable(n,e=!1){var t,s;let i;switch((n.type==="ParenthesizedExpression"||(t=n.extra)!=null&&t.parenthesized)&&(i=vi(n),e?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(b.InvalidParenthesizedAssignment,n):i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise(b.InvalidParenthesizedAssignment,n):this.raise(b.InvalidParenthesizedAssignment,n)),n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":n.type="ObjectPattern";for(let o=0,l=n.properties.length,c=l-1;o<l;o++){var a;let p=n.properties[o],u=o===c;this.toAssignableObjectExpressionProp(p,u,e),u&&p.type==="RestElement"&&(a=n.extra)!=null&&a.trailingCommaLoc&&this.raise(b.RestTrailingComma,n.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=n;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":n.type="ArrayPattern",this.toAssignableList(n.elements,(s=n.extra)==null?void 0:s.trailingCommaLoc,e);break;case"AssignmentExpression":n.operator!=="="&&this.raise(b.MissingEqInAssignment,n.left.loc.end),n.type="AssignmentPattern",delete n.operator,this.toAssignable(n.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e);break}}toAssignableObjectExpressionProp(n,e,t){if(n.type==="ObjectMethod")this.raise(n.kind==="get"||n.kind==="set"?b.PatternHasAccessor:b.PatternHasMethod,n.key);else if(n.type==="SpreadElement"){n.type="RestElement";let s=n.argument;this.checkToRestConversion(s,!1),this.toAssignable(s,t),e||this.raise(b.RestTrailingComma,n)}else this.toAssignable(n,t)}toAssignableList(n,e,t){let s=n.length-1;for(let i=0;i<=s;i++){let a=n[i];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let o=a.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,t)}else this.toAssignable(a,t);a.type==="RestElement"&&(i<s?this.raise(b.RestTrailingComma,a):e&&this.raise(b.RestTrailingComma,e))}}}isAssignable(n,e){switch(n.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=n.properties.length-1;return n.properties.every((s,i)=>s.type!=="ObjectMethod"&&(i===t||s.type!=="SpreadElement")&&this.isAssignable(s))}case"ObjectProperty":return this.isAssignable(n.value);case"SpreadElement":return this.isAssignable(n.argument);case"ArrayExpression":return n.elements.every(t=>t===null||this.isAssignable(t));case"AssignmentExpression":return n.operator==="=";case"ParenthesizedExpression":return this.isAssignable(n.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(n,e){return n}toReferencedListDeep(n,e){this.toReferencedList(n,e);for(let t of n)t?.type==="ArrayExpression"&&this.toReferencedListDeep(t.elements)}parseSpread(n){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(n,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let n=this.startNode();return this.next(),n.argument=this.parseBindingAtom(),this.finishNode(n,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let n=this.startNode();return this.next(),n.elements=this.parseBindingList(3,93,1),this.finishNode(n,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(n,e,t){let s=t&1,i=[],a=!0;for(;!this.eat(n);)if(a?a=!1:this.expect(12),s&&this.match(12))i.push(null);else{if(this.eat(n))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),t)),!this.checkCommaAfterRest(e)){this.expect(n);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(b.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());i.push(this.parseAssignableListItem(t,o))}}return i}parseBindingRestProperty(n){return this.next(),n.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(n,"RestElement")}parseBindingProperty(){let n=this.startNode(),{type:e,startLoc:t}=this.state;return e===21?this.parseBindingRestProperty(n):(e===138?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1))}parseAssignableListItem(n,e){let t=this.parseMaybeDefault();this.parseAssignableListItemTypes(t,n);let s=this.parseMaybeDefault(t.loc.start,t);return e.length&&(t.decorators=e),s}parseAssignableListItemTypes(n,e){return n}parseMaybeDefault(n,e){var t,s;if((t=n)!=null||(n=this.state.startLoc),e=(s=e)!=null?s:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(n);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(n,e,t){return gl({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},n)}isOptionalMemberExpression(n){return n.type==="OptionalMemberExpression"}checkLVal(n,{in:e,binding:t=64,checkClashes:s=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:a=!1}){var o;let l=n.type;if(this.isObjectMethod(n))return;let c=this.isOptionalMemberExpression(n);if(c||l==="MemberExpression"){c&&(this.expectPlugin("optionalChainingAssign",n.loc.start),e.type!=="AssignmentExpression"&&this.raise(b.InvalidLhsOptionalChaining,n,{ancestor:e})),t!==64&&this.raise(b.InvalidPropertyBindingPattern,n);return}if(l==="Identifier"){this.checkIdentifier(n,t,i);let{name:d}=n;s&&(s.has(d)?this.raise(b.ParamDupe,n):s.add(d));return}let p=this.isValidLVal(l,!(a||(o=n.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",t);if(p===!0)return;if(p===!1){let d=t===64?b.InvalidLhs:b.InvalidLhsBinding;this.raise(d,n,{ancestor:e});return}let[u,f]=Array.isArray(p)?p:[p,l==="ParenthesizedExpression"],m=l==="ArrayPattern"||l==="ObjectPattern"?{type:l}:e;for(let d of[].concat(n[u]))d&&this.checkLVal(d,{in:m,binding:t,checkClashes:s,strictModeChanged:i,hasParenthesizedAncestor:f})}checkIdentifier(n,e,t=!1){this.state.strict&&(t?fi(n.name,this.inModule):di(n.name))&&(e===64?this.raise(b.StrictEvalArguments,n,{referenceName:n.name}):this.raise(b.StrictEvalArgumentsBinding,n,{bindingName:n.name})),e&8192&&n.name==="let"&&this.raise(b.LetInLexicalBinding,n),e&64||this.declareNameFromIdentifier(n,e)}declareNameFromIdentifier(n,e){this.scope.declareName(n.name,e,n.loc.start)}checkToRestConversion(n,e){switch(n.type){case"ParenthesizedExpression":this.checkToRestConversion(n.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(b.InvalidRestAssignmentPattern,n)}}checkCommaAfterRest(n){return this.match(12)?(this.raise(this.lookaheadCharCode()===n?b.RestTrailingComma:b.ElementAfterRest,this.state.startLoc),!0):!1}},yl=(r,n)=>hasOwnProperty.call(r,n)&&r[n];function vl(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function Zr(r){if(!r)throw new Error("Assert fail")}var k=Re`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`});function xl(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ei(r){return r==="private"||r==="public"||r==="protected"}function Pl(r){return r==="in"||r==="out"}var Tl=r=>class extends r{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:k.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:k.InvalidModifierOnTypeParameter})}getScopeHandler(){return Ds}tsIsIdentifier(){return B(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!B(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let s=this.state.value;if(e.indexOf(s)!==-1){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:s,errorTemplate:i=k.InvalidModifierOnTypeMember},a){let o=(c,p,u,f)=>{p===u&&a[f]&&this.raise(k.InvalidModifiersOrder,c,{orderedModifiers:[u,f]})},l=(c,p,u,f)=>{(a[u]&&p===f||a[f]&&p===u)&&this.raise(k.IncompatibleModifiers,c,{modifiers:[u,f]})};for(;;){let{startLoc:c}=this.state,p=this.tsParseModifier(e.concat(t??[]),s);if(!p)break;ei(p)?a.accessibility?this.raise(k.DuplicateAccessibilityModifier,c,{modifier:p}):(o(c,p,p,"override"),o(c,p,p,"static"),o(c,p,p,"readonly"),a.accessibility=p):Pl(p)?(a[p]&&this.raise(k.DuplicateModifier,c,{modifier:p}),a[p]=!0,o(c,p,"in","out")):(hasOwnProperty.call(a,p)?this.raise(k.DuplicateModifier,c,{modifier:p}):(o(c,p,"static","readonly"),o(c,p,"static","override"),o(c,p,"override","readonly"),o(c,p,"abstract","override"),l(c,p,"declare","override"),l(c,p,"static","abstract")),a[p]=!0),t!=null&&t.includes(p)&&this.raise(i,c,{modifier:p})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,t){let s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return vl(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=t();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;s&&this.expect(12);return}return i&&(i.value=o),a}tsParseBracketedList(e,t,s,i,a){i||(s?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,t,a);return s?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(k.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(e.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(e.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),t.params.length===0&&this.raise(k.EmptyTypeParameters,t),s.value!==-1&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let s=e===19,i="parameters",a="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t[i]=this.tsParseBindingListForSignature(),s?t[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(t[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:s}=t;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise(k.UnsupportedSignatureParameterKind,t,{type:s})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),B(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let s=e;if(this.match(10)||this.match(47)){t&&this.raise(k.ReadonlyForMethodSignature,e);let i=s;i.kind&&this.match(47)&&this.raise(k.AccesorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let a="parameters",o="typeAnnotation";if(i.kind==="get")i[a].length>0&&(this.raise(b.BadGetterArity,this.state.curPosition()),this.isThisParam(i[a][0])&&this.raise(k.AccesorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[a].length!==1)this.raise(b.BadSetterArity,this.state.curPosition());else{let l=i[a][0];this.isThisParam(l)&&this.raise(k.AccesorCannotDeclareThisParameter,this.state.curPosition()),l.type==="Identifier"&&l.optional&&this.raise(k.SetAccesorCannotHaveOptionalParameter,this.state.curPosition()),l.type==="RestElement"&&this.raise(k.SetAccesorCannotHaveRestParameter,this.state.curPosition())}i[o]&&this.raise(k.SetAccesorCannotHaveReturnType,i[o])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=s;t&&(i.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(i.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let s=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(s,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let t=this.tsTryParseIndexSignature(e);return t||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1;return e.elementTypes.forEach(s=>{let{type:i}=s;t&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&s.optional)&&this.raise(k.OptionalTypeBeforeRequired,s),t||(t=i==="TSNamedTupleMember"&&s.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,t=this.eat(21),s,i,a,o,c=xe(this.state.type)?this.lookaheadCharCode():null;if(c===58)s=!0,a=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(c===63){a=!0;let p=this.state.startLoc,u=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(s=!0,i=this.createIdentifier(this.startNodeAt(p),u),this.expect(17),this.expect(14),o=this.tsParseType()):(s=!1,o=f,this.expect(17))}else o=this.tsParseType(),a=this.eat(17),s=this.eat(14);if(s){let p;i?(p=this.startNodeAtNode(i),p.optional=a,p.label=i,p.elementType=o,this.eat(17)&&(p.optional=!0,this.raise(k.TupleOptionalAfterType,this.state.lastTokStartLoc))):(p=this.startNodeAtNode(o),p.optional=a,this.raise(k.InvalidTupleMemberLabel,o),p.label=o,p.elementType=this.tsParseType()),o=this.finishNode(p,"TSNamedTupleMember")}else if(a){let p=this.startNodeAtNode(o);p.typeAnnotation=o,o=this.finishNode(p,"TSOptionalType")}if(t){let p=this.startNodeAt(e);p.typeAnnotation=o,o=this.finishNode(p,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let s=this.startNode();return e==="TSConstructorType"&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),t=this.lookahead();return t.type!==134&&t.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(B(e)||e===88||e===84){let t=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":xl(this.state.value);if(t!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),t==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(k.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Bo(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,t,s){let i=this.startNode(),a=this.eat(s),o=[];do o.push(t());while(this.eat(s));return o.length===1&&!a?o[0]:(i.types=o,this.finishNode(i,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(B(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let t=this.startNode();this.expect(e);let s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(s.parameterName=l,s.asserts=!0,s.typeAnnotation=null,l=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(l,s),l.asserts=!0),t.typeAnnotation=l,this.finishNode(t,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let o=this.tsParseTypeAnnotation(!1);return s.parameterName=a,s.typeAnnotation=o,s.asserts=i,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!B(this.state.type)&&!this.match(78)?!1:(e&&this.raise(b.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()}),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Zr(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return s.length||this.raise(k.EmptyHeritageClauseType,t,{token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),t.declare&&(e.declare=!0),B(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(k.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(s,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let s=this.startNode();this.tsParseModuleOrNamespaceDeclaration(s,!0),e.body=s}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,s){e.isExport=s||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(k.ImportAliasHasImportType,i),e.moduleReference=i,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){let t=this.tryParse(s=>e()||s());if(!(t.aborted||!t.node))return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),s=e();if(s!==void 0&&s!==!1)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t=this.state.type,s;return this.isContextual(100)&&(t=74,s="let"),this.tsInAmbientContext(()=>{switch(t){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,s||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(B(t))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,s){switch(t.name){case"declare":{let i=this.tsTryParseDeclare(e);return i&&(i.declare=!0),i}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let i=e;return i.global=!0,i.id=t,i.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(i,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,s)}}tsParseDeclaration(e,t,s,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(80)||B(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(B(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&B(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let s=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(e);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=t,!!s)return super.parseArrowExpression(s,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(k.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===V.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return jo(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let s=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,o=i.override,l=i.readonly;!(e&4)&&(a||l||o)&&this.raise(k.UnexpectedParameterModifier,s);let c=this.parseMaybeDefault();this.parseAssignableListItemTypes(c,e);let p=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let u=this.startNodeAt(s);return t.length&&(u.decorators=t),a&&(u.accessibility=a),l&&(u.readonly=l),o&&(u.override=o),p.type!=="Identifier"&&p.type!=="AssignmentPattern"&&this.raise(k.UnsupportedParameterPropertyKind,u),u.parameter=p,this.finishNode(u,"TSParameterProperty")}return t.length&&(c.decorators=t),p}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)t.type!=="Identifier"&&t.optional&&!this.state.isAmbientContext&&this.raise(k.PatternIsOptional,t)}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=t==="FunctionDeclaration"?"TSDeclareFunction":t==="ClassMethod"||t==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(k.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(t=>{t?.type==="TSTypeCastExpression"&&this.raise(k.UnexpectedTypeAnnotation,t.typeAnnotation)})}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,s,i){let a=super.parseArrayLike(e,t,s,i);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(t);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(s)return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(t);if(f)return f}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(vn(this.state.type)){let f=super.parseTaggedTemplateExpression(e,t,i);return f.typeParameters=c,f}if(!s&&this.eat(10)){let f=this.startNodeAt(t);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=c,i.optionalChainMember&&(f.optional=a),this.finishCallExpression(f,i.optionalChainMember)}let p=this.state.type;if(p===48||p===52||p!==10&&ms(p)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=c,this.finishNode(u,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(k.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),l}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:s}=e;s.type==="TSInstantiationExpression"&&!((t=s.extra)!=null&&t.parenthesized)&&(e.typeParameters=s.typeParameters,e.callee=s.expression)}parseExprOp(e,t,s){let i;if(mn(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(t);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(b.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(k.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let t=this.lookaheadCharCode();return e?t===123||t===42:t!==61}return!e&&this.isContextual(87)}applyImportPhase(e,t,s,i){super.applyImportPhase(e,t,s,i),t?e.exportKind=s==="type"?"type":"value":e.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let t;if(B(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let s=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,s);t=super.parseImportSpecifiersAndAfter(e,s)}else t=super.parseImport(e);return t.importKind==="type"&&t.specifiers.length>1&&t.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(k.TypeImportCannotSpecifyDefaultAndNamed,t),t}parseExport(e,t){if(this.match(83)){this.next();let s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,s,!0)}else if(this.eat(29)){let s=e;return s.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(s,"TSExportAssignment")}else if(this.eatContextual(93)){let s=e;return this.expectContextual(128),s.id=this.parseIdentifier(),this.semicolon(),this.finishNode(s,"TSNamespaceExportDeclaration")}else return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,t,s||i);if(!i)return a;for(let{id:o,init:l}of a.declarations)l&&(t!=="const"||o.typeAnnotation?this.raise(k.InitializerNotAllowedInAmbientContext,l):Cl(l,this.hasPlugin("estree"))||this.raise(k.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some(s=>ei(s)?e.accessibility===s:!!e[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,t,s){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:k.InvalidModifierOnTypeParameterPositions},t);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(k.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,t,s,i){let a=this.tsTryParseIndexSignature(t);if(a){e.body.push(a),t.abstract&&this.raise(k.IndexSignatureHasAbstract,t),t.accessibility&&this.raise(k.IndexSignatureHasAccessibility,t,{modifier:t.accessibility}),t.declare&&this.raise(k.IndexSignatureHasDeclare,t),t.override&&this.raise(k.IndexSignatureHasOverride,t);return}!this.state.inAbstractClass&&t.abstract&&this.raise(k.NonAbstractClassHasAbstractMethod,t),t.override&&(s.hadSuperClass||this.raise(k.OverrideNotInSubClass,t)),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(k.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(k.ClassMethodHasDeclare,e)}parseExpressionStatement(e,t,s){return(t.type==="Identifier"?this.tsParseExpressionStatement(e,t,s):void 0)||super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,s);let i=this.tryParse(()=>super.parseConditional(e,t));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(s,i.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let t=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(k.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=B(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(a,t),a.declare=!0),a):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(113))return;super.parseClassId(e,t,s,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(k.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:t}=e;this.raise(k.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:t.type==="Identifier"&&!e.computed?t.name:`[${this.input.slice(t.start,t.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(k.PrivateElementHasAbstract,e),e.accessibility&&this.raise(k.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(k.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(k.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:p}=t;c&&(p==="get"||p==="set")&&this.raise(k.DeclareAccessor,t,{kind:p}),l&&(t.typeParameters=l),super.pushClassMethod(e,t,s,i,a,o)}pushClassPrivateMethod(e,t,s,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(t.typeParameters=a),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,t,s,i,a,o,l)}parseFunctionParams(e,t){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var s,i,a,o,l;let c,p,u;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(c=this.state.clone(),p=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!p.error)return p.node;let{context:d}=this.state,g=d[d.length-1];(g===V.j_oTag||g===V.j_expr)&&d.pop()}if(!((s=p)!=null&&s.error)&&!this.match(47))return super.parseMaybeAssign(e,t);(!c||c===this.state)&&(c=this.state.clone());let f,m=this.tryParse(d=>{var g,h;f=this.tsParseTypeParameters(this.tsParseConstModifier);let v=super.parseMaybeAssign(e,t);return(v.type!=="ArrowFunctionExpression"||(g=v.extra)!=null&&g.parenthesized)&&d(),((h=f)==null?void 0:h.params.length)!==0&&this.resetStartLocationFromNode(v,f),v.typeParameters=f,v},c);if(!m.error&&!m.aborted)return f&&this.reportReservedArrowTypeParam(f),m.node;if(!p&&(Zr(!this.hasPlugin("jsx")),u=this.tryParse(()=>super.parseMaybeAssign(e,t),c),!u.error))return u.node;if((i=p)!=null&&i.node)return this.state=p.failState,p.node;if(m.node)return this.state=m.failState,f&&this.reportReservedArrowTypeParam(f),m.node;if((a=u)!=null&&a.node)return this.state=u.failState,u.node;throw((o=p)==null?void 0:o.error)||m.error||((l=u)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var t;e.params.length===1&&!e.params[0].constraint&&!((t=e.extra)!=null&&t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(k.ReservedArrowTypeParam,e)}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse(s=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),i});if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(t&2))return e;this.eat(17)&&(e.optional=!0);let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(k.UnexpectedTypeCastInParameter,e):this.raise(k.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,s){return yl({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(s!==64||!t)&&["expression",!0],TSSatisfiesExpression:(s!==64||!t)&&["expression",!0],TSTypeAssertion:(s!==64||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,s)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let s=super.parseMaybeDefault(e,t);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(k.TypeAnnotationAfterAssign,s.typeAnnotation),s}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,s){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TSTypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,t,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(t=>this.isAssignable(t,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,s){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,s)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(k.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,s,i,a,o,l){let c=super.parseMethod(e,t,s,i,a,o,l);if(c.abstract&&(this.hasPlugin("estree")?!!c.value.body:!!c.body)){let{key:u}=c;this.raise(k.AbstractMethodHasImplementation,c,{methodName:u.type==="Identifier"&&!c.computed?u.name:`[${this.input.slice(u.start,u.end)}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,t,s,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,a){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:4096))}parseTypeOnlyImportExportSpecifier(e,t,s){let i=t?"imported":"local",a=t?"local":"exported",o=e[i],l,c=!1,p=!0,u=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let d=this.parseIdentifier();xe(this.state.type)?(c=!0,o=m,l=t?this.parseIdentifier():this.parseModuleExportName(),p=!1):(l=d,p=!1)}else xe(this.state.type)?(p=!1,l=t?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=m)}else xe(this.state.type)&&(c=!0,t?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&s&&this.raise(t?k.TypeModifierIsUsedInTypeImports:k.TypeModifierIsUsedInTypeExports,u),e[i]=o,e[a]=l;let f=t?"importKind":"exportKind";e[f]=c?"type":"value",p&&this.eatContextual(93)&&(e[a]=t?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=Be(e[i])),t&&this.checkIdentifier(e[a],c?4098:4096)}};function wl(r){if(r.type!=="MemberExpression")return!1;let{computed:n,property:e}=r;return n&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Pi(r.object)}function Cl(r,n){var e;let{type:t}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(n){if(t==="Literal"){let{value:s}=r;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(t==="StringLiteral"||t==="BooleanLiteral")return!0;return!!(xi(r,n)||Sl(r,n)||t==="TemplateLiteral"&&r.expressions.length===0||wl(r))}function xi(r,n){return n?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function Sl(r,n){if(r.type==="UnaryExpression"){let{operator:e,argument:t}=r;if(e==="-"&&xi(t,n))return!0}return!1}function Pi(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:Pi(r.object)}var ti=Re`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Il=r=>class extends r{parsePlaceholder(e){if(this.match(144)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let s=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=t,s?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,s,i){e!==void 0&&super.checkReservedWord(e,t,s,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s){return e==="Placeholder"||super.isValidLVal(e,t,s)}toAssignable(e,t){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!(super.chStartsBindingIdentifier(e,t)||this.lookahead().type===144)}verifyBreakContinue(e,t){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){var s;if(t.type!=="Placeholder"||(s=t.extra)!=null&&s.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let i=e;return i.label=this.finishPlaceholder(t,"Identifier"),this.next(),i.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(i,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,s){let i=t?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(s||!t)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,i);throw this.raise(ti.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,t){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let i=this.startNode();return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(He(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var s;return(s=e.specifiers)!=null&&s.length?!0:super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;t!=null&&t.length&&(e.specifiers=t.filter(s=>s.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(ti.UnexpectedSpace,this.state.lastTokEndLoc)}},El=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),B(this.state.type)){let s=this.parseIdentifierName(),i=this.createIdentifier(t,s);if(i.type="V8IntrinsicIdentifier",this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function Y(r,n){let[e,t]=typeof n=="string"?[n,{}]:n,s=Object.keys(t),i=s.length===0;return r.some(a=>{if(typeof a=="string")return i&&a===e;{let[o,l]=a;if(o!==e)return!1;for(let c of s)if(l[c]!==t[c])return!1;return!0}})}function qe(r,n,e){let t=r.find(s=>Array.isArray(s)?s[0]===n:s===n);return t&&Array.isArray(t)&&t.length>1?t[1][e]:null}var ni=["minimal","fsharp","hack","smart"],si=["^^","@@","^","%","#"],ri=["hash","bar"];function Al(r){if(Y(r,"decorators")){if(Y(r,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=qe(r,"decorators","decoratorsBeforeExport");if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=qe(r,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(Y(r,"flow")&&Y(r,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Y(r,"placeholders")&&Y(r,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Y(r,"pipelineOperator")){let n=qe(r,"pipelineOperator","proposal");if(!ni.includes(n)){let t=ni.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}let e=Y(r,["recordAndTuple",{syntaxType:"hash"}]);if(n==="hack"){if(Y(r,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Y(r,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=qe(r,"pipelineOperator","topicToken");if(!si.includes(t)){let s=si.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(t==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(n==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Y(r,"moduleAttributes")){if(Y(r,"importAssertions")||Y(r,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(qe(r,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Y(r,"importAssertions")&&Y(r,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Y(r,"recordAndTuple")&&qe(r,"recordAndTuple","syntaxType")!=null&&!ri.includes(qe(r,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+ri.map(n=>`'${n}'`).join(", "));if(Y(r,"asyncDoExpressions")&&!Y(r,"doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(Y(r,"optionalChainingAssign")&&qe(r,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Ti={estree:ko,jsx:bl,flow:hl,typescript:Tl,v8intrinsic:El,placeholders:Il},kl=Object.keys(Ti),ds={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function Nl(r){if(r==null)return Object.assign({},ds);if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let n={};for(let t of Object.keys(ds)){var e;n[t]=(e=r[t])!=null?e:ds[t]}return n}var Ls=class extends Ms{checkProto(n,e,t,s){if(n.type==="SpreadElement"||this.isObjectMethod(n)||n.computed||n.shorthand)return;let i=n.key;if((i.type==="Identifier"?i.name:i.value)==="__proto__"){if(e){this.raise(b.RecordNoProto,i);return}t.used&&(s?s.doubleProtoLoc===null&&(s.doubleProtoLoc=i.loc.start):this.raise(b.DuplicateProto,i)),t.used=!0}}shouldExitDescending(n,e){return n.type==="ArrowFunctionExpression"&&n.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let n=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),n.comments=this.comments,n.errors=this.state.errors,this.options.tokens&&(n.tokens=this.tokens),n}parseExpression(n,e){return n?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(n){let e=this.state.startLoc,t=this.parseMaybeAssign(n);if(this.match(12)){let s=this.startNodeAt(e);for(s.expressions=[t];this.eat(12);)s.expressions.push(this.parseMaybeAssign(n));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return t}parseMaybeAssignDisallowIn(n,e){return this.disallowInAnd(()=>this.parseMaybeAssign(n,e))}parseMaybeAssignAllowIn(n,e){return this.allowInAnd(()=>this.parseMaybeAssign(n,e))}setOptionalParametersError(n,e){var t;n.optionalParametersLoc=(t=e?.loc)!=null?t:this.state.startLoc}parseMaybeAssign(n,e){let t=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,t)),o}let s;n?s=!1:(n=new ut,s=!0);let{type:i}=this.state;(i===10||B(i))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(n);if(e&&(a=e.call(this,a,t)),Oo(this.state.type)){let o=this.startNodeAt(t),l=this.state.value;if(o.operator=l,this.match(29)){this.toAssignable(a,!0),o.left=a;let c=t.index;n.doubleProtoLoc!=null&&n.doubleProtoLoc.index>=c&&(n.doubleProtoLoc=null),n.shorthandAssignLoc!=null&&n.shorthandAssignLoc.index>=c&&(n.shorthandAssignLoc=null),n.privateKeyLoc!=null&&n.privateKeyLoc.index>=c&&(this.checkDestructuringPrivate(n),n.privateKeyLoc=null)}else o.left=a;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(o,"AssignmentExpression")}),o}else s&&this.checkExpressionErrors(n,!0);return a}parseMaybeConditional(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprOps(n);return this.shouldExitDescending(s,t)?s:this.parseConditional(s,e,n)}parseConditional(n,e,t){if(this.eat(17)){let s=this.startNodeAt(e);return s.test=n,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return n}parseMaybeUnaryOrPrivate(n){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(n)}parseExprOps(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseMaybeUnaryOrPrivate(n);return this.shouldExitDescending(s,t)?s:this.parseExprOp(s,e,-1)}parseExprOp(n,e,t){if(this.isPrivateName(n)){let i=this.getPrivateNameSV(n);(t>=mn(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(b.PrivateInExpectedIn,n,{identifierName:i}),this.classScope.usePrivateName(i,n.loc.start)}let s=this.state.type;if(Uo(s)&&(this.prodParam.hasIn||!this.match(58))){let i=mn(s);if(i>t){if(s===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return n;this.checkPipelineAtInfixOperator(n,e)}let a=this.startNodeAt(e);a.left=n,a.operator=this.state.value;let o=s===41||s===42,l=s===40;if(l&&(i=mn(42)),this.next(),s===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(b.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(s,i);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(l&&(p===41||p===42)||o&&p===40)throw this.raise(b.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,t)}}return n}parseExprOpRightExpr(n,e){let t=this.state.startLoc;switch(n){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(b.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(n,e),t)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(n,e)}}parseExprOpBaseRightExpr(n,e){let t=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,Vo(n)?e-1:e)}parseHackPipeBody(){var n;let{startLoc:e}=this.state,t=this.parseMaybeAssign();return wo.has(t.type)&&!((n=t.extra)!=null&&n.parenthesized)&&this.raise(b.PipeUnparenthesizedBody,e,{type:t.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipeTopicUnused,e),t}checkExponentialAfterUnary(n){this.match(57)&&this.raise(b.UnexpectedTokenUnaryExponentiation,n.argument)}parseMaybeUnary(n,e){let t=this.state.startLoc,s=this.isContextual(96);if(s&&this.isAwaitAllowed()){this.next();let l=this.parseAwait(t);return e||this.checkExponentialAfterUnary(l),l}let i=this.match(34),a=this.startNode();if(Ro(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(n,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(b.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(b.DeletePrivateField,a)}if(!i)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,i,n);if(s){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?ms(l):ms(l)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(b.AwaitNotInAsyncContext,t),this.parseAwait(t)}return o}parseUpdate(n,e,t){if(e){let a=n;return this.checkLVal(a.argument,{in:this.finishNode(a,"UpdateExpression")}),n}let s=this.state.startLoc,i=this.parseExprSubscripts(t);if(this.checkExpressionErrors(t,!1))return i;for(;_o(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(s);a.operator=this.state.value,a.prefix=!1,a.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(a,"UpdateExpression")})}return i}parseExprSubscripts(n){let e=this.state.startLoc,t=this.state.potentialArrowAt,s=this.parseExprAtom(n);return this.shouldExitDescending(s,t)?s:this.parseSubscripts(s,e)}parseSubscripts(n,e,t){let s={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(n),stop:!1};do n=this.parseSubscript(n,e,t,s),s.maybeAsyncArrow=!1;while(!s.stop);return n}parseSubscript(n,e,t,s){let{type:i}=this.state;if(!t&&i===15)return this.parseBind(n,e,t,s);if(vn(i))return this.parseTaggedTemplateExpression(n,e,s);let a=!1;if(i===18){if(t&&(this.raise(b.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return s.stop=!0,n;s.optionalChainMember=a=!0,this.next()}if(!t&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(n,e,s,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(n,e,s,o,a):(s.stop=!0,n)}}parseMember(n,e,t,s,i){let a=this.startNodeAt(e);return a.object=n,a.computed=s,s?(a.property=this.parseExpression(),this.expect(3)):this.match(138)?(n.type==="Super"&&this.raise(b.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),t.optionalChainMember?(a.optional=i,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(n,e,t,s){let i=this.startNodeAt(e);return i.object=n,this.next(),i.callee=this.parseNoCallExpr(),s.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,t)}parseCoverCallAndAsyncArrowHead(n,e,t,s){let i=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=n;let{maybeAsyncArrow:l,optionalChainMember:c}=t;l&&(this.expressionScope.enter(al()),a=new ut),c&&(o.optional=s),s?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,n.type==="Import",n.type!=="Super",o,a);let p=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!s?(t.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),p)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=i,p}toReferencedArguments(n,e){this.toReferencedListDeep(n.arguments,e)}parseTaggedTemplateExpression(n,e,t){let s=this.startNodeAt(e);return s.tag=n,s.quasi=this.parseTemplate(!0),t.optionalChainMember&&this.raise(b.OptionalChainingNoTemplate,e),this.finishNode(s,"TaggedTemplateExpression")}atPossibleAsyncArrow(n){return n.type==="Identifier"&&n.name==="async"&&this.state.lastTokEndLoc.index===n.end&&!this.canInsertSemicolon()&&n.end-n.start===5&&n.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(n,e){if(n.callee.type==="Import")if(n.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),n.arguments.length===0||n.arguments.length>2)this.raise(b.ImportCallArity,n,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of n.arguments)t.type==="SpreadElement"&&this.raise(b.ImportCallSpreadArgument,t);return this.finishNode(n,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(n,e,t,s,i){let a=[],o=!0,l=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(b.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),s&&this.addTrailingCommaExtraToNode(s),this.next();break}a.push(this.parseExprListItem(!1,i,t))}return this.state.inFSharpPipelineDirectBody=l,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(n,e){var t;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(n,e.arguments,!0,(t=e.extra)==null?void 0:t.trailingCommaLoc),e.innerComments&&Vt(n,e.innerComments),e.callee.trailingComments&&Vt(n,e.callee.trailingComments),n}parseNoCallExpr(){let n=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),n,!0)}parseExprAtom(n){let e,t=null,{type:s}=this.state;switch(s){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(b.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,n);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,n);case 68:return this.parseFunctionOrFunctionSent();case 26:t=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(t,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let i=e.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(b.UnsupportedBind,i)}case 138:return this.raise(b.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);this.unexpected();break}case 47:{let i=this.input.codePointAt(this.nextTokenStart());_e(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(B(s)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(B(l))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(n,e){let t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.state.type=n,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=re(this.state.endLoc,-1),this.parseTopicReference(t);this.unexpected()}parseTopicReference(n){let e=this.startNode(),t=this.state.startLoc,s=this.state.type;return this.next(),this.finishTopicReference(e,t,n,s)}finishTopicReference(n,e,t,s){if(this.testTopicReferenceConfiguration(t,e,s)){let i=t==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(t==="smart"?b.PrimaryTopicNotAllowed:b.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(n,i)}else throw this.raise(b.PipeTopicUnconfiguredToken,e,{token:He(s)})}testTopicReferenceConfiguration(n,e,t){switch(n){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:He(t)}]);case"smart":return t===27;default:throw this.raise(b.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(n){this.prodParam.enter(gn(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(b.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(n,e,!0)}parseDo(n,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),n.async=e,this.next();let t=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),n.body=this.parseBlock(),this.prodParam.exit()):n.body=this.parseBlock(),this.state.labels=t,this.finishNode(n,"DoExpression")}parseSuper(){let n=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(b.SuperNotAllowed,n):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(b.UnexpectedSuper,n),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(b.UnsupportedSuper,n),this.finishNode(n,"Super")}parsePrivateName(){let n=this.startNode(),e=this.startNodeAt(re(this.state.startLoc,1)),t=this.state.value;return this.next(),n.id=this.createIdentifier(e,t),this.finishNode(n,"PrivateName")}parseFunctionOrFunctionSent(){let n=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(n,e,"sent")}return this.parseFunction(n)}parseMetaProperty(n,e,t){n.meta=e;let s=this.state.containsEsc;return n.property=this.parseIdentifier(!0),(n.property.name!==t||s)&&this.raise(b.UnsupportedMetaProperty,n.property,{target:e.name,onlyValidPropertyName:t}),this.finishNode(n,"MetaProperty")}parseImportMetaProperty(n){let e=this.createIdentifier(this.startNodeAtNode(n),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(b.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);if(t||this.unexpected(),this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(b.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),n.phase=t?"source":"defer",this.parseImportCall(n)}return this.parseMetaProperty(n,e,"meta")}parseLiteralAtNode(n,e,t){return this.addExtra(t,"rawValue",n),this.addExtra(t,"raw",this.input.slice(t.start,this.state.end)),t.value=n,this.next(),this.finishNode(t,e)}parseLiteral(n,e){let t=this.startNode();return this.parseLiteralAtNode(n,e,t)}parseStringLiteral(n){return this.parseLiteral(n,"StringLiteral")}parseNumericLiteral(n){return this.parseLiteral(n,"NumericLiteral")}parseBigIntLiteral(n){return this.parseLiteral(n,"BigIntLiteral")}parseDecimalLiteral(n){return this.parseLiteral(n,"DecimalLiteral")}parseRegExpLiteral(n){let e=this.parseLiteral(n.value,"RegExpLiteral");return e.pattern=n.pattern,e.flags=n.flags,e}parseBooleanLiteral(n){let e=this.startNode();return e.value=n,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let n=this.startNode();return this.next(),this.finishNode(n,"NullLiteral")}parseParenAndDistinguishExpression(n){let e=this.state.startLoc,t;this.next(),this.expressionScope.enter(il());let s=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new ut,c=!0,p,u;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){u=this.state.startLoc;break}if(this.match(21)){let d=this.state.startLoc;if(p=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),d)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=s,this.state.inFSharpPipelineDirectBody=i;let m=this.startNodeAt(e);return n&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),u&&this.unexpected(u),p&&this.unexpected(p),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(t=this.startNodeAt(a),t.expressions=o,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,f)):t=o[0],this.wrapParenthesis(e,t))}wrapParenthesis(n,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",n.index),this.takeSurroundingComments(e,n.index,this.state.lastTokEndLoc.index),e;let t=this.startNodeAt(n);return t.expression=e,this.finishNode(t,"ParenthesizedExpression")}shouldParseArrow(n){return!this.canInsertSemicolon()}parseArrow(n){if(this.eat(19))return n}parseParenItem(n,e){return n}parseNewOrNewTarget(){let n=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(n),"new");this.next();let t=this.parseMetaProperty(n,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(b.UnexpectedNewTarget,t),t}return this.parseNew(n)}parseNew(n){if(this.parseNewCallee(n),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),n.arguments=e}else n.arguments=[];return this.finishNode(n,"NewExpression")}parseNewCallee(n){let e=this.match(83),t=this.parseNoCallExpr();n.callee=t,e&&(t.type==="Import"||t.type==="ImportExpression")&&this.raise(b.ImportCallNotNewExpression,t)}parseTemplateElement(n){let{start:e,startLoc:t,end:s,value:i}=this.state,a=e+1,o=this.startNodeAt(re(t,1));i===null&&(n||this.raise(b.InvalidEscapeSequenceTemplate,re(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,p=s+c;o.value={raw:this.input.slice(a,p).replace(/\r\n?/g,`
9
9
  `),cooked:i===null?null:i.slice(1,c)},o.tail=l,this.next();let u=this.finishNode(o,"TemplateElement");return this.resetEndLocation(u,re(this.state.lastTokEndLoc,c)),u}parseTemplate(n){let e=this.startNode();e.expressions=[];let t=this.parseTemplateElement(n);for(e.quasis=[t];!t.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(t=this.parseTemplateElement(n));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(n);){if(o)o=!1;else if(this.expect(12),this.match(n)){this.addTrailingCommaExtraToNode(l);break}let p;e?p=this.parseBindingProperty():(p=this.parsePropertyDefinition(s),this.checkProto(p,t,a,s)),t&&!this.isObjectProperty(p)&&p.type!=="SpreadElement"&&this.raise(b.InvalidRecordProperty,p),p.shorthand&&this.addExtra(p,"shorthand",!0),l.properties.push(p)}this.next(),this.state.inFSharpPipelineDirectBody=i;let c="ObjectExpression";return e?c="ObjectPattern":t&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(n){this.addExtra(n,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(n,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(n){return!n.computed&&n.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(n){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(b.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let t=this.startNode(),s=!1,i=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(t.decorators=e,e=[]),t.method=!1,n&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(t);let l=this.state.containsEsc,c=this.parsePropertyName(t,n);if(!o&&!l&&this.maybeAsyncOrAccessorProp(t)){let p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(s=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(t)),(p==="get"||p==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(c),t.kind=p,this.match(55)&&(o=!0,this.raise(b.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(t))}return this.parseObjPropValue(t,a,o,s,!1,i,n)}getGetterSetterExpectedParamCount(n){return n.kind==="get"?0:1}getObjectOrClassMethodParams(n){return n.params}checkGetterSetterParams(n){var e;let t=this.getGetterSetterExpectedParamCount(n),s=this.getObjectOrClassMethodParams(n);s.length!==t&&this.raise(n.kind==="get"?b.BadGetterArity:b.BadSetterArity,n),n.kind==="set"&&((e=s[s.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(b.BadSetterRestParameter,n)}parseObjectMethod(n,e,t,s,i){if(i){let a=this.parseMethod(n,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(t||e||this.match(10))return s&&this.unexpected(),n.kind="method",n.method=!0,this.parseMethod(n,e,t,!1,!1,"ObjectMethod")}parseObjectProperty(n,e,t,s){if(n.shorthand=!1,this.eat(14))return n.value=t?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(s),this.finishNode(n,"ObjectProperty");if(!n.computed&&n.key.type==="Identifier"){if(this.checkReservedWord(n.key.name,n.key.loc.start,!0,!1),t)n.value=this.parseMaybeDefault(e,Be(n.key));else if(this.match(29)){let i=this.state.startLoc;s!=null?s.shorthandAssignLoc===null&&(s.shorthandAssignLoc=i):this.raise(b.InvalidCoverInitializedName,i),n.value=this.parseMaybeDefault(e,Be(n.key))}else n.value=Be(n.key);return n.shorthand=!0,this.finishNode(n,"ObjectProperty")}}parseObjPropValue(n,e,t,s,i,a,o){let l=this.parseObjectMethod(n,t,s,i,a)||this.parseObjectProperty(n,e,i,o);return l||this.unexpected(),l}parsePropertyName(n,e){if(this.eat(0))n.computed=!0,n.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:t,value:s}=this.state,i;if(xe(t))i=this.parseIdentifier(!0);else switch(t){case 134:i=this.parseNumericLiteral(s);break;case 133:i=this.parseStringLiteral(s);break;case 135:i=this.parseBigIntLiteral(s);break;case 136:i=this.parseDecimalLiteral(s);break;case 138:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(b.UnexpectedPrivateField,a),i=this.parsePrivateName();break}default:this.unexpected()}n.key=i,t!==138&&(n.computed=!1)}return n.key}initFunction(n,e){n.id=null,n.generator=!1,n.async=e}parseMethod(n,e,t,s,i,a,o=!1){this.initFunction(n,t),n.generator=e,this.scope.enter(18|(o?64:0)|(i?32:0)),this.prodParam.enter(gn(t,n.generator)),this.parseFunctionParams(n,s);let l=this.parseFunctionBodyAndFinish(n,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(n,e,t,s){t&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(n,!t,s,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(n,e,t,s){this.scope.enter(6);let i=gn(t,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(n,t);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(n,e,s)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(n,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(n,"ArrowFunctionExpression")}setArrowFunctionParameters(n,e,t){this.toAssignableList(e,t,!1),n.params=e}parseFunctionBodyAndFinish(n,e,t=!1){return this.parseFunctionBody(n,!1,t),this.finishNode(n,e)}parseFunctionBody(n,e,t=!1){let s=e&&!this.match(5);if(this.expressionScope.enter(yi()),s)n.body=this.parseMaybeAssign(),this.checkParams(n,!1,e,!1);else{let i=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),n.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(n.params);o&&l&&this.raise(b.IllegalLanguageModeDirective,(n.kind==="method"||n.kind==="constructor")&&n.key?n.key.loc.end:n);let c=!i&&this.state.strict;this.checkParams(n,!this.state.strict&&!e&&!t&&!l,e,c),this.state.strict&&n.id&&this.checkIdentifier(n.id,65,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(n){return n.type==="Identifier"}isSimpleParamList(n){for(let e=0,t=n.length;e<t;e++)if(!this.isSimpleParameter(n[e]))return!1;return!0}checkParams(n,e,t,s=!0){let i=!e&&new Set,a={type:"FormalParameters"};for(let o of n.params)this.checkLVal(o,{in:a,binding:5,checkClashes:i,strictModeChanged:s})}parseExprList(n,e,t,s){let i=[],a=!0;for(;!this.eat(n);){if(a)a=!1;else if(this.expect(12),this.match(n)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}i.push(this.parseExprListItem(e,t))}return i}parseExprListItem(n,e,t){let s;if(this.match(12))n||this.raise(b.UnexpectedToken,this.state.curPosition(),{unexpected:","}),s=null;else if(this.match(21)){let i=this.state.startLoc;s=this.parseParenItem(this.parseSpread(e),i)}else if(this.match(17)){this.expectPlugin("partialApplication"),t||this.raise(b.UnexpectedArgumentPlaceholder,this.state.startLoc);let i=this.startNode();this.next(),s=this.finishNode(i,"ArgumentPlaceholder")}else s=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return s}parseIdentifier(n){let e=this.startNode(),t=this.parseIdentifierName(n);return this.createIdentifier(e,t)}createIdentifier(n,e){return n.name=e,n.loc.identifierName=e,this.finishNode(n,"Identifier")}parseIdentifierName(n){let e,{startLoc:t,type:s}=this.state;xe(s)?e=this.state.value:this.unexpected();let i=Mo(s);return n?i&&this.replaceToken(132):this.checkReservedWord(e,t,i,!1),this.next(),e}checkReservedWord(n,e,t,s){if(n.length>10||!Qo(n))return;if(t&&Ko(n)){this.raise(b.UnexpectedKeyword,e,{keyword:n});return}if((this.state.strict?s?fi:ui:pi)(n,this.inModule)){this.raise(b.UnexpectedReservedWord,e,{reservedWord:n});return}else if(n==="yield"){if(this.prodParam.hasYield){this.raise(b.YieldBindingIdentifier,e);return}}else if(n==="await"){if(this.prodParam.hasAwait){this.raise(b.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(b.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(n==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(b.ArgumentsInClass,e);return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(n){let e=this.startNodeAt(n);return this.expressionScope.recordParameterInitializerError(b.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(b.ObsoleteAwaitStar,e),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:n}=this.state;return n===53||n===10||n===0||vn(n)||n===102&&!this.state.containsEsc||n===137||n===56||this.hasPlugin("v8intrinsic")&&n===54}parseYield(){let n=this.startNode();this.expressionScope.recordParameterInitializerError(b.YieldInParameter,n),this.next();let e=!1,t=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:t=this.parseMaybeAssign()}return n.delegate=e,n.argument=t,this.finishNode(n,"YieldExpression")}parseImportCall(n){return this.next(),n.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(n.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(n.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(n,"ImportExpression")}checkPipelineAtInfixOperator(n,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&n.type==="SequenceExpression"&&this.raise(b.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(n,e){if(this.isSimpleReference(n)){let t=this.startNodeAt(e);return t.callee=n,this.finishNode(t,"PipelineBareFunction")}else{let t=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),t.expression=n,this.finishNode(t,"PipelineTopicExpression")}}isSimpleReference(n){switch(n.type){case"MemberExpression":return!n.computed&&this.isSimpleReference(n.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(n){if(this.match(19))throw this.raise(b.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(b.PipelineTopicUnused,n)}withTopicBindingContext(n){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(n){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return n()}finally{this.state.topicContext=e}}else return n()}withSoloAwaitPermittingContext(n){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return n()}finally{this.state.soloAwait=e}}allowInAnd(n){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return n()}finally{this.prodParam.exit()}}return n()}disallowInAnd(n){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return n()}finally{this.prodParam.exit()}}return n()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(n){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let t=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let s=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,n);return this.state.inFSharpPipelineDirectBody=t,s}parseModuleExpression(){this.expectPlugin("moduleBlocks");let n=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let t=this.initializeScopes(!0);this.enterInitialScopes();try{n.body=this.parseProgram(e,8,"module")}finally{t()}return this.finishNode(n,"ModuleExpression")}parsePropertyNamePrefixOperator(n){}},fs={kind:1},Dl={kind:2},Ml=/[\uD800-\uDFFF]/u,hs=/in(?:stanceof)?/y;function Ll(r,n){for(let e=0;e<r.length;e++){let t=r[e],{type:s}=t;if(typeof s=="number"){{if(s===138){let{loc:i,start:a,value:o,end:l}=t,c=a+1,p=re(i.start,1);r.splice(e,1,new Ae({type:Fe(27),value:"#",start:a,end:c,startLoc:i.start,endLoc:p}),new Ae({type:Fe(132),value:o,start:c,end:l,startLoc:p,endLoc:i.end})),e++;continue}if(vn(s)){let{loc:i,start:a,value:o,end:l}=t,c=a+1,p=re(i.start,1),u;n.charCodeAt(a)===96?u=new Ae({type:Fe(22),value:"`",start:a,end:c,startLoc:i.start,endLoc:p}):u=new Ae({type:Fe(8),value:"}",start:a,end:c,startLoc:i.start,endLoc:p});let f,m,d,g;s===24?(m=l-1,d=re(i.end,-1),f=o===null?null:o.slice(1,-1),g=new Ae({type:Fe(22),value:"`",start:m,end:l,startLoc:d,endLoc:i.end})):(m=l-2,d=re(i.end,-2),f=o===null?null:o.slice(1,-2),g=new Ae({type:Fe(23),value:"${",start:m,end:l,startLoc:d,endLoc:i.end})),r.splice(e,1,u,new Ae({type:Fe(20),value:f,start:c,end:m,startLoc:p,endLoc:d}),g),e+=2;continue}}t.type=Fe(s)}}return r}var Os=class extends Ls{parseTopLevel(n,e){return n.program=this.parseProgram(e),n.comments=this.comments,this.options.tokens&&(n.tokens=Ll(this.tokens,this.input)),this.finishNode(n,"File")}parseProgram(n,e=139,t=this.options.sourceType){if(n.sourceType=t,n.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(n,!0,!0,e),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[i,a]of Array.from(this.scope.undefinedExports))this.raise(b.ModuleExportUndefined,a,{localName:i});let s;return e===139?s=this.finishNode(n,"Program"):s=this.finishNodeAt(n,"Program",re(this.state.startLoc,-1)),s}stmtToDirective(n){let e=n;e.type="Directive",e.value=e.expression,delete e.expression;let t=e.value,s=t.value,i=this.input.slice(t.start,t.end),a=t.value=i.slice(1,-1);return this.addExtra(t,"raw",i),this.addExtra(t,"rawValue",a),this.addExtra(t,"expressionValue",s),t.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let n=this.startNode();return n.value=this.state.value,this.next(),this.finishNode(n,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(n,e){if(_e(n)){if(hs.lastIndex=e,hs.test(this.input)){let t=this.codePointAtPos(hs.lastIndex);if(!pt(t)&&t!==92)return!1}return!0}else return n===92}chStartsBindingPattern(n){return n===91||n===123}hasFollowingBindingAtom(){let n=this.nextTokenStart(),e=this.codePointAtPos(n);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,n)}hasInLineFollowingBindingIdentifier(){let n=this.nextTokenInLineStart(),e=this.codePointAtPos(n);return this.chStartsBindingIdentifier(e,n)}startsUsingForOf(){let{type:n,containsEsc:e}=this.lookahead();if(n===102&&!e)return!1;if(B(n)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let n=this.nextTokenInLineStart();if(this.isUnparsedContextual(n,"using")){n=this.nextTokenInLineStartSince(n+5);let e=this.codePointAtPos(n);if(this.chStartsBindingIdentifier(e,n))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(n=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,n&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(n){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(n,e)}parseStatementContent(n,e){let t=this.state.type,s=this.startNode(),i=!!(n&2),a=!!(n&4),o=n&1;switch(t){case 60:return this.parseBreakContinueStatement(s,!0);case 63:return this.parseBreakContinueStatement(s,!1);case 64:return this.parseDebuggerStatement(s);case 90:return this.parseDoWhileStatement(s);case 91:return this.parseForStatement(s);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?b.StrictFunction:this.options.annexB?b.SloppyFunctionAnnexB:b.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(s,!1,!i&&a);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,s),!0);case 69:return this.parseIfStatement(s);case 70:return this.parseReturnStatement(s);case 71:return this.parseSwitchStatement(s);case 72:return this.parseThrowStatement(s);case 73:return this.parseTryStatement(s);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?i||this.raise(b.UnexpectedLexicalDeclaration,s):this.raise(b.AwaitUsingNotInAsyncContext,s),this.next(),this.parseVarStatement(s,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(b.UnexpectedUsingDeclaration,this.state.startLoc):i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(s,"using");case 100:{if(this.state.containsEsc)break;let p=this.nextTokenStart(),u=this.codePointAtPos(p);if(u!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(u,p)&&u!==123))break}case 75:i||this.raise(b.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let p=this.state.value;return this.parseVarStatement(s,p)}case 92:return this.parseWhileStatement(s);case 76:return this.parseWithStatement(s);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(s);case 83:{let p=this.lookaheadCharCode();if(p===40||p===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(b.UnexpectedImportExport,this.state.startLoc),this.next();let p;return t===83?(p=this.parseImport(s),p.type==="ImportDeclaration"&&(!p.importKind||p.importKind==="value")&&(this.sawUnambiguousESM=!0)):(p=this.parseExport(s,e),(p.type==="ExportNamedDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportAllDeclaration"&&(!p.exportKind||p.exportKind==="value")||p.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(p),p}default:if(this.isAsyncFunction())return i||this.raise(b.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(s,!0,!i&&a)}let l=this.state.value,c=this.parseExpression();return B(t)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(s,l,c,n):this.parseExpressionStatement(s,c,e)}assertModuleNodeAllowed(n){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(b.ImportOutsideModule,n)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(n,e,t){return n&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(b.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...n)):e.decorators=n,this.resetStartLocationFromNode(e,n[0]),t&&this.resetStartLocationFromNode(t,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(n){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))n||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(b.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(b.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let n=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,t;if(this.match(10)){let s=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(s,t);let i=this.state.startLoc;n.expression=this.parseMaybeDecoratorArguments(t),this.getPluginOption("decorators","allowCallParenthesized")===!1&&n.expression!==t&&this.raise(b.DecoratorArgumentsOutsideParentheses,i)}else{for(t=this.parseIdentifier(!1);this.eat(16);){let s=this.startNodeAt(e);s.object=t,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),s.computed=!1,t=this.finishNode(s,"MemberExpression")}n.expression=this.parseMaybeDecoratorArguments(t)}}else n.expression=this.parseExprSubscripts();return this.finishNode(n,"Decorator")}parseMaybeDecoratorArguments(n){if(this.eat(10)){let e=this.startNodeAtNode(n);return e.callee=n,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return n}parseBreakContinueStatement(n,e){return this.next(),this.isLineTerminator()?n.label=null:(n.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(n,e),this.finishNode(n,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(n,e){let t;for(t=0;t<this.state.labels.length;++t){let s=this.state.labels[t];if((n.label==null||s.name===n.label.name)&&(s.kind!=null&&(e||s.kind===1)||n.label&&e))break}if(t===this.state.labels.length){let s=e?"BreakStatement":"ContinueStatement";this.raise(b.IllegalBreakContinue,n,{type:s})}}parseDebuggerStatement(n){return this.next(),this.semicolon(),this.finishNode(n,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let n=this.parseExpression();return this.expect(11),n}parseDoWhileStatement(n){return this.next(),this.state.labels.push(fs),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),n.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(n,"DoWhileStatement")}parseForStatement(n){this.next(),this.state.labels.push(fs);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(n,null);let t=this.isContextual(100);{let l=this.isContextual(96)&&this.startsAwaitUsing(),c=l||this.isContextual(107)&&this.startsUsingForOf(),p=t&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||p){let u=this.startNode(),f;l?(f="await using",this.isAwaitAllowed()||this.raise(b.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):f=this.state.value,this.next(),this.parseVar(u,!0,f);let m=this.finishNode(u,"VariableDeclaration"),d=this.match(58);return d&&c&&this.raise(b.ForInUsing,m),(d||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(n,m,e):(e!==null&&this.unexpected(e),this.parseFor(n,m))}}let s=this.isContextual(95),i=new ut,a=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(t&&this.raise(b.ForOfLet,a),e===null&&s&&a.type==="Identifier"&&this.raise(b.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(a,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{in:{type:l}}),this.parseForIn(n,a,e)}else this.checkExpressionErrors(i,!0);return e!==null&&this.unexpected(e),this.parseFor(n,a)}parseFunctionStatement(n,e,t){return this.next(),this.parseFunction(n,1|(t?2:0)|(e?8:0))}parseIfStatement(n){return this.next(),n.test=this.parseHeaderExpression(),n.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),n.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(n,"IfStatement")}parseReturnStatement(n){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(b.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?n.argument=null:(n.argument=this.parseExpression(),this.semicolon()),this.finishNode(n,"ReturnStatement")}parseSwitchStatement(n){this.next(),n.discriminant=this.parseHeaderExpression();let e=n.cases=[];this.expect(5),this.state.labels.push(Dl),this.scope.enter(0);let t;for(let s;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);t&&this.finishNode(t,"SwitchCase"),e.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(s&&this.raise(b.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),s=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(n,"SwitchStatement")}parseThrowStatement(n){return this.next(),this.hasPrecedingLineBreak()&&this.raise(b.NewlineAfterThrow,this.state.lastTokEndLoc),n.argument=this.parseExpression(),this.semicolon(),this.finishNode(n,"ThrowStatement")}parseCatchClauseParam(){let n=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&n.type==="Identifier"?8:0),this.checkLVal(n,{in:{type:"CatchClause"},binding:9}),n}parseTryStatement(n){if(this.next(),n.block=this.parseBlock(),n.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),n.handler=this.finishNode(e,"CatchClause")}return n.finalizer=this.eat(67)?this.parseBlock():null,!n.handler&&!n.finalizer&&this.raise(b.NoCatchOrFinally,n),this.finishNode(n,"TryStatement")}parseVarStatement(n,e,t=!1){return this.next(),this.parseVar(n,!1,e,t),this.semicolon(),this.finishNode(n,"VariableDeclaration")}parseWhileStatement(n){return this.next(),n.test=this.parseHeaderExpression(),this.state.labels.push(fs),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(n,"WhileStatement")}parseWithStatement(n){return this.state.strict&&this.raise(b.StrictWith,this.state.startLoc),this.next(),n.object=this.parseHeaderExpression(),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(n,"WithStatement")}parseEmptyStatement(n){return this.next(),this.finishNode(n,"EmptyStatement")}parseLabeledStatement(n,e,t,s){for(let a of this.state.labels)a.name===e&&this.raise(b.LabelRedeclaration,t,{labelName:e});let i=Fo(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===n.start)o.statementStart=this.state.start,o.kind=i;else break}return this.state.labels.push({name:e,kind:i,statementStart:this.state.start}),n.body=s&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),n.label=t,this.finishNode(n,"LabeledStatement")}parseExpressionStatement(n,e,t){return n.expression=e,this.semicolon(),this.finishNode(n,"ExpressionStatement")}parseBlock(n=!1,e=!0,t){let s=this.startNode();return n&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(s,n,!1,8,t),e&&this.scope.exit(),this.finishNode(s,"BlockStatement")}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="StringLiteral"&&!n.expression.extra.parenthesized}parseBlockBody(n,e,t,s,i){let a=n.body=[],o=n.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,t,s,i)}parseBlockOrModuleBlockBody(n,e,t,s,i){let a=this.state.strict,o=!1,l=!1;for(;!this.match(s);){let c=t?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let p=this.stmtToDirective(c);e.push(p),!o&&p.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}n.push(c)}i?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(n,e){return n.init=e,this.semicolon(!1),n.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),n.update=this.match(11)?null:this.parseExpression(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,"ForStatement")}parseForIn(n,e,t){let s=this.match(58);return this.next(),s?t!==null&&this.unexpected(t):n.await=t!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!s||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(b.ForInOfLoopInitializer,e,{type:s?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(b.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),n.left=e,n.right=s?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(n,s?"ForInStatement":"ForOfStatement")}parseVar(n,e,t,s=!1){let i=n.declarations=[];for(n.kind=t;;){let a=this.startNode();if(this.parseVarId(a,t),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!s&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):t==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(b.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"const"})),i.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return n}parseVarId(n,e){let t=this.parseBindingAtom();this.checkLVal(t,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),n.id=t}parseAsyncFunctionExpression(n){return this.parseFunction(n,8)}parseFunction(n,e=0){let t=e&2,s=!!(e&1),i=s&&!(e&4),a=!!(e&8);this.initFunction(n,a),this.match(55)&&(t&&this.raise(b.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),n.generator=!0),s&&(n.id=this.parseFunctionId(i));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(gn(a,n.generator)),s||(n.id=this.parseFunctionId()),this.parseFunctionParams(n,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(n,s?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),s&&!t&&this.registerFunctionStatementId(n),this.state.maybeInArrowParameters=o,n}parseFunctionId(n){return n||B(this.state.type)?this.parseIdentifier():null}parseFunctionParams(n,e){this.expect(10),this.expressionScope.enter(rl()),n.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(n){n.id&&this.scope.declareName(n.id.name,!this.options.annexB||this.state.strict||n.generator||n.async?this.scope.treatFunctionsAsVar?5:8201:17,n.id.loc.start)}parseClass(n,e,t){this.next();let s=this.state.strict;return this.state.strict=!0,this.parseClassId(n,e,t),this.parseClassSuper(n),n.body=this.parseClassBody(!!n.superClass,s),this.finishNode(n,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(n){return!n.computed&&!n.static&&(n.key.name==="constructor"||n.key.value==="constructor")}parseClassBody(n,e){this.classScope.enter();let t={hadConstructor:!1,hadSuperClass:n},s=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(s.length>0)throw this.raise(b.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){s.push(this.parseDecorator());continue}let a=this.startNode();s.length&&(a.decorators=s,this.resetStartLocationFromNode(a,s[0]),s=[]),this.parseClassMember(i,a,t),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(b.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),s.length)throw this.raise(b.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(n,e){let t=this.parseIdentifier(!0);if(this.isClassMethod()){let s=e;return s.kind="method",s.computed=!1,s.key=t,s.static=!1,this.pushClassMethod(n,s,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let s=e;return s.computed=!1,s.key=t,s.static=!1,n.body.push(this.parseClassProperty(s)),!0}return this.resetPreviousNodeTrailingComments(t),!1}parseClassMember(n,e,t){let s=this.isContextual(106);if(s){if(this.parseClassMemberFromModifier(n,e))return;if(this.eat(5)){this.parseClassStaticBlock(n,e);return}}this.parseClassMemberWithIsStatic(n,e,t,s)}parseClassMemberWithIsStatic(n,e,t,s){let i=e,a=e,o=e,l=e,c=e,p=i,u=i;if(e.static=s,this.parsePropertyNamePrefixOperator(e),this.eat(55)){p.kind="method";let h=this.match(138);if(this.parseClassElementName(p),h){this.pushClassPrivateMethod(n,a,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsGenerator,i.key),this.pushClassMethod(n,i,!0,!1,!1,!1);return}let f=B(this.state.type)&&!this.state.containsEsc,m=this.match(138),d=this.parseClassElementName(e),g=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(p.kind="method",m){this.pushClassPrivateMethod(n,a,!1,!1);return}let h=this.isNonstaticConstructor(i),v=!1;h&&(i.kind="constructor",t.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(b.DuplicateConstructor,d),h&&this.hasPlugin("typescript")&&e.override&&this.raise(b.OverrideOnConstructor,d),t.hadConstructor=!0,v=t.hadSuperClass),this.pushClassMethod(n,i,!1,!1,h,v)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o);else if(f&&d.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);let h=this.eat(55);u.optional&&this.unexpected(g),p.kind="method";let v=this.match(138);this.parseClassElementName(p),this.parsePostMemberNameModifiers(u),v?this.pushClassPrivateMethod(n,a,h,!0):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAsync,i.key),this.pushClassMethod(n,i,h,!0,!1,!1))}else if(f&&(d.name==="get"||d.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(d),p.kind=d.name;let h=this.match(138);this.parseClassElementName(i),h?this.pushClassPrivateMethod(n,a,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(b.ConstructorIsAccessor,i.key),this.pushClassMethod(n,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(f&&d.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(d);let h=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(n,c,h)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(n,l):this.pushClassProperty(n,o):this.unexpected()}parseClassElementName(n){let{type:e,value:t}=this.state;if((e===132||e===133)&&n.static&&t==="prototype"&&this.raise(b.StaticPrototype,this.state.startLoc),e===138){t==="constructor"&&this.raise(b.ConstructorClassPrivateField,this.state.startLoc);let s=this.parsePrivateName();return n.key=s,s}return this.parsePropertyName(n)}parseClassStaticBlock(n,e){var t;this.scope.enter(208);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,n.body.push(this.finishNode(e,"StaticBlock")),(t=e.decorators)!=null&&t.length&&this.raise(b.DecoratorStaticBlock,e)}pushClassProperty(n,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(b.ConstructorClassField,e.key),n.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(n,e){let t=this.parseClassPrivateProperty(e);n.body.push(t),this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),0,t.key.loc.start)}pushClassAccessorProperty(n,e,t){if(!t&&!e.computed){let i=e.key;(i.name==="constructor"||i.value==="constructor")&&this.raise(b.ConstructorClassField,i)}let s=this.parseClassAccessorProperty(e);n.body.push(s),t&&this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassMethod(n,e,t,s,i,a){n.body.push(this.parseMethod(e,t,s,i,a,"ClassMethod",!0))}pushClassPrivateMethod(n,e,t,s){let i=this.parseMethod(e,t,s,!1,!1,"ClassPrivateMethod",!0);n.body.push(i);let a=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,a)}declareClassPrivateMethodInScope(n,e){this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),e,n.key.loc.start)}parsePostMemberNameModifiers(n){}parseClassPrivateProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassPrivateProperty")}parseClassProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassProperty")}parseClassAccessorProperty(n){return this.parseInitializer(n),this.semicolon(),this.finishNode(n,"ClassAccessorProperty")}parseInitializer(n){this.scope.enter(80),this.expressionScope.enter(yi()),this.prodParam.enter(0),n.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(n,e,t,s=8331){if(B(this.state.type))n.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(n.id,s);else if(t||!e)n.id=null;else throw this.raise(b.MissingClassName,this.state.startLoc)}parseClassSuper(n){n.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(n,e){let t=this.parseMaybeImportPhase(n,!0),s=this.maybeParseExportDefaultSpecifier(n,t),i=!s||this.eat(12),a=i&&this.eatExportStar(n),o=a&&this.maybeParseExportNamespaceSpecifier(n),l=i&&(!o||this.eat(12)),c=s||a;if(a&&!o){if(s&&this.unexpected(),e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.parseExportFrom(n,!0),this.finishNode(n,"ExportAllDeclaration")}let p=this.maybeParseExportNamedSpecifiers(n);s&&i&&!a&&!p&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let u;if(c||p){if(u=!1,e)throw this.raise(b.UnsupportedDecoratorExport,n);this.parseExportFrom(n,c)}else u=this.maybeParseExportDeclaration(n);if(c||p||u){var f;let m=n;if(this.checkExport(m,!0,!1,!!m.source),((f=m.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=n,d=this.parseExportDefaultExpression();if(m.declaration=d,d.type==="ClassDeclaration")this.maybeTakeDecorators(e,d,m);else if(e)throw this.raise(b.UnsupportedDecoratorExport,n);return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(n){return this.eat(55)}maybeParseExportDefaultSpecifier(n,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let t=e||this.parseIdentifier(!0),s=this.startNodeAtNode(t);return s.exported=t,n.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(n){if(this.isContextual(93)){n.specifiers||(n.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),n.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(n){if(this.match(5)){n.specifiers||(n.specifiers=[]);let e=n.exportKind==="type";return n.specifiers.push(...this.parseExportSpecifiers(e)),n.source=null,n.declaration=null,this.hasPlugin("importAssertions")&&(n.assertions=[]),!0}return!1}maybeParseExportDeclaration(n){return this.shouldParseExportDeclaration()?(n.specifiers=[],n.source=null,this.hasPlugin("importAssertions")&&(n.assertions=[]),n.declaration=this.parseExportDeclaration(n),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let n=this.nextTokenInLineStart();return this.isUnparsedContextual(n,"function")}parseExportDefaultExpression(){let n=this.startNode();if(this.match(68))return this.next(),this.parseFunction(n,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(n,13);if(this.match(80))return this.parseClass(n,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(b.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(n){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:n}=this.state;if(B(n)){if(n===95&&!this.state.containsEsc||n===100)return!1;if((n===130||n===129)&&!this.state.containsEsc){let{type:s}=this.lookahead();if(B(s)&&s!==98||s===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),t=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||B(this.state.type)&&t)return!0;if(this.match(65)&&t){let s=this.input.charCodeAt(this.nextTokenStartSince(e+4));return s===34||s===39}return!1}parseExportFrom(n,e){this.eatContextual(98)?(n.source=this.parseImportSource(),this.checkExport(n),this.maybeParseImportAttributes(n),this.checkJSONModuleImport(n)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:n}=this.state;return n===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(b.DecoratorBeforeExport,this.state.startLoc),!0):n===74||n===75||n===68||n===80||this.isLet()||this.isAsyncFunction()}checkExport(n,e,t,s){if(e){var i;if(t){if(this.checkDuplicateExports(n,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=n.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(b.ExportDefaultFromAsIdentifier,o)}}else if((i=n.specifiers)!=null&&i.length)for(let o of n.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!s&&o.local){let{local:p}=o;p.type!=="Identifier"?this.raise(b.ExportBindingIsString,o,{localName:p.value,exportName:c}):(this.checkReservedWord(p.name,p.loc.start,!0,!1),this.scope.checkLocalExport(p))}}else if(n.declaration){if(n.declaration.type==="FunctionDeclaration"||n.declaration.type==="ClassDeclaration"){let o=n.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(n,o.name)}else if(n.declaration.type==="VariableDeclaration")for(let o of n.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(n){if(n.type==="Identifier")this.checkDuplicateExports(n,n.name);else if(n.type==="ObjectPattern")for(let e of n.properties)this.checkDeclaration(e);else if(n.type==="ArrayPattern")for(let e of n.elements)e&&this.checkDeclaration(e);else n.type==="ObjectProperty"?this.checkDeclaration(n.value):n.type==="RestElement"?this.checkDeclaration(n.argument):n.type==="AssignmentPattern"&&this.checkDeclaration(n.left)}checkDuplicateExports(n,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(b.DuplicateDefaultExport,n):this.raise(b.DuplicateExport,n,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(n){let e=[],t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else if(this.expect(12),this.eat(8))break;let s=this.isContextual(130),i=this.match(133),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,i,n,s))}return e}parseExportSpecifier(n,e,t,s){return this.eatContextual(93)?n.exported=this.parseModuleExportName():e?n.exported=ll(n.local):n.exported||(n.exported=Be(n.local)),this.finishNode(n,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let n=this.parseStringLiteral(this.state.value),e=n.value.match(Ml);return e&&this.raise(b.ModuleExportNameHasLoneSurrogate,n,{surrogateCharCode:e[0].charCodeAt(0)}),n}return this.parseIdentifier(!0)}isJSONModuleImport(n){return n.assertions!=null?n.assertions.some(({key:e,value:t})=>t.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(n){let{specifiers:e}=n,t=e.length===1?e[0].type:null;if(n.phase==="source")t!=="ImportDefaultSpecifier"&&this.raise(b.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(n.phase==="defer")t!=="ImportNamespaceSpecifier"&&this.raise(b.DeferImportRequiresNamespace,e[0].loc.start);else if(n.module){var s;t!=="ImportDefaultSpecifier"&&this.raise(b.ImportReflectionNotBinding,e[0].loc.start),((s=n.assertions)==null?void 0:s.length)>0&&this.raise(b.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(n){if(this.isJSONModuleImport(n)&&n.type!=="ExportAllDeclaration"){let{specifiers:e}=n;if(e!=null){let t=e.find(s=>{let i;if(s.type==="ExportSpecifier"?i=s.local:s.type==="ImportSpecifier"&&(i=s.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});t!==void 0&&this.raise(b.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(n){return n?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(n,e,t,s){e||(t==="module"?(this.expectPlugin("importReflection",s),n.module=!0):this.hasPlugin("importReflection")&&(n.module=!1),t==="source"?(this.expectPlugin("sourcePhaseImports",s),n.phase="source"):t==="defer"?(this.expectPlugin("deferredImportEvaluation",s),n.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(n.phase=null))}parseMaybeImportPhase(n,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(n,e,null),null;let t=this.parseIdentifier(!0),{type:s}=this.state;return(xe(s)?s!==98||this.lookaheadCharCode()===102:s!==12)?(this.resetPreviousIdentifierLeadingComments(t),this.applyImportPhase(n,e,t.name,t.loc.start),null):(this.applyImportPhase(n,e,null),t)}isPrecedingIdImportPhase(n){let{type:e}=this.state;return B(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(n){return this.match(133)?this.parseImportSourceAndAttributes(n):this.parseImportSpecifiersAndAfter(n,this.parseMaybeImportPhase(n,!1))}parseImportSpecifiersAndAfter(n,e){n.specifiers=[];let s=!this.maybeParseDefaultImportSpecifier(n,e)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(n);return s&&!i&&this.parseNamedImportSpecifiers(n),this.expectContextual(98),this.parseImportSourceAndAttributes(n)}parseImportSourceAndAttributes(n){var e;return(e=n.specifiers)!=null||(n.specifiers=[]),n.source=this.parseImportSource(),this.maybeParseImportAttributes(n),this.checkImportReflection(n),this.checkJSONModuleImport(n),this.semicolon(),this.finishNode(n,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(n,e,t){e.local=this.parseIdentifier(),n.specifiers.push(this.finishImportSpecifier(e,t))}finishImportSpecifier(n,e,t=8201){return this.checkLVal(n.local,{in:{type:e},binding:t}),this.finishNode(n,e)}parseImportAttributes(){this.expect(5);let n=[],e=new Set;do{if(this.match(8))break;let t=this.startNode(),s=this.state.value;if(e.has(s)&&this.raise(b.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:s}),e.add(s),this.match(133)?t.key=this.parseStringLiteral(s):t.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return this.expect(8),n}parseModuleAttributes(){let n=[],e=new Set;do{let t=this.startNode();if(t.key=this.parseIdentifier(!0),t.key.name!=="type"&&this.raise(b.ModuleAttributeDifferentFromType,t.key),e.has(t.key.name)&&this.raise(b.ModuleAttributesWithDuplicateKeys,t.key,{key:t.key.name}),e.add(t.key.name),this.expect(14),!this.match(133))throw this.raise(b.ModuleAttributeInvalidValue,this.state.startLoc);t.value=this.parseStringLiteral(this.state.value),n.push(this.finishNode(t,"ImportAttribute"))}while(this.eat(12));return n}maybeParseImportAttributes(n){let e,t=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),t=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(b.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(n,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!t&&this.hasPlugin("importAssertions")?n.assertions=e:n.attributes=e}maybeParseDefaultImportSpecifier(n,e){if(e){let t=this.startNodeAtNode(e);return t.local=e,n.specifiers.push(this.finishImportSpecifier(t,"ImportDefaultSpecifier")),!0}else if(xe(this.state.type))return this.parseImportSpecifierLocal(n,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(n){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(n,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(n){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(b.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let t=this.startNode(),s=this.match(133),i=this.isContextual(130);t.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(t,s,n.importKind==="type"||n.importKind==="typeof",i,void 0);n.specifiers.push(a)}}parseImportSpecifier(n,e,t,s,i){if(this.eatContextual(93))n.local=this.parseIdentifier();else{let{imported:a}=n;if(e)throw this.raise(b.ImportBindingIsString,n,{importName:a.value});this.checkReservedWord(a.name,n.loc.start,!0,!0),n.local||(n.local=Be(a))}return this.finishImportSpecifier(n,"ImportSpecifier",i)}isThisParam(n){return n.type==="Identifier"&&n.name==="this"}},Pn=class extends Os{constructor(n,e){n=Nl(n),super(n,e),this.options=n,this.initializeScopes(),this.plugins=Ol(this.options.plugins),this.filename=n.sourceFilename}getScopeHandler(){return jt}parse(){this.enterInitialScopes();let n=this.startNode(),e=this.startNode();return this.nextToken(),n.errors=null,this.parseTopLevel(n,e),n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Ol(r){let n=new Map;for(let e of r){let[t,s]=Array.isArray(e)?e:[e,{}];n.has(t)||n.set(t,s||{})}return n}function Fl(r,n){var e;if(((e=n)==null?void 0:e.sourceType)==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let t=Ut(n,r),s=t.parse();if(t.sawUnambiguousESM)return s;if(t.ambiguousScriptDifferentAst)try{return n.sourceType="script",Ut(n,r).parse()}catch{}else s.program.sourceType="script";return s}catch(t){try{return n.sourceType="script",Ut(n,r).parse()}catch{}throw t}}else return Ut(n,r).parse()}function Ul(r,n){let e=Ut(n,r);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function _l(r){let n={};for(let e of Object.keys(r))n[e]=Fe(r[e]);return n}var Rl=_l(Do);function Ut(r,n){let e=Pn;return r!=null&&r.plugins&&(Al(r.plugins),e=Bl(r.plugins)),new e(r,n)}var ii={};function Bl(r){let n=kl.filter(s=>Y(r,s)),e=n.join("/"),t=ii[e];if(!t){t=Pn;for(let s of n)t=Ti[s](t);ii[e]=t}return t}zt.parse=Fl;zt.parseExpression=Ul;zt.tokTypes=Rl});import{Command as au}from"commander";import{readFileSync as Lp}from"fs";import st from"node:path";import{Command as Op}from"commander";import{defu as Fp}from"defu";import oe from"kleur";import sn from"lodash";import It from"prompts";var At=[{name:"Accordion",value:"accordion",instructions:["Remember to add the accordion animations to your tailwind.config.js"],files:[{fileName:"Accordion/Accordion.vue",dirPath:"components/UI",fileContent:`<template>
10
10
  <AccordionRoot v-bind="forwarded">
11
11
  <slot :items="items">
@@ -2329,7 +2329,7 @@ export const buttonStyles = tv({
2329
2329
 
2330
2330
  const props = defineProps<ContextMenuTriggerProps>();
2331
2331
  </script>
2332
- `}],utils:[],composables:[],plugins:[]},{name:"DataTables.net",value:"datatable",deps:["datatables.net-buttons-dt@^2.4.3","datatables.net-responsive-dt@^2.5.1","datatables.net-searchbuilder-dt@^1.7.0","datatables.net-select-dt@^1.7.1","datatables.net-vue3","jszip"],overrides:{"datatables.net":"1.13.11","datatables.net-dt":"1.13.11"},plugins:[{fileName:"datatables.client.ts",dirPath:"plugins",fileContent:`import DataTablesCore from "datatables.net";
2332
+ `}],utils:[],composables:[],plugins:[]},{name:"DataTables.net",value:"datatable",deps:["datatables.net-buttons-dt","datatables.net-responsive-dt","datatables.net-searchbuilder-dt","datatables.net-select-dt","datatables.net-vue3","jszip"],plugins:[{fileName:"datatables.client.ts",dirPath:"plugins",fileContent:`import DataTablesCore from "datatables.net";
2333
2333
  import DataTable from "datatables.net-vue3";
2334
2334
  import JSZip from "jszip";
2335
2335
 
@@ -2350,995 +2350,1097 @@ DataTable.use(DataTablesCore);
2350
2350
  export default defineNuxtPlugin((nuxtApp) => {
2351
2351
  nuxtApp.vueApp.component("DataTable", DataTable);
2352
2352
  });
2353
- `}],files:[{fileName:"Datatable.client.vue",dirPath:"components/UI",fileContent:`<template>
2354
- <DataTable ref="table" :data="data" :class="props.class" :options="options">
2355
- <slot></slot>
2356
- </DataTable>
2357
- </template>
2358
-
2359
- <script lang="ts" setup generic="T">
2360
- import type DataTableRef from "datatables.net";
2361
- import type { Config } from "datatables.net/types/types";
2362
-
2363
- const table = shallowRef<{ dt: InstanceType<typeof DataTableRef<T[]>> } | null>(null);
2364
-
2365
- const props = withDefaults(
2366
- defineProps<{
2367
- data?: Config["data"];
2368
- class?: any;
2369
- options?: Config;
2370
- }>(),
2371
- {
2372
- data: () => [],
2373
- class: "nowrap hover order-column row-border stripe display",
2374
- options: () => ({}),
2375
- }
2376
- );
2377
-
2378
- const emits = defineEmits<{
2379
- ready: [any];
2380
- }>();
2381
-
2382
- onMounted(() => {
2383
- nextTick(() => {
2384
- emits("ready", table.value?.dt);
2385
- });
2386
- });
2387
- </script>
2388
-
2389
- <style>
2390
- :root {
2391
- --dt-row-selected: 262.1, 83.3%, 57.8%;
2392
- --dt-row-selected-text: 210, 20%, 98%;
2393
- --dt-row-selected-link: 262.1, 83.3%, 57.8%;
2394
- --dt-row-stripe: 0, 0%, 100%;
2395
- --dt-row-hover: 0, 0%, 100%;
2396
- --dt-column-ordering: 0, 0%, 100%;
2397
- --dt-border: 220, 13%, 91%;
2398
- --dt-foreground: 224, 71.4%, 4.1%;
2399
- }
2400
-
2401
- .dark {
2402
- --dt-row-selected: 263.4, 70%, 50.4%;
2403
- --dt-row-selected-text: 210, 20%, 98%;
2404
- --dt-row-selected-link: 263.4, 70%, 50.4%;
2405
- --dt-row-stripe: 224, 71.4%, 4.1%;
2406
- --dt-row-hover: 224, 71.4%, 4.1%;
2407
- --dt-column-ordering: 224, 71.4%, 4.1%;
2408
- --dt-border: 215, 27.9%, 16.9%;
2409
- --dt-foreground: 224, 71.4%, 4.1%;
2410
- }
2411
-
2412
- table.dataTable td.dt-control {
2413
- text-align: center;
2414
- cursor: pointer;
2415
- }
2416
- table.dataTable td.dt-control:before {
2417
- display: inline-block;
2418
- color: hsla(var(--dt-foreground), 0.5);
2419
- content: "\u25BA";
2420
- }
2421
- table.dataTable tr.dt-hasChild td.dt-control:before {
2422
- content: "\u25BC";
2423
- }
2424
-
2425
- table.dataTable thead > tr > th.sorting,
2426
- table.dataTable thead > tr > th.sorting_asc,
2427
- table.dataTable thead > tr > th.sorting_desc,
2428
- table.dataTable thead > tr > th.sorting_asc_disabled,
2429
- table.dataTable thead > tr > th.sorting_desc_disabled,
2430
- table.dataTable thead > tr > td.sorting,
2431
- table.dataTable thead > tr > td.sorting_asc,
2432
- table.dataTable thead > tr > td.sorting_desc,
2433
- table.dataTable thead > tr > td.sorting_asc_disabled,
2434
- table.dataTable thead > tr > td.sorting_desc_disabled {
2435
- @apply relative cursor-pointer pr-7;
2436
- }
2437
- table.dataTable thead > tr > th.sorting:before,
2438
- table.dataTable thead > tr > th.sorting:after,
2439
- table.dataTable thead > tr > th.sorting_asc:before,
2440
- table.dataTable thead > tr > th.sorting_asc:after,
2441
- table.dataTable thead > tr > th.sorting_desc:before,
2442
- table.dataTable thead > tr > th.sorting_desc:after,
2443
- table.dataTable thead > tr > th.sorting_asc_disabled:before,
2444
- table.dataTable thead > tr > th.sorting_asc_disabled:after,
2445
- table.dataTable thead > tr > th.sorting_desc_disabled:before,
2446
- table.dataTable thead > tr > th.sorting_desc_disabled:after,
2447
- table.dataTable thead > tr > td.sorting:before,
2448
- table.dataTable thead > tr > td.sorting:after,
2449
- table.dataTable thead > tr > td.sorting_asc:before,
2450
- table.dataTable thead > tr > td.sorting_asc:after,
2451
- table.dataTable thead > tr > td.sorting_desc:before,
2452
- table.dataTable thead > tr > td.sorting_desc:after,
2453
- table.dataTable thead > tr > td.sorting_asc_disabled:before,
2454
- table.dataTable thead > tr > td.sorting_asc_disabled:after,
2455
- table.dataTable thead > tr > td.sorting_desc_disabled:before,
2456
- table.dataTable thead > tr > td.sorting_desc_disabled:after {
2457
- @apply absolute right-2.5 block text-xs leading-3 opacity-25;
2458
- }
2459
- table.dataTable thead > tr > th.sorting:before,
2460
- table.dataTable thead > tr > th.sorting_asc:before,
2461
- table.dataTable thead > tr > th.sorting_desc:before,
2462
- table.dataTable thead > tr > th.sorting_asc_disabled:before,
2463
- table.dataTable thead > tr > th.sorting_desc_disabled:before,
2464
- table.dataTable thead > tr > td.sorting:before,
2465
- table.dataTable thead > tr > td.sorting_asc:before,
2466
- table.dataTable thead > tr > td.sorting_desc:before,
2467
- table.dataTable thead > tr > td.sorting_asc_disabled:before,
2468
- table.dataTable thead > tr > td.sorting_desc_disabled:before {
2469
- @apply bottom-[43%] h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-up.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-up.svg?color=white')];
2470
- }
2471
- table.dataTable thead > tr > th.sorting:after,
2472
- table.dataTable thead > tr > th.sorting_asc:after,
2473
- table.dataTable thead > tr > th.sorting_desc:after,
2474
- table.dataTable thead > tr > th.sorting_asc_disabled:after,
2475
- table.dataTable thead > tr > th.sorting_desc_disabled:after,
2476
- table.dataTable thead > tr > td.sorting:after,
2477
- table.dataTable thead > tr > td.sorting_asc:after,
2478
- table.dataTable thead > tr > td.sorting_desc:after,
2479
- table.dataTable thead > tr > td.sorting_asc_disabled:after,
2480
- table.dataTable thead > tr > td.sorting_desc_disabled:after {
2481
- @apply top-[43%] h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];
2482
- }
2483
- table.dataTable thead > tr > th.sorting_asc:before,
2484
- table.dataTable thead > tr > th.sorting_desc:after,
2485
- table.dataTable thead > tr > td.sorting_asc:before,
2486
- table.dataTable thead > tr > td.sorting_desc:after {
2487
- @apply opacity-80;
2488
- }
2489
- table.dataTable thead > tr > th.sorting_desc_disabled:after,
2490
- table.dataTable thead > tr > th.sorting_asc_disabled:before,
2491
- table.dataTable thead > tr > td.sorting_desc_disabled:after,
2492
- table.dataTable thead > tr > td.sorting_asc_disabled:before {
2493
- @apply hidden;
2494
- }
2495
- table.dataTable thead > tr > th:active,
2496
- table.dataTable thead > tr > td:active {
2497
- @apply outline-none;
2498
- }
2499
-
2500
- div.dataTables_scrollBody > table.dataTable > thead > tr > th:before,
2501
- div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,
2502
- div.dataTables_scrollBody > table.dataTable > thead > tr > td:before,
2503
- div.dataTables_scrollBody > table.dataTable > thead > tr > td:after {
2504
- @apply hidden;
2505
- }
2506
-
2507
- div.dataTables_processing {
2508
- @apply absolute left-[50%] top-[50%] ml-[-100px] mt-[-26px] w-[200px] p-0.5 text-center;
2509
- }
2510
- div.dataTables_processing > div:last-child {
2511
- @apply relative mx-auto my-4 h-4 w-20;
2512
- }
2513
- div.dataTables_processing > div:last-child > div {
2514
- @apply absolute top-0 h-3.5 w-3.5 rounded-full;
2515
- background: hsl(var(--dt-row-selected));
2516
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
2517
- }
2518
- div.dataTables_processing > div:last-child > div:nth-child(1) {
2519
- left: 8px;
2520
- animation: datatables-loader-1 0.6s infinite;
2521
- }
2522
- div.dataTables_processing > div:last-child > div:nth-child(2) {
2523
- left: 8px;
2524
- animation: datatables-loader-2 0.6s infinite;
2525
- }
2526
- div.dataTables_processing > div:last-child > div:nth-child(3) {
2527
- left: 32px;
2528
- animation: datatables-loader-2 0.6s infinite;
2529
- }
2530
- div.dataTables_processing > div:last-child > div:nth-child(4) {
2531
- left: 56px;
2532
- animation: datatables-loader-3 0.6s infinite;
2533
- }
2534
-
2535
- @keyframes datatables-loader-1 {
2536
- 0% {
2537
- transform: scale(0);
2538
- }
2539
- 100% {
2540
- transform: scale(1);
2541
- }
2542
- }
2543
- @keyframes datatables-loader-3 {
2544
- 0% {
2545
- transform: scale(1);
2546
- }
2547
- 100% {
2548
- transform: scale(0);
2549
- }
2550
- }
2551
- @keyframes datatables-loader-2 {
2552
- 0% {
2553
- transform: translate(0, 0);
2554
- }
2555
- 100% {
2556
- transform: translate(24px, 0);
2557
- }
2558
- }
2559
- table.dataTable.nowrap th,
2560
- table.dataTable.nowrap td {
2561
- white-space: nowrap;
2562
- }
2563
- table.dataTable th.dt-left,
2564
- table.dataTable td.dt-left {
2565
- text-align: left;
2566
- }
2567
- table.dataTable th.dt-center,
2568
- table.dataTable td.dt-center,
2569
- table.dataTable td.dataTables_empty {
2570
- text-align: center;
2571
- }
2572
- table.dataTable th.dt-right,
2573
- table.dataTable td.dt-right {
2574
- text-align: right;
2575
- }
2576
- table.dataTable th.dt-justify,
2577
- table.dataTable td.dt-justify {
2578
- text-align: justify;
2579
- }
2580
- table.dataTable th.dt-nowrap,
2581
- table.dataTable td.dt-nowrap {
2582
- white-space: nowrap;
2583
- }
2584
- table.dataTable thead th,
2585
- table.dataTable thead td,
2586
- table.dataTable tfoot th,
2587
- table.dataTable tfoot td {
2588
- text-align: left;
2589
- }
2590
- table.dataTable thead th.dt-head-left,
2591
- table.dataTable thead td.dt-head-left,
2592
- table.dataTable tfoot th.dt-head-left,
2593
- table.dataTable tfoot td.dt-head-left {
2594
- text-align: left;
2595
- }
2596
- table.dataTable thead th.dt-head-center,
2597
- table.dataTable thead td.dt-head-center,
2598
- table.dataTable tfoot th.dt-head-center,
2599
- table.dataTable tfoot td.dt-head-center {
2600
- text-align: center;
2601
- }
2602
- table.dataTable thead th.dt-head-right,
2603
- table.dataTable thead td.dt-head-right,
2604
- table.dataTable tfoot th.dt-head-right,
2605
- table.dataTable tfoot td.dt-head-right {
2606
- text-align: right;
2607
- }
2608
- table.dataTable thead th.dt-head-justify,
2609
- table.dataTable thead td.dt-head-justify,
2610
- table.dataTable tfoot th.dt-head-justify,
2611
- table.dataTable tfoot td.dt-head-justify {
2612
- text-align: justify;
2613
- }
2614
- table.dataTable thead th.dt-head-nowrap,
2615
- table.dataTable thead td.dt-head-nowrap,
2616
- table.dataTable tfoot th.dt-head-nowrap,
2617
- table.dataTable tfoot td.dt-head-nowrap {
2618
- white-space: nowrap;
2619
- }
2620
- table.dataTable tbody th.dt-body-left,
2621
- table.dataTable tbody td.dt-body-left {
2622
- text-align: left;
2623
- }
2624
- table.dataTable tbody th.dt-body-center,
2625
- table.dataTable tbody td.dt-body-center {
2626
- text-align: center;
2627
- }
2628
- table.dataTable tbody th.dt-body-right,
2629
- table.dataTable tbody td.dt-body-right {
2630
- text-align: right;
2631
- }
2632
- table.dataTable tbody th.dt-body-justify,
2633
- table.dataTable tbody td.dt-body-justify {
2634
- text-align: justify;
2635
- }
2636
- table.dataTable tbody th.dt-body-nowrap,
2637
- table.dataTable tbody td.dt-body-nowrap {
2638
- white-space: nowrap;
2639
- }
2640
-
2641
- /* Table Styles */
2642
-
2643
- table.dataTable {
2644
- @apply w-full table-auto border-collapse;
2645
- }
2646
-
2647
- /* Table header styles */
2648
- table.dataTable thead th,
2649
- table.dataTable tfoot th {
2650
- @apply text-left text-sm font-medium text-muted-foreground;
2651
- }
2652
-
2653
- table.dataTable > thead > tr > th {
2654
- @apply border-b border-t-0 px-6 py-3;
2655
- }
2656
- table.dataTable > thead > tr > td {
2657
- @apply border-b px-6 py-3 text-sm;
2658
- }
2659
- table.dataTable > thead > tr > th:active,
2660
- table.dataTable > thead > tr > td:active {
2661
- @apply outline-none;
2662
- }
2663
- table.dataTable > tfoot > tr > th,
2664
- table.dataTable > tfoot > tr > td {
2665
- @apply border-t px-6 py-3;
2666
- }
2667
- table.dataTable tbody tr {
2668
- @apply bg-transparent;
2669
- }
2670
- table.dataTable tbody tr.selected > * {
2671
- @apply bg-primary/10;
2672
- }
2673
- table.dataTable tbody tr.selected a {
2674
- @apply text-primary;
2675
- }
2676
- table.dataTable tbody th,
2677
- table.dataTable tbody td {
2678
- @apply px-6 py-3 text-sm;
2679
- }
2680
- table.dataTable.row-border > tbody > tr > th,
2681
- table.dataTable.row-border > tbody > tr > td,
2682
- table.dataTable.display > tbody > tr > th,
2683
- table.dataTable.display > tbody > tr > td {
2684
- @apply border-t;
2685
- }
2686
- table.dataTable.row-border > tbody > tr:first-child > th,
2687
- table.dataTable.row-border > tbody > tr:first-child > td,
2688
- table.dataTable.display > tbody > tr:first-child > th,
2689
- table.dataTable.display > tbody > tr:first-child > td {
2690
- @apply border-t-0;
2691
- }
2692
- table.dataTable.row-border > tbody > tr.selected + tr.selected > td,
2693
- table.dataTable.display > tbody > tr.selected + tr.selected > td {
2694
- @apply border-t-primary/30;
2695
- }
2696
- table.dataTable.cell-border > tbody > tr > th,
2697
- table.dataTable.cell-border > tbody > tr > td {
2698
- @apply border-r border-t;
2699
- }
2700
- table.dataTable.cell-border > tbody > tr > th:first-child,
2701
- table.dataTable.cell-border > tbody > tr > td:first-child {
2702
- @apply border-l;
2703
- }
2704
- table.dataTable.cell-border > tbody > tr:first-child > th,
2705
- table.dataTable.cell-border > tbody > tr:first-child > td {
2706
- @apply border-t-0;
2707
- }
2708
- table.dataTable.stripe > tbody > tr.odd > *,
2709
- table.dataTable.display > tbody > tr.odd > * {
2710
- @apply bg-muted/50;
2711
- }
2712
- table.dataTable.stripe > tbody > tr.odd.selected > *,
2713
- table.dataTable.display > tbody > tr.odd.selected > * {
2714
- @apply bg-primary/10;
2715
- }
2716
- table.dataTable.hover > tbody > tr:hover > *,
2717
- table.dataTable.display > tbody > tr:hover > * {
2718
- @apply bg-muted;
2719
- }
2720
- table.dataTable.hover > tbody > tr.selected:hover > *,
2721
- table.dataTable.display > tbody > tr.selected:hover > * {
2722
- @apply !bg-primary/10;
2723
- }
2724
- table.dataTable.order-column > tbody tr > .sorting_1,
2725
- table.dataTable.order-column > tbody tr > .sorting_2,
2726
- table.dataTable.order-column > tbody tr > .sorting_3,
2727
- table.dataTable.display > tbody tr > .sorting_1,
2728
- table.dataTable.display > tbody tr > .sorting_2,
2729
- table.dataTable.display > tbody tr > .sorting_3 {
2730
- @apply bg-muted;
2731
- }
2732
- table.dataTable.order-column > tbody tr.selected > .sorting_1,
2733
- table.dataTable.order-column > tbody tr.selected > .sorting_2,
2734
- table.dataTable.order-column > tbody tr.selected > .sorting_3,
2735
- table.dataTable.display > tbody tr.selected > .sorting_1,
2736
- table.dataTable.display > tbody tr.selected > .sorting_2,
2737
- table.dataTable.display > tbody tr.selected > .sorting_3 {
2738
- @apply !bg-primary/10;
2739
- }
2740
- table.dataTable.display > tbody > tr.odd > .sorting_1,
2741
- table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 {
2742
- @apply bg-muted/50;
2743
- }
2744
- table.dataTable.display > tbody > tr.odd > .sorting_2,
2745
- table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 {
2746
- @apply bg-muted/30;
2747
- }
2748
- table.dataTable.display > tbody > tr.odd > .sorting_3,
2749
- table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 {
2750
- @apply bg-muted/10;
2751
- }
2752
- table.dataTable.display > tbody > tr.odd.selected > .sorting_1,
2753
- table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 {
2754
- @apply bg-muted/50;
2755
- }
2756
- table.dataTable.display > tbody > tr.odd.selected > .sorting_2,
2757
- table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 {
2758
- @apply bg-muted/30;
2759
- }
2760
- table.dataTable.display > tbody > tr.odd.selected > .sorting_3,
2761
- table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 {
2762
- @apply bg-muted/10;
2763
- }
2764
- table.dataTable.display > tbody > tr.even > .sorting_1,
2765
- table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 {
2766
- @apply bg-muted/50;
2767
- }
2768
- table.dataTable.display > tbody > tr.even > .sorting_2,
2769
- table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 {
2770
- @apply bg-muted/30;
2771
- }
2772
- table.dataTable.display > tbody > tr.even > .sorting_3,
2773
- table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 {
2774
- @apply bg-muted/10;
2775
- }
2776
- table.dataTable.display > tbody > tr.even.selected > .sorting_1,
2777
- table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 {
2778
- @apply bg-primary/10;
2779
- }
2780
- table.dataTable.display > tbody > tr.even.selected > .sorting_2,
2781
- table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 {
2782
- @apply bg-primary/10;
2783
- }
2784
- table.dataTable.display > tbody > tr.even.selected > .sorting_3,
2785
- table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 {
2786
- @apply bg-primary/10;
2787
- }
2788
- table.dataTable.display tbody tr:hover > .sorting_1,
2789
- table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
2790
- @apply bg-muted;
2791
- }
2792
- table.dataTable.display tbody tr:hover > .sorting_2,
2793
- table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
2794
- @apply bg-muted;
2795
- }
2796
- table.dataTable.display tbody tr:hover > .sorting_3,
2797
- table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
2798
- @apply bg-muted;
2799
- }
2800
- table.dataTable.display tbody tr:hover.selected > .sorting_1,
2801
- table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
2802
- @apply bg-primary/10;
2803
- }
2804
- table.dataTable.display tbody tr:hover.selected > .sorting_2,
2805
- table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
2806
- @apply bg-primary/10;
2807
- }
2808
- table.dataTable.display tbody tr:hover.selected > .sorting_3,
2809
- table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
2810
- @apply bg-primary/10;
2811
- }
2812
- table.dataTable.no-footer {
2813
- @apply border-b-0;
2814
- }
2815
- table.dataTable.compact thead th,
2816
- table.dataTable.compact thead td,
2817
- table.dataTable.compact tfoot th,
2818
- table.dataTable.compact tfoot td,
2819
- table.dataTable.compact tbody th,
2820
- table.dataTable.compact tbody td {
2821
- @apply px-4 py-2;
2822
- }
2823
-
2824
- table.dataTable th,
2825
- table.dataTable td {
2826
- @apply box-content border-y;
2827
- }
2828
-
2829
- table.dataTable tr:last-child td {
2830
- @apply !border-b-0;
2831
- }
2832
-
2833
- /* Control feature layout */
2834
- .dataTables_wrapper {
2835
- @apply w-full overflow-x-auto;
2836
- }
2837
-
2838
- /* Export button styles */
2839
- .dataTables_wrapper .dt-buttons {
2840
- @apply inline-flex flex-wrap items-center gap-2;
2841
- button {
2842
- @apply inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-md border bg-background px-3 text-sm text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;
2843
- }
2844
- }
2845
-
2846
- /* Copy modal */
2847
- .dt-button-info {
2848
- @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur;
2849
- }
2850
-
2851
- .dataTables_wrapper .dataTables_length {
2852
- label {
2853
- @apply inline-flex items-center gap-2 text-sm font-normal text-muted-foreground;
2854
- select {
2855
- @apply h-9 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:text-sm;
2856
- }
2857
- }
2858
- }
2859
- .dataTables_wrapper .dataTables_filter {
2860
- label {
2861
- @apply inline-flex w-full cursor-pointer items-center gap-2 text-sm font-normal text-muted-foreground;
2862
- input {
2863
- @apply h-9 w-full rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input sm:text-sm;
2864
- }
2865
- }
2866
- }
2867
- .dataTables_wrapper .dataTables_info {
2868
- @apply flex items-center gap-3 text-sm !text-muted-foreground;
2869
- }
2870
- .dataTables_wrapper .dataTables_paginate {
2871
- .paginate_button {
2872
- @apply ml-1 box-border inline-flex h-9 min-w-[36px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;
2873
- }
2874
- }
2875
- .dataTables_wrapper .dataTables_paginate .paginate_button.current,
2876
- .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
2877
- @apply bg-muted;
2878
- }
2879
- .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
2880
- .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
2881
- .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
2882
- @apply pointer-events-none opacity-50;
2883
- }
2884
- .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
2885
- @apply bg-muted;
2886
- }
2887
- .dataTables_wrapper .dataTables_paginate .paginate_button:active {
2888
- @apply bg-muted;
2889
- }
2890
- .dataTables_wrapper .dataTables_paginate .ellipsis {
2891
- @apply inline-flex h-8 min-w-[32px] items-start justify-center text-sm;
2892
- }
2893
- .dataTables_wrapper .dataTables_scroll {
2894
- clear: both;
2895
- }
2896
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
2897
- -webkit-overflow-scrolling: touch;
2898
- }
2899
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,
2900
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,
2901
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,
2902
- .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
2903
- vertical-align: middle;
2904
- }
2905
- .dataTables_wrapper
2906
- .dataTables_scroll
2907
- div.dataTables_scrollBody
2908
- > table
2909
- > thead
2910
- > tr
2911
- > th
2912
- > div.dataTables_sizing,
2913
- .dataTables_wrapper
2914
- .dataTables_scroll
2915
- div.dataTables_scrollBody
2916
- > table
2917
- > thead
2918
- > tr
2919
- > td
2920
- > div.dataTables_sizing,
2921
- .dataTables_wrapper
2922
- .dataTables_scroll
2923
- div.dataTables_scrollBody
2924
- > table
2925
- > tbody
2926
- > tr
2927
- > th
2928
- > div.dataTables_sizing,
2929
- .dataTables_wrapper
2930
- .dataTables_scroll
2931
- div.dataTables_scrollBody
2932
- > table
2933
- > tbody
2934
- > tr
2935
- > td
2936
- > div.dataTables_sizing {
2937
- height: 0;
2938
- overflow: hidden;
2939
- margin: 0 !important;
2940
- padding: 0 !important;
2941
- }
2942
- .dataTables_wrapper.no-footer .dataTables_scrollBody {
2943
- @apply border-b;
2944
- }
2945
- .dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
2946
- .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
2947
- border-bottom: none;
2948
- }
2949
- .dataTables_wrapper:after {
2950
- visibility: hidden;
2951
- display: block;
2952
- content: "";
2953
- clear: both;
2954
- height: 0;
2955
- }
2956
-
2957
- /*
2958
- responsive styles
2959
- */
2960
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
2961
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
2962
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
2963
- cursor: default !important;
2964
- }
2965
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
2966
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
2967
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
2968
- display: none !important;
2969
- }
2970
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
2971
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
2972
- cursor: pointer;
2973
- }
2974
-
2975
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
2976
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
2977
- @apply mr-2 inline-flex h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-right.svg')] bg-contain bg-center bg-no-repeat pb-[3px] content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-right.svg?color=white')];
2978
- }
2979
- table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control.arrow-right::before,
2980
- table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control.arrow-right::before {
2981
- content: "\u25C4";
2982
- }
2983
- table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
2984
- table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
2985
- @apply mr-2 inline-block h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];
2986
- }
2987
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,
2988
- table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {
2989
- padding-left: 0.333em;
2990
- }
2991
- table.dataTable.dtr-column > tbody > tr > td.dtr-control,
2992
- table.dataTable.dtr-column > tbody > tr > th.dtr-control,
2993
- table.dataTable.dtr-column > tbody > tr > td.control,
2994
- table.dataTable.dtr-column > tbody > tr > th.control {
2995
- cursor: pointer;
2996
- }
2997
- table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
2998
- table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
2999
- table.dataTable.dtr-column > tbody > tr > td.control:before,
3000
- table.dataTable.dtr-column > tbody > tr > th.control:before {
3001
- @apply mr-2 inline-flex h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-right.svg')] bg-contain bg-center bg-no-repeat pb-[3px] content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-right.svg?color=white')];
3002
- }
3003
- table.dataTable.dtr-column > tbody > tr > td.dtr-control.arrow-right::before,
3004
- table.dataTable.dtr-column > tbody > tr > th.dtr-control.arrow-right::before,
3005
- table.dataTable.dtr-column > tbody > tr > td.control.arrow-right::before,
3006
- table.dataTable.dtr-column > tbody > tr > th.control.arrow-right::before {
3007
- content: "\u25C4";
3008
- }
3009
- table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,
3010
- table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,
3011
- table.dataTable.dtr-column > tbody > tr.parent td.control:before,
3012
- table.dataTable.dtr-column > tbody > tr.parent th.control:before {
3013
- @apply mr-2 inline-block h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];
3014
- }
3015
-
3016
- table.dataTable > tbody td.child {
3017
- @apply p-0;
3018
- }
3019
- table.dataTable > tbody > tr.child:hover,
3020
- table.dataTable > tbody > tr.child:hover > td.child {
3021
- background: transparent !important;
3022
- }
3023
- table.dataTable > tbody > tr.child ul.dtr-details {
3024
- @apply m-0 block w-full list-none p-0;
3025
- }
3026
- table.dataTable > tbody > tr.child ul.dtr-details > li {
3027
- @apply border-b p-3 px-7 hover:bg-muted;
3028
- }
3029
-
3030
- table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
3031
- @apply border-b-0;
3032
- }
3033
- table.dataTable > tbody > tr.child span.dtr-title {
3034
- @apply inline-block min-w-[80px] font-bold;
3035
- }
3036
- div.dtr-modal {
3037
- position: fixed;
3038
- box-sizing: border-box;
3039
- top: 0;
3040
- left: 0;
3041
- height: 100%;
3042
- width: 100%;
3043
- z-index: 100;
3044
- padding: 10em 1em;
3045
- }
3046
- div.dtr-modal div.dtr-modal-display {
3047
- position: absolute;
3048
- top: 0;
3049
- left: 0;
3050
- bottom: 0;
3051
- right: 0;
3052
- width: 50%;
3053
- height: fit-content;
3054
- max-height: 75%;
3055
- overflow: auto;
3056
- margin: auto;
3057
- z-index: 102;
3058
- overflow: auto;
3059
- background-color: #f5f5f7;
3060
- border: 1px solid black;
3061
- border-radius: 0.5em;
3062
- box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
3063
- }
3064
- div.dtr-modal div.dtr-modal-content {
3065
- position: relative;
3066
- padding: 2.5em;
3067
- }
3068
- div.dtr-modal div.dtr-modal-content h2 {
3069
- margin-top: 0;
3070
- }
3071
- div.dtr-modal div.dtr-modal-close {
3072
- position: absolute;
3073
- top: 6px;
3074
- right: 6px;
3075
- width: 22px;
3076
- height: 22px;
3077
- text-align: center;
3078
- border-radius: 3px;
3079
- cursor: pointer;
3080
- z-index: 12;
3081
- }
3082
- div.dtr-modal div.dtr-modal-background {
3083
- position: fixed;
3084
- top: 0;
3085
- left: 0;
3086
- right: 0;
3087
- bottom: 0;
3088
- z-index: 101;
3089
- background: rgba(0, 0, 0, 0.6);
3090
- }
3091
-
3092
- /* Search Builder Styles */
3093
- div.dt-button-collection {
3094
- overflow: visible !important;
3095
- z-index: 2002 !important;
3096
- }
3097
- div.dt-button-collection div.dtsb-searchBuilder {
3098
- padding-left: 1em !important;
3099
- padding-right: 1em !important;
3100
- }
3101
- div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow {
3102
- padding-right: 40px;
3103
- }
3104
- .dtsb-greyscale {
3105
- @apply !border;
3106
- }
3107
- div.dtsb-logicContainer .dtsb-greyscale {
3108
- border: none !important;
3109
- }
3110
- div.dtsb-searchBuilder {
3111
- @apply mb-4 cursor-default justify-evenly text-left;
3112
- }
3113
- div.dtsb-searchBuilder button.dtsb-button,
3114
- div.dtsb-searchBuilder select {
3115
- @apply text-sm;
3116
- }
3117
- div.dtsb-searchBuilder div.dtsb-titleRow {
3118
- @apply mb-3 flex items-center justify-between;
3119
- }
3120
- div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title {
3121
- @apply inline-block text-sm font-normal;
3122
- }
3123
- div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title:empty {
3124
- display: inline;
3125
- }
3126
- div.dtsb-searchBuilder div.dtsb-vertical .dtsb-value,
3127
- div.dtsb-searchBuilder div.dtsb-vertical .dtsb-data,
3128
- div.dtsb-searchBuilder div.dtsb-vertical .dtsb-condition {
3129
- display: block;
3130
- }
3131
- div.dtsb-searchBuilder div.dtsb-group {
3132
- @apply relative clear-both mb-4;
3133
- }
3134
- div.dtsb-searchBuilder div.dtsb-group button.dtsb-search {
3135
- float: right;
3136
- }
3137
- div.dtsb-searchBuilder div.dtsb-group button.dtsb-clearGroup {
3138
- margin: 2px;
3139
- text-align: center;
3140
- padding: 0;
3141
- }
3142
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {
3143
- -webkit-transform: rotate(90deg);
3144
- -moz-transform: rotate(90deg);
3145
- -o-transform: rotate(90deg);
3146
- -ms-transform: rotate(90deg);
3147
- transform: rotate(90deg);
3148
- position: absolute;
3149
- margin-top: 0.8em;
3150
- margin-right: 0.8em;
3151
- }
3152
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {
3153
- margin-bottom: 0.8em;
3154
- display: flex;
3155
- justify-content: flex-start;
3156
- flex-flow: row wrap;
3157
- }
3158
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,
3159
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {
3160
- padding: 0.4em;
3161
- margin-right: 0.8em;
3162
- min-width: 5em;
3163
- max-width: 20em;
3164
- color: inherit;
3165
- }
3166
- div.dtsb-searchBuilder
3167
- div.dtsb-group
3168
- div.dtsb-criteria
3169
- select.dtsb-dropDown
3170
- option.dtsb-notItalic,
3171
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic {
3172
- font-style: normal;
3173
- }
3174
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-italic {
3175
- font-style: italic;
3176
- }
3177
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {
3178
- flex: 1;
3179
- white-space: nowrap;
3180
- }
3181
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont span.dtsp-joiner {
3182
- margin-right: 0.8em;
3183
- }
3184
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input.dtsb-value {
3185
- width: 33%;
3186
- }
3187
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont select,
3188
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input {
3189
- height: 100%;
3190
- box-sizing: border-box;
3191
- }
3192
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {
3193
- margin-left: auto;
3194
- display: inline-block;
3195
- }
3196
- div.dtsb-searchBuilder
3197
- div.dtsb-group
3198
- div.dtsb-criteria
3199
- div.dtsb-buttonContainer
3200
- button.dtsb-delete,
3201
- div.dtsb-searchBuilder
3202
- div.dtsb-group
3203
- div.dtsb-criteria
3204
- div.dtsb-buttonContainer
3205
- button.dtsb-right,
3206
- div.dtsb-searchBuilder
3207
- div.dtsb-group
3208
- div.dtsb-criteria
3209
- div.dtsb-buttonContainer
3210
- button.dtsb-left {
3211
- margin-right: 0.8em;
3212
- }
3213
- div.dtsb-searchBuilder
3214
- div.dtsb-group
3215
- div.dtsb-criteria
3216
- div.dtsb-buttonContainer
3217
- button.dtsb-delete:last-child,
3218
- div.dtsb-searchBuilder
3219
- div.dtsb-group
3220
- div.dtsb-criteria
3221
- div.dtsb-buttonContainer
3222
- button.dtsb-right:last-child,
3223
- div.dtsb-searchBuilder
3224
- div.dtsb-group
3225
- div.dtsb-criteria
3226
- div.dtsb-buttonContainer
3227
- button.dtsb-left:last-child {
3228
- margin-right: 0;
3229
- }
3230
- @media screen and (max-width: 550px) {
3231
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {
3232
- display: flex;
3233
- flex-flow: none;
3234
- flex-direction: column;
3235
- justify-content: flex-start;
3236
- padding-right: calc(35px + 0.8em);
3237
- margin-bottom: 0px;
3238
- }
3239
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:first-child),
3240
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:nth-child(2)),
3241
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:last-child) {
3242
- padding-top: 0.8em;
3243
- }
3244
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:first-child,
3245
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:nth-child(2),
3246
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:last-child {
3247
- padding-top: 0em;
3248
- }
3249
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,
3250
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {
3251
- max-width: none;
3252
- width: 100%;
3253
- margin-bottom: 0.8em;
3254
- margin-right: 0.8em;
3255
- }
3256
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {
3257
- margin-right: 0.8em;
3258
- }
3259
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {
3260
- position: absolute;
3261
- width: 35px;
3262
- display: flex;
3263
- flex-wrap: wrap-reverse;
3264
- right: 0;
3265
- }
3266
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button {
3267
- margin-right: 0px !important;
3268
- }
3269
- }
3270
- div.dtsb-searchBuilder button,
3271
- div.dtsb-searchBuilder select.dtsb-dropDown,
3272
- div.dtsb-searchBuilder input {
3273
- @apply bg-background;
3274
- }
3275
- div.dtsb-searchBuilder button.dtsb-button {
3276
- @apply relative box-border inline-flex h-9 cursor-pointer select-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-md border bg-background px-3 py-2 text-sm font-normal text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;
3277
- }
3278
- div.dtsb-searchBuilder button.dtsb-button:hover {
3279
- @apply cursor-pointer bg-muted;
3280
- }
3281
- div.dtsb-searchBuilder div.dtsb-logicContainer {
3282
- @apply overflow-hidden rounded-none border;
3283
- }
3284
- div.dtsb-searchBuilder div.dtsb-logicContainer button {
3285
- @apply rounded-md border-transparent bg-transparent;
3286
- }
3287
- div.dtsb-searchBuilder button.dtsb-clearGroup {
3288
- min-width: 2em;
3289
- padding: 0;
3290
- }
3291
- div.dtsb-searchBuilder button.dtsb-iptbtn {
3292
- min-width: 100px;
3293
- text-align: left;
3294
- }
3295
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {
3296
- @apply flex flex-row content-start items-start justify-start rounded-md;
3297
- }
3298
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic {
3299
- @apply m-0 shrink-0 grow rounded-none border-0;
3300
- flex-basis: 3em;
3301
- }
3302
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup {
3303
- border: none;
3304
- border-radius: 0px;
3305
- width: 2em;
3306
- margin: 0px;
3307
- }
3308
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,
3309
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {
3310
- @apply rounded-md border;
3311
- }
3312
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition,
3313
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data,
3314
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value {
3315
- @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;
3316
- }
3317
-
3318
- div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value {
3319
- @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;
3320
- }
3321
-
3322
- /* Col vis styles */
3323
- .dt-button-background {
3324
- @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur-sm;
3325
- }
3326
- .dt-button-down-arrow {
3327
- @apply text-[10px];
3328
- }
3329
- .dt-button-collection {
3330
- @apply relative;
3331
- [role="menu"] {
3332
- @apply absolute -left-40 top-7 flex w-[300px] flex-wrap gap-x-3 gap-y-2 rounded-md border bg-background p-2 shadow lg:w-[500px];
3333
- button {
3334
- @apply h-7 px-2 text-xs;
3335
- }
3336
- .dt-button.buttons-columnVisibility.dt-button-active {
3337
- @apply bg-primary text-primary-foreground;
3338
- }
3339
- }
3340
- }
3341
- </style>
2353
+ `}],files:[{fileName:"Datatable.client.vue",dirPath:"components/UI",fileContent:`<template>\r
2354
+ <DataTable\r
2355
+ :columns="columns"\r
2356
+ :ajax="ajax"\r
2357
+ ref="table"\r
2358
+ :data="data"\r
2359
+ :class="props.class"\r
2360
+ :options="options"\r
2361
+ >\r
2362
+ <template v-for="(_, name) in $slots" v-slot:[name]="scope">\r
2363
+ <slot :name="name" v-bind="scope"></slot>\r
2364
+ </template>\r
2365
+ </DataTable>\r
2366
+ </template>\r
2367
+ \r
2368
+ <script lang="ts" setup generic="T extends Record<string, any>">\r
2369
+ import type DataTableRef from "datatables.net";\r
2370
+ import type { Config } from "datatables.net";\r
2371
+ \r
2372
+ export type DataTablesNamedSlotProps<T> = {\r
2373
+ /** The data to show in the cell (from the \`columns.data\` configuration) */\r
2374
+ cellData: keyof T | null;\r
2375
+ /** The column index for the cell (0-based index) */\r
2376
+ colIndex: number;\r
2377
+ /** The data object for the whole row */\r
2378
+ rowData: T | Record<string, any>;\r
2379
+ /** Row index for the cell (data index, not the display index) */\r
2380
+ rowIndex: number;\r
2381
+ /** Orthogonal data type */\r
2382
+ type: string;\r
2383
+ };\r
2384
+ \r
2385
+ const table = shallowRef<{ dt: InstanceType<typeof DataTableRef<T[]>> } | null>(null);\r
2386
+ \r
2387
+ const props = withDefaults(\r
2388
+ defineProps<{\r
2389
+ data?: Config["data"];\r
2390
+ class?: any;\r
2391
+ columns?: Config["columns"];\r
2392
+ ajax?: Config["ajax"];\r
2393
+ options?: Config;\r
2394
+ }>(),\r
2395
+ {\r
2396
+ data: () => [],\r
2397
+ class: "nowrap hover order-column row-border stripe display",\r
2398
+ options: () => ({}),\r
2399
+ }\r
2400
+ );\r
2401
+ \r
2402
+ const emits = defineEmits<{\r
2403
+ ready: [any];\r
2404
+ }>();\r
2405
+ \r
2406
+ onMounted(() => {\r
2407
+ nextTick(() => {\r
2408
+ emits("ready", table.value?.dt);\r
2409
+ });\r
2410
+ });\r
2411
+ </script>\r
2412
+ \r
2413
+ <style>\r
2414
+ :root {\r
2415
+ --dt-row-selected: 262.1, 83.3%, 57.8%;\r
2416
+ --dt-row-selected-text: 210, 20%, 98%;\r
2417
+ --dt-row-selected-link: 262.1, 83.3%, 57.8%;\r
2418
+ --dt-row-stripe: 0, 0%, 100%;\r
2419
+ --dt-row-hover: 0, 0%, 100%;\r
2420
+ --dt-column-ordering: 0, 0%, 100%;\r
2421
+ --dt-border: 220, 13%, 91%;\r
2422
+ --dt-foreground: 224, 71.4%, 4.1%;\r
2423
+ }\r
2424
+ \r
2425
+ .dark {\r
2426
+ --dt-row-selected: 263.4, 70%, 50.4%;\r
2427
+ --dt-row-selected-text: 210, 20%, 98%;\r
2428
+ --dt-row-selected-link: 263.4, 70%, 50.4%;\r
2429
+ --dt-row-stripe: 224, 71.4%, 4.1%;\r
2430
+ --dt-row-hover: 224, 71.4%, 4.1%;\r
2431
+ --dt-column-ordering: 224, 71.4%, 4.1%;\r
2432
+ --dt-border: 215, 27.9%, 16.9%;\r
2433
+ --dt-foreground: 224, 71.4%, 4.1%;\r
2434
+ }\r
2435
+ \r
2436
+ table.dataTable td.dt-control {\r
2437
+ text-align: center;\r
2438
+ cursor: pointer;\r
2439
+ }\r
2440
+ table.dataTable td.dt-control:before {\r
2441
+ display: inline-block;\r
2442
+ color: hsla(var(--dt-foreground), 0.5);\r
2443
+ content: "\u25BA";\r
2444
+ }\r
2445
+ table.dataTable tr.dt-hasChild td.dt-control:before {\r
2446
+ content: "\u25BC";\r
2447
+ }\r
2448
+ \r
2449
+ table.dataTable thead > tr > th.sorting,\r
2450
+ table.dataTable thead > tr > th.sorting_asc,\r
2451
+ table.dataTable thead > tr > th.sorting_desc,\r
2452
+ table.dataTable thead > tr > th.sorting_asc_disabled,\r
2453
+ table.dataTable thead > tr > th.sorting_desc_disabled,\r
2454
+ table.dataTable thead > tr > td.sorting,\r
2455
+ table.dataTable thead > tr > td.sorting_asc,\r
2456
+ table.dataTable thead > tr > td.sorting_desc,\r
2457
+ table.dataTable thead > tr > td.sorting_asc_disabled,\r
2458
+ table.dataTable thead > tr > td.sorting_desc_disabled,\r
2459
+ /* V2 */\r
2460
+ table.dataTable thead > tr > th.dt-orderable-asc,\r
2461
+ table.dataTable thead > tr > th.dt-orderable-desc,\r
2462
+ table.dataTable thead > tr > td.dt-orderable-asc,\r
2463
+ table.dataTable thead > tr > td.dt-orderable-desc {\r
2464
+ @apply relative cursor-pointer pr-7;\r
2465
+ }\r
2466
+ table.dataTable thead > tr > th.sorting:before,\r
2467
+ table.dataTable thead > tr > th.sorting:after,\r
2468
+ table.dataTable thead > tr > th.sorting_asc:before,\r
2469
+ table.dataTable thead > tr > th.sorting_asc:after,\r
2470
+ table.dataTable thead > tr > th.sorting_desc:before,\r
2471
+ table.dataTable thead > tr > th.sorting_desc:after,\r
2472
+ table.dataTable thead > tr > th.sorting_asc_disabled:before,\r
2473
+ table.dataTable thead > tr > th.sorting_asc_disabled:after,\r
2474
+ table.dataTable thead > tr > th.sorting_desc_disabled:before,\r
2475
+ table.dataTable thead > tr > th.sorting_desc_disabled:after,\r
2476
+ table.dataTable thead > tr > td.sorting:before,\r
2477
+ table.dataTable thead > tr > td.sorting:after,\r
2478
+ table.dataTable thead > tr > td.sorting_asc:before,\r
2479
+ table.dataTable thead > tr > td.sorting_asc:after,\r
2480
+ table.dataTable thead > tr > td.sorting_desc:before,\r
2481
+ table.dataTable thead > tr > td.sorting_desc:after,\r
2482
+ table.dataTable thead > tr > td.sorting_asc_disabled:before,\r
2483
+ table.dataTable thead > tr > td.sorting_asc_disabled:after,\r
2484
+ table.dataTable thead > tr > td.sorting_desc_disabled:before,\r
2485
+ table.dataTable thead > tr > td.sorting_desc_disabled:after,\r
2486
+ /* V2 */\r
2487
+ table.dataTable thead > tr > th.dt-orderable-asc:before,\r
2488
+ table.dataTable thead > tr > th.dt-orderable-asc:after,\r
2489
+ table.dataTable thead > tr > th.dt-orderable-desc:before,\r
2490
+ table.dataTable thead > tr > th.dt-orderable-desc:after,\r
2491
+ table.dataTable thead > tr > td.dt-orderable-asc:before,\r
2492
+ table.dataTable thead > tr > td.dt-orderable-asc:after,\r
2493
+ table.dataTable thead > tr > td.dt-orderable-desc:before,\r
2494
+ table.dataTable thead > tr > td.dt-orderable-desc:after {\r
2495
+ @apply absolute right-2.5 block text-xs leading-3 opacity-25;\r
2496
+ }\r
2497
+ table.dataTable thead > tr > th.sorting:before,\r
2498
+ table.dataTable thead > tr > th.sorting_asc:before,\r
2499
+ table.dataTable thead > tr > th.sorting_desc:before,\r
2500
+ table.dataTable thead > tr > th.sorting_asc_disabled:before,\r
2501
+ table.dataTable thead > tr > th.sorting_desc_disabled:before,\r
2502
+ table.dataTable thead > tr > td.sorting:before,\r
2503
+ table.dataTable thead > tr > td.sorting_asc:before,\r
2504
+ table.dataTable thead > tr > td.sorting_desc:before,\r
2505
+ table.dataTable thead > tr > td.sorting_asc_disabled:before,\r
2506
+ table.dataTable thead > tr > td.sorting_desc_disabled:before,\r
2507
+ /* V2 */\r
2508
+ table.dataTable thead > tr > th.dt-orderable-asc:before,\r
2509
+ table.dataTable thead > tr > th.dt-orderable-desc:before,\r
2510
+ table.dataTable thead > tr > td.dt-orderable-asc:before,\r
2511
+ table.dataTable thead > tr > td.dt-orderable-desc:before {\r
2512
+ @apply bottom-[43%] h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-up.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-up.svg?color=white')];\r
2513
+ }\r
2514
+ table.dataTable thead > tr > th.sorting:after,\r
2515
+ table.dataTable thead > tr > th.sorting_asc:after,\r
2516
+ table.dataTable thead > tr > th.sorting_desc:after,\r
2517
+ table.dataTable thead > tr > th.sorting_asc_disabled:after,\r
2518
+ table.dataTable thead > tr > th.sorting_desc_disabled:after,\r
2519
+ table.dataTable thead > tr > td.sorting:after,\r
2520
+ table.dataTable thead > tr > td.sorting_asc:after,\r
2521
+ table.dataTable thead > tr > td.sorting_desc:after,\r
2522
+ table.dataTable thead > tr > td.sorting_asc_disabled:after,\r
2523
+ table.dataTable thead > tr > td.sorting_desc_disabled:after,\r
2524
+ /* V2 */\r
2525
+ table.dataTable thead > tr > th.dt-orderable-asc:after,\r
2526
+ table.dataTable thead > tr > th.dt-orderable-desc:after,\r
2527
+ table.dataTable thead > tr > td.dt-orderable-asc:after,\r
2528
+ table.dataTable thead > tr > td.dt-orderable-desc:after {\r
2529
+ @apply top-[43%] h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];\r
2530
+ }\r
2531
+ table.dataTable thead > tr > th.sorting_asc:before,\r
2532
+ table.dataTable thead > tr > th.sorting_desc:after,\r
2533
+ table.dataTable thead > tr > td.sorting_asc:before,\r
2534
+ table.dataTable thead > tr > td.sorting_desc:after,\r
2535
+ /* V2 */\r
2536
+ table.dataTable thead > tr > th.dt-ordering-asc:before,\r
2537
+ table.dataTable thead > tr > th.dt-ordering-desc:after {\r
2538
+ @apply opacity-80;\r
2539
+ }\r
2540
+ table.dataTable thead > tr > th.sorting_desc_disabled:after,\r
2541
+ table.dataTable thead > tr > th.sorting_asc_disabled:before,\r
2542
+ table.dataTable thead > tr > td.sorting_desc_disabled:after,\r
2543
+ table.dataTable thead > tr > td.sorting_asc_disabled:before {\r
2544
+ @apply hidden;\r
2545
+ }\r
2546
+ table.dataTable thead > tr > th:active,\r
2547
+ table.dataTable thead > tr > td:active {\r
2548
+ @apply outline-none;\r
2549
+ }\r
2550
+ \r
2551
+ div.dataTables_scrollBody > table.dataTable > thead > tr > th:before,\r
2552
+ div.dataTables_scrollBody > table.dataTable > thead > tr > th:after,\r
2553
+ div.dataTables_scrollBody > table.dataTable > thead > tr > td:before,\r
2554
+ div.dataTables_scrollBody > table.dataTable > thead > tr > td:after {\r
2555
+ @apply hidden;\r
2556
+ }\r
2557
+ \r
2558
+ div.dataTables_processing {\r
2559
+ @apply absolute left-[50%] top-[50%] ml-[-100px] mt-[-26px] w-[200px] p-0.5 text-center;\r
2560
+ }\r
2561
+ div.dataTables_processing > div:last-child {\r
2562
+ @apply relative mx-auto my-4 h-4 w-20;\r
2563
+ }\r
2564
+ div.dataTables_processing > div:last-child > div {\r
2565
+ @apply absolute top-0 h-3.5 w-3.5 rounded-full;\r
2566
+ background: hsl(var(--dt-row-selected));\r
2567
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);\r
2568
+ }\r
2569
+ div.dataTables_processing > div:last-child > div:nth-child(1) {\r
2570
+ left: 8px;\r
2571
+ animation: datatables-loader-1 0.6s infinite;\r
2572
+ }\r
2573
+ div.dataTables_processing > div:last-child > div:nth-child(2) {\r
2574
+ left: 8px;\r
2575
+ animation: datatables-loader-2 0.6s infinite;\r
2576
+ }\r
2577
+ div.dataTables_processing > div:last-child > div:nth-child(3) {\r
2578
+ left: 32px;\r
2579
+ animation: datatables-loader-2 0.6s infinite;\r
2580
+ }\r
2581
+ div.dataTables_processing > div:last-child > div:nth-child(4) {\r
2582
+ left: 56px;\r
2583
+ animation: datatables-loader-3 0.6s infinite;\r
2584
+ }\r
2585
+ \r
2586
+ @keyframes datatables-loader-1 {\r
2587
+ 0% {\r
2588
+ transform: scale(0);\r
2589
+ }\r
2590
+ 100% {\r
2591
+ transform: scale(1);\r
2592
+ }\r
2593
+ }\r
2594
+ @keyframes datatables-loader-3 {\r
2595
+ 0% {\r
2596
+ transform: scale(1);\r
2597
+ }\r
2598
+ 100% {\r
2599
+ transform: scale(0);\r
2600
+ }\r
2601
+ }\r
2602
+ @keyframes datatables-loader-2 {\r
2603
+ 0% {\r
2604
+ transform: translate(0, 0);\r
2605
+ }\r
2606
+ 100% {\r
2607
+ transform: translate(24px, 0);\r
2608
+ }\r
2609
+ }\r
2610
+ table.dataTable.nowrap th,\r
2611
+ table.dataTable.nowrap td {\r
2612
+ white-space: nowrap;\r
2613
+ }\r
2614
+ table.dataTable th.dt-left,\r
2615
+ table.dataTable td.dt-left {\r
2616
+ text-align: left;\r
2617
+ }\r
2618
+ table.dataTable th.dt-center,\r
2619
+ table.dataTable td.dt-center,\r
2620
+ table.dataTable td.dataTables_empty {\r
2621
+ text-align: center;\r
2622
+ }\r
2623
+ table.dataTable th.dt-right,\r
2624
+ table.dataTable td.dt-right {\r
2625
+ text-align: right;\r
2626
+ }\r
2627
+ table.dataTable th.dt-justify,\r
2628
+ table.dataTable td.dt-justify {\r
2629
+ text-align: justify;\r
2630
+ }\r
2631
+ table.dataTable th.dt-nowrap,\r
2632
+ table.dataTable td.dt-nowrap {\r
2633
+ white-space: nowrap;\r
2634
+ }\r
2635
+ table.dataTable thead th,\r
2636
+ table.dataTable thead td,\r
2637
+ table.dataTable tfoot th,\r
2638
+ table.dataTable tfoot td {\r
2639
+ text-align: left;\r
2640
+ }\r
2641
+ table.dataTable thead th.dt-head-left,\r
2642
+ table.dataTable thead td.dt-head-left,\r
2643
+ table.dataTable tfoot th.dt-head-left,\r
2644
+ table.dataTable tfoot td.dt-head-left {\r
2645
+ text-align: left;\r
2646
+ }\r
2647
+ table.dataTable thead th.dt-head-center,\r
2648
+ table.dataTable thead td.dt-head-center,\r
2649
+ table.dataTable tfoot th.dt-head-center,\r
2650
+ table.dataTable tfoot td.dt-head-center {\r
2651
+ text-align: center;\r
2652
+ }\r
2653
+ table.dataTable thead th.dt-head-right,\r
2654
+ table.dataTable thead td.dt-head-right,\r
2655
+ table.dataTable tfoot th.dt-head-right,\r
2656
+ table.dataTable tfoot td.dt-head-right {\r
2657
+ text-align: right;\r
2658
+ }\r
2659
+ table.dataTable thead th.dt-head-justify,\r
2660
+ table.dataTable thead td.dt-head-justify,\r
2661
+ table.dataTable tfoot th.dt-head-justify,\r
2662
+ table.dataTable tfoot td.dt-head-justify {\r
2663
+ text-align: justify;\r
2664
+ }\r
2665
+ table.dataTable thead th.dt-head-nowrap,\r
2666
+ table.dataTable thead td.dt-head-nowrap,\r
2667
+ table.dataTable tfoot th.dt-head-nowrap,\r
2668
+ table.dataTable tfoot td.dt-head-nowrap {\r
2669
+ white-space: nowrap;\r
2670
+ }\r
2671
+ table.dataTable tbody th.dt-body-left,\r
2672
+ table.dataTable tbody td.dt-body-left {\r
2673
+ text-align: left;\r
2674
+ }\r
2675
+ table.dataTable tbody th.dt-body-center,\r
2676
+ table.dataTable tbody td.dt-body-center {\r
2677
+ text-align: center;\r
2678
+ }\r
2679
+ table.dataTable tbody th.dt-body-right,\r
2680
+ table.dataTable tbody td.dt-body-right {\r
2681
+ text-align: right;\r
2682
+ }\r
2683
+ table.dataTable tbody th.dt-body-justify,\r
2684
+ table.dataTable tbody td.dt-body-justify {\r
2685
+ text-align: justify;\r
2686
+ }\r
2687
+ table.dataTable tbody th.dt-body-nowrap,\r
2688
+ table.dataTable tbody td.dt-body-nowrap {\r
2689
+ white-space: nowrap;\r
2690
+ }\r
2691
+ \r
2692
+ /* Table Styles */\r
2693
+ \r
2694
+ table.dataTable {\r
2695
+ @apply w-full table-auto border-collapse;\r
2696
+ }\r
2697
+ \r
2698
+ /* Table header styles */\r
2699
+ table.dataTable thead th,\r
2700
+ table.dataTable tfoot th {\r
2701
+ @apply text-left text-sm font-medium text-muted-foreground;\r
2702
+ }\r
2703
+ \r
2704
+ table.dataTable > thead > tr > th {\r
2705
+ @apply border-b border-t-0 px-6 py-3;\r
2706
+ }\r
2707
+ table.dataTable > thead > tr > td {\r
2708
+ @apply border-b px-6 py-3 text-sm;\r
2709
+ }\r
2710
+ table.dataTable > thead > tr > th:active,\r
2711
+ table.dataTable > thead > tr > td:active {\r
2712
+ @apply outline-none;\r
2713
+ }\r
2714
+ table.dataTable > tfoot > tr > th,\r
2715
+ table.dataTable > tfoot > tr > td {\r
2716
+ @apply border-t px-6 py-3;\r
2717
+ }\r
2718
+ table.dataTable tbody tr {\r
2719
+ @apply bg-transparent;\r
2720
+ }\r
2721
+ table.dataTable tbody tr.selected > * {\r
2722
+ @apply bg-primary/10;\r
2723
+ }\r
2724
+ table.dataTable tbody tr.selected a {\r
2725
+ @apply text-primary;\r
2726
+ }\r
2727
+ table.dataTable tbody th,\r
2728
+ table.dataTable tbody td {\r
2729
+ @apply px-6 py-3 text-sm;\r
2730
+ }\r
2731
+ table.dataTable.row-border > tbody > tr > th,\r
2732
+ table.dataTable.row-border > tbody > tr > td,\r
2733
+ table.dataTable.display > tbody > tr > th,\r
2734
+ table.dataTable.display > tbody > tr > td {\r
2735
+ @apply border-t;\r
2736
+ }\r
2737
+ table.dataTable.row-border > tbody > tr:first-child > th,\r
2738
+ table.dataTable.row-border > tbody > tr:first-child > td,\r
2739
+ table.dataTable.display > tbody > tr:first-child > th,\r
2740
+ table.dataTable.display > tbody > tr:first-child > td {\r
2741
+ @apply border-t-0;\r
2742
+ }\r
2743
+ table.dataTable.row-border > tbody > tr.selected + tr.selected > td,\r
2744
+ table.dataTable.display > tbody > tr.selected + tr.selected > td {\r
2745
+ @apply border-t-primary/30;\r
2746
+ }\r
2747
+ table.dataTable.cell-border > tbody > tr > th,\r
2748
+ table.dataTable.cell-border > tbody > tr > td {\r
2749
+ @apply border-r border-t;\r
2750
+ }\r
2751
+ table.dataTable.cell-border > tbody > tr > th:first-child,\r
2752
+ table.dataTable.cell-border > tbody > tr > td:first-child {\r
2753
+ @apply border-l;\r
2754
+ }\r
2755
+ table.dataTable.cell-border > tbody > tr:first-child > th,\r
2756
+ table.dataTable.cell-border > tbody > tr:first-child > td {\r
2757
+ @apply border-t-0;\r
2758
+ }\r
2759
+ table.dataTable.stripe > tbody > tr.odd > *,\r
2760
+ table.dataTable.display > tbody > tr.odd > * {\r
2761
+ @apply bg-muted/50;\r
2762
+ }\r
2763
+ table.dataTable.stripe > tbody > tr.odd.selected > *,\r
2764
+ table.dataTable.display > tbody > tr.odd.selected > * {\r
2765
+ @apply bg-primary/10;\r
2766
+ }\r
2767
+ table.dataTable.hover > tbody > tr:hover > *,\r
2768
+ table.dataTable.display > tbody > tr:hover > * {\r
2769
+ @apply bg-muted;\r
2770
+ }\r
2771
+ table.dataTable.hover > tbody > tr.selected:hover > *,\r
2772
+ table.dataTable.display > tbody > tr.selected:hover > * {\r
2773
+ @apply !bg-primary/10;\r
2774
+ }\r
2775
+ table.dataTable.order-column > tbody tr > .sorting_1,\r
2776
+ table.dataTable.order-column > tbody tr > .sorting_2,\r
2777
+ table.dataTable.order-column > tbody tr > .sorting_3,\r
2778
+ table.dataTable.display > tbody tr > .sorting_1,\r
2779
+ table.dataTable.display > tbody tr > .sorting_2,\r
2780
+ table.dataTable.display > tbody tr > .sorting_3 {\r
2781
+ @apply bg-muted;\r
2782
+ }\r
2783
+ table.dataTable.order-column > tbody tr.selected > .sorting_1,\r
2784
+ table.dataTable.order-column > tbody tr.selected > .sorting_2,\r
2785
+ table.dataTable.order-column > tbody tr.selected > .sorting_3,\r
2786
+ table.dataTable.display > tbody tr.selected > .sorting_1,\r
2787
+ table.dataTable.display > tbody tr.selected > .sorting_2,\r
2788
+ table.dataTable.display > tbody tr.selected > .sorting_3 {\r
2789
+ @apply !bg-primary/10;\r
2790
+ }\r
2791
+ table.dataTable.display > tbody > tr.odd > .sorting_1,\r
2792
+ table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_1 {\r
2793
+ @apply bg-muted/50;\r
2794
+ }\r
2795
+ table.dataTable.display > tbody > tr.odd > .sorting_2,\r
2796
+ table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_2 {\r
2797
+ @apply bg-muted/30;\r
2798
+ }\r
2799
+ table.dataTable.display > tbody > tr.odd > .sorting_3,\r
2800
+ table.dataTable.order-column.stripe > tbody > tr.odd > .sorting_3 {\r
2801
+ @apply bg-muted/10;\r
2802
+ }\r
2803
+ table.dataTable.display > tbody > tr.odd.selected > .sorting_1,\r
2804
+ table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_1 {\r
2805
+ @apply bg-muted/50;\r
2806
+ }\r
2807
+ table.dataTable.display > tbody > tr.odd.selected > .sorting_2,\r
2808
+ table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_2 {\r
2809
+ @apply bg-muted/30;\r
2810
+ }\r
2811
+ table.dataTable.display > tbody > tr.odd.selected > .sorting_3,\r
2812
+ table.dataTable.order-column.stripe > tbody > tr.odd.selected > .sorting_3 {\r
2813
+ @apply bg-muted/10;\r
2814
+ }\r
2815
+ table.dataTable.display > tbody > tr.even > .sorting_1,\r
2816
+ table.dataTable.order-column.stripe > tbody > tr.even > .sorting_1 {\r
2817
+ @apply bg-muted/50;\r
2818
+ }\r
2819
+ table.dataTable.display > tbody > tr.even > .sorting_2,\r
2820
+ table.dataTable.order-column.stripe > tbody > tr.even > .sorting_2 {\r
2821
+ @apply bg-muted/30;\r
2822
+ }\r
2823
+ table.dataTable.display > tbody > tr.even > .sorting_3,\r
2824
+ table.dataTable.order-column.stripe > tbody > tr.even > .sorting_3 {\r
2825
+ @apply bg-muted/10;\r
2826
+ }\r
2827
+ table.dataTable.display > tbody > tr.even.selected > .sorting_1,\r
2828
+ table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_1 {\r
2829
+ @apply bg-primary/10;\r
2830
+ }\r
2831
+ table.dataTable.display > tbody > tr.even.selected > .sorting_2,\r
2832
+ table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_2 {\r
2833
+ @apply bg-primary/10;\r
2834
+ }\r
2835
+ table.dataTable.display > tbody > tr.even.selected > .sorting_3,\r
2836
+ table.dataTable.order-column.stripe > tbody > tr.even.selected > .sorting_3 {\r
2837
+ @apply bg-primary/10;\r
2838
+ }\r
2839
+ table.dataTable.display tbody tr:hover > .sorting_1,\r
2840
+ table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {\r
2841
+ @apply bg-muted;\r
2842
+ }\r
2843
+ table.dataTable.display tbody tr:hover > .sorting_2,\r
2844
+ table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {\r
2845
+ @apply bg-muted;\r
2846
+ }\r
2847
+ table.dataTable.display tbody tr:hover > .sorting_3,\r
2848
+ table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {\r
2849
+ @apply bg-muted;\r
2850
+ }\r
2851
+ table.dataTable.display tbody tr:hover.selected > .sorting_1,\r
2852
+ table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {\r
2853
+ @apply bg-primary/10;\r
2854
+ }\r
2855
+ table.dataTable.display tbody tr:hover.selected > .sorting_2,\r
2856
+ table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {\r
2857
+ @apply bg-primary/10;\r
2858
+ }\r
2859
+ table.dataTable.display tbody tr:hover.selected > .sorting_3,\r
2860
+ table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {\r
2861
+ @apply bg-primary/10;\r
2862
+ }\r
2863
+ table.dataTable.no-footer {\r
2864
+ @apply border-b-0;\r
2865
+ }\r
2866
+ table.dataTable.compact thead th,\r
2867
+ table.dataTable.compact thead td,\r
2868
+ table.dataTable.compact tfoot th,\r
2869
+ table.dataTable.compact tfoot td,\r
2870
+ table.dataTable.compact tbody th,\r
2871
+ table.dataTable.compact tbody td {\r
2872
+ @apply px-4 py-2;\r
2873
+ }\r
2874
+ \r
2875
+ table.dataTable th,\r
2876
+ table.dataTable td {\r
2877
+ @apply box-content border-y;\r
2878
+ }\r
2879
+ \r
2880
+ table.dataTable tr:last-child td {\r
2881
+ @apply !border-b-0;\r
2882
+ }\r
2883
+ \r
2884
+ /* Control feature layout */\r
2885
+ .dataTables_wrapper {\r
2886
+ @apply w-full overflow-x-auto;\r
2887
+ }\r
2888
+ \r
2889
+ /* Export button styles - v1 of datatables */\r
2890
+ .dataTables_wrapper .dt-buttons {\r
2891
+ @apply inline-flex flex-wrap items-center gap-2;\r
2892
+ button {\r
2893
+ @apply inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-md border bg-background px-3 text-sm text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\r
2894
+ }\r
2895
+ }\r
2896
+ /* V2 of datatables button styles. \r
2897
+ */\r
2898
+ .dt-buttons {\r
2899
+ @apply inline-flex flex-wrap items-center gap-2;\r
2900
+ button {\r
2901
+ @apply inline-flex h-9 items-center gap-2 whitespace-nowrap rounded-md border bg-background px-3 text-sm text-muted-foreground hover:bg-muted focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\r
2902
+ }\r
2903
+ }\r
2904
+ \r
2905
+ /* Copy modal */\r
2906
+ .dt-button-info {\r
2907
+ @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur;\r
2908
+ }\r
2909
+ \r
2910
+ /* Select box at bottom showing number of records being displayed - v1 of datatables */\r
2911
+ .dataTables_wrapper .dataTables_length {\r
2912
+ label {\r
2913
+ @apply inline-flex items-center gap-2 text-sm font-normal text-muted-foreground;\r
2914
+ select {\r
2915
+ @apply h-9 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:text-sm;\r
2916
+ }\r
2917
+ }\r
2918
+ }\r
2919
+ /* Select box at the bottom showing how many items are being display - v2 */\r
2920
+ .dt-length {\r
2921
+ @apply inline-flex items-center gap-2;\r
2922
+ label {\r
2923
+ @apply text-sm font-normal text-muted-foreground;\r
2924
+ }\r
2925
+ select {\r
2926
+ @apply h-9 w-[70px] cursor-pointer rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus-visible:border-input focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background sm:text-sm;\r
2927
+ }\r
2928
+ }\r
2929
+ \r
2930
+ /* Search box at the top styles - v1 of datatables */\r
2931
+ .dataTables_wrapper .dataTables_filter {\r
2932
+ label {\r
2933
+ @apply inline-flex w-full cursor-pointer items-center gap-2 text-sm font-normal text-muted-foreground;\r
2934
+ input {\r
2935
+ @apply h-9 w-full rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input sm:text-sm;\r
2936
+ }\r
2937
+ }\r
2938
+ }\r
2939
+ \r
2940
+ /* Search box at the top styles -v2 */\r
2941
+ .dt-search {\r
2942
+ @apply flex items-center gap-3;\r
2943
+ label {\r
2944
+ @apply inline-flex cursor-pointer items-center gap-2 text-sm font-normal text-muted-foreground;\r
2945
+ }\r
2946
+ input {\r
2947
+ @apply h-9 w-full rounded-md border border-border bg-background px-2 py-1 transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input sm:text-sm md:w-[50%] lg:w-[250px];\r
2948
+ }\r
2949
+ }\r
2950
+ \r
2951
+ /* Info text that shows \`Showing X to XX of XXXX entries - v1 */\r
2952
+ .dataTables_wrapper .dataTables_info,\r
2953
+ .dt-info {\r
2954
+ @apply flex items-center gap-3 text-sm !text-muted-foreground;\r
2955
+ }\r
2956
+ \r
2957
+ /* Pagination button styles - v1 datatables */\r
2958
+ .dataTables_wrapper .dataTables_paginate {\r
2959
+ .paginate_button {\r
2960
+ @apply ml-1 box-border inline-flex h-9 min-w-[36px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\r
2961
+ }\r
2962
+ }\r
2963
+ /* Pagination button - v2 */\r
2964
+ .dt-paging-button {\r
2965
+ @apply ml-1 box-border inline-flex h-9 min-w-[36px] cursor-pointer items-center justify-center rounded bg-transparent px-3 py-2 text-center text-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\r
2966
+ &.current,\r
2967
+ &:hover {\r
2968
+ @apply bg-muted;\r
2969
+ }\r
2970
+ &.disabled,\r
2971
+ &.disabled:hover,\r
2972
+ &.disabled:active {\r
2973
+ @apply pointer-events-none opacity-50;\r
2974
+ }\r
2975
+ }\r
2976
+ .dataTables_wrapper .dataTables_paginate .paginate_button.current,\r
2977
+ .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {\r
2978
+ @apply bg-muted;\r
2979
+ }\r
2980
+ .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,\r
2981
+ .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,\r
2982
+ .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {\r
2983
+ @apply pointer-events-none opacity-50;\r
2984
+ }\r
2985
+ .dataTables_wrapper .dataTables_paginate .paginate_button:hover {\r
2986
+ @apply bg-muted;\r
2987
+ }\r
2988
+ .dataTables_wrapper .dataTables_paginate .paginate_button:active {\r
2989
+ @apply bg-muted;\r
2990
+ }\r
2991
+ .dataTables_wrapper .dataTables_paginate .ellipsis,\r
2992
+ .dt-paging .ellipsis {\r
2993
+ @apply inline-flex h-8 min-w-[32px] items-start justify-center text-sm;\r
2994
+ }\r
2995
+ .dataTables_wrapper .dataTables_scroll {\r
2996
+ clear: both;\r
2997
+ }\r
2998
+ .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {\r
2999
+ -webkit-overflow-scrolling: touch;\r
3000
+ }\r
3001
+ .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,\r
3002
+ .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,\r
3003
+ .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,\r
3004
+ .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {\r
3005
+ vertical-align: middle;\r
3006
+ }\r
3007
+ .dataTables_wrapper\r
3008
+ .dataTables_scroll\r
3009
+ div.dataTables_scrollBody\r
3010
+ > table\r
3011
+ > thead\r
3012
+ > tr\r
3013
+ > th\r
3014
+ > div.dataTables_sizing,\r
3015
+ .dataTables_wrapper\r
3016
+ .dataTables_scroll\r
3017
+ div.dataTables_scrollBody\r
3018
+ > table\r
3019
+ > thead\r
3020
+ > tr\r
3021
+ > td\r
3022
+ > div.dataTables_sizing,\r
3023
+ .dataTables_wrapper\r
3024
+ .dataTables_scroll\r
3025
+ div.dataTables_scrollBody\r
3026
+ > table\r
3027
+ > tbody\r
3028
+ > tr\r
3029
+ > th\r
3030
+ > div.dataTables_sizing,\r
3031
+ .dataTables_wrapper\r
3032
+ .dataTables_scroll\r
3033
+ div.dataTables_scrollBody\r
3034
+ > table\r
3035
+ > tbody\r
3036
+ > tr\r
3037
+ > td\r
3038
+ > div.dataTables_sizing {\r
3039
+ height: 0;\r
3040
+ overflow: hidden;\r
3041
+ margin: 0 !important;\r
3042
+ padding: 0 !important;\r
3043
+ }\r
3044
+ .dataTables_wrapper.no-footer .dataTables_scrollBody {\r
3045
+ @apply border-b;\r
3046
+ }\r
3047
+ .dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,\r
3048
+ .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {\r
3049
+ border-bottom: none;\r
3050
+ }\r
3051
+ .dataTables_wrapper:after {\r
3052
+ visibility: hidden;\r
3053
+ display: block;\r
3054
+ content: "";\r
3055
+ clear: both;\r
3056
+ height: 0;\r
3057
+ }\r
3058
+ \r
3059
+ /* \r
3060
+ responsive styles\r
3061
+ */\r
3062
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,\r
3063
+ table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,\r
3064
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {\r
3065
+ cursor: default !important;\r
3066
+ }\r
3067
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,\r
3068
+ table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,\r
3069
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {\r
3070
+ display: none !important;\r
3071
+ }\r
3072
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,\r
3073
+ table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {\r
3074
+ cursor: pointer;\r
3075
+ }\r
3076
+ \r
3077
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,\r
3078
+ table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {\r
3079
+ @apply mr-2 inline-flex h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-right.svg')] bg-contain bg-center bg-no-repeat pb-[3px] content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-right.svg?color=white')];\r
3080
+ }\r
3081
+ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control.arrow-right::before,\r
3082
+ table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control.arrow-right::before {\r
3083
+ content: "\u25C4";\r
3084
+ }\r
3085
+ table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,\r
3086
+ table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {\r
3087
+ @apply mr-2 inline-block h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];\r
3088
+ }\r
3089
+ table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,\r
3090
+ table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {\r
3091
+ padding-left: 0.333em;\r
3092
+ }\r
3093
+ table.dataTable.dtr-column > tbody > tr > td.dtr-control,\r
3094
+ table.dataTable.dtr-column > tbody > tr > th.dtr-control,\r
3095
+ table.dataTable.dtr-column > tbody > tr > td.control,\r
3096
+ table.dataTable.dtr-column > tbody > tr > th.control {\r
3097
+ cursor: pointer;\r
3098
+ }\r
3099
+ table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,\r
3100
+ table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,\r
3101
+ table.dataTable.dtr-column > tbody > tr > td.control:before,\r
3102
+ table.dataTable.dtr-column > tbody > tr > th.control:before {\r
3103
+ @apply mr-2 inline-flex h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-right.svg')] bg-contain bg-center bg-no-repeat pb-[3px] content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-right.svg?color=white')];\r
3104
+ }\r
3105
+ table.dataTable.dtr-column > tbody > tr > td.dtr-control.arrow-right::before,\r
3106
+ table.dataTable.dtr-column > tbody > tr > th.dtr-control.arrow-right::before,\r
3107
+ table.dataTable.dtr-column > tbody > tr > td.control.arrow-right::before,\r
3108
+ table.dataTable.dtr-column > tbody > tr > th.control.arrow-right::before {\r
3109
+ content: "\u25C4";\r
3110
+ }\r
3111
+ table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,\r
3112
+ table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,\r
3113
+ table.dataTable.dtr-column > tbody > tr.parent td.control:before,\r
3114
+ table.dataTable.dtr-column > tbody > tr.parent th.control:before {\r
3115
+ @apply mr-2 inline-block h-4 w-4 bg-[url('https://api.iconify.design/lucide:chevron-down.svg')] bg-contain bg-center bg-no-repeat content-[''] dark:bg-[url('https://api.iconify.design/lucide:chevron-down.svg?color=white')];\r
3116
+ }\r
3117
+ \r
3118
+ table.dataTable > tbody td.child {\r
3119
+ @apply p-0;\r
3120
+ }\r
3121
+ table.dataTable > tbody > tr.child:hover,\r
3122
+ table.dataTable > tbody > tr.child:hover > td.child {\r
3123
+ background: transparent !important;\r
3124
+ }\r
3125
+ table.dataTable > tbody > tr.child ul.dtr-details {\r
3126
+ @apply m-0 block w-full list-none p-0;\r
3127
+ }\r
3128
+ table.dataTable > tbody > tr.child ul.dtr-details > li {\r
3129
+ @apply border-b p-3 px-7 hover:bg-muted;\r
3130
+ }\r
3131
+ \r
3132
+ table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {\r
3133
+ @apply border-b-0;\r
3134
+ }\r
3135
+ table.dataTable > tbody > tr.child span.dtr-title {\r
3136
+ @apply inline-block min-w-[80px] font-bold;\r
3137
+ }\r
3138
+ div.dtr-modal {\r
3139
+ position: fixed;\r
3140
+ box-sizing: border-box;\r
3141
+ top: 0;\r
3142
+ left: 0;\r
3143
+ height: 100%;\r
3144
+ width: 100%;\r
3145
+ z-index: 100;\r
3146
+ padding: 10em 1em;\r
3147
+ }\r
3148
+ div.dtr-modal div.dtr-modal-display {\r
3149
+ position: absolute;\r
3150
+ top: 0;\r
3151
+ left: 0;\r
3152
+ bottom: 0;\r
3153
+ right: 0;\r
3154
+ width: 50%;\r
3155
+ height: fit-content;\r
3156
+ max-height: 75%;\r
3157
+ overflow: auto;\r
3158
+ margin: auto;\r
3159
+ z-index: 102;\r
3160
+ overflow: auto;\r
3161
+ background-color: #f5f5f7;\r
3162
+ border: 1px solid black;\r
3163
+ border-radius: 0.5em;\r
3164
+ box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);\r
3165
+ }\r
3166
+ div.dtr-modal div.dtr-modal-content {\r
3167
+ position: relative;\r
3168
+ padding: 2.5em;\r
3169
+ }\r
3170
+ div.dtr-modal div.dtr-modal-content h2 {\r
3171
+ margin-top: 0;\r
3172
+ }\r
3173
+ div.dtr-modal div.dtr-modal-close {\r
3174
+ position: absolute;\r
3175
+ top: 6px;\r
3176
+ right: 6px;\r
3177
+ width: 22px;\r
3178
+ height: 22px;\r
3179
+ text-align: center;\r
3180
+ border-radius: 3px;\r
3181
+ cursor: pointer;\r
3182
+ z-index: 12;\r
3183
+ }\r
3184
+ div.dtr-modal div.dtr-modal-background {\r
3185
+ position: fixed;\r
3186
+ top: 0;\r
3187
+ left: 0;\r
3188
+ right: 0;\r
3189
+ bottom: 0;\r
3190
+ z-index: 101;\r
3191
+ background: rgba(0, 0, 0, 0.6);\r
3192
+ }\r
3193
+ \r
3194
+ /* Search Builder Styles */\r
3195
+ div.dt-button-collection {\r
3196
+ overflow: visible !important;\r
3197
+ z-index: 2002 !important;\r
3198
+ }\r
3199
+ div.dt-button-collection div.dtsb-searchBuilder {\r
3200
+ padding-left: 1em !important;\r
3201
+ padding-right: 1em !important;\r
3202
+ }\r
3203
+ div.dt-button-collection.dtb-collection-closeable div.dtsb-titleRow {\r
3204
+ padding-right: 40px;\r
3205
+ }\r
3206
+ .dtsb-greyscale {\r
3207
+ @apply !border;\r
3208
+ }\r
3209
+ div.dtsb-logicContainer .dtsb-greyscale {\r
3210
+ border: none !important;\r
3211
+ }\r
3212
+ div.dtsb-searchBuilder {\r
3213
+ @apply mb-4 cursor-default justify-evenly text-left;\r
3214
+ }\r
3215
+ div.dtsb-searchBuilder button.dtsb-button,\r
3216
+ div.dtsb-searchBuilder select {\r
3217
+ @apply text-sm;\r
3218
+ }\r
3219
+ div.dtsb-searchBuilder div.dtsb-titleRow {\r
3220
+ @apply mb-3 flex items-center justify-between;\r
3221
+ }\r
3222
+ div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title {\r
3223
+ @apply inline-block text-sm font-normal;\r
3224
+ }\r
3225
+ div.dtsb-searchBuilder div.dtsb-titleRow div.dtsb-title:empty {\r
3226
+ display: inline;\r
3227
+ }\r
3228
+ div.dtsb-searchBuilder div.dtsb-vertical .dtsb-value,\r
3229
+ div.dtsb-searchBuilder div.dtsb-vertical .dtsb-data,\r
3230
+ div.dtsb-searchBuilder div.dtsb-vertical .dtsb-condition {\r
3231
+ display: block;\r
3232
+ }\r
3233
+ div.dtsb-searchBuilder div.dtsb-group {\r
3234
+ @apply relative clear-both mb-4;\r
3235
+ }\r
3236
+ div.dtsb-searchBuilder div.dtsb-group button.dtsb-search {\r
3237
+ float: right;\r
3238
+ }\r
3239
+ div.dtsb-searchBuilder div.dtsb-group button.dtsb-clearGroup {\r
3240
+ margin: 2px;\r
3241
+ text-align: center;\r
3242
+ padding: 0;\r
3243
+ }\r
3244
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {\r
3245
+ -webkit-transform: rotate(90deg);\r
3246
+ -moz-transform: rotate(90deg);\r
3247
+ -o-transform: rotate(90deg);\r
3248
+ -ms-transform: rotate(90deg);\r
3249
+ transform: rotate(90deg);\r
3250
+ position: absolute;\r
3251
+ margin-top: 0.8em;\r
3252
+ margin-right: 0.8em;\r
3253
+ }\r
3254
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {\r
3255
+ margin-bottom: 0.8em;\r
3256
+ display: flex;\r
3257
+ justify-content: flex-start;\r
3258
+ flex-flow: row wrap;\r
3259
+ }\r
3260
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\r
3261
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\r
3262
+ padding: 0.4em;\r
3263
+ margin-right: 0.8em;\r
3264
+ min-width: 5em;\r
3265
+ max-width: 20em;\r
3266
+ color: inherit;\r
3267
+ }\r
3268
+ div.dtsb-searchBuilder\r
3269
+ div.dtsb-group\r
3270
+ div.dtsb-criteria\r
3271
+ select.dtsb-dropDown\r
3272
+ option.dtsb-notItalic,\r
3273
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input option.dtsb-notItalic {\r
3274
+ font-style: normal;\r
3275
+ }\r
3276
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-italic {\r
3277
+ font-style: italic;\r
3278
+ }\r
3279
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {\r
3280
+ flex: 1;\r
3281
+ white-space: nowrap;\r
3282
+ }\r
3283
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont span.dtsp-joiner {\r
3284
+ margin-right: 0.8em;\r
3285
+ }\r
3286
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input.dtsb-value {\r
3287
+ width: 33%;\r
3288
+ }\r
3289
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont select,\r
3290
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont input {\r
3291
+ height: 100%;\r
3292
+ box-sizing: border-box;\r
3293
+ }\r
3294
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {\r
3295
+ margin-left: auto;\r
3296
+ display: inline-block;\r
3297
+ }\r
3298
+ div.dtsb-searchBuilder\r
3299
+ div.dtsb-group\r
3300
+ div.dtsb-criteria\r
3301
+ div.dtsb-buttonContainer\r
3302
+ button.dtsb-delete,\r
3303
+ div.dtsb-searchBuilder\r
3304
+ div.dtsb-group\r
3305
+ div.dtsb-criteria\r
3306
+ div.dtsb-buttonContainer\r
3307
+ button.dtsb-right,\r
3308
+ div.dtsb-searchBuilder\r
3309
+ div.dtsb-group\r
3310
+ div.dtsb-criteria\r
3311
+ div.dtsb-buttonContainer\r
3312
+ button.dtsb-left {\r
3313
+ margin-right: 0.8em;\r
3314
+ }\r
3315
+ div.dtsb-searchBuilder\r
3316
+ div.dtsb-group\r
3317
+ div.dtsb-criteria\r
3318
+ div.dtsb-buttonContainer\r
3319
+ button.dtsb-delete:last-child,\r
3320
+ div.dtsb-searchBuilder\r
3321
+ div.dtsb-group\r
3322
+ div.dtsb-criteria\r
3323
+ div.dtsb-buttonContainer\r
3324
+ button.dtsb-right:last-child,\r
3325
+ div.dtsb-searchBuilder\r
3326
+ div.dtsb-group\r
3327
+ div.dtsb-criteria\r
3328
+ div.dtsb-buttonContainer\r
3329
+ button.dtsb-left:last-child {\r
3330
+ margin-right: 0;\r
3331
+ }\r
3332
+ @media screen and (max-width: 550px) {\r
3333
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria {\r
3334
+ display: flex;\r
3335
+ flex-flow: none;\r
3336
+ flex-direction: column;\r
3337
+ justify-content: flex-start;\r
3338
+ padding-right: calc(35px + 0.8em);\r
3339
+ margin-bottom: 0px;\r
3340
+ }\r
3341
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:first-child),\r
3342
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:nth-child(2)),\r
3343
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:not(:last-child) {\r
3344
+ padding-top: 0.8em;\r
3345
+ }\r
3346
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:first-child,\r
3347
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:nth-child(2),\r
3348
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria:last-child {\r
3349
+ padding-top: 0em;\r
3350
+ }\r
3351
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\r
3352
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\r
3353
+ max-width: none;\r
3354
+ width: 100%;\r
3355
+ margin-bottom: 0.8em;\r
3356
+ margin-right: 0.8em;\r
3357
+ }\r
3358
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-inputCont {\r
3359
+ margin-right: 0.8em;\r
3360
+ }\r
3361
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer {\r
3362
+ position: absolute;\r
3363
+ width: 35px;\r
3364
+ display: flex;\r
3365
+ flex-wrap: wrap-reverse;\r
3366
+ right: 0;\r
3367
+ }\r
3368
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria div.dtsb-buttonContainer button {\r
3369
+ margin-right: 0px !important;\r
3370
+ }\r
3371
+ }\r
3372
+ div.dtsb-searchBuilder button,\r
3373
+ div.dtsb-searchBuilder select.dtsb-dropDown,\r
3374
+ div.dtsb-searchBuilder input {\r
3375
+ @apply bg-background;\r
3376
+ }\r
3377
+ div.dtsb-searchBuilder button.dtsb-button {\r
3378
+ @apply relative box-border inline-flex h-9 cursor-pointer select-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-md border bg-background px-3 py-2 text-sm font-normal text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background;\r
3379
+ }\r
3380
+ div.dtsb-searchBuilder button.dtsb-button:hover {\r
3381
+ @apply cursor-pointer bg-muted;\r
3382
+ }\r
3383
+ div.dtsb-searchBuilder div.dtsb-logicContainer {\r
3384
+ @apply overflow-hidden rounded-none border;\r
3385
+ }\r
3386
+ div.dtsb-searchBuilder div.dtsb-logicContainer button {\r
3387
+ @apply rounded-md border-transparent bg-transparent;\r
3388
+ }\r
3389
+ div.dtsb-searchBuilder button.dtsb-clearGroup {\r
3390
+ min-width: 2em;\r
3391
+ padding: 0;\r
3392
+ }\r
3393
+ div.dtsb-searchBuilder button.dtsb-iptbtn {\r
3394
+ min-width: 100px;\r
3395
+ text-align: left;\r
3396
+ }\r
3397
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer {\r
3398
+ @apply flex flex-row content-start items-start justify-start rounded-md;\r
3399
+ }\r
3400
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-logic {\r
3401
+ @apply m-0 shrink-0 grow rounded-none border-0;\r
3402
+ flex-basis: 3em;\r
3403
+ }\r
3404
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-logicContainer button.dtsb-clearGroup {\r
3405
+ border: none;\r
3406
+ border-radius: 0px;\r
3407
+ width: 2em;\r
3408
+ margin: 0px;\r
3409
+ }\r
3410
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-dropDown,\r
3411
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-input {\r
3412
+ @apply rounded-md border;\r
3413
+ }\r
3414
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-condition,\r
3415
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-data,\r
3416
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria select.dtsb-value {\r
3417
+ @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;\r
3418
+ }\r
3419
+ \r
3420
+ div.dtsb-searchBuilder div.dtsb-group div.dtsb-criteria input.dtsb-value {\r
3421
+ @apply rounded-md border border-input bg-background text-sm transition focus:border-primary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background focus-visible:border-input;\r
3422
+ }\r
3423
+ \r
3424
+ /* Col vis styles */\r
3425
+ .dt-button-background {\r
3426
+ @apply fixed inset-0 z-50 flex flex-col items-center justify-center bg-background/50 backdrop-blur-sm;\r
3427
+ }\r
3428
+ .dt-button-down-arrow {\r
3429
+ @apply text-[10px];\r
3430
+ }\r
3431
+ .dt-button-collection {\r
3432
+ @apply relative;\r
3433
+ [role="menu"] {\r
3434
+ @apply absolute -left-20 top-7 flex min-w-[200px] flex-col rounded-md border bg-background py-2 shadow before:mx-2 before:mb-2 before:text-xs before:text-muted-foreground/70 before:content-['Select_columns'];\r
3435
+ button {\r
3436
+ @apply h-8 rounded-none border-none px-4 text-xs;\r
3437
+ }\r
3438
+ .dt-button.buttons-columnVisibility.dt-button-active {\r
3439
+ @apply text-foreground after:ml-auto after:content-['\u2713'];\r
3440
+ }\r
3441
+ }\r
3442
+ }\r
3443
+ </style>\r
3342
3444
  `}],utils:[],composables:[]},{name:"Date Field",value:"date-field",devDeps:["@internationalized/date"],files:[{fileName:"DateField.vue",dirPath:"components/UI",fileContent:`<template>
3343
3445
  <DateFieldRoot
3344
3446
  v-slot="{ segments, modelValue, isInvalid }"
@@ -3839,155 +3941,155 @@ export default defineNuxtPlugin((nuxtApp) => {
3839
3941
 
3840
3942
  const { base, border, container, icon: iconClass, label: labelClass } = style();
3841
3943
  </script>
3842
- `}],utils:[],composables:[],plugins:[]},{name:"Drawer",value:"drawer",deps:["vaul-vue"],files:[{fileName:"Drawer/Close.vue",dirPath:"components/UI",fileContent:`<template>
3843
- <DrawerClose v-bind="props">
3844
- <slot />
3845
- </DrawerClose>
3846
- </template>
3847
-
3848
- <script lang="ts" setup>
3849
- import { DrawerClose } from "vaul-vue";
3850
-
3851
- interface Props
3852
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerClose>, "$props">> {}
3853
- const props = defineProps<Props>();
3854
- </script>
3855
- `},{fileName:"Drawer/Content.vue",dirPath:"components/UI",fileContent:`<template>
3856
- <UiDrawerPortal>
3857
- <slot name="overlay">
3858
- <UiDrawerOverlay />
3859
- </slot>
3860
- <slot name="content">
3861
- <DrawerContent v-bind="{ ...props, ...$attrs }" :class="styles({ class: props.class })">
3862
- <slot name="knob">
3863
- <div
3864
- className="mx-auto shrink-0 cursor-grab active:cursor-grabbing my-5 h-2 w-[60px] rounded-full bg-muted"
3865
- />
3866
- </slot>
3867
- <slot />
3868
- </DrawerContent>
3869
- </slot>
3870
- </UiDrawerPortal>
3871
- </template>
3872
-
3873
- <script lang="ts" setup>
3874
- import { DrawerContent } from "vaul-vue";
3875
-
3876
- defineOptions({ inheritAttrs: false });
3877
-
3878
- interface Props
3879
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerContent>, "$props">> {}
3880
-
3881
- const props = defineProps<Props & { class?: any }>();
3882
- const styles = tv({
3883
- base: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex h-auto max-h-[95%] flex-col rounded-t-[10px] border bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40",
3884
- });
3885
- </script>
3886
- `},{fileName:"Drawer/Description.vue",dirPath:"components/UI",fileContent:`<template>
3887
- <DrawerDescription v-bind="props" :class="styles({ class: props.class })">
3888
- <slot>
3889
- {{ props.text }}
3890
- </slot>
3891
- </DrawerDescription>
3892
- </template>
3893
-
3894
- <script lang="ts" setup>
3895
- import { DrawerDescription } from "vaul-vue";
3896
-
3897
- interface Props
3898
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerDescription>, "$props">> {
3899
- class?: any;
3900
- text?: string;
3901
- }
3902
-
3903
- const props = defineProps<Props>();
3904
-
3905
- const styles = tv({
3906
- base: "text-sm text-muted-foreground",
3907
- });
3908
- </script>
3909
- `},{fileName:"Drawer/Drawer.vue",dirPath:"components/UI",fileContent:`<template>
3910
- <DrawerRoot v-bind="forwarded">
3911
- <slot />
3912
- </DrawerRoot>
3913
- </template>
3914
-
3915
- <script lang="ts" setup>
3916
- import { useForwardPropsEmits } from "radix-vue";
3917
- import { DrawerRoot } from "vaul-vue";
3918
- import type { DrawerRootEmits, DrawerRootProps } from "vaul-vue";
3919
-
3920
- const props = defineProps<DrawerRootProps>();
3921
- const emits = defineEmits<DrawerRootEmits>();
3922
- const forwarded = useForwardPropsEmits(props, emits);
3923
- </script>
3924
- `},{fileName:"Drawer/Overlay.vue",dirPath:"components/UI",fileContent:`<template>
3925
- <DrawerOverlay v-bind="props" :class="styles({ class: props.class })" />
3926
- </template>
3927
-
3928
- <script lang="ts" setup>
3929
- import { DrawerOverlay } from "vaul-vue";
3930
-
3931
- interface Props
3932
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerOverlay>, "$props">> {}
3933
-
3934
- const props = defineProps<Props & { class?: any }>();
3935
-
3936
- const styles = tv({
3937
- base: "fixed inset-0 z-50 bg-black/40 backdrop-blur",
3938
- });
3939
- </script>
3940
- `},{fileName:"Drawer/Portal.vue",dirPath:"components/UI",fileContent:`<template>
3941
- <DrawerPortal v-bind="props">
3942
- <slot />
3943
- </DrawerPortal>
3944
- </template>
3945
-
3946
- <script lang="ts" setup>
3947
- import { DrawerPortal } from "vaul-vue";
3948
-
3949
- interface Props
3950
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerPortal>, "$props">> {}
3951
-
3952
- const props = defineProps<Props>();
3953
- </script>
3954
- `},{fileName:"Drawer/Title.vue",dirPath:"components/UI",fileContent:`<template>
3955
- <DrawerTitle v-bind="props" :class="styles({ class: props.class })">
3956
- <slot>
3957
- {{ props.text }}
3958
- </slot>
3959
- </DrawerTitle>
3960
- </template>
3961
-
3962
- <script lang="ts" setup>
3963
- import { DrawerTitle } from "vaul-vue";
3964
-
3965
- interface Props
3966
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTitle>, "$props">> {
3967
- class?: any;
3968
- text?: string;
3969
- }
3970
-
3971
- const props = defineProps<Props>();
3972
-
3973
- const styles = tv({
3974
- base: "text-lg font-semibold leading-none tracking-tight",
3975
- });
3976
- </script>
3977
- `},{fileName:"Drawer/Trigger.vue",dirPath:"components/UI",fileContent:`<template>
3978
- <DrawerTrigger v-bind="props">
3979
- <slot />
3980
- </DrawerTrigger>
3981
- </template>
3982
-
3983
- <script lang="ts" setup>
3984
- import { DrawerTrigger } from "vaul-vue";
3985
-
3986
- interface Props
3987
- extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTrigger>, "$props">> {}
3988
-
3989
- const props = defineProps<Props>();
3990
- </script>
3944
+ `}],utils:[],composables:[],plugins:[]},{name:"Drawer",value:"drawer",deps:["vaul-vue"],files:[{fileName:"Drawer/Close.vue",dirPath:"components/UI",fileContent:`<template>\r
3945
+ <DrawerClose v-bind="props">\r
3946
+ <slot />\r
3947
+ </DrawerClose>\r
3948
+ </template>\r
3949
+ \r
3950
+ <script lang="ts" setup>\r
3951
+ import { DrawerClose } from "vaul-vue";\r
3952
+ \r
3953
+ interface Props\r
3954
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerClose>, "$props">> {}\r
3955
+ const props = defineProps<Props>();\r
3956
+ </script>\r
3957
+ `},{fileName:"Drawer/Content.vue",dirPath:"components/UI",fileContent:`<template>\r
3958
+ <UiDrawerPortal>\r
3959
+ <slot name="overlay">\r
3960
+ <UiDrawerOverlay />\r
3961
+ </slot>\r
3962
+ <slot name="content">\r
3963
+ <DrawerContent v-bind="{ ...props, ...$attrs }" :class="styles({ class: props.class })">\r
3964
+ <slot name="knob">\r
3965
+ <div\r
3966
+ className="mx-auto shrink-0 cursor-grab active:cursor-grabbing my-5 h-2 w-[60px] rounded-full bg-muted"\r
3967
+ />\r
3968
+ </slot>\r
3969
+ <slot />\r
3970
+ </DrawerContent>\r
3971
+ </slot>\r
3972
+ </UiDrawerPortal>\r
3973
+ </template>\r
3974
+ \r
3975
+ <script lang="ts" setup>\r
3976
+ import { DrawerContent } from "vaul-vue";\r
3977
+ \r
3978
+ defineOptions({ inheritAttrs: false });\r
3979
+ \r
3980
+ interface Props\r
3981
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerContent>, "$props">> {}\r
3982
+ \r
3983
+ const props = defineProps<Props & { class?: any }>();\r
3984
+ const styles = tv({\r
3985
+ base: "fixed bottom-0 left-0 right-0 z-50 mt-24 flex h-auto max-h-[95%] flex-col rounded-t-[10px] border bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary/40",\r
3986
+ });\r
3987
+ </script>\r
3988
+ `},{fileName:"Drawer/Description.vue",dirPath:"components/UI",fileContent:`<template>\r
3989
+ <DrawerDescription v-bind="props" :class="styles({ class: props.class })">\r
3990
+ <slot>\r
3991
+ {{ props.text }}\r
3992
+ </slot>\r
3993
+ </DrawerDescription>\r
3994
+ </template>\r
3995
+ \r
3996
+ <script lang="ts" setup>\r
3997
+ import { DrawerDescription } from "vaul-vue";\r
3998
+ \r
3999
+ interface Props\r
4000
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerDescription>, "$props">> {\r
4001
+ class?: any;\r
4002
+ text?: string;\r
4003
+ }\r
4004
+ \r
4005
+ const props = defineProps<Props>();\r
4006
+ \r
4007
+ const styles = tv({\r
4008
+ base: "text-sm text-muted-foreground",\r
4009
+ });\r
4010
+ </script>\r
4011
+ `},{fileName:"Drawer/Drawer.vue",dirPath:"components/UI",fileContent:`<template>\r
4012
+ <DrawerRoot v-bind="forwarded">\r
4013
+ <slot />\r
4014
+ </DrawerRoot>\r
4015
+ </template>\r
4016
+ \r
4017
+ <script lang="ts" setup>\r
4018
+ import { useForwardPropsEmits } from "radix-vue";\r
4019
+ import { DrawerRoot } from "vaul-vue";\r
4020
+ import type { DrawerRootEmits, DrawerRootProps } from "vaul-vue";\r
4021
+ \r
4022
+ const props = defineProps<DrawerRootProps>();\r
4023
+ const emits = defineEmits<DrawerRootEmits>();\r
4024
+ const forwarded = useForwardPropsEmits(props, emits);\r
4025
+ </script>\r
4026
+ `},{fileName:"Drawer/Overlay.vue",dirPath:"components/UI",fileContent:`<template>\r
4027
+ <DrawerOverlay v-bind="props" :class="styles({ class: props.class })" />\r
4028
+ </template>\r
4029
+ \r
4030
+ <script lang="ts" setup>\r
4031
+ import { DrawerOverlay } from "vaul-vue";\r
4032
+ \r
4033
+ interface Props\r
4034
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerOverlay>, "$props">> {}\r
4035
+ \r
4036
+ const props = defineProps<Props & { class?: any }>();\r
4037
+ \r
4038
+ const styles = tv({\r
4039
+ base: "fixed inset-0 z-50 bg-black/40 backdrop-blur",\r
4040
+ });\r
4041
+ </script>\r
4042
+ `},{fileName:"Drawer/Portal.vue",dirPath:"components/UI",fileContent:`<template>\r
4043
+ <DrawerPortal v-bind="props">\r
4044
+ <slot />\r
4045
+ </DrawerPortal>\r
4046
+ </template>\r
4047
+ \r
4048
+ <script lang="ts" setup>\r
4049
+ import { DrawerPortal } from "vaul-vue";\r
4050
+ \r
4051
+ interface Props\r
4052
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerPortal>, "$props">> {}\r
4053
+ \r
4054
+ const props = defineProps<Props>();\r
4055
+ </script>\r
4056
+ `},{fileName:"Drawer/Title.vue",dirPath:"components/UI",fileContent:`<template>\r
4057
+ <DrawerTitle v-bind="props" :class="styles({ class: props.class })">\r
4058
+ <slot>\r
4059
+ {{ props.text }}\r
4060
+ </slot>\r
4061
+ </DrawerTitle>\r
4062
+ </template>\r
4063
+ \r
4064
+ <script lang="ts" setup>\r
4065
+ import { DrawerTitle } from "vaul-vue";\r
4066
+ \r
4067
+ interface Props\r
4068
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTitle>, "$props">> {\r
4069
+ class?: any;\r
4070
+ text?: string;\r
4071
+ }\r
4072
+ \r
4073
+ const props = defineProps<Props>();\r
4074
+ \r
4075
+ const styles = tv({\r
4076
+ base: "text-lg font-semibold leading-none tracking-tight",\r
4077
+ });\r
4078
+ </script>\r
4079
+ `},{fileName:"Drawer/Trigger.vue",dirPath:"components/UI",fileContent:`<template>\r
4080
+ <DrawerTrigger v-bind="props">\r
4081
+ <slot />\r
4082
+ </DrawerTrigger>\r
4083
+ </template>\r
4084
+ \r
4085
+ <script lang="ts" setup>\r
4086
+ import { DrawerTrigger } from "vaul-vue";\r
4087
+ \r
4088
+ interface Props\r
4089
+ extends /* @vue-ignore */ Partial<Pick<InstanceType<typeof DrawerTrigger>, "$props">> {}\r
4090
+ \r
4091
+ const props = defineProps<Props>();\r
4092
+ </script>\r
3991
4093
  `}],utils:[],composables:[],plugins:[]},{name:"Dropdown Menu",value:"dropdown-menu",files:[{fileName:"DropdownMenu/Arrow.vue",dirPath:"components/UI",fileContent:`<template>
3992
4094
  <DropdownMenuArrow
3993
4095
  v-bind="reactiveOmit(props, 'class')"
@@ -4437,104 +4539,104 @@ export default defineNuxtPlugin((nuxtApp) => {
4437
4539
 
4438
4540
  const props = defineProps<DropdownMenuTriggerProps>();
4439
4541
  </script>
4440
- `}],utils:[],composables:[],plugins:[]},{name:"Dropfile",value:"dropfile",files:[{fileName:"Dropfile.vue",dirPath:"components/UI",fileContent:`<template>
4441
- <div @click="open()" ref="dropZoneRef" :class="styles({ isOverDropZone, class: props.class })">
4442
- <slot name="message">
4443
- <div class="py-10 text-center">
4444
- <slot name="icon">
4445
- <div
4446
- v-if="icon"
4447
- class="inline-flex items-center justify-center rounded-md border p-2 transition"
4448
- :class="[isOverDropZone && 'animate-bounce border-primary']"
4449
- >
4450
- <Icon
4451
- :name="icon"
4452
- class="h-7 w-7 opacity-70"
4453
- :class="[isOverDropZone && 'text-primary']"
4454
- />
4455
- </div>
4456
- </slot>
4457
- <slot name="title">
4458
- <p class="mt-5 text-sm font-medium" v-html="title"></p>
4459
- </slot>
4460
- <slot name="subtext">
4461
- <p class="mt-1 text-sm text-muted-foreground/60" v-html="subtext"></p>
4462
- </slot>
4463
- </div>
4464
- </slot>
4465
- </div>
4466
- </template>
4467
-
4468
- <script setup lang="ts">
4469
- const props = withDefaults(
4470
- defineProps<{
4471
- /**
4472
- * The text to display as the title of the dropzone.
4473
- */
4474
- title?: string;
4475
- /**
4476
- * The text to display as the subtext of the dropzone.
4477
- */
4478
- subtext?: string;
4479
- /**
4480
- * The icon to display in the dropzone.
4481
- */
4482
- icon?: string;
4483
- /**
4484
- * The function to call when files are dropped.
4485
- */
4486
- onDrop?: Function;
4487
- /**
4488
- * Whether or not to allow multiple files to be picked. Does not affect drag and drop.
4489
- */
4490
- multiple?: boolean;
4491
- /**
4492
- * The file types to accept. Does not affect drag and drop.
4493
- */
4494
- accept?: string;
4495
- class?: any;
4496
- }>(),
4497
- {
4498
- title: "Click to upload or drag & drop files.",
4499
- subtext: "All file types accepted",
4500
- icon: "heroicons:cloud-arrow-up",
4501
- multiple: true,
4502
- accept: "*",
4503
- }
4504
- );
4505
-
4506
- const { open, reset, onChange } = useFileDialog({
4507
- multiple: props.multiple,
4508
- accept: props.accept,
4509
- });
4510
-
4511
- onChange((files: FileList | null) => {
4512
- if (files?.length) {
4513
- handleDrop(Array.from(files || []))
4514
- reset()
4515
- }
4516
- })
4517
-
4518
- const dropZoneRef = ref<HTMLDivElement>();
4519
- const emits = defineEmits<{
4520
- dropped: [any];
4521
- }>();
4522
-
4523
- const handleDrop = (files: File[] | null) => {
4524
- if (!files) return;
4525
- if (props.onDrop) props.onDrop(files);
4526
- emits("dropped", files);
4527
- };
4528
-
4529
- const { isOverDropZone } = useDropZone(dropZoneRef, handleDrop);
4530
-
4531
- const styles = tv({
4532
- base: "flex w-full cursor-pointer items-center justify-center rounded-md border border-dashed transition hover:border-primary",
4533
- variants: {
4534
- isOverDropZone: { true: "border-primary bg-primary/10" },
4535
- },
4536
- });
4537
- </script>
4542
+ `}],utils:[],composables:[],plugins:[]},{name:"Dropfile",value:"dropfile",files:[{fileName:"Dropfile.vue",dirPath:"components/UI",fileContent:`<template>\r
4543
+ <div @click="open()" ref="dropZoneRef" :class="styles({ isOverDropZone, class: props.class })">\r
4544
+ <slot name="message">\r
4545
+ <div class="py-10 text-center">\r
4546
+ <slot name="icon">\r
4547
+ <div\r
4548
+ v-if="icon"\r
4549
+ class="inline-flex items-center justify-center rounded-md border p-2 transition"\r
4550
+ :class="[isOverDropZone && 'animate-bounce border-primary']"\r
4551
+ >\r
4552
+ <Icon\r
4553
+ :name="icon"\r
4554
+ class="h-7 w-7 opacity-70"\r
4555
+ :class="[isOverDropZone && 'text-primary']"\r
4556
+ />\r
4557
+ </div>\r
4558
+ </slot>\r
4559
+ <slot name="title">\r
4560
+ <p class="mt-5 text-sm font-medium" v-html="title"></p>\r
4561
+ </slot>\r
4562
+ <slot name="subtext">\r
4563
+ <p class="mt-1 text-sm text-muted-foreground/60" v-html="subtext"></p>\r
4564
+ </slot>\r
4565
+ </div>\r
4566
+ </slot>\r
4567
+ </div>\r
4568
+ </template>\r
4569
+ \r
4570
+ <script setup lang="ts">\r
4571
+ const props = withDefaults(\r
4572
+ defineProps<{\r
4573
+ /**\r
4574
+ * The text to display as the title of the dropzone.\r
4575
+ */\r
4576
+ title?: string;\r
4577
+ /**\r
4578
+ * The text to display as the subtext of the dropzone.\r
4579
+ */\r
4580
+ subtext?: string;\r
4581
+ /**\r
4582
+ * The icon to display in the dropzone.\r
4583
+ */\r
4584
+ icon?: string;\r
4585
+ /**\r
4586
+ * The function to call when files are dropped.\r
4587
+ */\r
4588
+ onDrop?: Function;\r
4589
+ /**\r
4590
+ * Whether or not to allow multiple files to be picked. Does not affect drag and drop.\r
4591
+ */\r
4592
+ multiple?: boolean;\r
4593
+ /**\r
4594
+ * The file types to accept. Does not affect drag and drop.\r
4595
+ */\r
4596
+ accept?: string;\r
4597
+ class?: any;\r
4598
+ }>(),\r
4599
+ {\r
4600
+ title: "Click to upload or drag & drop files.",\r
4601
+ subtext: "All file types accepted",\r
4602
+ icon: "heroicons:cloud-arrow-up",\r
4603
+ multiple: true,\r
4604
+ accept: "*",\r
4605
+ }\r
4606
+ );\r
4607
+ \r
4608
+ const { open, reset, onChange } = useFileDialog({\r
4609
+ multiple: props.multiple,\r
4610
+ accept: props.accept,\r
4611
+ });\r
4612
+ \r
4613
+ onChange((files: FileList | null) => {\r
4614
+ if (files?.length) {\r
4615
+ handleDrop(Array.from(files || []))\r
4616
+ reset()\r
4617
+ }\r
4618
+ })\r
4619
+ \r
4620
+ const dropZoneRef = ref<HTMLDivElement>();\r
4621
+ const emits = defineEmits<{\r
4622
+ dropped: [any];\r
4623
+ }>();\r
4624
+ \r
4625
+ const handleDrop = (files: File[] | null) => {\r
4626
+ if (!files) return;\r
4627
+ if (props.onDrop) props.onDrop(files);\r
4628
+ emits("dropped", files);\r
4629
+ };\r
4630
+ \r
4631
+ const { isOverDropZone } = useDropZone(dropZoneRef, handleDrop);\r
4632
+ \r
4633
+ const styles = tv({\r
4634
+ base: "flex w-full cursor-pointer items-center justify-center rounded-md border border-dashed transition hover:border-primary",\r
4635
+ variants: {\r
4636
+ isOverDropZone: { true: "border-primary bg-primary/10" },\r
4637
+ },\r
4638
+ });\r
4639
+ </script>\r
4538
4640
  `}],utils:[],composables:[],plugins:[]},{name:"Form",value:"form",deps:["@vee-validate/nuxt"],nuxtModules:["@vee-validate/nuxt"],composables:[{fileName:"useFormField.ts",dirPath:"composables",fileContent:`import { FORM_ITEM_INJECTION_KEY } from "@/components/Ui/Form/Item.vue";
4539
4641
  import {
4540
4642
  FieldContextKey,