comp-hub 0.28.2 → 0.28.4
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/README.md +132 -132
- package/bin/cli.js +54 -54
- package/bin/lib/commands.js +173 -173
- package/bin/lib/constants.js +22 -22
- package/bin/lib/http.js +62 -62
- package/bin/lib/startup.js +183 -183
- package/bin/lib/utils.js +112 -112
- package/dist/index.js +17 -17
- package/dist/website/container/assets/index-CVxgDysj.js +14 -0
- package/dist/website/container/assets/index-h6S5dyy4.css +1 -0
- package/dist/website/container/index.html +32 -32
- package/dist/website/container/js/vue2-sfc-loader.js +260 -260
- package/dist/website/container/js/vue3-sfc-loader.js +289 -289
- package/dist/website/item/assets/index-CGgDhzaN.js +39 -0
- package/dist/website/item/assets/index-lq3uP4DP.css +1 -0
- package/dist/website/item/index.html +30 -30
- package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CP9hjm3T.js +1 -0
- package/dist/website/main/assets/{BaseDialog.vue_vue_type_script_setup_true_lang-CgV6_zzd.js → BaseDialog.vue_vue_type_script_setup_true_lang-BROcUfEh.js} +1 -1
- package/dist/website/main/assets/{BaseSegmented.vue_vue_type_script_setup_true_lang-CW16Y3Jx.js → BaseSegmented.vue_vue_type_script_setup_true_lang-DU79Plk1.js} +1 -1
- package/dist/website/main/assets/{CanvasAnimation.vue_vue_type_script_setup_true_lang-Bvp_ZzUC.js → CanvasAnimation.vue_vue_type_script_setup_true_lang-gAGMSPxq.js} +1 -1
- package/dist/website/main/assets/{EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CofI0Rvq.js → EmptyStatusContainer.vue_vue_type_script_setup_true_lang-pswB5SUz.js} +1 -1
- package/dist/website/main/assets/{LoadingWrapper.vue_vue_type_script_setup_true_lang-bBtkKtmz.js → LoadingWrapper.vue_vue_type_script_setup_true_lang-kJcgjuK5.js} +1 -1
- package/dist/website/main/assets/{PanelBackground.vue_vue_type_script_setup_true_lang-DBIlZFl0.js → PanelBackground.vue_vue_type_script_setup_true_lang-BELCrrRh.js} +1 -1
- package/dist/website/main/assets/{cloud-upload-BRjLuSi4.js → cloud-upload-Cdco6849.js} +1 -1
- package/dist/website/main/assets/{core-B1GcTOER.js → core-CcVTMiBP.js} +1 -1
- package/dist/website/main/assets/{el-table-column-8qfe8CVK.js → el-table-column-CGzXlVpD.js} +1 -1
- package/dist/website/main/assets/{home-rounded-8qNxvN2I.js → home-rounded-BhKYWFxg.js} +1 -1
- package/dist/website/main/assets/{index-BbWYQKfr.css → index-B-RD5UzD.css} +1 -1
- package/dist/website/main/assets/index-BGAeKS26.js +2 -0
- package/dist/website/main/assets/index-BUoUeU3q.js +1 -0
- package/dist/website/main/assets/index-BXRWapP9.js +1 -0
- package/dist/website/main/assets/index-Bb4dzB_t.js +1 -0
- package/dist/website/main/assets/index-BbVoROfE.js +1 -0
- package/dist/website/main/assets/index-BjMNHNZQ.js +1 -0
- package/dist/website/main/assets/{index-0Y9kW7YJ.js → index-BoIy-5_p.js} +1 -1
- package/dist/website/main/assets/index-C1KlLhF1.js +1 -0
- package/dist/website/main/assets/index-CEizeGti.js +1 -0
- package/dist/website/main/assets/index-CKuqpXAR.js +1 -0
- package/dist/website/main/assets/{index-DoTR7Juh.css → index-CNqahi2L.css} +1 -1
- package/dist/website/main/assets/index-CP6sOfKF.css +1 -0
- package/dist/website/main/assets/index-Cacmn-le.js +1 -0
- package/dist/website/main/assets/index-Car8xTN1.js +1 -0
- package/dist/website/main/assets/{index-BbT8J87U.js → index-Cd1GqG9-.js} +14 -14
- package/dist/website/main/assets/index-Cdv-VxRL.js +2 -0
- package/dist/website/main/assets/{index-DxyEzkir.css → index-Cl0SK7oa.css} +1 -1
- package/dist/website/main/assets/index-CmSN0r9I.css +1 -0
- package/dist/website/main/assets/{index-DAzjyaU7.js → index-D26LViqE.js} +1 -1
- package/dist/website/main/assets/index-D4vHIupw.js +1 -0
- package/dist/website/main/assets/index-D62zqHYv.js +1 -0
- package/dist/website/main/assets/{index-D14ffQA8.js → index-DGh9vJu4.js} +1 -1
- package/dist/website/main/assets/index-DJ4AvgpT.css +1 -0
- package/dist/website/main/assets/{index-DZjtRMOp.js → index-DKb_LuTB.js} +2 -2
- package/dist/website/main/assets/index-DNWHN_5F.js +1 -0
- package/dist/website/main/assets/index-D_mLoa5V.js +1 -0
- package/dist/website/main/assets/{index-CYFm50TZ.js → index-DcbQ_ahf.js} +1 -1
- package/dist/website/main/assets/index-Dp1XrCJD.js +1 -0
- package/dist/website/main/assets/index-DroKXXhR.js +1 -0
- package/dist/website/main/assets/index-JcGCRZej.js +1 -0
- package/dist/website/main/assets/{index-B0VzfFN6.js → index-RTrUAzmO.js} +1 -1
- package/dist/website/main/assets/index-VFwGpUE-.css +1 -0
- package/dist/website/main/assets/{index-BrvU6RCl.js → index-WPdppQti.js} +1 -1
- package/dist/website/main/assets/index-XEEaWsyW.js +1 -0
- package/dist/website/main/assets/{index-D0mMVLUA.js → index-eyM0Chsl.js} +1 -1
- package/dist/website/main/assets/index-gswaBdwW.js +4 -0
- package/dist/website/main/assets/index-tCnrZXQC.js +1 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-0kHDvgX-.js +2 -0
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CK2dnh4X.js +1 -0
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BNtjpWNo.js → index.vue_vue_type_script_setup_true_lang-CVJdloX3.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-DX9EV5b8.js → index.vue_vue_type_script_setup_true_lang-CgaIiyg6.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BcOOhzBa.js → index.vue_vue_type_script_setup_true_lang-DhkIAGmf.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-ZQHD5QfX.js → index.vue_vue_type_script_setup_true_lang-Q7u6DEB4.js} +1 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-_M-s3_Ie.js +1 -0
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-CDQojDH9.js → index.vue_vue_type_style_index_0_lang-CIN0y80j.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-BrQNRrgu.js → index.vue_vue_type_style_index_0_lang-DTKsCZO_.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-Dao6jw6s.js → index.vue_vue_type_style_index_0_lang-iFwx3NZQ.js} +1 -1
- package/dist/website/main/assets/{kid-star-Cr1NlTdT.js → kid-star-DD-9HSxX.js} +1 -1
- package/dist/website/main/assets/{md5-DzJRYP5-.js → md5-ohq5q_Pj.js} +1 -1
- package/dist/website/main/assets/{settings-BFJXTJ9K.js → settings-f8ZwrSyv.js} +1 -1
- package/dist/website/main/assets/{supervised-user-circle-Bnx5icEm.js → supervised-user-circle-C6l0wkza.js} +1 -1
- package/dist/website/main/assets/{sync-saved-locally-rounded-DtyOT0dw.js → sync-saved-locally-rounded-Cgz-NvDy.js} +1 -1
- package/dist/website/main/assets/{terminal-D72IJB2N.js → terminal-DIdElzFh.js} +1 -1
- package/dist/website/main/assets/{useCacheOssStore-DApHt9lQ.js → useCacheOssStore-OAoLDVbw.js} +1 -1
- package/dist/website/main/assets/useCompEditStore-CA87jjE-.js +368 -0
- package/dist/website/main/assets/useCompEditStore-CiX1ghqX.css +1 -0
- package/dist/website/main/assets/{useCompMetaLocalStore-eE-CBcE9.js → useCompMetaLocalStore-BKTMp_k8.js} +1 -1
- package/dist/website/main/assets/{useKeyword-BLg7A4PR.js → useKeyword-CmJvOYMB.js} +1 -1
- package/dist/website/main/assets/{useMessage-Cx6Ix45S.js → useMessage-DRWIT9X-.js} +1 -1
- package/dist/website/main/assets/{useTeamHeaders-Cc060CP0.js → useTeamHeaders-DxHN7-t0.js} +1 -1
- package/dist/website/main/assets/useVscodeOpen-PzIPfNxl.js +1 -0
- package/dist/website/main/assets/vendor-core-BKehvho7.js +3 -0
- package/dist/website/main/assets/{vendor-ui-DXwyveTF.js → vendor-ui-CGT0cG1n.js} +2 -2
- package/dist/website/main/index.html +6 -5
- package/package.json +45 -45
- package/dist/website/container/assets/index-7l-rYyHX.css +0 -1
- package/dist/website/container/assets/index-QLp4vG1I.js +0 -14
- package/dist/website/item/assets/index-Dbdwi_To.js +0 -40
- package/dist/website/item/assets/index-Dt7E5e5b.css +0 -1
- package/dist/website/main/assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-C2LcEFL4.js +0 -1
- package/dist/website/main/assets/index-BbWodQCE.js +0 -1
- package/dist/website/main/assets/index-BjHkHge5.js +0 -1
- package/dist/website/main/assets/index-BmKipP5M.js +0 -1
- package/dist/website/main/assets/index-BtOXjKjQ.js +0 -2
- package/dist/website/main/assets/index-C0K8T0Xx.js +0 -1
- package/dist/website/main/assets/index-C1sEhRir.js +0 -1
- package/dist/website/main/assets/index-CDnNjG3p.css +0 -1
- package/dist/website/main/assets/index-CIC11BH9.js +0 -2
- package/dist/website/main/assets/index-CIsQpojO.js +0 -1
- package/dist/website/main/assets/index-CduGhjwk.js +0 -1
- package/dist/website/main/assets/index-ColU6pai.js +0 -1
- package/dist/website/main/assets/index-Cr00Cnja.js +0 -1
- package/dist/website/main/assets/index-CzTcYkCn.css +0 -1
- package/dist/website/main/assets/index-D-uwf4yo.css +0 -1
- package/dist/website/main/assets/index-DF7kFkvq.js +0 -1
- package/dist/website/main/assets/index-DFTKmQf7.js +0 -4
- package/dist/website/main/assets/index-DIAvnYXs.js +0 -1
- package/dist/website/main/assets/index-DLG3xPU-.js +0 -1
- package/dist/website/main/assets/index-DMimQ8qZ.js +0 -1
- package/dist/website/main/assets/index-DSgvaoRk.js +0 -1
- package/dist/website/main/assets/index-DbhO-url.js +0 -1
- package/dist/website/main/assets/index-DqvpfDy3.js +0 -1
- package/dist/website/main/assets/index-FFTkVbVX.css +0 -1
- package/dist/website/main/assets/index-gm-0wl9c.js +0 -1
- package/dist/website/main/assets/index-tfdENYSZ.js +0 -1
- package/dist/website/main/assets/index-wQUKmtT3.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Bin3s9j1.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-CVSKP8Ny.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-D96-vCRS.js +0 -2
- package/dist/website/main/assets/useCompEditStore-DWHXDEWk.js +0 -307
- package/dist/website/main/assets/useCompEditStore-DqsRNPtJ.css +0 -1
- package/dist/website/main/assets/useVscodeOpen-DCcaXYnx.js +0 -1
- package/dist/website/main/assets/vendor-core-CzvSW5ae.js +0 -3
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
import{am as sb,a7 as tg,a3 as di,aD as rg,aF as ib,ac as mu,f as yu,Z as sg,_ as Ep,U as Hr,a0 as nb,a5 as ab,e as Ks,y as Ua,g as ob,x as gu,A as Du,J as xu,o as ub,p as lb,R as pb,P as cb,D as hb,l as db}from"./vendor-ui-DXwyveTF.js";import{l as En,a as Or,f as fb,E as Ee,V as Ap,g as Fa,M as ka,o as iu,q as $s,K as mb,y as yb,k as gb}from"./index-BbT8J87U.js";/* empty css *//* empty css */import{v as St,ab as be,l as nt,$ as qo,Z as ig,ai as Cp,g as Le,az as Db,j as Ke,aO as oe,c as xb,ax as ne,X as ng,i as We,r as de,q as lt,ap as He,aB as hc,aA as Lt,aM as yr,W as dc,af as sr,Y as ln,aF as Hs,aj as fc,aR as ag,H as Kt,F as Rs,ah as fi,aN as Eb,k as rr,aD as Ab,ac as Cb,K as bb,al as Tb,y as vb,ad as Sb,w as wb}from"./vendor-core-CzvSW5ae.js";import{c as og,p as Pb}from"./index-CYFm50TZ.js";import{_ as ug}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CofI0Rvq.js";import{v as nu}from"./v4-EwEgHOG0.js";import{c as Fb,b as kb,d as Ib,I as Pl,a as Sf,e as Nb}from"./useMessage-Cx6Ix45S.js";import{u as lg,_ as pg,a as Bb}from"./index.vue_vue_type_style_index_0_lang-CDQojDH9.js";import{_ as cg}from"./BaseDialog.vue_vue_type_script_setup_true_lang-CgV6_zzd.js";import{_ as _b}from"./PanelBackground.vue_vue_type_script_setup_true_lang-DBIlZFl0.js";import{_ as Lb}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-CW16Y3Jx.js";import{_ as Ob}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-bBtkKtmz.js";function Mb(t,e){for(var r=0;r<e.length;r++){const s=e[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in t)){const a=Object.getOwnPropertyDescriptor(s,i);a&&Object.defineProperty(t,i,a.get?a:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const $b=St({__name:"BaseBadge",props:{isDot:{type:Boolean,default:!1},offset:{type:Array,default:()=>[5,-5]}},setup(t){const e=t,r=Le(()=>({"--offsetX":`${e.offset[0]}px`,"--offsetY":`${e.offset[1]}px`}));return(s,i)=>(be(),nt("div",{class:ig(["inline relative",{dot:t.isDot}]),style:qo(r.value)},[Cp(s.$slots,"default",{},void 0,!0)],6))}}),Rb=En($b,[["__scopeId","data-v-3453529a"]]),jb={key:1,class:"grid-container"},Ub=St({__name:"GridContainer",props:{itemMinWidth:{type:Number,default:300},gap:{type:Number,default:20},useTransition:{type:Boolean,default:!0}},setup(t){Db(i=>({v58810582:s.value,v6c23f06a:r.value}));const e=t,r=Le(()=>e.gap+"px"),s=Le(()=>e.itemMinWidth+"px");return(i,a)=>t.useTransition?(be(),Ke(xb,{key:0,class:"grid-container",name:"list",tag:"div"},{default:oe(()=>[Cp(i.$slots,"default",{},void 0,!0)]),_:3})):(be(),nt("div",jb,[Cp(i.$slots,"default",{},void 0,!0)]))}}),Vb=En(Ub,[["__scopeId","data-v-404bcef7"]]);var qb=Object.create,mc=Object.defineProperty,Hb=Object.getOwnPropertyDescriptor,zb=Object.getOwnPropertyNames,Wb=Object.getPrototypeOf,Jb=Object.prototype.hasOwnProperty,Kb=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yc=(t,e)=>{for(var r in e)mc(t,r,{get:e[r],enumerable:!0})},Xb=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of zb(e))!Jb.call(t,i)&&i!==r&&mc(t,i,{get:()=>e[i],enumerable:!(s=Hb(e,i))||s.enumerable});return t},Gb=(t,e,r)=>(r=t!=null?qb(Wb(t)):{},Xb(mc(r,"default",{value:t,enumerable:!0}),t)),Yb=Kb((t,e)=>{var r,s,i,a,u,p,c,m,f,d,D,y,x,E,C,b,A,v,P;x=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,y=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,r=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,C=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,D=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,b=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,P=/[\t\v\f\ufeff\p{Zs}]+/yu,m=/\r?\n|[\r\u2028\u2029]/y,f=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,E=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,s=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,a=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,u=/[^<>{}]+/y,v=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,A=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,p=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,d=RegExp(m.source),e.exports=function*(S,{jsx:F=!1}={}){var B,I,R,j,V,N,q,te,W,Y,ge,Ae,Ie,he;for({length:N}=S,j=0,V="",he=[{tag:"JS"}],B=[],ge=0,Ae=!1;j<N;){switch(te=he[he.length-1],te.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(S[j]==="/"&&(v.test(V)||p.test(V))&&(x.lastIndex=j,q=x.exec(S))){j=x.lastIndex,V=q[0],Ae=!0,yield{type:"RegularExpressionLiteral",value:q[0],closed:q[1]!==void 0&&q[1]!=="\\"};continue}if(y.lastIndex=j,q=y.exec(S)){switch(Ie=q[0],W=y.lastIndex,Y=Ie,Ie){case"(":V==="?NonExpressionParenKeyword"&&he.push({tag:"JSNonExpressionParen",nesting:ge}),ge++,Ae=!1;break;case")":ge--,Ae=!0,te.tag==="JSNonExpressionParen"&&ge===te.nesting&&(he.pop(),Y="?NonExpressionParenEnd",Ae=!1);break;case"{":y.lastIndex=0,R=!A.test(V)&&(v.test(V)||p.test(V)),B.push(R),Ae=!1;break;case"}":switch(te.tag){case"InterpolationInTemplate":if(B.length===te.nesting){b.lastIndex=j,q=b.exec(S),j=b.lastIndex,V=q[0],q[1]==="${"?(V="?InterpolationInTemplate",Ae=!1,yield{type:"TemplateMiddle",value:q[0]}):(he.pop(),Ae=!0,yield{type:"TemplateTail",value:q[0],closed:q[1]==="`"});continue}break;case"InterpolationInJSX":if(B.length===te.nesting){he.pop(),j+=1,V="}",yield{type:"JSXPunctuator",value:"}"};continue}}Ae=B.pop(),Y=Ae?"?ExpressionBraceEnd":"}";break;case"]":Ae=!0;break;case"++":case"--":Y=Ae?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(F&&(v.test(V)||p.test(V))){he.push({tag:"JSXTag"}),j+=1,V="<",yield{type:"JSXPunctuator",value:Ie};continue}Ae=!1;break;default:Ae=!1}j=W,V=Y,yield{type:"Punctuator",value:Ie};continue}if(r.lastIndex=j,q=r.exec(S)){switch(j=r.lastIndex,Y=q[0],q[0]){case"for":case"if":case"while":case"with":V!=="."&&V!=="?."&&(Y="?NonExpressionParenKeyword")}V=Y,Ae=!p.test(q[0]),yield{type:q[1]==="#"?"PrivateIdentifier":"IdentifierName",value:q[0]};continue}if(C.lastIndex=j,q=C.exec(S)){j=C.lastIndex,V=q[0],Ae=!0,yield{type:"StringLiteral",value:q[0],closed:q[2]!==void 0};continue}if(D.lastIndex=j,q=D.exec(S)){j=D.lastIndex,V=q[0],Ae=!0,yield{type:"NumericLiteral",value:q[0]};continue}if(b.lastIndex=j,q=b.exec(S)){j=b.lastIndex,V=q[0],q[1]==="${"?(V="?InterpolationInTemplate",he.push({tag:"InterpolationInTemplate",nesting:B.length}),Ae=!1,yield{type:"TemplateHead",value:q[0]}):(Ae=!0,yield{type:"NoSubstitutionTemplate",value:q[0],closed:q[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(i.lastIndex=j,q=i.exec(S)){switch(j=i.lastIndex,Y=q[0],q[0]){case"<":he.push({tag:"JSXTag"});break;case">":he.pop(),V==="/"||te.tag==="JSXTagEnd"?(Y="?JSX",Ae=!0):he.push({tag:"JSXChildren"});break;case"{":he.push({tag:"InterpolationInJSX",nesting:B.length}),Y="?InterpolationInJSX",Ae=!1;break;case"/":V==="<"&&(he.pop(),he[he.length-1].tag==="JSXChildren"&&he.pop(),he.push({tag:"JSXTagEnd"}))}V=Y,yield{type:"JSXPunctuator",value:q[0]};continue}if(s.lastIndex=j,q=s.exec(S)){j=s.lastIndex,V=q[0],yield{type:"JSXIdentifier",value:q[0]};continue}if(a.lastIndex=j,q=a.exec(S)){j=a.lastIndex,V=q[0],yield{type:"JSXString",value:q[0],closed:q[2]!==void 0};continue}break;case"JSXChildren":if(u.lastIndex=j,q=u.exec(S)){j=u.lastIndex,V=q[0],yield{type:"JSXText",value:q[0]};continue}switch(S[j]){case"<":he.push({tag:"JSXTag"}),j++,V="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":he.push({tag:"InterpolationInJSX",nesting:B.length}),j++,V="?InterpolationInJSX",Ae=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(P.lastIndex=j,q=P.exec(S)){j=P.lastIndex,yield{type:"WhiteSpace",value:q[0]};continue}if(m.lastIndex=j,q=m.exec(S)){j=m.lastIndex,Ae=!1,c.test(V)&&(V="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:q[0]};continue}if(f.lastIndex=j,q=f.exec(S)){j=f.lastIndex,d.test(q[0])&&(Ae=!1,c.test(V)&&(V="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:q[0],closed:q[1]!==void 0};continue}if(E.lastIndex=j,q=E.exec(S)){j=E.lastIndex,Ae=!1,yield{type:"SingleLineComment",value:q[0]};continue}I=String.fromCodePoint(S.codePointAt(j)),j+=I.length,V=I,Ae=!1,yield{type:te.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:I}}}}),Qb={};yc(Qb,{__debug:()=>Uw,check:()=>Rw,doc:()=>aD,format:()=>as,formatWithCursor:()=>pD,getSupportInfo:()=>jw,util:()=>oD,version:()=>hw});var Va=(t,e)=>(r,s,...i)=>r|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,i),Zb=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},eT=Va("replaceAll",function(){if(typeof this=="string")return Zb}),Eu=eT,tT=class{diff(e,r,s={}){let i;typeof s=="function"?(i=s,s={}):"callback"in s&&(i=s.callback);let a=this.castInput(e,s),u=this.castInput(r,s),p=this.removeEmpty(this.tokenize(a,s)),c=this.removeEmpty(this.tokenize(u,s));return this.diffWithOptionsObj(p,c,s,i)}diffWithOptionsObj(e,r,s,i){var a;let u=A=>{if(A=this.postProcess(A,s),i){setTimeout(function(){i(A)},0);return}else return A},p=r.length,c=e.length,m=1,f=p+c;s.maxEditLength!=null&&(f=Math.min(f,s.maxEditLength));let d=(a=s.timeout)!==null&&a!==void 0?a:1/0,D=Date.now()+d,y=[{oldPos:-1,lastComponent:void 0}],x=this.extractCommon(y[0],r,e,0,s);if(y[0].oldPos+1>=c&&x+1>=p)return u(this.buildValues(y[0].lastComponent,r,e));let E=-1/0,C=1/0,b=()=>{for(let A=Math.max(E,-m);A<=Math.min(C,m);A+=2){let v,P=y[A-1],S=y[A+1];P&&(y[A-1]=void 0);let F=!1;if(S){let I=S.oldPos-A;F=S&&0<=I&&I<p}let B=P&&P.oldPos+1<c;if(!F&&!B){y[A]=void 0;continue}if(!B||F&&P.oldPos<S.oldPos?v=this.addToPath(S,!0,!1,0,s):v=this.addToPath(P,!1,!0,1,s),x=this.extractCommon(v,r,e,A,s),v.oldPos+1>=c&&x+1>=p)return u(this.buildValues(v.lastComponent,r,e))||!0;y[A]=v,v.oldPos+1>=c&&(C=Math.min(C,A-1)),x+1>=p&&(E=Math.max(E,A+1))}m++};if(i)(function A(){setTimeout(function(){if(m>f||Date.now()>D)return i(void 0);b()||A()},0)})();else for(;m<=f&&Date.now()<=D;){let A=b();if(A)return A}}addToPath(e,r,s,i,a){let u=e.lastComponent;return u&&!a.oneChangePerToken&&u.added===r&&u.removed===s?{oldPos:e.oldPos+i,lastComponent:{count:u.count+1,added:r,removed:s,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:r,removed:s,previousComponent:u}}}extractCommon(e,r,s,i,a){let u=r.length,p=s.length,c=e.oldPos,m=c-i,f=0;for(;m+1<u&&c+1<p&&this.equals(s[c+1],r[m+1],a);)m++,c++,f++,a.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(e.lastComponent={count:f,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=c,m}equals(e,r,s){return s.comparator?s.comparator(e,r):e===r||!!s.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,s){let i=[],a;for(;e;)i.push(e),a=e.previousComponent,delete e.previousComponent,e=a;i.reverse();let u=i.length,p=0,c=0,m=0;for(;p<u;p++){let f=i[p];if(f.removed)f.value=this.join(s.slice(m,m+f.count)),m+=f.count;else{if(!f.added&&this.useLongestToken){let d=r.slice(c,c+f.count);d=d.map(function(D,y){let x=s[m+y];return x.length>D.length?x:D}),f.value=this.join(d)}else f.value=this.join(r.slice(c,c+f.count));c+=f.count,f.added||(m+=f.count)}}return i}},rT=class extends tT{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}},sT=new rT;function iT(t,e,r){return sT.diff(t,e,r)}var nT=()=>{},aT=nT,hg="cr",dg="crlf",oT="lf",uT=oT,gc="\r",fg=`\r
|
|
2
|
-
`,Au=`
|
|
3
|
-
`,lT=Au;function pT(t){let e=t.indexOf(gc);return e!==-1?t.charAt(e+1)===Au?dg:hg:uT}function Dc(t){return t===hg?gc:t===dg?fg:lT}var cT=new Map([[Au,/\n/gu],[gc,/\r/gu],[fg,/\r\n/gu]]);function mg(t,e){let r=cT.get(e);return t.match(r)?.length??0}var hT=/\r\n?/gu;function dT(t){return Eu(0,t,hT,Au)}function fT(t){return this[t<0?this.length+t:t]}var mT=Va("at",function(){if(Array.isArray(this)||typeof this=="string")return fT}),Et=mT,vi="string",cs="array",Xs="cursor",gs="indent",Ds="align",xs="trim",Xt="group",Kr="fill",ir="if-break",Es="indent-if-break",As="line-suffix",Cs="line-suffix-boundary",Ft="line",Xr="label",Dr="break-parent",yg=new Set([Xs,gs,Ds,xs,Xt,Kr,ir,Es,As,Cs,Ft,Xr,Dr]);function yT(t){let e=t.length;for(;e>0&&(t[e-1]==="\r"||t[e-1]===`
|
|
4
|
-
`);)e--;return e<t.length?t.slice(0,e):t}function gT(t){if(typeof t=="string")return vi;if(Array.isArray(t))return cs;if(!t)return;let{type:e}=t;if(yg.has(e))return e}var Si=gT,DT=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function xT(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
5
|
-
Expected it to be 'string' or 'object'.`;if(Si(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=DT([...yg].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
|
|
6
|
-
Expected it to be ${s}.`}var ET=class extends Error{name="InvalidDocError";constructor(e){super(xT(e)),this.doc=e}},pn=ET,wf={};function AT(t,e,r,s){let i=[t];for(;i.length>0;){let a=i.pop();if(a===wf){r(i.pop());continue}r&&i.push(a,wf);let u=Si(a);if(!u)throw new pn(a);if(e?.(a)!==!1)switch(u){case cs:case Kr:{let p=u===cs?a:a.parts;for(let c=p.length,m=c-1;m>=0;--m)i.push(p[m]);break}case ir:i.push(a.flatContents,a.breakContents);break;case Xt:if(s&&a.expandedStates)for(let p=a.expandedStates.length,c=p-1;c>=0;--c)i.push(a.expandedStates[c]);else i.push(a.contents);break;case Ds:case gs:case Es:case Xr:case As:i.push(a.contents);break;case vi:case Xs:case xs:case Cs:case Ft:case Dr:break;default:throw new pn(a)}}}var xc=AT;function Cu(t,e){if(typeof t=="string")return e(t);let r=new Map;return s(t);function s(a){if(r.has(a))return r.get(a);let u=i(a);return r.set(a,u),u}function i(a){switch(Si(a)){case cs:return e(a.map(s));case Kr:return e({...a,parts:a.parts.map(s)});case ir:return e({...a,breakContents:s(a.breakContents),flatContents:s(a.flatContents)});case Xt:{let{expandedStates:u,contents:p}=a;return u?(u=u.map(s),p=u[0]):p=s(p),e({...a,contents:p,expandedStates:u})}case Ds:case gs:case Es:case Xr:case As:return e({...a,contents:s(a.contents)});case vi:case Xs:case xs:case Cs:case Ft:case Dr:return e(a);default:throw new pn(a)}}}function Ec(t,e,r){let s=r,i=!1;function a(u){if(i)return!1;let p=e(u);p!==void 0&&(i=!0,s=p)}return xc(t,a),s}function CT(t){if(t.type===Xt&&t.break||t.type===Ft&&t.hard||t.type===Dr)return!0}function bT(t){return Ec(t,CT,!1)}function Pf(t){if(t.length>0){let e=Et(0,t,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function TT(t){let e=new Set,r=[];function s(a){if(a.type===Dr&&Pf(r),a.type===Xt){if(r.push(a),e.has(a))return!1;e.add(a)}}function i(a){a.type===Xt&&r.pop().break&&Pf(r)}xc(t,s,i,!0)}function vT(t){return t.type===Ft&&!t.hard?t.soft?"":" ":t.type===ir?t.flatContents:t}function ST(t){return Cu(t,vT)}function Ff(t){for(t=[...t];t.length>=2&&Et(0,t,-2).type===Ft&&Et(0,t,-1).type===Dr;)t.length-=2;if(t.length>0){let e=ha(Et(0,t,-1));t[t.length-1]=e}return t}function ha(t){switch(Si(t)){case gs:case Es:case Xt:case As:case Xr:{let e=ha(t.contents);return{...t,contents:e}}case ir:return{...t,breakContents:ha(t.breakContents),flatContents:ha(t.flatContents)};case Kr:return{...t,parts:Ff(t.parts)};case cs:return Ff(t);case vi:return yT(t);case Ds:case Xs:case xs:case Cs:case Ft:case Dr:break;default:throw new pn(t)}return t}function gg(t){return ha(PT(t))}function wT(t){switch(Si(t)){case Kr:if(t.parts.every(e=>e===""))return"";break;case Xt:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===Xt&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case Ds:case gs:case Es:case As:if(!t.contents)return"";break;case ir:if(!t.flatContents&&!t.breakContents)return"";break;case cs:{let e=[];for(let r of t){if(!r)continue;let[s,...i]=Array.isArray(r)?r:[r];typeof s=="string"&&typeof Et(0,e,-1)=="string"?e[e.length-1]+=s:e.push(s),e.push(...i)}return e.length===0?"":e.length===1?e[0]:e}case vi:case Xs:case xs:case Cs:case Ft:case Xr:case Dr:break;default:throw new pn(t)}return t}function PT(t){return Cu(t,e=>wT(e))}function FT(t,e=Tg){return Cu(t,r=>typeof r=="string"?Ag(e,r.split(`
|
|
7
|
-
`)):r)}function kT(t){if(t.type===Ft)return!0}function IT(t){return Ec(t,kT,!1)}function Ho(t,e){return t.type===Xr?{...t,contents:e(t.contents)}:e(t)}var NT=aT;function au(t){return{type:gs,contents:t}}function cn(t,e){return{type:Ds,contents:e,n:t}}function BT(t){return cn(Number.NEGATIVE_INFINITY,t)}function Dg(t){return cn({type:"root"},t)}function _T(t){return cn(-1,t)}function xg(t,e,r){let s=t;if(e>0){for(let i=0;i<Math.floor(e/r);++i)s=au(s);s=cn(e%r,s),s=cn(Number.NEGATIVE_INFINITY,s)}return s}var bu={type:Dr},mi={type:Xs};function LT(t){return{type:Kr,parts:t}}function Eg(t,e={}){return NT(e.expandedStates),{type:Xt,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function OT(t,e){return Eg(t[0],{...e,expandedStates:t})}function MT(t,e="",r={}){return{type:ir,breakContents:t,flatContents:e,groupId:r.groupId}}function $T(t,e){return{type:Es,contents:t,groupId:e.groupId,negate:e.negate}}function Ag(t,e){let r=[];for(let s=0;s<e.length;s++)s!==0&&r.push(t),r.push(e[s]);return r}function RT(t,e){return t?{type:Xr,label:t,contents:e}:e}var Cg={type:Ft},jT={type:Ft,soft:!0},Ac={type:Ft,hard:!0},ls=[Ac,bu],bg={type:Ft,hard:!0,literal:!0},Tg=[bg,bu];function bp(t){return{type:As,contents:t}}var UT={type:Cs},VT={type:xs};function ns(t){if(!t)return"";if(Array.isArray(t)){let e=[];for(let r of t)if(Array.isArray(r))e.push(...ns(r));else{let s=ns(r);s!==""&&e.push(s)}return e}return t.type===ir?{...t,breakContents:ns(t.breakContents),flatContents:ns(t.flatContents)}:t.type===Xt?{...t,contents:ns(t.contents),expandedStates:t.expandedStates?.map(ns)}:t.type===Kr?{type:"fill",parts:t.parts.map(ns)}:t.contents?{...t,contents:ns(t.contents)}:t}function qT(t){let e=Object.create(null),r=new Set;return s(ns(t));function s(a,u,p){if(typeof a=="string")return JSON.stringify(a);if(Array.isArray(a)){let c=a.map(s).filter(Boolean);return c.length===1?c[0]:`[${c.join(", ")}]`}if(a.type===Ft){let c=p?.[u+1]?.type===Dr;return a.literal?c?"literalline":"literallineWithoutBreakParent":a.hard?c?"hardline":"hardlineWithoutBreakParent":a.soft?"softline":"line"}if(a.type===Dr)return p?.[u-1]?.type===Ft&&p[u-1].hard?void 0:"breakParent";if(a.type===xs)return"trim";if(a.type===gs)return"indent("+s(a.contents)+")";if(a.type===Ds)return a.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+s(a.contents)+")":a.n<0?"dedent("+s(a.contents)+")":a.n.type==="root"?"markAsRoot("+s(a.contents)+")":"align("+JSON.stringify(a.n)+", "+s(a.contents)+")";if(a.type===ir)return"ifBreak("+s(a.breakContents)+(a.flatContents?", "+s(a.flatContents):"")+(a.groupId?(a.flatContents?"":', ""')+`, { groupId: ${i(a.groupId)} }`:"")+")";if(a.type===Es){let c=[];a.negate&&c.push("negate: true"),a.groupId&&c.push(`groupId: ${i(a.groupId)}`);let m=c.length>0?`, { ${c.join(", ")} }`:"";return`indentIfBreak(${s(a.contents)}${m})`}if(a.type===Xt){let c=[];a.break&&a.break!=="propagated"&&c.push("shouldBreak: true"),a.id&&c.push(`id: ${i(a.id)}`);let m=c.length>0?`, { ${c.join(", ")} }`:"";return a.expandedStates?`conditionalGroup([${a.expandedStates.map(f=>s(f)).join(",")}]${m})`:`group(${s(a.contents)}${m})`}if(a.type===Kr)return`fill([${a.parts.map(c=>s(c)).join(", ")}])`;if(a.type===As)return"lineSuffix("+s(a.contents)+")";if(a.type===Cs)return"lineSuffixBoundary";if(a.type===Xr)return`label(${JSON.stringify(a.label)}, ${s(a.contents)})`;if(a.type===Xs)return"cursor";throw new Error("Unknown doc type "+a.type)}function i(a){if(typeof a!="symbol")return JSON.stringify(String(a));if(a in e)return e[a];let u=a.description||"symbol";for(let p=0;;p++){let c=u+(p>0?` #${p}`:"");if(!r.has(c))return r.add(c),e[a]=`Symbol.for(${JSON.stringify(c)})`}}}var HT=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function zT(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function WT(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}var JT="©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇",KT=/[^\x20-\x7F]/u,XT=new Set(JT);function GT(t){if(!t)return 0;if(!KT.test(t))return t.length;t=t.replace(HT(),r=>XT.has(r)?" ":" ");let e=0;for(let r of t){let s=r.codePointAt(0);s<=31||s>=127&&s<=159||s>=768&&s<=879||s>=65024&&s<=65039||(e+=zT(s)||WT(s)?2:1)}return e}var Cc=GT,YT={type:0},QT={type:1},vg={value:"",length:0,queue:[],get root(){return vg}};function Sg(t,e,r){let s=e.type===1?t.queue.slice(0,-1):[...t.queue,e],i="",a=0,u=0,p=0;for(let x of s)switch(x.type){case 0:f(),r.useTabs?c(1):m(r.tabWidth);break;case 3:{let{string:E}=x;f(),i+=E,a+=E.length;break}case 2:{let{width:E}=x;u+=1,p+=E;break}default:throw new Error(`Unexpected indent comment '${x.type}'.`)}return D(),{...t,value:i,length:a,queue:s};function c(x){i+=" ".repeat(x),a+=r.tabWidth*x}function m(x){i+=" ".repeat(x),a+=x}function f(){r.useTabs?d():D()}function d(){u>0&&c(u),y()}function D(){p>0&&m(p),y()}function y(){u=0,p=0}}function ZT(t,e,r){if(!e)return t;if(e.type==="root")return{...t,root:t};if(e===Number.NEGATIVE_INFINITY)return t.root;let s;return typeof e=="number"?e<0?s=QT:s={type:2,width:e}:s={type:3,string:e},Sg(t,s,r)}function ev(t,e){return Sg(t,YT,e)}function tv(t){let e=0;for(let r=t.length-1;r>=0;r--){let s=t[r];if(s===" "||s===" ")e++;else break}return e}function wg(t){let e=tv(t);return{text:e===0?t:t.slice(0,t.length-e),count:e}}var Vt=Symbol("MODE_BREAK"),_r=Symbol("MODE_FLAT"),Tp=Symbol("DOC_FILL_PRINTED_LENGTH");function Co(t,e,r,s,i,a){if(r===Number.POSITIVE_INFINITY)return!0;let u=e.length,p=!1,c=[t],m="";for(;r>=0;){if(c.length===0){if(u===0)return!0;c.push(e[--u]);continue}let{mode:f,doc:d}=c.pop(),D=Si(d);switch(D){case vi:d&&(p&&(m+=" ",r-=1,p=!1),m+=d,r-=Cc(d));break;case cs:case Kr:{let y=D===cs?d:d.parts,x=d[Tp]??0;for(let E=y.length-1;E>=x;E--)c.push({mode:f,doc:y[E]});break}case gs:case Ds:case Es:case Xr:c.push({mode:f,doc:d.contents});break;case xs:{let{text:y,count:x}=wg(m);m=y,r+=x;break}case Xt:{if(a&&d.break)return!1;let y=d.break?Vt:f,x=d.expandedStates&&y===Vt?Et(0,d.expandedStates,-1):d.contents;c.push({mode:y,doc:x});break}case ir:{let y=(d.groupId?i[d.groupId]||_r:f)===Vt?d.breakContents:d.flatContents;y&&c.push({mode:f,doc:y});break}case Ft:if(f===Vt||d.hard)return!0;d.soft||(p=!0);break;case As:s=!0;break;case Cs:if(s)return!1;break}}return!1}function Tu(t,e){let r=Object.create(null),s=e.printWidth,i=Dc(e.endOfLine),a=0,u=[{indent:vg,mode:Vt,doc:t}],p="",c=!1,m=[],f=[],d=[],D=[],y=0;for(TT(t);u.length>0;){let{indent:A,mode:v,doc:P}=u.pop();switch(Si(P)){case vi:{let S=i!==`
|
|
8
|
-
`?Eu(0,P,`
|
|
9
|
-
`,i):P;S&&(p+=S,u.length>0&&(a+=Cc(S)));break}case cs:for(let S=P.length-1;S>=0;S--)u.push({indent:A,mode:v,doc:P[S]});break;case Xs:if(f.length>=2)throw new Error("There are too many 'cursor' in doc.");f.push(y+p.length);break;case gs:u.push({indent:ev(A,e),mode:v,doc:P.contents});break;case Ds:u.push({indent:ZT(A,P.n,e),mode:v,doc:P.contents});break;case xs:b();break;case Xt:switch(v){case _r:if(!c){u.push({indent:A,mode:P.break?Vt:_r,doc:P.contents});break}case Vt:{c=!1;let S={indent:A,mode:_r,doc:P.contents},F=s-a,B=m.length>0;if(!P.break&&Co(S,u,F,B,r))u.push(S);else if(P.expandedStates){let I=Et(0,P.expandedStates,-1);if(P.break){u.push({indent:A,mode:Vt,doc:I});break}else for(let R=1;R<P.expandedStates.length+1;R++)if(R>=P.expandedStates.length){u.push({indent:A,mode:Vt,doc:I});break}else{let j=P.expandedStates[R],V={indent:A,mode:_r,doc:j};if(Co(V,u,F,B,r)){u.push(V);break}}}else u.push({indent:A,mode:Vt,doc:P.contents});break}}P.id&&(r[P.id]=Et(0,u,-1).mode);break;case Kr:{let S=s-a,F=P[Tp]??0,{parts:B}=P,I=B.length-F;if(I===0)break;let R=B[F+0],j=B[F+1],V={indent:A,mode:_r,doc:R},N={indent:A,mode:Vt,doc:R},q=Co(V,[],S,m.length>0,r,!0);if(I===1){q?u.push(V):u.push(N);break}let te={indent:A,mode:_r,doc:j},W={indent:A,mode:Vt,doc:j};if(I===2){q?u.push(te,V):u.push(W,N);break}let Y=B[F+2],ge={indent:A,mode:v,doc:{...P,[Tp]:F+2}},Ae=Co({indent:A,mode:_r,doc:[R,j,Y]},[],S,m.length>0,r,!0);u.push(ge),Ae?u.push(te,V):q?u.push(W,V):u.push(W,N);break}case ir:case Es:{let S=P.groupId?r[P.groupId]:v;if(S===Vt){let F=P.type===ir?P.breakContents:P.negate?P.contents:au(P.contents);F&&u.push({indent:A,mode:v,doc:F})}if(S===_r){let F=P.type===ir?P.flatContents:P.negate?au(P.contents):P.contents;F&&u.push({indent:A,mode:v,doc:F})}break}case As:m.push({indent:A,mode:v,doc:P.contents});break;case Cs:m.length>0&&u.push({indent:A,mode:v,doc:Ac});break;case Ft:switch(v){case _r:if(P.hard)c=!0;else{P.soft||(p+=" ",a+=1);break}case Vt:if(m.length>0){u.push({indent:A,mode:v,doc:P},...m.reverse()),m.length=0;break}P.literal?(p+=i,a=0,A.root&&(A.root.value&&(p+=A.root.value),a=A.root.length)):(b(),p+=i+A.value,a=A.length);break}break;case Xr:u.push({indent:A,mode:v,doc:P.contents});break;case Dr:break;default:throw new pn(P)}u.length===0&&m.length>0&&(u.push(...m.reverse()),m.length=0)}let x=d.join("")+p,E=[...D,...f];if(E.length!==2)return{formatted:x};let C=E[0];return{formatted:x,cursorNodeStart:C,cursorNodeText:x.slice(C,Et(0,E,-1))};function b(){let{text:A,count:v}=wg(p);A&&(d.push(A),y+=A.length),p="",a-=v,f.length>0&&(D.push(...f.map(P=>Math.min(P,y))),f.length=0)}}function rv(t,e,r=0){let s=0;for(let i=r;i<t.length;++i)t[i]===" "?s=s+e-s%e:s++;return s}var bc=rv,sv=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:r}=this;return Et(0,e,r===null?-2:-4)??null}get index(){return this.siblings===null?null:Et(0,this.stack,-2)}get node(){return Et(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,r=Et(0,e,-3);return Array.isArray(r)?r:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:r}=this;return e!==null&&r===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:e}=this,{length:r}=e;return r>1?Et(0,e,-2):null}getValue(){return Et(0,this.stack,-1)}getNode(e=0){let r=this.#e(e);return r===-1?null:this.stack[r]}getParentNode(e=0){return this.getNode(e+1)}#e(e){let{stack:r}=this;for(let s=r.length-1;s>=0;s-=2)if(!Array.isArray(r[s])&&--e<0)return s;return-1}call(e,...r){let{stack:s}=this,{length:i}=s,a=Et(0,s,-1);for(let u of r)a=a?.[u],s.push(u,a);try{return e(this)}finally{s.length=i}}callParent(e,r=0){let s=this.#e(r+1),i=this.stack.splice(s+1);try{return e(this)}finally{this.stack.push(...i)}}each(e,...r){let{stack:s}=this,{length:i}=s,a=Et(0,s,-1);for(let u of r)a=a[u],s.push(u,a);try{for(let u=0;u<a.length;++u)s.push(u,a[u]),e(this,u,a),s.length-=2}finally{s.length=i}}map(e,...r){let s=[];return this.each((i,a,u)=>{s[a]=e(i,a,u)},...r),s}match(...e){let r=this.stack.length-1,s=null,i=this.stack[r--];for(let a of e){if(i===void 0)return!1;let u=null;if(typeof s=="number"&&(u=s,s=this.stack[r--],i=this.stack[r--]),a&&!a(i,s,u))return!1;s=this.stack[r--],i=this.stack[r--]}return!0}findAncestor(e){for(let r of this.#t())if(e(r))return r}hasAncestor(e){for(let r of this.#t())if(e(r))return!0;return!1}*#t(){let{stack:e}=this;for(let r=e.length-3;r>=0;r-=2){let s=e[r];Array.isArray(s)||(yield s)}}},iv=sv;function nv(t){return t!==null&&typeof t=="object"}var Tc=nv;function qa(t){return(e,r,s)=>{let i=!!s?.backwards;if(r===!1)return!1;let{length:a}=e,u=r;for(;u>=0&&u<a;){let p=e.charAt(u);if(t instanceof RegExp){if(!t.test(p))return u}else if(!t.includes(p))return u;i?u--:u++}return u===-1||u===a?u:!1}}var av=qa(/\s/u),zs=qa(" "),Pg=qa(",; "),Fg=qa(/[^\n\r]/u),kf=t=>t===`
|
|
10
|
-
`||t==="\r"||t==="\u2028"||t==="\u2029";function ov(t,e,r){let s=!!r?.backwards;if(e===!1)return!1;let i=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&i===`
|
|
11
|
-
`)return e-2;if(kf(i))return e-1}else{if(i==="\r"&&t.charAt(e+1)===`
|
|
12
|
-
`)return e+2;if(kf(i))return e+1}return e}var xi=ov;function uv(t,e,r={}){let s=zs(t,r.backwards?e-1:e,r),i=xi(t,s,r);return s!==i}var Us=uv;function lv(t){return Array.isArray(t)&&t.length>0}var pv=lv;function*vu(t,e){let{getVisitorKeys:r,filter:s=()=>!0}=e,i=a=>Tc(a)&&s(a);for(let a of r(t)){let u=t[a];if(Array.isArray(u))for(let p of u)i(p)&&(yield p);else i(u)&&(yield u)}}function*cv(t,e){let r=[t];for(let s=0;s<r.length;s++){let i=r[s];for(let a of vu(i,e))yield a,r.push(a)}}function hv(t,e){return vu(t,e).next().done}function kg(t,e,r){let{cache:s}=r;if(s.has(t))return s.get(t);let{filter:i}=r;if(!i)return[];let a,u=(r.getChildren?.(t,r)??[...vu(t,{getVisitorKeys:r.getVisitorKeys})]).flatMap(m=>(a??(a=[t,...e]),i(m,a)?[m]:kg(m,a,r))),{locStart:p,locEnd:c}=r;return u.sort((m,f)=>p(m)-p(f)||c(m)-c(f)),s.set(t,u),u}var Ig=kg;function dv(t){let e=t.type||t.kind||"(unknown type)",r=String(t.name||t.id&&(typeof t.id=="object"?t.id.name:t.id)||t.key&&(typeof t.key=="object"?t.key.name:t.key)||t.value&&(typeof t.value=="object"?"":String(t.value))||t.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),e+(r?" "+r:"")}function vc(t,e){(t.comments??(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=dv(t)}function da(t,e){e.leading=!0,e.trailing=!1,vc(t,e)}function pi(t,e,r){e.leading=!1,e.trailing=!1,r&&(e.marker=r),vc(t,e)}function fa(t,e){e.leading=!1,e.trailing=!0,vc(t,e)}var Ng=new WeakMap;function Bg(t,e,r,s,i=[]){let{locStart:a,locEnd:u}=r,p=a(e),c=u(e),m=Ig(t,i,{cache:Ng,locStart:a,locEnd:u,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes}),f,d,D=0,y=m.length;for(;D<y;){let x=D+y>>1,E=m[x],C=a(E),b=u(E);if(C<=p&&c<=b)return Bg(E,e,r,E,[E,...i]);if(b<=p){f=E,D=x+1;continue}if(c<=C){d=E,y=x;continue}throw new Error("Comment location overlaps with node location")}if(s?.type==="TemplateLiteral"){let{quasis:x}=s,E=kl(x,e,r);f&&kl(x,f,r)!==E&&(f=null),d&&kl(x,d,r)!==E&&(d=null)}return{enclosingNode:s,precedingNode:f,followingNode:d}}var Fl=()=>!1;function fv(t,e){let{comments:r}=t;if(delete t.comments,!pv(r)||!e.printer.canAttachComment)return;let s=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:u}=e,{ownLine:p=Fl,endOfLine:c=Fl,remaining:m=Fl}=a,f=r.map((d,D)=>({...Bg(t,d,e),comment:d,text:u,options:e,ast:t,isLastComment:r.length-1===D}));for(let[d,D]of f.entries()){let{comment:y,precedingNode:x,enclosingNode:E,followingNode:C,text:b,options:A,ast:v,isLastComment:P}=D,S;if(i?S=[D]:(y.enclosingNode=E,y.precedingNode=x,y.followingNode=C,S=[y,b,A,v,P]),mv(b,A,f,d))y.placement="ownLine",p(...S)||(C?da(C,y):x?fa(x,y):pi(E||v,y));else if(yv(b,A,f,d))y.placement="endOfLine",c(...S)||(x?fa(x,y):C?da(C,y):pi(E||v,y));else if(y.placement="remaining",!m(...S))if(x&&C){let F=s.length;F>0&&s[F-1].followingNode!==C&&If(s,A),s.push(D)}else x?fa(x,y):C?da(C,y):pi(E||v,y)}if(If(s,e),!i)for(let d of r)delete d.precedingNode,delete d.enclosingNode,delete d.followingNode}var _g=t=>!/[\S\n\u2028\u2029]/u.test(t);function mv(t,e,r,s){let{comment:i,precedingNode:a}=r[s],{locStart:u,locEnd:p}=e,c=u(i);if(a)for(let m=s-1;m>=0;m--){let{comment:f,precedingNode:d}=r[m];if(d!==a||!_g(t.slice(p(f),c)))break;c=u(f)}return Us(t,c,{backwards:!0})}function yv(t,e,r,s){let{comment:i,followingNode:a}=r[s],{locStart:u,locEnd:p}=e,c=p(i);if(a)for(let m=s+1;m<r.length;m++){let{comment:f,followingNode:d}=r[m];if(d!==a||!_g(t.slice(c,u(f))))break;c=p(f)}return Us(t,c)}function If(t,e){let r=t.length;if(r===0)return;let{precedingNode:s,followingNode:i}=t[0],a=e.locStart(i),u;for(u=r;u>0;--u){let{comment:p,precedingNode:c,followingNode:m}=t[u-1],f=e.originalText.slice(e.locEnd(p),a);if(e.printer.isGap?.(f,e)??/^[\s(]*$/u.test(f))a=e.locStart(p);else break}for(let[p,{comment:c}]of t.entries())p<u?fa(s,c):da(i,c);for(let p of[s,i])p.comments&&p.comments.length>1&&p.comments.sort((c,m)=>e.locStart(c)-e.locStart(m));t.length=0}function kl(t,e,r){let s=r.locStart(e)-1;for(let i=1;i<t.length;++i)if(s<r.locStart(t[i]))return i-1;return 0}function gv(t,e){let r=e-1;r=zs(t,r,{backwards:!0}),r=xi(t,r,{backwards:!0}),r=zs(t,r,{backwards:!0});let s=xi(t,r,{backwards:!0});return r!==s}var Sc=gv;function Lg(t,e){let r=t.node;return r.printed=!0,e.printer.printComment(t,e)}function Dv(t,e){let r=t.node,s=[Lg(t,e)],{printer:i,originalText:a,locStart:u,locEnd:p}=e;if(i.isBlockComment?.(r)){let m=Us(a,p(r))?Us(a,u(r),{backwards:!0})?ls:Cg:" ";s.push(m)}else s.push(ls);let c=xi(a,zs(a,p(r)));return c!==!1&&Us(a,c)&&s.push(ls),s}function xv(t,e,r){let s=t.node,i=Lg(t,e),{printer:a,originalText:u,locStart:p}=e,c=a.isBlockComment?.(s);if(r?.hasLineSuffix&&!r?.isBlock||Us(u,p(s),{backwards:!0})){let m=Sc(u,p(s));return{doc:bp([ls,m?ls:"",i]),isBlock:c,hasLineSuffix:!0}}return!c||r?.hasLineSuffix?{doc:[bp([" ",i]),bu],isBlock:c,hasLineSuffix:!0}:{doc:[" ",i],isBlock:c,hasLineSuffix:!1}}function Ev(t,e){let r=t.node;if(!r)return{};let s=e[Symbol.for("printedComments")];if((r.comments||[]).filter(p=>!s.has(p)).length===0)return{leading:"",trailing:""};let i=[],a=[],u;return t.each(()=>{let p=t.node;if(s?.has(p))return;let{leading:c,trailing:m}=p;c?i.push(Dv(t,e)):m&&(u=xv(t,e,u),a.push(u.doc))},"comments"),{leading:i,trailing:a}}function Av(t,e,r){let{leading:s,trailing:i}=Ev(t,r);return!s&&!i?e:Ho(e,a=>[s,a,i])}function Cv(t){let{[Symbol.for("comments")]:e,[Symbol.for("printedComments")]:r}=t;for(let s of e){if(!s.printed&&!r.has(s))throw new Error('Comment "'+s.value.trim()+'" was not printed. Please report this error!');delete s.printed}}var Og=class extends Error{name="ConfigError"},Nf=class extends Error{name="UndefinedParserError"},bv={checkIgnorePragma:{category:"Special",type:"boolean",default:!1,description:"Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.",cliCategory:"Other"},cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:`Maintain existing
|
|
13
|
-
(mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:t=>typeof t=="string"||typeof t=="function",choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"jsonc",description:"JSON with Comments"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"},{value:"mjml",description:"MJML"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:t=>typeof t=="string"||typeof t=="object",cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
|
|
14
|
-
The range will extend forwards to the end of the selected statement.`,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
|
|
15
|
-
The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function Mg({plugins:t=[],showDeprecated:e=!1}={}){let r=t.flatMap(i=>i.languages??[]),s=[];for(let i of vv(Object.assign({},...t.map(({options:a})=>a),bv)))!e&&i.deprecated||(Array.isArray(i.choices)&&(e||(i.choices=i.choices.filter(a=>!a.deprecated)),i.name==="parser"&&(i.choices=[...i.choices,...Tv(i.choices,r,t)])),i.pluginDefaults=Object.fromEntries(t.filter(a=>a.defaultOptions?.[i.name]!==void 0).map(a=>[a.name,a.defaultOptions[i.name]])),s.push(i));return{languages:r,options:s}}function*Tv(t,e,r){let s=new Set(t.map(i=>i.value));for(let i of e)if(i.parsers){for(let a of i.parsers)if(!s.has(a)){s.add(a);let u=r.find(c=>c.parsers&&Object.prototype.hasOwnProperty.call(c.parsers,a)),p=i.name;u?.name&&(p+=` (plugin: ${u.name})`),yield{value:a,description:p}}}}function vv(t){let e=[];for(let[r,s]of Object.entries(t)){let i={name:r,...s};Array.isArray(i.default)&&(i.default=Et(0,i.default,-1).value),e.push(i)}return e}var Sv=Array.prototype.toReversed??function(){return[...this].reverse()},wv=Va("toReversed",function(){if(Array.isArray(this))return Sv}),Pv=wv;function Fv(){let t=globalThis,e=t.Deno?.build?.os;return typeof e=="string"?e==="windows":t.navigator?.platform?.startsWith("Win")??t.process?.platform?.startsWith("win")??!1}var kv=Fv();function $g(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Iv(t){return t=$g(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Nv(t){t=$g(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Bv(t){return kv?Nv(t):Iv(t)}var _v=t=>String(t).split(/[/\\]/u).pop(),Lv=t=>String(t).startsWith("file:");function Bf(t,e){if(!e)return;let r=_v(e).toLowerCase();return t.find(({filenames:s})=>s?.some(i=>i.toLowerCase()===r))??t.find(({extensions:s})=>s?.some(i=>r.endsWith(i)))}function Ov(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r?.includes(e))??t.find(({extensions:r})=>r?.includes(`.${e}`))}var Mv=void 0;function _f(t,e){if(e){if(Lv(e))try{e=Bv(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r?.({filepath:e}))}}function $v(t,e){let r=Pv(0,t.plugins).flatMap(s=>s.languages??[]);return(Ov(r,e.language)??Bf(r,e.physicalFile)??Bf(r,e.file)??_f(r,e.physicalFile)??_f(r,e.file)??Mv?.(r,e.physicalFile))?.parsers[0]}var Rg=$v,rn={key:t=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?t:JSON.stringify(t),value(t){if(t===null||typeof t!="object")return JSON.stringify(t);if(Array.isArray(t))return`[${t.map(r=>rn.value(r)).join(", ")}]`;let e=Object.keys(t);return e.length===0?"{}":`{ ${e.map(r=>`${rn.key(r)}: ${rn.value(t[r])}`).join(", ")} }`},pair:({key:t,value:e})=>rn.value({[t]:e})},wc=new Proxy(String,{get:()=>wc}),jr=wc,jg=()=>wc,Rv=(t,e,{descriptor:r})=>{let s=[`${jr.yellow(typeof t=="string"?r.key(t):r.pair(t))} is deprecated`];return e&&s.push(`we now treat it as ${jr.blue(typeof e=="string"?r.key(e):r.pair(e))}`),s.join("; ")+"."},Ug=Symbol.for("vnopts.VALUE_NOT_EXIST"),zo=Symbol.for("vnopts.VALUE_UNCHANGED"),Lf=" ".repeat(2),jv=(t,e,r)=>{let{text:s,list:i}=r.normalizeExpectedResult(r.schemas[t].expected(r)),a=[];return s&&a.push(Of(t,e,s,r.descriptor)),i&&a.push([Of(t,e,i.title,r.descriptor)].concat(i.values.map(u=>Vg(u,r.loggerPrintWidth))).join(`
|
|
16
|
-
`)),qg(a,r.loggerPrintWidth)};function Of(t,e,r,s){return[`Invalid ${jr.red(s.key(t))} value.`,`Expected ${jr.blue(r)},`,`but received ${e===Ug?jr.gray("nothing"):jr.red(s.value(e))}.`].join(" ")}function Vg({text:t,list:e},r){let s=[];return t&&s.push(`- ${jr.blue(t)}`),e&&s.push([`- ${jr.blue(e.title)}:`].concat(e.values.map(i=>Vg(i,r-Lf.length).replace(/^|\n/g,`$&${Lf}`))).join(`
|
|
17
|
-
`)),qg(s,r)}function qg(t,e){if(t.length===1)return t[0];let[r,s]=t,[i,a]=t.map(u=>u.split(`
|
|
18
|
-
`,1)[0].length);return i>e&&i>a?s:r}var Hi=[],Il=[];function Nl(t,e,r){if(t===e)return 0;let s=r?.maxDistance,i=t;t.length>e.length&&(t=e,e=i);let a=t.length,u=e.length;for(;a>0&&t.charCodeAt(~-a)===e.charCodeAt(~-u);)a--,u--;let p=0;for(;p<a&&t.charCodeAt(p)===e.charCodeAt(p);)p++;if(a-=p,u-=p,s!==void 0&&u-a>s)return s;if(a===0)return s!==void 0&&u>s?s:u;let c,m,f,d,D=0,y=0;for(;D<a;)Il[D]=t.charCodeAt(p+D),Hi[D]=++D;for(;y<u;){for(c=e.charCodeAt(p+y),f=y++,m=y,D=0;D<a;D++)d=c===Il[D]?f:f+1,f=Hi[D],m=Hi[D]=f>m?d>m?m+1:d:d>f?f+1:d;if(s!==void 0){let x=m;for(D=0;D<a;D++)Hi[D]<x&&(x=Hi[D]);if(x>s)return s}}return Hi.length=a,Il.length=a,s!==void 0&&m>s?s:m}function Uv(t,e,r){if(!Array.isArray(e)||e.length===0)return;let s=r?.maxDistance,i=t.length;for(let c of e)if(c===t)return c;let a,u=Number.POSITIVE_INFINITY,p=new Set;for(let c of e){if(p.has(c))continue;p.add(c);let m=Math.abs(c.length-i);if(m>=u||m>s)continue;let f=Number.isFinite(u)?Math.min(u,s):s,d=f===void 0?Nl(t,c):Nl(t,c,{maxDistance:f});if(d>s)continue;let D=d;if(f!==void 0&&d===f&&f===s&&(D=Nl(t,c)),D<u&&(u=D,a=c,u===0))break}if(!(u>s))return a}var Hg=(t,e,{descriptor:r,logger:s,schemas:i})=>{let a=[`Ignored unknown option ${jr.yellow(r.pair({key:t,value:e}))}.`],u=Uv(t,Object.keys(i),{maxDistance:3});u&&a.push(`Did you mean ${jr.blue(r.key(u))}?`),s.warn(a.join(" "))},Vv=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function qv(t,e){let r=new t(e),s=Object.create(r);for(let i of Vv)i in e&&(s[i]=Hv(e[i],r,Gs.prototype[i].length));return s}var Gs=class{static create(e){return qv(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,r){return!1}deprecated(e,r){return!1}forward(e,r){}redirect(e,r){}overlap(e,r,s){return e}preprocess(e,r){return e}postprocess(e,r){return zo}};function Hv(t,e,r){return typeof t=="function"?(...s)=>t(...s.slice(0,r-1),e,...s.slice(r-1)):()=>t}var zv=class extends Gs{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,r){return r.schemas[this._sourceName].validate(e,r)}redirect(e,r){return this._sourceName}},Wv=class extends Gs{expected(){return"anything"}validate(){return!0}},Jv=class extends Gs{constructor({valueSchema:e,name:r=e.name,...s}){super({...s,name:r}),this._valueSchema=e}expected(e){let{text:r,list:s}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:r&&`an array of ${r}`,list:s&&{title:"an array of the following values",values:[{list:s}]}}}validate(e,r){if(!Array.isArray(e))return!1;let s=[];for(let i of e){let a=r.normalizeValidateResult(this._valueSchema.validate(i,r),i);a!==!0&&s.push(a.value)}return s.length===0?!0:{value:s}}deprecated(e,r){let s=[];for(let i of e){let a=r.normalizeDeprecatedResult(this._valueSchema.deprecated(i,r),i);a!==!1&&s.push(...a.map(({value:u})=>({value:[u]})))}return s}forward(e,r){let s=[];for(let i of e){let a=r.normalizeForwardResult(this._valueSchema.forward(i,r),i);s.push(...a.map(Mf))}return s}redirect(e,r){let s=[],i=[];for(let a of e){let u=r.normalizeRedirectResult(this._valueSchema.redirect(a,r),a);"remain"in u&&s.push(u.remain),i.push(...u.redirect.map(Mf))}return s.length===0?{redirect:i}:{redirect:i,remain:s}}overlap(e,r){return e.concat(r)}};function Mf({from:t,to:e}){return{from:[t],to:e}}var Kv=class extends Gs{expected(){return"true or false"}validate(e){return typeof e=="boolean"}};function Xv(t,e){let r=Object.create(null);for(let s of t){let i=s[e];if(r[i])throw new Error(`Duplicate ${e} ${JSON.stringify(i)}`);r[i]=s}return r}function Gv(t,e){let r=new Map;for(let s of t){let i=s[e];if(r.has(i))throw new Error(`Duplicate ${e} ${JSON.stringify(i)}`);r.set(i,s)}return r}function Yv(){let t=Object.create(null);return e=>{let r=JSON.stringify(e);return t[r]?!0:(t[r]=!0,!1)}}function Qv(t,e){let r=[],s=[];for(let i of t)e(i)?r.push(i):s.push(i);return[r,s]}function Zv(t){return t===Math.floor(t)}function eS(t,e){if(t===e)return 0;let r=typeof t,s=typeof e,i=["undefined","object","boolean","number","string"];return r!==s?i.indexOf(r)-i.indexOf(s):r!=="string"?Number(t)-Number(e):t.localeCompare(e)}function tS(t){return(...e)=>{let r=t(...e);return typeof r=="string"?new Error(r):r}}function $f(t){return t===void 0?{}:t}function zg(t){if(typeof t=="string")return{text:t};let{text:e,list:r}=t;return rS((e||r)!==void 0,"Unexpected `expected` result, there should be at least one field."),r?{text:e,list:{title:r.title,values:r.values.map(zg)}}:{text:e}}function Rf(t,e){return t===!0?!0:t===!1?{value:e}:t}function jf(t,e,r=!1){return t===!1?!1:t===!0?r?!0:[{value:e}]:"value"in t?[t]:t.length===0?!1:t}function Uf(t,e){return typeof t=="string"||"key"in t?{from:e,to:t}:"from"in t?{from:t.from,to:t.to}:{from:e,to:t.to}}function vp(t,e){return t===void 0?[]:Array.isArray(t)?t.map(r=>Uf(r,e)):[Uf(t,e)]}function Vf(t,e){let r=vp(typeof t=="object"&&"redirect"in t?t.redirect:t,e);return r.length===0?{remain:e,redirect:r}:typeof t=="object"&&"remain"in t?{remain:t.remain,redirect:r}:{redirect:r}}function rS(t,e){if(!t)throw new Error(e)}var sS=class extends Gs{constructor(e){super(e),this._choices=Gv(e.choices.map(r=>r&&typeof r=="object"?r:{value:r}),"value")}expected({descriptor:e}){let r=Array.from(this._choices.keys()).map(a=>this._choices.get(a)).filter(({hidden:a})=>!a).map(a=>a.value).sort(eS).map(e.value),s=r.slice(0,-2),i=r.slice(-2);return{text:s.concat(i.join(" or ")).join(", "),list:{title:"one of the following values",values:r}}}validate(e){return this._choices.has(e)}deprecated(e){let r=this._choices.get(e);return r&&r.deprecated?{value:e}:!1}forward(e){let r=this._choices.get(e);return r?r.forward:void 0}redirect(e){let r=this._choices.get(e);return r?r.redirect:void 0}},iS=class extends Gs{expected(){return"a number"}validate(e,r){return typeof e=="number"}},nS=class extends iS{expected(){return"an integer"}validate(e,r){return r.normalizeValidateResult(super.validate(e,r),e)===!0&&Zv(e)}},qf=class extends Gs{expected(){return"a string"}validate(e){return typeof e=="string"}},aS=rn,oS=Hg,uS=jv,lS=Rv,pS=class{constructor(e,r){let{logger:s=console,loggerPrintWidth:i=80,descriptor:a=aS,unknown:u=oS,invalid:p=uS,deprecated:c=lS,missing:m=()=>!1,required:f=()=>!1,preprocess:d=y=>y,postprocess:D=()=>zo}=r||{};this._utils={descriptor:a,logger:s||{warn:()=>{}},loggerPrintWidth:i,schemas:Xv(e,"name"),normalizeDefaultResult:$f,normalizeExpectedResult:zg,normalizeDeprecatedResult:jf,normalizeForwardResult:vp,normalizeRedirectResult:Vf,normalizeValidateResult:Rf},this._unknownHandler=u,this._invalidHandler=tS(p),this._deprecatedHandler=c,this._identifyMissing=(y,x)=>!(y in x)||m(y,x),this._identifyRequired=f,this._preprocess=d,this._postprocess=D,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=Yv()}normalize(e){let r={},s=[this._preprocess(e,this._utils)],i=()=>{for(;s.length!==0;){let a=s.shift(),u=this._applyNormalization(a,r);s.push(...u)}};i();for(let a of Object.keys(this._utils.schemas)){let u=this._utils.schemas[a];if(!(a in r)){let p=$f(u.default(this._utils));"value"in p&&s.push({[a]:p.value})}}i();for(let a of Object.keys(this._utils.schemas)){if(!(a in r))continue;let u=this._utils.schemas[a],p=r[a],c=u.postprocess(p,this._utils);c!==zo&&(this._applyValidation(c,a,u),r[a]=c)}return this._applyPostprocess(r),this._applyRequiredCheck(r),r}_applyNormalization(e,r){let s=[],{knownKeys:i,unknownKeys:a}=this._partitionOptionKeys(e);for(let u of i){let p=this._utils.schemas[u],c=p.preprocess(e[u],this._utils);this._applyValidation(c,u,p);let m=({from:D,to:y})=>{s.push(typeof y=="string"?{[y]:D}:{[y.key]:y.value})},f=({value:D,redirectTo:y})=>{let x=jf(p.deprecated(D,this._utils),c,!0);if(x!==!1)if(x===!0)this._hasDeprecationWarned(u)||this._utils.logger.warn(this._deprecatedHandler(u,y,this._utils));else for(let{value:E}of x){let C={key:u,value:E};if(!this._hasDeprecationWarned(C)){let b=typeof y=="string"?{key:y,value:E}:y;this._utils.logger.warn(this._deprecatedHandler(C,b,this._utils))}}};vp(p.forward(c,this._utils),c).forEach(m);let d=Vf(p.redirect(c,this._utils),c);if(d.redirect.forEach(m),"remain"in d){let D=d.remain;r[u]=u in r?p.overlap(r[u],D,this._utils):D,f({value:D})}for(let{from:D,to:y}of d.redirect)f({value:D,redirectTo:y})}for(let u of a){let p=e[u];this._applyUnknownHandler(u,p,r,(c,m)=>{s.push({[c]:m})})}return s}_applyRequiredCheck(e){for(let r of Object.keys(this._utils.schemas))if(this._identifyMissing(r,e)&&this._identifyRequired(r))throw this._invalidHandler(r,Ug,this._utils)}_partitionOptionKeys(e){let[r,s]=Qv(Object.keys(e).filter(i=>!this._identifyMissing(i,e)),i=>i in this._utils.schemas);return{knownKeys:r,unknownKeys:s}}_applyValidation(e,r,s){let i=Rf(s.validate(e,this._utils),e);if(i!==!0)throw this._invalidHandler(r,i.value,this._utils)}_applyUnknownHandler(e,r,s,i){let a=this._unknownHandler(e,r,this._utils);if(a)for(let u of Object.keys(a)){if(this._identifyMissing(u,a))continue;let p=a[u];u in this._utils.schemas?i(u,p):s[u]=p}}_applyPostprocess(e){let r=this._postprocess(e,this._utils);if(r!==zo){if(r.delete)for(let s of r.delete)delete e[s];if(r.override){let{knownKeys:s,unknownKeys:i}=this._partitionOptionKeys(r.override);for(let a of s){let u=r.override[a];this._applyValidation(u,a,this._utils.schemas[a]),e[a]=u}for(let a of i){let u=r.override[a];this._applyUnknownHandler(a,u,e,(p,c)=>{let m=this._utils.schemas[p];this._applyValidation(c,p,m),e[p]=c})}}}}},Bl;function cS(t,e,{logger:r=!1,isCLI:s=!1,passThrough:i=!1,FlagSchema:a,descriptor:u}={}){if(s){if(!a)throw new Error("'FlagSchema' option is required.");if(!u)throw new Error("'descriptor' option is required.")}else u=rn;let p=i?Array.isArray(i)?(D,y)=>i.includes(D)?{[D]:y}:void 0:(D,y)=>({[D]:y}):(D,y,x)=>{let{_:E,...C}=x.schemas;return Hg(D,y,{...x,schemas:C})},c=hS(e,{isCLI:s,FlagSchema:a}),m=new pS(c,{logger:r,unknown:p,descriptor:u}),f=r!==!1;f&&Bl&&(m._hasDeprecationWarned=Bl);let d=m.normalize(t);return f&&(Bl=m._hasDeprecationWarned),d}function hS(t,{isCLI:e,FlagSchema:r}){let s=[];e&&s.push(Wv.create({name:"_"}));for(let i of t)s.push(dS(i,{isCLI:e,optionInfos:t,FlagSchema:r})),i.alias&&e&&s.push(zv.create({name:i.alias,sourceName:i.name}));return s}function dS(t,{isCLI:e,optionInfos:r,FlagSchema:s}){let{name:i}=t,a={name:i},u,p={};switch(t.type){case"int":u=nS,e&&(a.preprocess=Number);break;case"string":u=qf;break;case"choice":u=sS,a.choices=t.choices.map(c=>c?.redirect?{...c,redirect:{to:{key:t.name,value:c.redirect}}}:c);break;case"boolean":u=Kv;break;case"flag":u=s,a.flags=r.flatMap(c=>[c.alias,c.description&&c.name,c.oppositeDescription&&`no-${c.name}`].filter(Boolean));break;case"path":u=qf;break;default:throw new Error(`Unexpected type ${t.type}`)}if(t.exception?a.validate=(c,m,f)=>t.exception(c)||m.validate(c,f):a.validate=(c,m,f)=>c===void 0||m.validate(c,f),t.redirect&&(p.redirect=c=>c?{to:typeof t.redirect=="string"?t.redirect:{key:t.redirect.option,value:t.redirect.value}}:void 0),t.deprecated&&(p.deprecated=!0),e&&!t.array){let c=a.preprocess||(m=>m);a.preprocess=(m,f,d)=>f.preprocess(c(Array.isArray(m)?Et(0,m,-1):m),d)}return t.array?Jv.create({...e?{preprocess:c=>Array.isArray(c)?c:[c]}:{},...p,valueSchema:u.create(a)}):u.create({...a,...p})}var fS=cS,mS=Array.prototype.findLast??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return r}},yS=Va("findLast",function(){if(Array.isArray(this))return mS}),Wg=yS,gS=Symbol.for("PRETTIER_IS_FRONT_MATTER"),DS=[];function xS(t){return!!t?.[gS]}var Pc=xS,Jg=new Set(["yaml","toml"]),Kg=({node:t})=>Pc(t)&&Jg.has(t.language);async function ES(t,e,r,s){let{node:i}=r,{language:a}=i;if(!Jg.has(a))return;let u=i.value.trim(),p;if(u){let c=a==="yaml"?a:Rg(s,{language:a});if(!c)return;p=u?await t(u,{parser:c}):""}else p=u;return Dg([i.startDelimiter,i.explicitLanguage??"",ls,p,p?ls:"",i.endDelimiter])}function AS(t,e){return Kg({node:t})&&(delete e.end,delete e.raw,delete e.value),e}var CS=AS;function bS({node:t}){return t.raw}var TS=bS,Xg=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),vS=t=>Object.keys(t).filter(e=>!Xg.has(e));function SS(t,e){let r=t?s=>t(s,Xg):vS;return e?new Proxy(r,{apply:(s,i,a)=>Pc(a[0])?DS:Reflect.apply(s,i,a)}):r}var Hf=SS;function Gg(t,e){if(!e)throw new Error("parserName is required.");let r=Wg(0,t,i=>i.parsers&&Object.prototype.hasOwnProperty.call(i.parsers,e));if(r)return r;let s=`Couldn't resolve parser "${e}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new Og(s)}function wS(t,e){if(!e)throw new Error("astFormat is required.");let r=Wg(0,t,i=>i.printers&&Object.prototype.hasOwnProperty.call(i.printers,e));if(r)return r;let s=`Couldn't find plugin for AST format "${e}".`;throw s+=" Plugins must be explicitly added to the standalone bundle.",new Og(s)}function Fc({plugins:t,parser:e}){let r=Gg(t,e);return Yg(r,e)}function Yg(t,e){let r=t.parsers[e];return typeof r=="function"?r():r}async function PS(t,e){let r=t.printers[e],s=typeof r=="function"?await r():r;return FS(s)}var _l=new WeakMap;function FS(t){if(_l.has(t))return _l.get(t);let{features:e,getVisitorKeys:r,embed:s,massageAstNode:i,print:a,...u}=t;e=BS(e);let p=e.experimental_frontMatterSupport;r=Hf(r,p.massageAstNode||p.embed||p.print);let c=i;i&&p.massageAstNode&&(c=new Proxy(i,{apply(D,y,x){return CS(...x),Reflect.apply(D,y,x)}}));let m=s;if(s){let D;m=new Proxy(s,{get(y,x,E){return x==="getVisitorKeys"?(D??(D=s.getVisitorKeys?Hf(s.getVisitorKeys,p.massageAstNode||p.embed):r),D):Reflect.get(y,x,E)},apply:(y,x,E)=>p.embed&&Kg(...E)?ES:Reflect.apply(y,x,E)})}let f=a;p.print&&(f=new Proxy(a,{apply(D,y,x){let[E]=x;return Pc(E.node)?TS(E):Reflect.apply(D,y,x)}}));let d={features:e,getVisitorKeys:r,embed:m,massageAstNode:c,print:f,...u};return _l.set(t,d),d}var kS=["clean","embed","print"],IS=Object.fromEntries(kS.map(t=>[t,!1]));function NS(t){return{...IS,...t}}function BS(t){return{experimental_avoidAstMutation:!1,...t,experimental_frontMatterSupport:NS(t?.experimental_frontMatterSupport)}}var zf={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function _S(t,e={}){let r={...t};if(!r.parser)if(r.filepath){if(r.parser=Rg(r,{physicalFile:r.filepath}),!r.parser)throw new Nf(`No parser could be inferred for file "${r.filepath}".`)}else throw new Nf("No parser and no file path given, couldn't infer a parser.");let s=Mg({plugins:t.plugins,showDeprecated:!0}).options,i={...zf,...Object.fromEntries(s.filter(d=>d.default!==void 0).map(d=>[d.name,d.default]))},a=Gg(r.plugins,r.parser),u=await Yg(a,r.parser);r.astFormat=u.astFormat,r.locEnd=u.locEnd,r.locStart=u.locStart;let p=a.printers?.[u.astFormat]?a:wS(r.plugins,u.astFormat),c=await PS(p,u.astFormat);r.printer=c,r.getVisitorKeys=c.getVisitorKeys;let m=p.defaultOptions?Object.fromEntries(Object.entries(p.defaultOptions).filter(([,d])=>d!==void 0)):{},f={...i,...m};for(let[d,D]of Object.entries(f))(r[d]===null||r[d]===void 0)&&(r[d]=D);return r.parser==="json"&&(r.trailingComma="none"),fS(r,s,{passThrough:Object.keys(zf),...e})}var An=_S;Gb(Yb());var kc={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};new Set(kc.keyword);new Set(kc.strict);new Set(kc.strictBind);var bo=(t,e)=>r=>t(e(r));function Qg(t){return{keyword:t.cyan,capitalized:t.yellow,jsxIdentifier:t.yellow,punctuator:t.yellow,number:t.magenta,string:t.green,regex:t.magenta,comment:t.gray,invalid:bo(bo(t.white,t.bgRed),t.bold),gutter:t.gray,marker:bo(t.red,t.bold),message:bo(t.red,t.bold),reset:t.reset}}Qg(jg());Qg(jg());function LS(){return new Proxy({},{get:()=>t=>t})}var Wf=/\r\n|[\n\r\u2028\u2029]/;function OS(t,e,r){let s=Object.assign({column:0,line:-1},t.start),i=Object.assign({},s,t.end),{linesAbove:a=2,linesBelow:u=3}=r||{},p=s.line,c=s.column,m=i.line,f=i.column,d=Math.max(p-(a+1),0),D=Math.min(e.length,m+u);p===-1&&(d=0),m===-1&&(D=e.length);let y=m-p,x={};if(y)for(let E=0;E<=y;E++){let C=E+p;if(!c)x[C]=!0;else if(E===0){let b=e[C-1].length;x[C]=[c,b-c+1]}else if(E===y)x[C]=[0,f];else{let b=e[C-E].length;x[C]=[0,b]}}else c===f?c?x[p]=[c,0]:x[p]=!0:x[p]=[c,f-c];return{start:d,end:D,markerLines:x}}function MS(t,e,r={}){let s=LS(),i=t.split(Wf),{start:a,end:u,markerLines:p}=OS(e,i,r),c=e.start&&typeof e.start.column=="number",m=String(u).length,f=t.split(Wf,u).slice(a,u).map((d,D)=>{let y=a+1+D,x=` ${` ${y}`.slice(-m)} |`,E=p[y],C=!p[y+1];if(E){let b="";if(Array.isArray(E)){let A=d.slice(0,Math.max(E[0]-1,0)).replace(/[^\t]/g," "),v=E[1]||1;b=[`
|
|
19
|
-
`,s.gutter(x.replace(/\d/g," "))," ",A,s.marker("^").repeat(v)].join(""),C&&r.message&&(b+=" "+s.message(r.message))}return[s.marker(">"),s.gutter(x),d.length>0?` ${d}`:"",b].join("")}else return` ${s.gutter(x)}${d.length>0?` ${d}`:""}`}).join(`
|
|
20
|
-
`);return r.message&&!c&&(f=`${" ".repeat(m+1)}${r.message}
|
|
21
|
-
${f}`),f}async function $S(t,e){let r=await Fc(e),s=r.preprocess?await r.preprocess(t,e):t;e.originalText=s;let i;try{i=await r.parse(s,e,e)}catch(a){RS(a,t)}return{text:s,ast:i}}function RS(t,e){let{loc:r}=t;if(r){let s=MS(e,r,{});throw t.message+=`
|
|
22
|
-
`+s,t.codeFrame=s,t}throw t}var Ha=$S;async function jS(t,e,r,s,i){if(r.embeddedLanguageFormatting!=="auto")return;let{printer:a}=r,{embed:u}=a;if(!u)return;if(u.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed");let{hasPrettierIgnore:p}=a,{getVisitorKeys:c}=u,m=[];D();let f=t.stack;for(let{print:y,node:x,pathStack:E}of m)try{t.stack=E;let C=await y(d,e,t,r);C&&i.set(x,C)}catch(C){if(globalThis.PRETTIER_DEBUG)throw C}t.stack=f;function d(y,x){return US(y,x,r,s)}function D(){let{node:y}=t;if(y===null||typeof y!="object"||p?.(t))return;for(let E of c(y))Array.isArray(y[E])?t.each(D,E):t.call(D,E);let x=u(t,r);if(x){if(typeof x=="function"){m.push({print:x,node:y,pathStack:[...t.stack]});return}i.set(y,x)}}}async function US(t,e,r,s){let i=await An({...r,...e,parentParser:r.parser,originalText:t,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await Ha(t,i),u=await s(a,i);return gg(u)}function VS(t,e,r,s){let{originalText:i,[Symbol.for("comments")]:a,locStart:u,locEnd:p,[Symbol.for("printedComments")]:c}=e,{node:m}=t,f=u(m),d=p(m);for(let y of a)u(y)>=f&&p(y)<=d&&c.add(y);let{printPrettierIgnored:D}=e.printer;return D?D(t,e,r,s):i.slice(f,d)}var qS=VS;async function Su(t,e){({ast:t}=await Zg(t,e));let r=new Map,s=new iv(t),i=new Map;await jS(s,u,e,Su,i);let a=await Jf(s,e,u,void 0,i);if(Cv(e),e.cursorOffset>=0){if(e.nodeAfterCursor&&!e.nodeBeforeCursor)return[mi,a];if(e.nodeBeforeCursor&&!e.nodeAfterCursor)return[a,mi]}return a;function u(c,m){return c===void 0||c===s?p(m):Array.isArray(c)?s.call(()=>p(m),...c):s.call(()=>p(m),c)}function p(c){let m=s.node;if(m==null)return"";let f=Tc(m)&&c===void 0;if(f&&r.has(m))return r.get(m);let d=Jf(s,e,u,c,i);return f&&r.set(m,d),d}}function Jf(t,e,r,s,i){let{node:a}=t,{printer:u}=e,p;switch(u.hasPrettierIgnore?.(t)?p=qS(t,e,r,s):i.has(a)?p=i.get(a):p=u.print(t,e,r,s),a){case e.cursorNode:p=Ho(p,c=>[mi,c,mi]);break;case e.nodeBeforeCursor:p=Ho(p,c=>[c,mi]);break;case e.nodeAfterCursor:p=Ho(p,c=>[mi,c]);break}return u.printComment&&!u.willPrintOwnComments?.(t,e)&&(p=Av(t,p,e)),p}async function Zg(t,e){let r=t.comments??[];e[Symbol.for("comments")]=r,e[Symbol.for("printedComments")]=new Set,fv(t,e);let{printer:{preprocess:s}}=e;return t=s?await s(t,e):t,{ast:t,comments:r}}function HS(t,e){let{cursorOffset:r,locStart:s,locEnd:i,getVisitorKeys:a}=e,u=y=>s(y)<=r&&i(y)>=r,p=t,c=[t];for(let y of cv(t,{getVisitorKeys:a,filter:u}))c.push(y),p=y;if(hv(p,{getVisitorKeys:a}))return{cursorNode:p};let m,f,d=-1,D=Number.POSITIVE_INFINITY;for(;c.length>0&&(m===void 0||f===void 0);){p=c.pop();let y=m!==void 0,x=f!==void 0;for(let E of vu(p,{getVisitorKeys:a})){if(!y){let C=i(E);C<=r&&C>d&&(m=E,d=C)}if(!x){let C=s(E);C>=r&&C<D&&(f=E,D=C)}}}return{nodeBeforeCursor:m,nodeAfterCursor:f}}var eD=HS;function zS(t,e){let{printer:r}=e,s=r.massageAstNode;if(!s)return t;let{getVisitorKeys:i}=r,{ignoredProperties:a}=s;return u(t);function u(p,c){if(!Tc(p))return p;if(Array.isArray(p))return p.map(D=>u(D,c)).filter(Boolean);let m={},f=new Set(i(p));for(let D in p)!Object.prototype.hasOwnProperty.call(p,D)||a?.has(D)||(f.has(D)?m[D]=u(p[D],p):m[D]=p[D]);let d=s(p,m,c);if(d!==null)return d??m}}var WS=zS,JS=Array.prototype.findLastIndex??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return e}return-1},KS=Va("findLastIndex",function(){if(Array.isArray(this))return JS}),XS=KS,GS=({parser:t})=>t==="json"||t==="json5"||t==="jsonc"||t==="json-stringify";function YS(t,e){return e=new Set(e),t.find(r=>tD.has(r.type)&&e.has(r))}function Kf(t){let e=XS(0,t,r=>r.type!=="Program"&&r.type!=="File");return e===-1?t:t.slice(0,e+1)}function QS(t,e,{locStart:r,locEnd:s}){let[i,...a]=t,[u,...p]=e;if(i===u)return[i,u];let c=r(i);for(let f of Kf(p))if(r(f)>=c)u=f;else break;let m=s(u);for(let f of Kf(a)){if(s(f)<=m)i=f;else break;if(i===u)break}return[i,u]}function Sp(t,e,r,s,i=[],a){let{locStart:u,locEnd:p}=r,c=u(t),m=p(t);if(e>m||e<c||a==="rangeEnd"&&e===c||a==="rangeStart"&&e===m)return;let f=[t,...i],d=Ig(t,f,{cache:Ng,locStart:u,locEnd:p,getVisitorKeys:r.getVisitorKeys,filter:r.printer.canAttachComment,getChildren:r.printer.getCommentChildNodes});for(let D of d){let y=Sp(D,e,r,s,f,a);if(y)return y}if(s(t,i[0]))return f}function ZS(t,e){return e!=="DeclareExportDeclaration"&&t!=="TypeParameterDeclaration"&&(t==="Directive"||t==="TypeAlias"||t==="TSExportAssignment"||t.startsWith("Declare")||t.startsWith("TSDeclare")||t.endsWith("Statement")||t.endsWith("Declaration"))}var tD=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),ew=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Xf(t,e,r){if(!e)return!1;switch(t.parser){case"flow":case"hermes":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"oxc":case"oxc-ts":case"__babel_estree":return ZS(e.type,r?.type);case"json":case"json5":case"jsonc":case"json-stringify":return tD.has(e.type);case"graphql":return ew.has(e.kind);case"vue":return e.tag!=="root"}return!1}function tw(t,e,r){let{rangeStart:s,rangeEnd:i,locStart:a,locEnd:u}=e,p=t.slice(s,i).search(/\S/u),c=p===-1;if(!c)for(s+=p;i>s&&!/\S/u.test(t[i-1]);--i);let m=Sp(r,s,e,(y,x)=>Xf(e,y,x),[],"rangeStart");if(!m)return;let f=c?m:Sp(r,i,e,y=>Xf(e,y),[],"rangeEnd");if(!f)return;let d,D;if(GS(e)){let y=YS(m,f);d=y,D=y}else[d,D]=QS(m,f,e);return[Math.min(a(d),a(D)),Math.max(u(d),u(D))]}var rD="\uFEFF",Gf=Symbol("cursor");async function sD(t,e,r=0){if(!t||t.trim().length===0)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:s,text:i}=await Ha(t,e);e.cursorOffset>=0&&(e={...e,...eD(s,e)});let a=await Su(s,e);r>0&&(a=xg([ls,a],r,e.tabWidth));let u=Tu(a,e);if(r>0){let c=u.formatted.trim();u.cursorNodeStart!==void 0&&(u.cursorNodeStart-=u.formatted.indexOf(c),u.cursorNodeStart<0&&(u.cursorNodeStart=0,u.cursorNodeText=u.cursorNodeText.trimStart()),u.cursorNodeStart+u.cursorNodeText.length>c.length&&(u.cursorNodeText=u.cursorNodeText.trimEnd())),u.formatted=c+Dc(e.endOfLine)}let p=e[Symbol.for("comments")];if(e.cursorOffset>=0){let c,m,f,d;if((e.cursorNode||e.nodeBeforeCursor||e.nodeAfterCursor)&&u.cursorNodeText)if(f=u.cursorNodeStart,d=u.cursorNodeText,e.cursorNode)c=e.locStart(e.cursorNode),m=i.slice(c,e.locEnd(e.cursorNode));else{if(!e.nodeBeforeCursor&&!e.nodeAfterCursor)throw new Error("Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor");c=e.nodeBeforeCursor?e.locEnd(e.nodeBeforeCursor):0;let b=e.nodeAfterCursor?e.locStart(e.nodeAfterCursor):i.length;m=i.slice(c,b)}else c=0,m=i,f=0,d=u.formatted;let D=e.cursorOffset-c;if(m===d)return{formatted:u.formatted,cursorOffset:f+D,comments:p};let y=m.split("");y.splice(D,0,Gf);let x=d.split(""),E=iT(y,x),C=f;for(let b of E)if(b.removed){if(b.value.includes(Gf))break}else C+=b.count;return{formatted:u.formatted,cursorOffset:C,comments:p}}return{formatted:u.formatted,cursorOffset:-1,comments:p}}async function rw(t,e){let{ast:r,text:s}=await Ha(t,e),[i,a]=tw(s,e,r)??[0,0],u=s.slice(i,a),p=Math.min(i,s.lastIndexOf(`
|
|
23
|
-
`,i)+1),c=s.slice(p,i).match(/^\s*/u)[0],m=bc(c,e.tabWidth),f=await sD(u,{...e,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:e.cursorOffset>i&&e.cursorOffset<=a?e.cursorOffset-i:-1,endOfLine:"lf"},m),d=f.formatted.trimEnd(),{cursorOffset:D}=e;D>a?D+=d.length-u.length:f.cursorOffset>=0&&(D=f.cursorOffset+i);let y=s.slice(0,i)+d+s.slice(a);if(e.endOfLine!=="lf"){let x=Dc(e.endOfLine);D>=0&&x===`\r
|
|
24
|
-
`&&(D+=mg(y.slice(0,D),`
|
|
25
|
-
`)),y=Eu(0,y,`
|
|
26
|
-
`,x)}return{formatted:y,cursorOffset:D,comments:f.comments}}function Ll(t,e,r){return typeof e!="number"||Number.isNaN(e)||e<0||e>t.length?r:e}function Yf(t,e){let{cursorOffset:r,rangeStart:s,rangeEnd:i}=e;return r=Ll(t,r,-1),s=Ll(t,s,0),i=Ll(t,i,t.length),{...e,cursorOffset:r,rangeStart:s,rangeEnd:i}}function iD(t,e){let{cursorOffset:r,rangeStart:s,rangeEnd:i,endOfLine:a}=Yf(t,e),u=t.charAt(0)===rD;if(u&&(t=t.slice(1),r--,s--,i--),a==="auto"&&(a=pT(t)),t.includes("\r")){let p=c=>mg(t.slice(0,Math.max(c,0)),`\r
|
|
27
|
-
`);r-=p(r),s-=p(s),i-=p(i),t=dT(t)}return{hasBOM:u,text:t,options:Yf(t,{...e,cursorOffset:r,rangeStart:s,rangeEnd:i,endOfLine:a})}}async function Qf(t,e){let r=await Fc(e);return!r.hasPragma||r.hasPragma(t)}async function sw(t,e){return(await Fc(e)).hasIgnorePragma?.(t)}async function nD(t,e){let{hasBOM:r,text:s,options:i}=iD(t,await An(e));if(i.rangeStart>=i.rangeEnd&&s!==""||i.requirePragma&&!await Qf(s,i)||i.checkIgnorePragma&&await sw(s,i))return{formatted:t,cursorOffset:e.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<s.length?a=await rw(s,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await Qf(s,i)&&(s=i.printer.insertPragma(s)),a=await sD(s,i)),r&&(a.formatted=rD+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function iw(t,e,r){let{text:s,options:i}=iD(t,await An(e)),a=await Ha(s,i);return r&&(r.preprocessForPrint&&(a.ast=await Zg(a.ast,i)),r.massage&&(a.ast=WS(a.ast,i))),a}async function nw(t,e){e=await An(e);let r=await Su(t,e);return Tu(r,e)}async function aw(t,e){let r=qT(t),{formatted:s}=await nD(r,{...e,parser:"__js_expression"});return s}async function ow(t,e){e=await An(e);let{ast:r}=await Ha(t,e);return e.cursorOffset>=0&&(e={...e,...eD(r,e)}),Su(r,e)}async function uw(t,e){return Tu(t,await An(e))}var aD={};yc(aD,{builders:()=>lw,printer:()=>pw,utils:()=>cw});var lw={join:Ag,line:Cg,softline:jT,hardline:ls,literalline:Tg,group:Eg,conditionalGroup:OT,fill:LT,lineSuffix:bp,lineSuffixBoundary:UT,cursor:mi,breakParent:bu,ifBreak:MT,trim:VT,indent:au,indentIfBreak:$T,align:cn,addAlignmentToDoc:xg,markAsRoot:Dg,dedentToRoot:BT,dedent:_T,hardlineWithoutBreakParent:Ac,literallineWithoutBreakParent:bg,label:RT,concat:t=>t},pw={printDocToString:Tu},cw={willBreak:bT,traverseDoc:xc,findInDoc:Ec,mapDoc:Cu,removeLines:ST,stripTrailingHardline:gg,replaceEndOfLine:FT,canBreak:IT},hw="3.8.3",oD={};yc(oD,{addDanglingComment:()=>pi,addLeadingComment:()=>da,addTrailingComment:()=>fa,getAlignmentSize:()=>bc,getIndentSize:()=>Dw,getMaxContinuousCount:()=>Aw,getNextNonSpaceNonCommentCharacter:()=>bw,getNextNonSpaceNonCommentCharacterIndex:()=>Bw,getPreferredQuote:()=>ww,getStringWidth:()=>Cc,hasNewline:()=>Us,hasNewlineInRange:()=>Fw,hasSpaces:()=>Iw,isNextLineEmpty:()=>$w,isNextLineEmptyAfterIndex:()=>_c,isPreviousLineEmpty:()=>Lw,makeString:()=>Mw,skip:()=>qa,skipEverythingButNewLine:()=>Fg,skipInlineComment:()=>Ic,skipNewline:()=>xi,skipSpaces:()=>zs,skipToLineEnd:()=>Pg,skipTrailingComment:()=>Nc,skipWhitespace:()=>av});function dw(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let r=e+2;r<t.length;++r)if(t.charAt(r)==="*"&&t.charAt(r+1)==="/")return r+2}return e}var Ic=dw;function fw(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Fg(t,e):e}var Nc=fw;function mw(t,e){let r=null,s=e;for(;s!==r;)r=s,s=zs(t,s),s=Ic(t,s),s=Nc(t,s),s=xi(t,s);return s}var Bc=mw;function yw(t,e){let r=null,s=e;for(;s!==r;)r=s,s=Pg(t,s),s=Ic(t,s),s=zs(t,s);return s=Nc(t,s),s=xi(t,s),s!==!1&&Us(t,s)}var _c=yw;function gw(t,e){let r=t.lastIndexOf(`
|
|
28
|
-
`);return r===-1?0:bc(t.slice(r+1).match(/^[\t ]*/u)[0],e)}var Dw=gw;function xw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ew(t,e){let r=t.matchAll(new RegExp(`(?:${xw(e)})+`,"gu"));return r.reduce||(r=[...r]),r.reduce((s,[i])=>Math.max(s,i.length),0)/e.length}var Aw=Ew;function Cw(t,e){let r=Bc(t,e);return r===!1?"":t.charAt(r)}var bw=Cw,uD=Object.freeze({character:"'",codePoint:39}),lD=Object.freeze({character:'"',codePoint:34}),Tw=Object.freeze({preferred:uD,alternate:lD}),vw=Object.freeze({preferred:lD,alternate:uD});function Sw(t,e){let{preferred:r,alternate:s}=e===!0||e==="'"?Tw:vw,{length:i}=t,a=0,u=0;for(let p=0;p<i;p++){let c=t.charCodeAt(p);c===r.codePoint?a++:c===s.codePoint&&u++}return(a>u?s:r).character}var ww=Sw;function Pw(t,e,r){for(let s=e;s<r;++s)if(t.charAt(s)===`
|
|
29
|
-
`)return!0;return!1}var Fw=Pw;function kw(t,e,r={}){return zs(t,r.backwards?e-1:e,r)!==e}var Iw=kw;function Nw(t,e,r){return Bc(t,r(e))}function Bw(t,e){return arguments.length===2||typeof e=="number"?Bc(t,e):Nw(...arguments)}function _w(t,e,r){return Sc(t,r(e))}function Lw(t,e){return arguments.length===2||typeof e=="number"?Sc(t,e):_w(...arguments)}function Ow(t,e,r){return _c(t,r(e))}function Mw(t,e,r){let s=e==='"'?"'":'"',i=Eu(0,t,/\\(.)|(["'])/gsu,(a,u,p)=>u===s?u:p===e?"\\"+p:p||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(u)?u:"\\"+u));return e+i+e}function $w(t,e){return arguments.length===2||typeof e=="number"?_c(t,e):Ow(...arguments)}function hi(t,e=1){return async(...r)=>{let s=r[e]??{},i=s.plugins??[];return r[e]={...s,plugins:Array.isArray(i)?i:Object.values(i)},t(...r)}}var pD=hi(nD);async function as(t,e){let{formatted:r}=await pD(t,{...e,cursorOffset:-1});return r}async function Rw(t,e){return await as(t,e)===t}var jw=hi(Mg,0),Uw={parse:hi(iw),formatAST:hi(nw),formatDoc:hi(aw),printToDoc:hi(ow),printDocToString:hi(uw)},Vw=Object.defineProperty,Lc=(t,e)=>{for(var r in e)Vw(t,r,{get:e[r],enumerable:!0})},cD={};Lc(cD,{parsers:()=>JD});var hD={};Lc(hD,{__babel_estree:()=>Bk,__js_expression:()=>Tm,__ts_expression:()=>vm,__vue_event_binding:()=>Cm,__vue_expression:()=>Tm,__vue_ts_event_binding:()=>bm,__vue_ts_expression:()=>vm,babel:()=>Cm,"babel-flow":()=>qD,"babel-ts":()=>bm});function qw(t,e){if(t==null)return{};var r={};for(var s in t)if({}.hasOwnProperty.call(t,s)){if(e.indexOf(s)!==-1)continue;r[s]=t[s]}return r}var Vs=class{line;column;index;constructor(e,r,s){this.line=e,this.column=r,this.index=s}},ou=class{start;end;filename;identifierName;constructor(e,r){this.start=e,this.end=r}};function fr(t,e){let{line:r,column:s,index:i}=t;return new Vs(r,s+e,i+e)}var Zf="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Hw={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Zf},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Zf}},em={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Wo=t=>t.type==="UpdateExpression"?em.UpdateExpression[`${t.prefix}`]:em[t.type],zw={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
30
|
-
- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.
|
|
31
|
-
- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${Wo(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${Wo(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${Wo(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:t})=>`Unexpected keyword '${t}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Ww={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Jw={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:t})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(t)}\`.`},Kw=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Xw=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${Wo({type:t})}; please wrap it in parentheses.`},{}),Gw=["message"];function tm(t,e,r){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:r})}function Yw({toMessage:t,code:e,reasonCode:r,syntaxPlugin:s}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";return function a(u,p){let c=new SyntaxError;return c.code=e,c.reasonCode=r,c.loc=u,c.pos=u.index,c.syntaxPlugin=s,i&&(c.missingPlugin=p.missingPlugin),tm(c,"clone",function(m={}){let{line:f,column:d,index:D}=m.loc??u;return a(new Vs(f,d,D),Object.assign({},p,m.details))}),tm(c,"details",p),Object.defineProperty(c,"message",{configurable:!0,get(){let m=`${t(p)} (${u.line}:${u.column})`;return this.message=m,m},set(m){Object.defineProperty(this,"message",{value:m,writable:!0})}}),c}}function Mr(t,e){if(Array.isArray(t))return s=>Mr(s,t[0]);let r={};for(let s of Object.keys(t)){let i=t[s],a=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:u}=a,p=qw(a,Gw),c=typeof u=="string"?()=>u:u;r[s]=Yw(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:c},e?{syntaxPlugin:e}:{},p))}return r}var U=Object.assign({},Mr(Hw),Mr(zw),Mr(Ww),Mr(Jw),Mr`pipelineOperator`(Xw));function Qw(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Zw(t){let e=Qw();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let r of Object.keys(e))t[r]!=null&&(e[r]=t[r]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if(t.startColumn==null||t.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(t.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(t.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(t.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:eP}=Object,rm=(t,e)=>{t&&eP(t,e,{enumerable:!1,value:t[e]})};function qn(t){return rm(t.loc.start,"index"),rm(t.loc.end,"index"),t}var tP=t=>class extends t{parse(){let e=qn(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(qn)),e}parseRegExpLiteral({pattern:e,flags:r}){let s=null;try{s=new RegExp(e,r)}catch{}let i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:r},i}parseBigIntLiteral(e){let r;try{r=BigInt(e)}catch{r=null}let s=this.estreeParseLiteral(r);return s.bigint=String(s.value||e),s}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,r){let s=this.startNodeAtNode(e);return s.expression=e,this.finishNodeAt(s,"ChainExpression",r)}directiveToStmt(e){let r=e.value;delete e.value,this.castNodeTo(r,"Literal"),r.raw=r.extra.raw,r.value=r.extra.expressionValue;let s=this.castNodeTo(e,"ExpressionStatement");return s.expression=r,s.directive=r.extra.rawValue,delete r.extra,s}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:r,end:s,loc:i,range:a,raw:u,value:p}=e,c=Object.create(e.constructor.prototype);return c.type="Literal",c.start=r,c.end=s,c.loc=i,c.range=a,c.raw=u,c.value=p,c}initFunction(e,r){super.initFunction(e,r),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!e.expression.extra?.parenthesized}parseBlockBody(e,r,s,i,a){super.parseBlockBody(e,r,s,i,a);let u=e.directives.map(p=>this.directiveToStmt(p));e.body=u.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){let r=super.getPrivateNameSV(e);return delete e.id,e.name=r,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return e.type==="PrivateIdentifier"}getPrivateNameSV(e){return e.name}parseLiteral(e,r){let s=super.parseLiteral(e,r);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(e,r,s=!1){super.parseFunctionBody(e,r,s),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,r,s,i,a,u,p=!1){let c=this.startNode();c.kind=e.kind,c=super.parseMethod(c,r,s,i,a,u,p),delete c.kind;let{typeParameters:m}=e;m&&(delete e.typeParameters,c.typeParameters=m,this.resetStartLocationFromNode(c,m));let f=this.castNodeTo(c,this.hasPlugin("typescript")&&!c.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return e.value=f,u==="ClassPrivateMethod"&&(e.computed=!1),this.hasPlugin("typescript")&&e.abstract?(delete e.abstract,this.finishNode(e,"TSAbstractMethodDefinition")):u==="ObjectMethod"?(e.kind==="method"&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let r=super.parseClassProperty(...e);return r.abstract&&this.hasPlugin("typescript")?(delete r.abstract,this.castNodeTo(r,"TSAbstractPropertyDefinition")):this.castNodeTo(r,"PropertyDefinition"),r}parseClassPrivateProperty(...e){let r=super.parseClassPrivateProperty(...e);return r.abstract&&this.hasPlugin("typescript")?this.castNodeTo(r,"TSAbstractPropertyDefinition"):this.castNodeTo(r,"PropertyDefinition"),r.computed=!1,r}parseClassAccessorProperty(e){let r=super.parseClassAccessorProperty(e);return r.abstract&&this.hasPlugin("typescript")?(delete r.abstract,this.castNodeTo(r,"TSAbstractAccessorProperty")):this.castNodeTo(r,"AccessorProperty"),r}parseObjectProperty(e,r,s,i){let a=super.parseObjectProperty(e,r,s,i);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,r,s,i){return e==="Property"?"value":super.isValidLVal(e,r,s,i)}isAssignable(e,r){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,r):super.isAssignable(e,r)}toAssignable(e,r=!1){if(e!=null&&this.isObjectProperty(e)){let{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,r)}else super.toAssignable(e,r)}toAssignableObjectExpressionProp(e,r,s){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(U.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(U.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,r,s)}finishCallExpression(e,r){let s=super.finishCallExpression(e,r);return s.callee.type==="Import"?(this.castNodeTo(s,"ImportExpression"),s.source=s.arguments[0],s.options=s.arguments[1]??null,delete s.arguments,delete s.callee):s.type==="OptionalCallExpression"?this.castNodeTo(s,"CallExpression"):s.optional=!1,s}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,r){let s=this.state.lastTokStartLoc,i=super.parseExport(e,r);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{let{declaration:a}=i;a?.type==="ClassDeclaration"&&a.decorators?.length>0&&a.start===i.start&&this.resetStartLocation(i,s)}break}return i}stopParseSubscript(e,r){let s=super.stopParseSubscript(e,r);return r.optionalChainMember?this.estreeParseChainExpression(s,e.loc.end):s}parseMember(e,r,s,i,a){let u=super.parseMember(e,r,s,i,a);return u.type==="OptionalMemberExpression"?this.castNodeTo(u,"MemberExpression"):u.optional=!1,u}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}castNodeTo(e,r){let s=super.castNodeTo(e,r);return this.fillOptionalPropertiesForTSESLint(s),s}cloneIdentifier(e){let r=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(r),r}cloneStringLiteral(e){return e.type==="Literal"?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,r,s){return qn(super.finishNodeAt(e,r,s))}finishNode(e,r){let s=super.finishNode(e,r);return this.fillOptionalPropertiesForTSESLint(s),s}resetStartLocation(e,r){super.resetStartLocation(e,r),qn(e)}resetEndLocation(e,r=this.state.lastTokEndLoc){super.resetEndLocation(e,r),qn(e)}},To=class{constructor(e,r){this.token=e,this.preserveSpace=!!r}token;preserveSpace},et={brace:new To("{"),j_oTag:new To("<tag"),j_cTag:new To("</tag"),j_expr:new To("<tag>...</tag>",!0)},$e=!0,ce=!0,Ol=!0,Hn=!0,Fs=!0,rP=!0,dD=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(e,r={}){this.label=e,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null}},Oc=new Map;function Je(t,e={}){e.keyword=t;let r=Ce(t,e);return Oc.set(t,r),r}function Ot(t,e){return Ce(t,{beforeExpr:$e,binop:e})}var ma=-1,Mc=[],$c=[],Rc=[],jc=[],Uc=[],Vc=[];function Ce(t,e={}){return++ma,$c.push(t),Rc.push(e.binop??-1),jc.push(e.beforeExpr??!1),Uc.push(e.startsExpr??!1),Vc.push(e.prefix??!1),Mc.push(new dD(t,e)),ma}function Ue(t,e={}){return++ma,Oc.set(t,ma),$c.push(t),Rc.push(e.binop??-1),jc.push(e.beforeExpr??!1),Uc.push(e.startsExpr??!1),Vc.push(e.prefix??!1),Mc.push(new dD("name",e)),ma}var sP={bracketL:Ce("[",{beforeExpr:$e,startsExpr:ce}),bracketHashL:Ce("#[",{beforeExpr:$e,startsExpr:ce}),bracketBarL:Ce("[|",{beforeExpr:$e,startsExpr:ce}),bracketR:Ce("]"),bracketBarR:Ce("|]"),braceL:Ce("{",{beforeExpr:$e,startsExpr:ce}),braceBarL:Ce("{|",{beforeExpr:$e,startsExpr:ce}),braceHashL:Ce("#{",{beforeExpr:$e,startsExpr:ce}),braceR:Ce("}"),braceBarR:Ce("|}"),parenL:Ce("(",{beforeExpr:$e,startsExpr:ce}),parenR:Ce(")"),comma:Ce(",",{beforeExpr:$e}),semi:Ce(";",{beforeExpr:$e}),colon:Ce(":",{beforeExpr:$e}),doubleColon:Ce("::",{beforeExpr:$e}),dot:Ce("."),question:Ce("?",{beforeExpr:$e}),questionDot:Ce("?."),arrow:Ce("=>",{beforeExpr:$e}),template:Ce("template"),ellipsis:Ce("...",{beforeExpr:$e}),backQuote:Ce("`",{startsExpr:ce}),dollarBraceL:Ce("${",{beforeExpr:$e,startsExpr:ce}),templateTail:Ce("...`",{startsExpr:ce}),templateNonTail:Ce("...${",{beforeExpr:$e,startsExpr:ce}),at:Ce("@"),hash:Ce("#",{startsExpr:ce}),interpreterDirective:Ce("#!..."),eq:Ce("=",{beforeExpr:$e,isAssign:Hn}),assign:Ce("_=",{beforeExpr:$e,isAssign:Hn}),slashAssign:Ce("_=",{beforeExpr:$e,isAssign:Hn}),xorAssign:Ce("_=",{beforeExpr:$e,isAssign:Hn}),moduloAssign:Ce("_=",{beforeExpr:$e,isAssign:Hn}),incDec:Ce("++/--",{prefix:Fs,postfix:rP,startsExpr:ce}),bang:Ce("!",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),tilde:Ce("~",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),doubleCaret:Ce("^^",{startsExpr:ce}),doubleAt:Ce("@@",{startsExpr:ce}),pipeline:Ot("|>",0),nullishCoalescing:Ot("??",1),logicalOR:Ot("||",1),logicalAND:Ot("&&",2),bitwiseOR:Ot("|",3),bitwiseXOR:Ot("^",4),bitwiseAND:Ot("&",5),equality:Ot("==/!=/===/!==",6),lt:Ot("</>/<=/>=",7),gt:Ot("</>/<=/>=",7),relational:Ot("</>/<=/>=",7),bitShift:Ot("<</>>/>>>",8),bitShiftL:Ot("<</>>/>>>",8),bitShiftR:Ot("<</>>/>>>",8),plusMin:Ce("+/-",{beforeExpr:$e,binop:9,prefix:Fs,startsExpr:ce}),modulo:Ce("%",{binop:10,startsExpr:ce}),star:Ce("*",{binop:10}),slash:Ot("/",10),exponent:Ce("**",{beforeExpr:$e,binop:11,rightAssociative:!0}),_in:Je("in",{beforeExpr:$e,binop:7}),_instanceof:Je("instanceof",{beforeExpr:$e,binop:7}),_break:Je("break"),_case:Je("case",{beforeExpr:$e}),_catch:Je("catch"),_continue:Je("continue"),_debugger:Je("debugger"),_default:Je("default",{beforeExpr:$e}),_else:Je("else",{beforeExpr:$e}),_finally:Je("finally"),_function:Je("function",{startsExpr:ce}),_if:Je("if"),_return:Je("return",{beforeExpr:$e}),_switch:Je("switch"),_throw:Je("throw",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),_try:Je("try"),_var:Je("var"),_const:Je("const"),_with:Je("with"),_new:Je("new",{beforeExpr:$e,startsExpr:ce}),_this:Je("this",{startsExpr:ce}),_super:Je("super",{startsExpr:ce}),_class:Je("class",{startsExpr:ce}),_extends:Je("extends",{beforeExpr:$e}),_export:Je("export"),_import:Je("import",{startsExpr:ce}),_null:Je("null",{startsExpr:ce}),_true:Je("true",{startsExpr:ce}),_false:Je("false",{startsExpr:ce}),_typeof:Je("typeof",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),_void:Je("void",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),_delete:Je("delete",{beforeExpr:$e,prefix:Fs,startsExpr:ce}),_do:Je("do",{isLoop:Ol,beforeExpr:$e}),_for:Je("for",{isLoop:Ol}),_while:Je("while",{isLoop:Ol}),_as:Ue("as",{startsExpr:ce}),_assert:Ue("assert",{startsExpr:ce}),_async:Ue("async",{startsExpr:ce}),_await:Ue("await",{startsExpr:ce}),_defer:Ue("defer",{startsExpr:ce}),_from:Ue("from",{startsExpr:ce}),_get:Ue("get",{startsExpr:ce}),_let:Ue("let",{startsExpr:ce}),_meta:Ue("meta",{startsExpr:ce}),_of:Ue("of",{startsExpr:ce}),_sent:Ue("sent",{startsExpr:ce}),_set:Ue("set",{startsExpr:ce}),_source:Ue("source",{startsExpr:ce}),_static:Ue("static",{startsExpr:ce}),_using:Ue("using",{startsExpr:ce}),_yield:Ue("yield",{startsExpr:ce}),_asserts:Ue("asserts",{startsExpr:ce}),_checks:Ue("checks",{startsExpr:ce}),_exports:Ue("exports",{startsExpr:ce}),_global:Ue("global",{startsExpr:ce}),_implements:Ue("implements",{startsExpr:ce}),_intrinsic:Ue("intrinsic",{startsExpr:ce}),_infer:Ue("infer",{startsExpr:ce}),_is:Ue("is",{startsExpr:ce}),_mixins:Ue("mixins",{startsExpr:ce}),_proto:Ue("proto",{startsExpr:ce}),_require:Ue("require",{startsExpr:ce}),_satisfies:Ue("satisfies",{startsExpr:ce}),_keyof:Ue("keyof",{startsExpr:ce}),_readonly:Ue("readonly",{startsExpr:ce}),_unique:Ue("unique",{startsExpr:ce}),_abstract:Ue("abstract",{startsExpr:ce}),_declare:Ue("declare",{startsExpr:ce}),_enum:Ue("enum",{startsExpr:ce}),_module:Ue("module",{startsExpr:ce}),_namespace:Ue("namespace",{startsExpr:ce}),_interface:Ue("interface",{startsExpr:ce}),_type:Ue("type",{startsExpr:ce}),_opaque:Ue("opaque",{startsExpr:ce}),name:Ce("name",{startsExpr:ce}),placeholder:Ce("%%",{startsExpr:ce}),string:Ce("string",{startsExpr:ce}),num:Ce("num",{startsExpr:ce}),bigint:Ce("bigint",{startsExpr:ce}),decimal:Ce("decimal",{startsExpr:ce}),regexp:Ce("regexp",{startsExpr:ce}),privateName:Ce("#name",{startsExpr:ce}),eof:Ce("eof"),jsxName:Ce("jsxName"),jsxText:Ce("jsxText",{beforeExpr:$e}),jsxTagStart:Ce("jsxTagStart",{startsExpr:ce}),jsxTagEnd:Ce("jsxTagEnd")};function Ye(t){return t>=93&&t<=133}function iP(t){return t<=92}function br(t){return t>=58&&t<=133}function fD(t){return t>=58&&t<=137}function nP(t){return jc[t]}function ua(t){return Uc[t]}function aP(t){return t>=29&&t<=33}function sm(t){return t>=129&&t<=131}function oP(t){return t>=90&&t<=92}function qc(t){return t>=58&&t<=92}function uP(t){return t>=39&&t<=59}function lP(t){return t===34}function pP(t){return Vc[t]}function cP(t){return t>=121&&t<=123}function hP(t){return t>=124&&t<=130}function qs(t){return $c[t]}function Jo(t){return Rc[t]}function dP(t){return t===57}function wp(t){return t>=24&&t<=25}function mD(t){return Mc[t]}var Hc="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",yD="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",fP=new RegExp("["+Hc+"]"),mP=new RegExp("["+Hc+yD+"]");Hc=yD=null;var gD=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],yP=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function Pp(t,e){let r=65536;for(let s=0,i=e.length;s<i;s+=2){if(r+=e[s],r>t)return!1;if(r+=e[s+1],r>=t)return!0}return!1}function $r(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&fP.test(String.fromCharCode(t)):Pp(t,gD)}function gi(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&mP.test(String.fromCharCode(t)):Pp(t,gD)||Pp(t,yP)}var zc={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},gP=new Set(zc.keyword),DP=new Set(zc.strict),xP=new Set(zc.strictBind);function DD(t,e){return e&&t==="await"||t==="enum"}function xD(t,e){return DD(t,e)||DP.has(t)}function ED(t){return xP.has(t)}function AD(t,e){return xD(t,e)||ED(t)}function EP(t){return gP.has(t)}function AP(t,e,r){return t===64&&e===64&&$r(r)}var CP=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function bP(t){return CP.has(t)}var Wc=class{flags=0;names=new Map;firstLexicalName="";constructor(e){this.flags=e}},Jc=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(e,r){this.parser=e,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&128)return!0;if(r&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Wc(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,r,s){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,e,r,s);let a=i.names.get(e)||0;r&16?a=a|4:(i.firstLexicalName||(i.firstLexicalName=e),a=a|2),i.names.set(e,a),r&8&&this.maybeExportDefined(i,e)}else if(r&4)for(let a=this.scopeStack.length-1;a>=0&&(i=this.scopeStack[a],this.checkRedeclarationInScope(i,e,r,s),i.names.set(e,(i.names.get(e)||0)|1),this.maybeExportDefined(i,e),!(i.flags&1667));--a);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,r){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(e,r,s,i){this.isRedeclaredInScope(e,r,s)&&this.parser.raise(U.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(e,r,s){if(!(s&1))return!1;if(s&8)return e.names.has(r);let i=e.names.get(r)||0;return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(e)&&(i&1)>0:(i&2)>0&&!(e.flags&8&&e.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(e)&&(i&4)>0}checkLocalExport(e){let{name:r}=e;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1667)return r}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:r}=this.scopeStack[e];if(r&1731&&!(r&4))return r}}},TP=class extends Wc{declareFunctions=new Set},vP=class extends Jc{createScope(e){return new TP(e)}declareName(e,r,s){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e),i.declareFunctions.add(e);return}super.declareName(e,r,s)}isRedeclaredInScope(e,r,s){if(super.isRedeclaredInScope(e,r,s))return!0;if(s&2048&&!e.declareFunctions.has(r)){let i=e.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},SP=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Se=Mr`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:t})=>`Cannot overwrite reserved type ${t}.`,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:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:r})=>`Enum \`${t}\` has type \`${r}\`, so the initializer of \`${e}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${r}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,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."},{}),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:t})=>`Unexpected reserved type ${t}.`,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:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function wP(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function im(t){return t.importKind==="type"||t.importKind==="typeof"}var PP={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function FP(t,e){let r=[],s=[];for(let i=0;i<t.length;i++)(e(t[i],i,t)?r:s).push(t[i]);return[r,s]}var kP=/\*?\s*@((?:no)?flow)\b/,IP=t=>class extends t{flowPragma=void 0;getScopeHandler(){return vP}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,r){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,r)}addComment(e){if(this.flowPragma===void 0){let r=kP.exec(e.value);if(r)if(r[1]==="flow")this.flowPragma="flow";else if(r[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let r=this.state.inType;this.state.inType=!0,this.expect(e||14);let s=this.flowParseType();return this.state.inType=r,s}flowParsePredicate(){let e=this.startNode(),r=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>r.index+1&&this.raise(Se.UnexpectedSpaceBetweenModuloChecks,r),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 r=null,s=null;return this.match(54)?(this.state.inType=e,s=this.flowParsePredicate()):(r=this.flowParseType(),this.state.inType=e,this.match(54)&&(s=this.flowParsePredicate())),[r,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let r=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"),r.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(r),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,r){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):(r&&this.raise(Se.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,r);throw 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(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let r=e.body=this.startNode(),s=r.body=[];for(this.expect(5);!this.match(8);){let u=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Se.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),s.push(super.parseImport(u))):(this.expectContextual(125,Se.UnsupportedStatementInDeclareModule),s.push(this.flowParseDeclare(u,!0)))}this.scope.exit(),this.expect(8),this.finishNode(r,"BlockStatement");let i=null,a=!1;return s.forEach(u=>{wP(u)?(i==="CommonJS"&&this.raise(Se.AmbiguousDeclareModuleKind,u),i="ES"):u.type==="DeclareModuleExports"&&(a&&this.raise(Se.DuplicateDeclareModuleExports,u),i==="ES"&&this.raise(Se.AmbiguousDeclareModuleKind,u),i="CommonJS",a=!0)}),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,r){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))&&!r){let s=this.state.value;throw this.raise(Se.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:s,suggestion:PP[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.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration");throw 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 r=this.flowParseTypeAlias(e);return this.castNodeTo(r,"DeclareTypeAlias"),r}flowParseDeclareOpaqueType(e){this.next();let r=this.flowParseOpaqueType(e,!0);return this.castNodeTo(r,"DeclareOpaqueType"),r}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,r){if(e.id=this.flowParseRestrictedIdentifier(!r,!0),this.scope.declareName(e.id.name,r?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(!r&&this.eat(12));if(r){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:r,allowExact:!1,allowSpread:!1,allowProto:r,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(Se.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,r,s){SP.has(e)&&this.raise(s?Se.AssignReservedType:Se.UnexpectedReservedType,r,{reservedType:e})}flowParseRestrictedIdentifier(e,r){return this.checkReservedType(this.state.value,this.state.startLoc,r),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,r){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,r||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let r=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(Se.MissingTypeParamDefault,r),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,r=this.startNode();r.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let s=!1;do{let i=this.flowParseTypeParameter(s);r.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(r,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()!==et.brace){let r=this.state.context;this.state.context=[r[0]];try{return e()}finally{this.state.context=r}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),r=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{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);this.state.noAnonFunctionType=s}),this.state.inType=r,!this.state.inType&&this.curContext()===et.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let e=this.startNode(),r=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=r,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(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,r,s){return e.static=r,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,r){return e.static=r,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,r){let s=this.startNode();return e.static=r,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:r,allowSpread:s,allowProto:i,allowInexact:a}){let u=this.state.inType;this.state.inType=!0;let p=this.startNode();p.callProperties=[],p.properties=[],p.indexers=[],p.internalSlots=[];let c,m,f=!1;for(r&&this.match(6)?(this.expect(6),c=9,m=!0):(this.expect(5),c=8,m=!1),p.exact=m;!this.match(c);){let D=!1,y=null,x=null,E=this.startNode();if(i&&this.isContextual(118)){let b=this.lookahead();b.type!==14&&b.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let b=this.lookahead();b.type!==14&&b.type!==17&&(this.next(),D=!0)}let C=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(C&&this.unexpected(C.loc.start),p.internalSlots.push(this.flowParseObjectTypeInternalSlot(E,D))):p.indexers.push(this.flowParseObjectTypeIndexer(E,D,C));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),C&&this.unexpected(C.loc.start),p.callProperties.push(this.flowParseObjectTypeCallProperty(E,D));else{let b="init";if(this.isContextual(99)||this.isContextual(104)){let v=this.lookahead();fD(v.type)&&(b=this.state.value,this.next())}let A=this.flowParseObjectTypeProperty(E,D,y,C,b,s,a??!m);A===null?(f=!0,x=this.state.lastTokStartLoc):p.properties.push(A)}this.flowObjectTypeSemicolon(),x&&!this.match(8)&&!this.match(9)&&this.raise(Se.UnexpectedExplicitInexactInObject,x)}this.expect(c),s&&(p.inexact=f);let d=this.finishNode(p,"ObjectTypeAnnotation");return this.state.inType=u,d}flowParseObjectTypeProperty(e,r,s,i,a,u,p){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(u?p||this.raise(Se.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Se.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Se.InexactVariance,i),null):(u||this.raise(Se.UnexpectedSpreadType,this.state.lastTokStartLoc),s!=null&&this.unexpected(s),i&&this.raise(Se.SpreadVariance,i),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=r,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),!u&&e.key.name==="constructor"&&e.value.this&&this.raise(Se.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 r=e.kind==="get"?0:1,s=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?Se.GetterMayNotHaveThisParam:Se.SetterMayNotHaveThisParam,e.value.this),s!==r&&this.raise(e.kind==="get"?U.BadGetterArity:U.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(U.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,r){e??(e=this.state.startLoc);let s=r||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(e);i.qualification=s,i.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(i,"QualifiedTypeIdentifier")}return s}flowParseGenericType(e,r){let s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,r),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 r=null,s=!1,i=null,a=this.startNode(),u=this.lookahead(),p=this.state.type===78;return u.type===14||u.type===17?(p&&!e&&this.raise(Se.ThisParamMustBeFirst,a),r=this.parseIdentifier(p),this.eat(17)&&(s=!0,p&&this.raise(Se.ThisParamMayNotBeOptional,a)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),a.name=r,a.optional=s,a.typeAnnotation=i,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let r=this.startNodeAt(e.loc.start);return r.name=null,r.optional=!1,r.typeAnnotation=e,this.finishNode(r,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let r=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)&&(r=this.flowParseFunctionTypeParam(!1)),{params:e,rest:r,_this:s}}flowIdentToTypeAnnotation(e,r,s){switch(s.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");case"symbol":return this.finishNode(r,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(e,s)}}flowParsePrimaryType(){let e=this.state.startLoc,r=this.startNode(),s,i,a=!1,u=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=u,i;case 47:{let p=this.startNode();return p.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),p.params=s.params,p.rest=s.rest,p.this=s._this,this.expect(11),this.expect(19),p.returnType=this.flowParseType(),this.finishNode(p,"FunctionTypeAnnotation")}case 10:{let p=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(Ye(this.state.type)||this.match(78)){let c=this.lookahead().type;a=c!==17&&c!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=u,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(),p.params=s.params,p.rest=s.rest,p.this=s._this,this.expect(11),this.expect(19),p.returnType=this.flowParseType(),p.typeParameters=null,this.finishNode(p,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return r.value=this.match(85),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",r);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",r);throw this.raise(Se.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(r,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(r,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(r,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(qc(this.state.type)){let p=qs(this.state.type);return this.next(),super.createIdentifier(r,p)}else if(Ye(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,r,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,r=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=r,this.next(),r=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=r,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=a,r=this.finishNode(i,"OptionalIndexedAccessType")):r=this.finishNode(i,"IndexedAccessType"))}return r}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 r=this.startNodeAt(e.loc.start);return r.params=[this.reinterpretTypeAsFunctionTypeParam(e)],r.rest=null,r.this=null,r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let r=this.flowParseAnonFunctionWithoutParens();for(e.types=[r];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?r:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let r=this.flowParseIntersectionType();for(e.types=[r];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?r:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let r=this.flowParseUnionType();return this.state.inType=e,r}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,r=this.parseIdentifier();return this.flowParseGenericType(e,r)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let r=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r)),r}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,r,s=!1){if(r){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,s));return}super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,r,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,r,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let s=this.lookahead();if(br(s.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}let r=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(r)&&(this.flowPragma=null),r}parseExpressionStatement(e,r,s){if(r.type==="Identifier"){if(r.name==="declare"){if(this.match(80)||Ye(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(Ye(this.state.type)){if(r.name==="interface")return this.flowParseInterface(e);if(r.name==="type")return this.flowParseTypeAlias(e);if(r.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,r,s)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||sm(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||sm(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,r,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(s),e}this.expect(17);let i=this.state.clone(),a=this.state.noArrowAt,u=this.startNodeAt(r),{consequent:p,failed:c}=this.tryParseConditionalConsequent(),[m,f]=this.getArrowLikeExpressions(p);if(c||f.length>0){let d=[...a];if(f.length>0){this.state=i,this.state.noArrowAt=d;for(let D=0;D<f.length;D++)d.push(f[D].start);({consequent:p,failed:c}=this.tryParseConditionalConsequent()),[m,f]=this.getArrowLikeExpressions(p)}c&&m.length>1&&this.raise(Se.AmbiguousConditionalArrow,i.startLoc),c&&m.length===1&&(this.state=i,d.push(m[0].start),this.state.noArrowAt=d,{consequent:p,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(p,!0),this.state.noArrowAt=a,this.expect(14),u.test=e,u.consequent=p,u.alternate=this.forwardNoArrowParamsConversionAt(u,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(u,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),r=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:r}}getArrowLikeExpressions(e,r){let s=[e],i=[];for(;s.length!==0;){let a=s.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(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 r?(i.forEach(a=>this.finishArrowValidation(a)),[i,[]]):FP(i,a=>a.params.every(u=>this.isAssignable(u,!0)))}finishArrowValidation(e){this.toAssignableList(e.params,e.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,r){let s;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),s=r(),this.state.noArrowParamsConversionAt.pop()):s=r(),s}parseParenItem(e,r){let s=super.parseParenItem(e,r);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(r);return i.expression=s,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return s}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 r=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(r)}else if(this.isContextual(131)){e.exportKind="type";let r=this.startNode();return this.next(),this.flowParseOpaqueType(r,!1)}else if(this.isContextual(129)){e.exportKind="type";let r=this.startNode();return this.next(),this.flowParseInterface(r)}else if(this.isContextual(126)){e.exportKind="value";let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}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:r}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&e.exportKind==="type"&&this.unexpected(r),s}parseClassId(e,r,s){super.parseClassId(e,r,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,r,s){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,r))return;r.declare=!0}super.parseClassMember(e,r,s),r.declare&&(r.type!=="ClassProperty"&&r.type!=="ClassPrivateProperty"&&r.type!=="PropertyDefinition"?this.raise(Se.DeclareClassElement,i):r.value&&this.raise(Se.DeclareClassFieldInitializer,r.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),r="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(U.InvalidIdentifier,this.state.curPosition(),{identifierName:r}),this.finishToken(132,r)}getTokenFromCode(e){let r=this.input.charCodeAt(this.state.pos+1);e===123&&r===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?r===46?this.finishOp(18,2):this.finishOp(17,1):AP(e,r,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,r){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,r):super.isAssignable(e,r)}toAssignable(e,r=!1){!r&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,r)}toAssignableList(e,r,s){for(let i=0;i<e.length;i++){let a=e[i];a?.type==="TypeCastExpression"&&(e[i]=this.typeCastToParameter(a))}super.toAssignableList(e,r,s)}toReferencedList(e,r){for(let s=0;s<e.length;s++){let i=e[s];i&&i.type==="TypeCastExpression"&&!i.extra?.parenthesized&&(e.length>1||!r)&&this.raise(Se.TypeCastInPattern,i.typeAnnotation)}return e}parseArrayLike(e,r,s){let i=super.parseArrayLike(e,r,s);return s!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,r,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,r,s,i)}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,r,s,i,a,u){if(r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,r,s,i,a,u),r.params&&a){let p=r.params;p.length>0&&this.isThisParam(p[0])&&this.raise(Se.ThisParamBannedInConstructor,r)}else if(r.type==="MethodDefinition"&&a&&r.value.params){let p=r.value.params;p.length>0&&this.isThisParam(p[0])&&this.raise(Se.ThisParamBannedInConstructor,r)}}pushClassPrivateMethod(e,r,s,i){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,r,s,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let r=e.implements=[];do{let s=this.startNode();s.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?s.typeParameters=this.flowParseTypeParameterInstantiation():s.typeParameters=null,r.push(this.finishNode(s,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let r=this.getObjectOrClassMethodParams(e);if(r.length>0){let s=r[0];this.isThisParam(s)&&e.kind==="get"?this.raise(Se.GetterMayNotHaveThisParam,s):this.isThisParam(s)&&this.raise(Se.SetterMayNotHaveThisParam,s)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,r,s,i,a,u,p){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!u&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let m=super.parseObjPropValue(e,r,s,i,a,u,p);return c&&((m.value||m).typeParameters=c),m}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(Se.PatternIsOptional,e),this.isThisParam(e)&&this.raise(Se.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(Se.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(Se.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,r){let s=super.parseMaybeDefault(e,r);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(Se.TypeBeforeInitializer,s.typeAnnotation),s}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(Se.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,r,s){r.local=im(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,s))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let r=this.lookaheadCharCode();return r===123||r===42}return!e&&this.isContextual(87)}applyImportPhase(e,r,s,i){if(super.applyImportPhase(e,r,s,i),r){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,r,s,i,a){let u=e.imported,p=null;u.type==="Identifier"&&(u.name==="type"?p="type":u.name==="typeof"&&(p="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let f=this.parseIdentifier(!0);p!==null&&!br(this.state.type)?(e.imported=f,e.importKind=p,e.local=this.cloneIdentifier(f)):(e.imported=u,e.importKind=null,e.local=this.parseIdentifier())}else{if(p!==null&&br(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=p;else{if(r)throw this.raise(U.ImportBindingIsString,e,{importName:u.value});e.imported=u,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=this.cloneIdentifier(e.imported))}let m=im(e);return s&&m&&this.raise(Se.ImportTypeShorthandOnlyInPureImport,e),(s||m)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!s&&!m&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,r){let s=e.kind;s!=="get"&&s!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,r)}parseVarId(e,r){super.parseVarId(e,r),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,r){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,r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,r){let s=null,i;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,r),s),!i.error)return i.node;let{context:a}=this.state,u=a[a.length-1];(u===et.j_oTag||u===et.j_expr)&&a.pop()}if(i?.error||this.match(47)){s=s||this.state.clone();let a,u=this.tryParse(c=>{a=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(a,()=>{let d=super.parseMaybeAssign(e,r);return this.resetStartLocationFromNode(d,a),d});m.extra?.parenthesized&&c();let f=this.maybeUnwrapTypeCastExpression(m);return f.type!=="ArrowFunctionExpression"&&c(),f.typeParameters=a,this.resetStartLocationFromNode(f,a),m},s),p=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(Se.UnexpectedTypeParameterBeforeAsyncArrowFunction,a),u.node;p=u.node}if(i?.node)return this.state=i.failState,i.node;if(p)return this.state=u.failState,p;throw i?.thrown?i.error:u.thrown?u.error:this.raise(Se.UnexpectedTokenAfterTypeParameter,a)}return super.parseMaybeAssign(e,r)}parseArrow(e){if(this.match(14)){let r=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(r.thrown)return null;r.error&&(this.state=r.failState),e.returnType=r.node.typeAnnotation?this.finishNode(r.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,r){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=r:super.setArrowFunctionParameters(e,r)}checkParams(e,r,s,i=!0){if(!(s&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(Se.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,r,s,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,r,s){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(r.index)){this.next();let i=this.startNodeAt(r);i.callee=e,i.arguments=super.parseCallExpressionArguments(),e=this.finishNode(i,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let i=this.state.clone(),a=this.tryParse(p=>this.parseAsyncArrowWithTypeParameters(r)||p(),i);if(!a.error&&!a.aborted)return a.node;let u=this.tryParse(()=>super.parseSubscripts(e,r,s),i);if(u.node&&!u.error)return u.node;if(a.node)return this.state=a.failState,a.node;if(u.node)return this.state=u.failState,u.node;throw a.error||u.error}return super.parseSubscripts(e,r,s)}parseSubscript(e,r,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(r);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),a.arguments=this.parseCallExpressionArguments(),a.optional=!0,this.finishCallExpression(a,!0)}else if(!s&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let a=this.startNodeAt(r);a.callee=e;let u=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,i.optionalChainMember)));if(u.node)return u.error&&(this.state=u.failState),u.node}return super.parseSubscript(e,r,s,i)}parseNewCallee(e){super.parseNewCallee(e);let r=null;this.shouldParseTypes()&&this.match(47)&&(r=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=r}parseAsyncArrowWithTypeParameters(e){let r=this.startNodeAt(e);if(this.parseFunctionParams(r,!1),!!this.parseArrow(r))return super.parseArrowExpression(r,void 0,!0)}readToken_mult_modulo(e){let r=this.input.charCodeAt(this.state.pos+1);if(e===42&&r===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 r=this.input.charCodeAt(this.state.pos+1);if(e===124&&r===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,r){let s=super.parseTopLevel(e,r);return this.state.hasFlowComment&&this.raise(Se.UnterminatedFlowComment,this.state.curPosition()),s}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Se.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,r=2;for(;[32,9].includes(this.input.charCodeAt(e+r));)r++;let s=this.input.charCodeAt(r+e),i=this.input.charCodeAt(r+e+1);return s===58&&i===58?r+2:this.input.slice(r+e,r+e+12)==="flow-include"?r+12:s===58&&i!==58?r:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(U.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:r,memberName:s}){this.raise(Se.EnumBooleanMemberNotInitialized,e,{memberName:s,enumName:r})}flowEnumErrorInvalidMemberInitializer(e,r){return this.raise(r.explicitType?r.explicitType==="symbol"?Se.EnumInvalidMemberInitializerSymbolType:Se.EnumInvalidMemberInitializerPrimaryType:Se.EnumInvalidMemberInitializerUnknownType,e,r)}flowEnumErrorNumberMemberNotInitialized(e,r){this.raise(Se.EnumNumberMemberNotInitialized,e,r)}flowEnumErrorStringMemberInconsistentlyInitialized(e,r){this.raise(Se.EnumStringMemberInconsistentlyInitialized,e,r)}flowEnumMemberInit(){let e=this.state.startLoc,r=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let s=this.parseNumericLiteral(this.state.value);return r()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 134:{let s=this.parseStringLiteral(this.state.value);return r()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 85:case 86:{let s=this.parseBooleanLiteral(this.match(85));return r()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,r=this.parseIdentifier(!0),s=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:r,init:s}}flowEnumCheckExplicitTypeMismatch(e,r,s){let{explicitType:i}=r;i!==null&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,r)}flowEnumMembers({enumName:e,explicitType:r}){let s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let u=this.startNode(),{id:p,init:c}=this.flowEnumMemberRaw(),m=p.name;if(m==="")continue;/^[a-z]/.test(m)&&this.raise(Se.EnumInvalidMemberName,p,{memberName:m,suggestion:m[0].toUpperCase()+m.slice(1),enumName:e}),s.has(m)&&this.raise(Se.EnumDuplicateMemberName,p,{memberName:m,enumName:e}),s.add(m);let f={enumName:e,explicitType:r,memberName:m};switch(u.id=p,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"boolean"),u.init=c.value,i.booleanMembers.push(this.finishNode(u,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"number"),u.init=c.value,i.numberMembers.push(this.finishNode(u,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"string"),u.init=c.value,i.stringMembers.push(this.finishNode(u,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,f);case"none":switch(r){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,f);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,f);break;default:i.defaultedMembers.push(this.finishNode(u,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:a}}flowEnumStringMembers(e,r,{enumName:s}){if(e.length===0)return r;if(r.length===0)return e;if(r.length>e.length){for(let i of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return r}else{for(let i of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:s});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!Ye(this.state.type))throw this.raise(Se.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:r}=this.state;return this.next(),r!=="boolean"&&r!=="number"&&r!=="string"&&r!=="symbol"&&this.raise(Se.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:r}),r}flowEnumBody(e,r){let s=r.name,i=r.loc.start,a=this.flowEnumParseExplicitType({enumName:s});this.expect(5);let{members:u,hasUnknownMembers:p}=this.flowEnumMembers({enumName:s,explicitType:a});switch(e.hasUnknownMembers=p,a){case"boolean":return e.explicitType=!0,e.members=u.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=u.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(u.stringMembers,u.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=u.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let m=u.booleanMembers.length,f=u.numberMembers.length,d=u.stringMembers.length,D=u.defaultedMembers.length;if(!m&&!f&&!d&&!D)return c();if(!m&&!f)return e.members=this.flowEnumStringMembers(u.stringMembers,u.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!f&&!d&&m>=D){for(let y of u.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:s,memberName:y.id.name});return e.members=u.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!m&&!d&&f>=D){for(let y of u.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:s,memberName:y.id.name});return e.members=u.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(Se.EnumInconsistentMemberValues,i,{enumName:s}),c()}}}flowParseEnumDeclaration(e){let r=this.parseIdentifier();return e.id=r,e.body=this.flowEnumBody(this.startNode(),r),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let r=this.input.charCodeAt(e+1);return r!==60&&r!==61}return!1}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}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},NP=/\r\n|[\r\n\u2028\u2029]/,vo=new RegExp(NP.source,"g");function nn(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function nm(t,e,r){for(let s=e;s<r;s++)if(nn(t.charCodeAt(s)))return!0;return!1}var Ml=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$l=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function BP(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var ss=Mr`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,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:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 ks(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function sn(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return sn(t.object)+"."+sn(t.property);throw new Error("Node had unexpected type: "+t.type)}var _P=t=>class extends t{jsxReadToken(){let e="",r=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ss.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(143)):super.getTokenFromCode(s);return}e+=this.input.slice(r,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(r,this.state.pos),e+=this.jsxReadEntity(),r=this.state.pos;break;case 62:case 125:this.raise(ss.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:s===125?"}":">"});default:nn(s)?(e+=this.input.slice(r,this.state.pos),e+=this.jsxReadNewLine(!0),r=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let r=this.input.charCodeAt(this.state.pos),s;return++this.state.pos,r===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,s=e?`
|
|
32
|
-
`:`\r
|
|
33
|
-
`):s=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let r="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(U.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===e)break;i===38?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadEntity(),s=this.state.pos):nn(i)?(r+=this.input.slice(s,this.state.pos),r+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}r+=this.input.slice(s,this.state.pos++),this.finishToken(134,r)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let r=10;this.codePointAtPos(this.state.pos)===120&&(r=16,++this.state.pos);let s=this.readInt(r,void 0,!1,"bail");if(s!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(s)}else{let r=0,s=!1;for(;r++<10&&this.state.pos<this.length&&!(s=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(s){this.input.slice(e,this.state.pos);let i;++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,r=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(gi(e)||e===45);this.finishToken(141,this.input.slice(r,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:qc(this.state.type)?e.name=qs(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,r=this.jsxParseIdentifier();if(!this.eat(14))return r;let s=this.startNodeAt(e);return s.namespace=r,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,r=this.jsxParseNamespacedName();if(r.type==="JSXNamespacedName")return r;for(;this.eat(16);){let s=this.startNodeAt(e);s.object=r,s.property=this.jsxParseIdentifier(),r=this.finishNode(s,"JSXMemberExpression")}return r}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(et.brace),this.next(),e=this.jsxParseExpressionContainer(e,et.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(ss.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(ss.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(et.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,r){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let s=this.parseExpression();s.type==="SequenceExpression"&&!s.extra?.parenthesized&&this.raise(ss.UnexpectedSequenceExpression,s.expressions[1]),e.expression=s}return this.setContext(r),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(et.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(et.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 r=this.startNodeAt(e);return this.eat(144)?this.finishNode(r,"JSXOpeningFragment"):(r.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(r))}jsxParseOpeningElementAfterName(e){let r=[];for(;!this.match(56)&&!this.match(144);)r.push(this.jsxParseAttribute());return e.attributes=r,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let r=this.startNodeAt(e);return this.eat(144)?this.finishNode(r,"JSXClosingFragment"):(r.name=this.jsxParseElementName(),this.expect(144),this.finishNode(r,"JSXClosingElement"))}jsxParseElementAt(e){let r=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e),a=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 142:s.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let u=this.startNode();this.setContext(et.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(u)):s.push(this.jsxParseExpressionContainer(u,et.j_expr));break}default:this.unexpected()}ks(i)&&!ks(a)&&a!==null?this.raise(ss.MissingClosingTagFragment,a):!ks(i)&&ks(a)?this.raise(ss.MissingClosingTagElement,a,{openingTagName:sn(i.name)}):!ks(i)&&!ks(a)&&sn(a.name)!==sn(i.name)&&this.raise(ss.MissingClosingTagElement,a,{openingTagName:sn(i.name)})}if(ks(i)?(r.openingFragment=i,r.closingFragment=a):(r.openingElement=i,r.closingElement=a),r.children=s,this.match(47))throw this.raise(ss.UnwrappedAdjacentJSXElements,this.state.startLoc);return ks(i)?this.finishNode(r,"JSXFragment"):this.finishNode(r,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:r}=this.state;r[r.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let r=this.curContext();if(r===et.j_expr){this.jsxReadToken();return}if(r===et.j_oTag||r===et.j_cTag){if($r(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&r===et.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(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:r,type:s}=this.state;if(s===56&&e===143)r.splice(-2,2,et.j_cTag),this.state.canStartJSXElement=!1;else if(s===143)r.push(et.j_oTag);else if(s===144){let i=r[r.length-1];i===et.j_oTag&&e===56||i===et.j_cTag?(r.pop(),this.state.canStartJSXElement=r[r.length-1]===et.j_expr):(this.setContext(et.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=nP(s)}},LP=class extends Wc{tsNames=new Map},OP=class extends Jc{importsStack=[];createScope(e){return this.importsStack.push(new Set),new LP(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,r){let s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!r&&s>1){for(let i=0;i<s-1;i++)if(this.importsStack[i].has(e))return!0}return!1}declareName(e,r,s){if(r&4096){this.hasImport(e,!0)&&this.parser.raise(U.VarRedeclaration,s,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let i=this.currentScope(),a=i.tsNames.get(e)||0;if(r&1024){this.maybeExportDefined(i,e),i.tsNames.set(e,a|16);return}super.declareName(e,r,s),r&2&&(r&1||(this.checkRedeclarationInScope(i,e,r,s),this.maybeExportDefined(i,e)),a=a|1),r&256&&(a=a|2),r&512&&(a=a|4),r&128&&(a=a|8),a&&i.tsNames.set(e,a)}isRedeclaredInScope(e,r,s){let i=e.tsNames.get(r);if((i&2)>0){if(s&256){let a=!!(s&512),u=(i&4)>0;return a!==u}return!0}return s&128&&(i&8)>0?e.names.get(r)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(e,r,s)}checkLocalExport(e){let{name:r}=e;if(this.hasImport(r))return;let s=this.scopeStack.length;for(let i=s-1;i>=0;i--){let a=this.scopeStack[i].tsNames.get(r);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(e)}},MP=class{stacks=[];enter(e){this.stacks.push(e)}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 Ko(t,e){return(t?2:0)|(e?1:0)}var $P=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[r,s]=e;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let a of Object.keys(s))if(i?.[a]!==s[a])return!1;return!0}}getPluginOption(e,r){return this.plugins.get(e)?.[r]}};function CD(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function RP(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function an(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function ni(t,e,r){let s=null,i=e.length;for(;s===null&&i>0;)s=e[--i];s===null||s.start>r.start?an(t,r.comments):CD(s,r.comments)}var jP=class extends $P{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:r}=this.state,s=r.length;if(s===0)return;let i=s-1,a=r[i];a.start===e.end&&(a.leadingNode=e,i--);let{start:u}=e;for(;i>=0;i--){let p=r[i],c=p.end;if(c>u)p.containingNode=e,this.finalizeComment(p),r.splice(i,1);else{c===u&&(p.trailingNode=e);break}}}finalizeComment(e){let{comments:r}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&CD(e.leadingNode,r),e.trailingNode!==null&&RP(e.trailingNode,r);else{let s=e.containingNode,i=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":ni(s,s.properties,e);break;case"CallExpression":case"OptionalCallExpression":ni(s,s.arguments,e);break;case"ImportExpression":ni(s,[s.source,s.options??null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":ni(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":ni(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":ni(s,s.specifiers,e);break;case"TSEnumDeclaration":an(s,r);break;case"TSEnumBody":ni(s,s.members,e);break;default:an(s,r)}else an(s,r)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let r=e.length-1;r>=0;r--)this.finalizeComment(e[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:r}=this.state,{length:s}=r;if(s===0)return;let i=r[s-1];i.leadingNode===e&&(i.leadingNode=null)}takeSurroundingComments(e,r,s){let{commentStack:i}=this.state,a=i.length;if(a===0)return;let u=a-1;for(;u>=0;u--){let p=i[u],c=p.end;if(p.start===s)p.leadingNode=e;else if(c===r)p.trailingNode=e;else if(c<r)break}}},UP=class bD{flags=1024;get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:e,sourceType:r,startIndex:s,startLine:i,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:r==="module",this.startIndex=s,this.curLine=i,this.lineStart=-a,this.startLoc=this.endLoc=new Vs(i,a,s)}errors=[];potentialArrowAt=-1;noArrowAt=[];noArrowParamsConversionAt=[];get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}labels=[];commentsLen=0;commentStack=[];pos=0;type=140;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[et.brace];get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}strictErrors=new Map;tokensLength=0;curPosition(){return new Vs(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new bD;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},VP=function(t){return t>=48&&t<=57},am={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},So={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function om(t,e,r,s,i,a){let u=r,p=s,c=i,m="",f=null,d=r,{length:D}=e;for(;;){if(r>=D){a.unterminated(u,p,c),m+=e.slice(d,r);break}let y=e.charCodeAt(r);if(qP(t,y,e,r)){m+=e.slice(d,r);break}if(y===92){m+=e.slice(d,r);let x=HP(e,r,s,i,t==="template",a);x.ch===null&&!f?f={pos:r,lineStart:s,curLine:i}:m+=x.ch,{pos:r,lineStart:s,curLine:i}=x,d=r}else y===8232||y===8233?(++r,++i,s=r):y===10||y===13?t==="template"?(m+=e.slice(d,r)+`
|
|
34
|
-
`,++r,y===13&&e.charCodeAt(r)===10&&++r,++i,d=s=r):a.unterminated(u,p,c):++r}return{pos:r,str:m,firstInvalidLoc:f,lineStart:s,curLine:i}}function qP(t,e,r,s){return t==="template"?e===96||e===36&&r.charCodeAt(s+1)===123:e===(t==="double"?34:39)}function HP(t,e,r,s,i,a){let u=!i;e++;let p=m=>({pos:e,ch:m,lineStart:r,curLine:s}),c=t.charCodeAt(e++);switch(c){case 110:return p(`
|
|
35
|
-
`);case 114:return p("\r");case 120:{let m;return{code:m,pos:e}=Fp(t,e,r,s,2,!1,u,a),p(m===null?null:String.fromCharCode(m))}case 117:{let m;return{code:m,pos:e}=vD(t,e,r,s,u,a),p(m===null?null:String.fromCodePoint(m))}case 116:return p(" ");case 98:return p("\b");case 118:return p("\v");case 102:return p("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:r=e,++s;case 8232:case 8233:return p("");case 56:case 57:if(i)return p(null);a.strictNumericEscape(e-1,r,s);default:if(c>=48&&c<=55){let m=e-1,f=/^[0-7]+/.exec(t.slice(m,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let D=t.charCodeAt(e);if(f!=="0"||D===56||D===57){if(i)return p(null);a.strictNumericEscape(m,r,s)}return p(String.fromCharCode(d))}return p(String.fromCharCode(c))}}function Fp(t,e,r,s,i,a,u,p){let c=e,m;return{n:m,pos:e}=TD(t,e,r,s,16,i,a,!1,p,!u),m===null&&(u?p.invalidEscapeSequence(c,r,s):e=c-1),{code:m,pos:e}}function TD(t,e,r,s,i,a,u,p,c,m){let f=e,d=i===16?am.hex:am.decBinOct,D=i===16?So.hex:i===10?So.dec:i===8?So.oct:So.bin,y=!1,x=0;for(let E=0,C=a??1/0;E<C;++E){let b=t.charCodeAt(e),A;if(b===95&&p!=="bail"){let v=t.charCodeAt(e-1),P=t.charCodeAt(e+1);if(p){if(Number.isNaN(P)||!D(P)||d.has(v)||d.has(P)){if(m)return{n:null,pos:e};c.unexpectedNumericSeparator(e,r,s)}}else{if(m)return{n:null,pos:e};c.numericSeparatorInEscapeSequence(e,r,s)}++e;continue}if(b>=97?A=b-97+10:b>=65?A=b-65+10:VP(b)?A=b-48:A=1/0,A>=i){if(A<=9&&m)return{n:null,pos:e};if(A<=9&&c.invalidDigit(e,r,s,i))A=0;else if(u)A=0,y=!0;else break}++e,x=x*i+A}return e===f||a!=null&&e-f!==a||y?{n:null,pos:e}:{n:x,pos:e}}function vD(t,e,r,s,i,a){let u=t.charCodeAt(e),p;if(u===123){if(++e,{code:p,pos:e}=Fp(t,e,r,s,t.indexOf("}",e)-e,!0,i,a),++e,p!==null&&p>1114111)if(i)a.invalidCodePoint(e,r,s);else return{code:null,pos:e}}else({code:p,pos:e}=Fp(t,e,r,s,4,!1,i,a));return{code:p,pos:e}}function zn(t,e,r){return new Vs(r,t-e,t)}var zP=new Set([103,109,115,105,121,117,100,118]),WP=class{constructor(e){let r=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=r+e.start,this.end=r+e.end,this.loc=new ou(e.startLoc,e.endLoc)}},JP=class extends jP{isLookahead;tokens=[];constructor(e,r){super(),this.state=new UP,this.state.init(e),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new WP(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=e,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ml.lastIndex=e,Ml.test(this.input)?Ml.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return $l.lastIndex=e,$l.test(this.input)?$l.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let r=this.input.charCodeAt(e);if((r&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(r=65536+((r&1023)<<10)+(s&1023))}return r}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([r,s])=>this.raise(r,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let r;this.isLookahead||(r=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(U.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,vo.lastIndex=s+2;vo.test(this.input)&&vo.lastIndex<=i;)++this.state.curLine,this.state.lineStart=vo.lastIndex;if(this.isLookahead)return;let a={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+e.length),loc:new ou(r,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(a),a}skipLineComment(e){let r=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!nn(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,u={type:"CommentLine",value:this.input.slice(r+e,a),start:this.sourceToOffsetPos(r),end:this.sourceToOffsetPos(a),loc:new ou(s,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(u),u}skipSpace(){let e=this.state.pos,r=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let s=this.input.charCodeAt(this.state.pos);switch(s){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 i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),r?.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),r?.push(i));break}default:break e}break;default:if(BP(s))++this.state.pos;else if(s===45&&!this.inModule&&this.optionFlags&8192){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(e===0||this.state.lineStart>e)){let a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),r?.push(a))}else break e}else if(s===60&&!this.inModule&&this.optionFlags&8192){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),r?.push(a))}else break e}else break e}}if(r?.length>0){let s=this.state.pos,i={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(s),comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(e,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=e,this.state.value=r,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,r=this.codePointAtPos(e);if(r>=48&&r<=57)throw this.raise(U.UnexpectedDigitAfterHash,this.state.curPosition());$r(r)?(++this.state.pos,this.finishToken(139,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===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 e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!nn(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let s=this.input.slice(r+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(e){let r=e===42?55:54,s=1,i=this.input.charCodeAt(this.state.pos+1);e===42&&i===42&&(s++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(s++,r=e===37?33:30),this.finishOp(r,s)}readToken_pipe_amp(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124&&r===62){this.finishOp(39,2);return}if(r===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===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(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===e){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,r=this.input.charCodeAt(e+1);if(r===62){let s=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);e===63?r===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){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:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:++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 r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===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(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);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($r(e)){this.readWord(e);return}}throw this.raise(U.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,r){let s=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(e,s)}readRegexp(){let e=this.state.startLoc,r=this.state.start+1,s,i,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(U.UnterminatedRegExp,fr(e,1));let m=this.input.charCodeAt(a);if(nn(m))throw this.raise(U.UnterminatedRegExp,fr(e,1));if(s)s=!1;else{if(m===91)i=!0;else if(m===93&&i)i=!1;else if(m===47&&!i)break;s=m===92}}let u=this.input.slice(r,a);++a;let p="",c=()=>fr(e,a+2-r);for(;a<this.length;){let m=this.codePointAtPos(a),f=String.fromCharCode(m);if(zP.has(m))m===118?p.includes("u")&&this.raise(U.IncompatibleRegExpUVFlags,c()):m===117&&p.includes("v")&&this.raise(U.IncompatibleRegExpUVFlags,c()),p.includes(f)&&this.raise(U.DuplicateRegExpFlags,c());else if(gi(m)||m===92)this.raise(U.MalformedRegExpFlags,c());else break;++a,p+=f}this.state.pos=a,this.finishToken(138,{pattern:u,flags:p})}readInt(e,r,s=!1,i=!0){let{n:a,pos:u}=TD(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,r,s,i,this.errorHandlers_readInt,!1);return this.state.pos=u,a}readRadixNumber(e){let r=this.state.pos,s=this.state.curPosition(),i=!1;this.state.pos+=2;let a=this.readInt(e);a==null&&this.raise(U.InvalidDigit,fr(s,2),{radix:e});let u=this.input.charCodeAt(this.state.pos);if(u===110)++this.state.pos,i=!0;else if(u===109)throw this.raise(U.InvalidDecimal,s);if($r(this.codePointAtPos(this.state.pos)))throw this.raise(U.NumberIdentifier,this.state.curPosition());if(i){let p=this.input.slice(r,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,p);return}this.finishToken(135,a)}readNumber(e){let r=this.state.pos,s=this.state.curPosition(),i=!1,a=!1,u=!1;!e&&this.readInt(10)===null&&this.raise(U.InvalidNumber,this.state.curPosition());let p=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(p){let d=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(U.StrictOctalLiteral,s),!this.state.strict){let D=d.indexOf("_");D>0&&this.raise(U.ZeroDigitNumericSeparator,fr(s,D))}u=p&&!/[89]/.test(d)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!u&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(U.InvalidOrMissingExponent,s),i=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||p)&&this.raise(U.InvalidBigIntLiteral,s),++this.state.pos,a=!0),$r(this.codePointAtPos(this.state.pos)))throw this.raise(U.NumberIdentifier,this.state.curPosition());let m=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(a){this.finishToken(136,m);return}let f=u?parseInt(m,8):parseFloat(m);this.finishToken(135,f)}readCodePoint(e){let{code:r,pos:s}=vD(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,r}readString(e){let{str:r,pos:s,curLine:i,lineStart:a}=om(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=i,this.finishToken(134,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:r,firstInvalidLoc:s,pos:i,curLine:a,lineStart:u}=om("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=u,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new Vs(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),this.input.codePointAt(i)===96?this.finishToken(24,s?null:e+r+"`"):(this.state.pos++,this.finishToken(25,s?null:e+r+"${"))}recordStrictModeErrors(e,r){let s=r.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,r):this.state.strictErrors.set(s,[e,r])}readWord1(e){this.state.containsEsc=!1;let r="",s=this.state.pos,i=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let a=this.codePointAtPos(this.state.pos);if(gi(a))this.state.pos+=a<=65535?1:2;else if(a===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);let u=this.state.curPosition(),p=this.state.pos===s?$r:gi;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(U.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(p(c)||this.raise(U.EscapedCharNotAnIdentifier,u),r+=String.fromCodePoint(c)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(e){let r=this.readWord1(e),s=Oc.get(r);s!==void 0?this.finishToken(s,qs(s)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:e}=this.state;qc(e)&&this.state.containsEsc&&this.raise(U.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:qs(e)})}raise(e,r,s={}){let i=r instanceof Vs?r:r.loc.start,a=e(i,s);if(!(this.optionFlags&2048))throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,r,s={}){let i=r instanceof Vs?r:r.loc.start,a=i.index,u=this.state.errors;for(let p=u.length-1;p>=0;p--){let c=u[p];if(c.loc.index===a)return u[p]=e(i,s);if(c.loc.index<a)break}return this.raise(e,r,s)}updateContext(e){}unexpected(e,r){throw this.raise(U.UnexpectedToken,e??this.state.startLoc,{expected:r?qs(r):null})}expectPlugin(e,r){if(this.hasPlugin(e))return!0;throw this.raise(U.MissingPlugin,r??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(r=>this.hasPlugin(r)))throw this.raise(U.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(r,s,i)=>{this.raise(e,zn(r,s,i))}}errorHandlers_readInt={invalidDigit:(e,r,s,i)=>this.optionFlags&2048?(this.raise(U.InvalidDigit,zn(e,r,s),{radix:i}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(U.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(U.UnexpectedNumericSeparator)};errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(U.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(U.InvalidCodePoint)});errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,r,s)=>{this.recordStrictModeErrors(U.StrictNumericEscape,zn(e,r,s))},unterminated:(e,r,s)=>{throw this.raise(U.UnterminatedString,zn(e-1,r,s))}});errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(U.StrictNumericEscape),unterminated:(e,r,s)=>{throw this.raise(U.UnterminatedTemplate,zn(e,r,s))}})},KP=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},XP=class{parser;stack=[];undefinedPrivateNames=new Map;constructor(e){this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new KP)}exit(){let e=this.stack.pop(),r=this.current();for(let[s,i]of Array.from(e.undefinedPrivateNames))r?r.undefinedPrivateNames.has(s)||r.undefinedPrivateNames.set(s,i):this.parser.raise(U.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(e,r,s){let{privateNames:i,loneAccessors:a,undefinedPrivateNames:u}=this.current(),p=i.has(e);if(r&3){let c=p&&a.get(e);if(c){let m=c&4,f=r&4,d=c&3,D=r&3;p=d===D||m!==f,p||a.delete(e)}else p||a.set(e,r)}p&&this.parser.raise(U.PrivateNameRedeclaration,s,{identifierName:e}),i.add(e),u.delete(e)}usePrivateName(e,r){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,r):this.parser.raise(U.InvalidPrivateFieldResolution,r,{identifierName:e})}},wu=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},SD=class extends wu{declarationErrors=new Map;constructor(e){super(e)}recordDeclarationError(e,r){let s=r.index;this.declarationErrors.set(s,[e,r])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},GP=class{parser;stack=[new wu];constructor(e){this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,r){let s=r.loc.start,{stack:i}=this,a=i.length-1,u=i[a];for(;!u.isCertainlyParameterDeclaration();){if(u.canBeArrowParameterDeclaration())u.recordDeclarationError(e,s);else return;u=i[--a]}this.parser.raise(e,s)}recordArrowParameterBindingError(e,r){let{stack:s}=this,i=s[s.length-1],a=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(e,a);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(e,a);else return}recordAsyncArrowParametersError(e){let{stack:r}=this,s=r.length-1,i=r[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(U.AwaitBindingIdentifier,e),i=r[--s]}validateAsPattern(){let{stack:e}=this,r=e[e.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([s,i])=>{this.parser.raise(s,i);let a=e.length-2,u=e[a];for(;u.canBeArrowParameterDeclaration();)u.clearDeclarationError(i.index),u=e[--a]})}};function YP(){return new wu(3)}function QP(){return new SD(1)}function ZP(){return new SD(2)}function wD(){return new wu}var eF=class extends JP{addExtra(e,r,s,i=!0){if(!e)return;let{extra:a}=e;a==null&&(a={},e.extra=a),i?a[r]=s:Object.defineProperty(a,r,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,r){if(this.input.startsWith(r,e)){let s=this.input.charCodeAt(e+r.length);return!(gi(s)||(s&64512)===55296)}return!1}isLookaheadContextual(e){let r=this.nextTokenStart();return this.isUnparsedContextual(r,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,r){if(!this.eatContextual(e)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return nm(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return nm(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(U.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,r){this.eat(e)||this.unexpected(r,e)}tryParse(e,r=this.state.clone()){let s={node:null};try{let i=e((a=null)=>{throw s.node=a,s});if(this.state.errors.length>r.errors.length){let a=this.state;return this.state=r,this.state.tokensLength=a.tokensLength,{node:i,error:a.errors[r.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let a=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:a};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:a};throw i}}checkExpressionErrors(e,r){if(!e)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:a,optionalParametersLoc:u,voidPatternLoc:p}=e,c=!!s||!!i||!!u||!!a||!!p;if(!r)return c;s!=null&&this.raise(U.InvalidCoverInitializedName,s),i!=null&&this.raise(U.DuplicateProto,i),a!=null&&this.raise(U.UnexpectedPrivateField,a),u!=null&&this.unexpected(u),p!=null&&this.raise(U.InvalidCoverDiscardElement,p)}isLiteralPropertyName(){return fD(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=e;let a=this.scope,u=this.getScopeHandler();this.scope=new u(this,e);let p=this.prodParam;this.prodParam=new MP;let c=this.classScope;this.classScope=new XP(this);let m=this.expressionScope;return this.expressionScope=new GP(this),()=>{this.state.labels=r,this.exportedIdentifiers=s,this.inModule=i,this.scope=a,this.prodParam=p,this.classScope=c,this.expressionScope=m}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let r=!this.inModule&&this.options.sourceType==="commonjs";(r||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let s=r?514:1;this.optionFlags&4&&(s|=512),this.optionFlags&16&&(s|=48),this.scope.enter(s)}checkDestructuringPrivate(e){let{privateKeyLoc:r}=e;r!==null&&this.expectPlugin("destructuringPrivate",r)}},Xo=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},kp=class{constructor(e,r,s){this.start=r,this.end=0,this.loc=new ou(s),e?.optionFlags&128&&(this.range=[r,0]),e?.filename&&(this.loc.filename=e.filename)}type=""},um=kp.prototype,tF=class extends eF{startNode(){let e=this.state.startLoc;return new kp(this,e.index,e)}startNodeAt(e){return new kp(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,r){return this.finishNodeAt(e,r,this.state.lastTokEndLoc)}finishNodeAt(e,r,s){return e.type=r,e.end=s.index,e.loc.end=s,this.optionFlags&128&&(e.range[1]=s.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,r){e.start=r.index,e.loc.start=r,this.optionFlags&128&&(e.range[0]=r.index)}resetEndLocation(e,r=this.state.lastTokEndLoc){e.end=r.index,e.loc.end=r,this.optionFlags&128&&(e.range[1]=r.index)}resetStartLocationFromNode(e,r){this.resetStartLocation(e,r.loc.start)}castNodeTo(e,r){return e.type=r,e}cloneIdentifier(e){let{type:r,start:s,end:i,loc:a,range:u,name:p}=e,c=Object.create(um);return c.type=r,c.start=s,c.end=i,c.loc=a,c.range=u,c.name=p,e.extra&&(c.extra=e.extra),c}cloneStringLiteral(e){let{type:r,start:s,end:i,loc:a,range:u,extra:p}=e,c=Object.create(um);return c.type=r,c.start=s,c.end=i,c.loc=a,c.range=u,c.extra=p,c.value=e.value,c}},Ip=t=>t.type==="ParenthesizedExpression"?Ip(t.expression):t,rF=class extends tF{toAssignable(e,r=!1){let s;switch((e.type==="ParenthesizedExpression"||e.extra?.parenthesized)&&(s=Ip(e),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(U.InvalidParenthesizedAssignment,e):s.type!=="CallExpression"&&s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(U.InvalidParenthesizedAssignment,e):this.raise(U.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let i=0,a=e.properties.length,u=a-1;i<a;i++){let p=e.properties[i],c=i===u;this.toAssignableObjectExpressionProp(p,c,r),c&&p.type==="RestElement"&&e.extra?.trailingCommaLoc&&this.raise(U.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:i,value:a}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(a,r);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":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,e.extra?.trailingCommaLoc,r);break;case"AssignmentExpression":e.operator!=="="&&this.raise(U.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise(U.VoidPatternInitializer,e.left),this.toAssignable(e.left,r);break;case"ParenthesizedExpression":this.toAssignable(s,r);break}}toAssignableObjectExpressionProp(e,r,s){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?U.PatternHasAccessor:U.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),r||this.raise(U.RestTrailingComma,e)}else this.toAssignable(e,s)}toAssignableList(e,r,s){let i=e.length-1;for(let a=0;a<=i;a++){let u=e[a];u&&(this.toAssignableListItem(e,a,s),u.type==="RestElement"&&(a<i?this.raise(U.RestTrailingComma,u):r&&this.raise(U.RestTrailingComma,r)))}}toAssignableListItem(e,r,s){let i=e[r];if(i.type==="SpreadElement"){this.castNodeTo(i,"RestElement");let a=i.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,s)}else this.toAssignable(i,s)}isAssignable(e,r){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let s=e.properties.length-1;return e.properties.every((i,a)=>i.type!=="ObjectMethod"&&(a===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(e,r){return e}toReferencedListDeep(e,r){this.toReferencedList(e,r);for(let s of e)s?.type==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(e){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let r=this.parseBindingAtom();return r.type==="VoidPattern"&&this.raise(U.UnexpectedVoidPattern,r),e.argument=r,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,r,s){let i=s&1,a=[],u=!0;for(;!this.eat(e);)if(u?u=!1:this.expect(12),i&&this.match(12))a.push(null);else{if(this.eat(e))break;if(this.match(21)){let p=this.parseRestBinding();if(s&2&&(p=this.parseFunctionParamType(p)),a.push(p),!this.checkCommaAfterRest(r)){this.expect(e);break}}else{let p=[];if(s&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(U.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)p.push(this.parseDecorator());a.push(this.parseBindingElement(s,p))}}return a}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise(U.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:r}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let s=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,r,!1,!1,!0,!1)}parseBindingElement(e,r){let s=this.parseMaybeDefault();return e&2&&this.parseFunctionParamType(s),r.length&&(s.decorators=r,this.resetStartLocationFromNode(s,r[0])),this.parseMaybeDefault(s.loc.start,s)}parseFunctionParamType(e){return e}parseMaybeDefault(e,r){if(e??(e=this.state.startLoc),r=r??this.parseBindingAtom(),!this.eat(29))return r;let s=this.startNodeAt(e);return r.type==="VoidPattern"&&this.raise(U.VoidPatternInitializer,r),s.left=r,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(e,r,s,i){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!r&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,r,s=64,i=!1,a=!1,u=!1,p=!1){let c=e.type;if(this.isObjectMethod(e))return;let m=this.isOptionalMemberExpression(e);if(m||c==="MemberExpression"){m&&(this.expectPlugin("optionalChainingAssign",e.loc.start),r.type!=="AssignmentExpression"&&this.raise(U.InvalidLhsOptionalChaining,e,{ancestor:r})),s!==64&&this.raise(U.InvalidPropertyBindingPattern,e);return}if(c==="Identifier"){this.checkIdentifier(e,s,a);let{name:C}=e;i&&(i.has(C)?this.raise(U.ParamDupe,e):i.add(C));return}else c==="VoidPattern"&&r.type==="CatchClause"&&this.raise(U.VoidPatternCatchClauseParam,e);let f=Ip(e);p||(p=f.type==="CallExpression"&&(f.callee.type==="Import"||f.callee.type==="Super"));let d=this.isValidLVal(c,p,!(u||e.extra?.parenthesized)&&r.type==="AssignmentExpression",s);if(d===!0)return;if(d===!1){let C=s===64?U.InvalidLhs:U.InvalidLhsBinding;this.raise(C,e,{ancestor:r});return}let D,y;typeof d=="string"?(D=d,y=c==="ParenthesizedExpression"):[D,y]=d;let x=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,E=e[D];if(Array.isArray(E))for(let C of E)C&&this.checkLVal(C,x,s,i,a,y,!0);else E&&this.checkLVal(E,x,s,i,a,y,p)}checkIdentifier(e,r,s=!1){this.state.strict&&(s?AD(e.name,this.inModule):ED(e.name))&&(r===64?this.raise(U.StrictEvalArguments,e,{referenceName:e.name}):this.raise(U.StrictEvalArgumentsBinding,e,{bindingName:e.name})),r&8192&&e.name==="let"&&this.raise(U.LetInLexicalBinding,e),r&64||this.declareNameFromIdentifier(e,r)}declareNameFromIdentifier(e,r){this.scope.declareName(e.name,r,e.loc.start)}checkToRestConversion(e,r){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(U.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?U.RestTrailingComma:U.ElementAfterRest,this.state.startLoc),!0):!1}},Rl=/in(?:stanceof)?|as|satisfies/y;function sF(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function lm(t){if(!t)throw new Error("Assert fail")}var ye=Mr`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"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:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>`Accessibility modifier already seen: '${t}'.`,DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' 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:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,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.",InvalidHeritageClauseType:({token:t})=>`'${t}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:t=>`'${t}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:t=>`'${t}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[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.",NonClassMethodPropertyHasAbstractModifier:"'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:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,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.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,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:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`,UsingDeclarationInAmbientContext:t=>`'${t}' declarations are not allowed in ambient contexts.`});function iF(t){switch(t){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 pm(t){return t==="private"||t==="public"||t==="protected"}function nF(t){return t==="in"||t==="out"}function Np(t){if(t.extra?.parenthesized)return!1;switch(t.type){case"Identifier":return!0;case"MemberExpression":return!t.computed&&Np(t.object);case"TSInstantiationExpression":return Np(t.expression);default:return!1}}var aF=t=>class extends t{getScopeHandler(){return OP}tsIsIdentifier(){return Ye(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,r,s){if(!Ye(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.includes(i)){if(s&&this.match(106)||r&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:r,stopOnStartOfClassStaticBlock:s,errorTemplate:i=ye.InvalidModifierOnTypeMember},a){let u=(c,m,f,d)=>{m===f&&a[d]&&this.raise(ye.InvalidModifiersOrder,c,{orderedModifiers:[f,d]})},p=(c,m,f,d)=>{(a[f]&&m===d||a[d]&&m===f)&&this.raise(ye.IncompatibleModifiers,c,{modifiers:[f,d]})};for(;;){let{startLoc:c}=this.state,m=this.tsParseModifier(e.concat(r??[]),s,a.static);if(!m)break;pm(m)?a.accessibility?this.raise(ye.DuplicateAccessibilityModifier,c,{modifier:m}):(u(c,m,m,"override"),u(c,m,m,"static"),u(c,m,m,"readonly"),a.accessibility=m):nF(m)?(a[m]&&this.raise(ye.DuplicateModifier,c,{modifier:m}),a[m]=!0,u(c,m,"in","out")):(Object.prototype.hasOwnProperty.call(a,m)?this.raise(ye.DuplicateModifier,c,{modifier:m}):(u(c,m,"static","readonly"),u(c,m,"static","override"),u(c,m,"override","readonly"),u(c,m,"abstract","override"),p(c,m,"declare","override"),p(c,m,"static","abstract")),a[m]=!0),r?.includes(m)&&this.raise(i,c,{modifier:m})}}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,r){let s=[];for(;!this.tsIsListTerminator(e);)s.push(r());return s}tsParseDelimitedList(e,r,s){return sF(this.tsParseDelimitedListWorker(e,r,!0,s))}tsParseDelimitedListWorker(e,r,s,i){let a=[],u=-1;for(;!this.tsIsListTerminator(e);){u=-1;let p=r();if(p==null)return;if(a.push(p),this.eat(12)){u=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;s&&this.expect(12);return}return i&&(i.value=u),a}tsParseBracketedList(e,r,s,i,a){i||(s?this.expect(0):this.expect(47));let u=this.tsParseDelimitedList(e,r,a);return s?this.expect(3):this.expect(48),u}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.tsParseLiteralTypeNode():(this.raise(ye.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=this.tsParseNonConditionalType()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseImportTypeOptions(){let e=this.startNode();this.expect(5);let r=this.startNode();return this.isContextual(76)?(r.method=!1,r.key=this.parseIdentifier(!0),r.computed=!1,r.shorthand=!1):this.unexpected(null,76),this.expect(14),r.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(r)],this.eat(12),this.expect(8),this.finishNode(e,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let e=this.startNode(),r=[];for(this.expect(5);!this.match(8);){let s=this.state.type;Ye(s)||s===134?r.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=r,this.next(),this.finishNode(e,"ObjectExpression")}tsParseEntityName(e){let r;if(e&1&&this.match(78))if(e&2)r=this.parseIdentifier(!0);else{let s=this.startNode();this.next(),r=this.finishNode(s,"ThisExpression")}else r=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let s=this.startNodeAtNode(r);s.left=r,s.right=this.parseIdentifier(!!(e&1)),r=this.finishNode(s,"TSQualifiedName")}return r}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let r=this.startNodeAtNode(e);return r.parameterName=e,r.typeAnnotation=this.tsParseTypeAnnotation(!1),r.asserts=!1,this.finishNode(r,"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(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeArguments=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ye.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ye.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ye.InvalidModifierOnTypeParameter});tsParseTypeParameter(e){let r=this.startNode();return e(r),r.name=this.tsParseTypeParameterName(),r.constraint=this.tsEatThenParseType(81),r.default=this.tsEatThenParseType(29),this.finishNode(r,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let r=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let s={value:-1};return r.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),r.params.length===0&&this.raise(ye.EmptyTypeParameters,r),s.value!==-1&&this.addExtra(r,"trailingComma",s.value),this.finishNode(r,"TSTypeParameterDeclaration")}tsFillSignature(e,r){let s=e===19,i="params",a="returnType";r.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),r[i]=this.tsParseBindingListForSignature(),s?r[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(r[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let r of e){let{type:s}=r;(s==="AssignmentPattern"||s==="TSParameterProperty")&&this.raise(ye.UnsupportedSignatureParameterKind,r,{type:s})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,r){return this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon(),this.finishNode(r,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),Ye(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 r=this.parseIdentifier();r.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(r),this.expect(3),e.parameters=[r];let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,r){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){r&&this.raise(ye.ReadonlyForMethodSignature,e);let s=e;s.kind&&this.match(47)&&this.raise(ye.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let i="params",a="returnType";if(s.kind==="get")s[i].length>0&&(this.raise(U.BadGetterArity,this.state.curPosition()),this.isThisParam(s[i][0])&&this.raise(ye.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[i].length!==1)this.raise(U.BadSetterArity,this.state.curPosition());else{let u=s[i][0];this.isThisParam(u)&&this.raise(ye.AccessorCannotDeclareThisParameter,this.state.curPosition()),u.type==="Identifier"&&u.optional&&this.raise(ye.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),u.type==="RestElement"&&this.raise(ye.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(ye.SetAccessorCannotHaveReturnType,s[a])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=e;r&&(s.readonly=!0);let i=this.tsTryParseTypeAnnotation();return i&&(s.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"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))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(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.match(10)&&!this.match(47)&&this.unexpected(null,10)),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)))}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.key=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),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 r=!1;return e.elementTypes.forEach(s=>{let{type:i}=s;r&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&s.optional)&&this.raise(ye.OptionalTypeBeforeRequired,s),r||(r=i==="TSNamedTupleMember"&&s.optional||i==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e=this.state.startLoc,r=this.eat(21),{startLoc:s}=this.state,i,a,u,p,c=br(this.state.type)?this.lookaheadCharCode():null;if(c===58)i=!0,u=!1,a=this.parseIdentifier(!0),this.expect(14),p=this.tsParseType();else if(c===63){u=!0;let m=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,a=this.createIdentifier(this.startNodeAt(s),m),this.expect(17),this.expect(14),p=this.tsParseType()):(i=!1,p=f,this.expect(17))}else p=this.tsParseType(),u=this.eat(17),i=this.eat(14);if(i){let m;a?(m=this.startNodeAt(s),m.optional=u,m.label=a,m.elementType=p,this.eat(17)&&(m.optional=!0,this.raise(ye.TupleOptionalAfterType,this.state.lastTokStartLoc))):(m=this.startNodeAt(s),m.optional=u,this.raise(ye.InvalidTupleMemberLabel,p),m.label=p,m.elementType=this.tsParseType()),p=this.finishNode(m,"TSNamedTupleMember")}else if(u){let m=this.startNodeAt(s);m.typeAnnotation=p,p=this.finishNode(m,"TSOptionalType")}if(r){let m=this.startNodeAt(e);m.typeAnnotation=p,p=this.finishNode(m,"TSRestType")}return p}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,r){let s=this.startNode();return e==="TSConstructorType"&&(s.abstract=!!r,r&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,s)),this.finishNode(s,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){{let e=this.state.startLoc,r=this.parseTemplateElement(!1),s=[r];if(r.tail){let i=this.startNodeAt(e),a=this.startNodeAt(e);return a.expressions=[],a.quasis=s,i.literal=this.finishNode(a,"TemplateLiteral"),this.finishNode(i,"TSLiteralType")}else{let i=[];for(;!r.tail;)i.push(this.tsParseType()),this.readTemplateContinuation(),s.push(r=this.parseTemplateElement(!1));let a=this.startNodeAt(e);return a.types=i,a.quasis=s,this.finishNode(a,"TSTemplateLiteralType")}}}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 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),r=this.lookahead();return r.type!==135&&r.type!==136&&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:if(!(this.optionFlags&1024)){let e=this.state.startLoc;this.next();let r=this.tsParseType();return this.expect(11),this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e.index),r}return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(Ye(e)||e===88||e===84){let r=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":iF(this.state.value);if(r!==void 0&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,r)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:e}=this.state,r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAt(e);s.elementType=r,this.expect(3),r=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAt(e);s.objectType=r,s.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(s,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let e=this.startNode(),r=this.state.value;return this.next(),e.operator=r,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),r==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ye.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let r=this.startNode();return r.name=this.tsParseTypeParameterName(),r.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(r,"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 cP(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,r,s){let i=this.startNode(),a=this.eat(s),u=[];do u.push(r());while(this.eat(s));return u.length===1&&!a?u[0]:(i.types=u,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(Ye(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,r=e.length;try{return this.parseObjectLike(8,!0),e.length===r}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,r=e.length;try{return super.parseBindingList(3,93,1),e.length===r}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 r=this.startNode();this.expect(e);let s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let p=this.tsParseThisTypeOrThisTypePredicate();return p.type==="TSThisType"?(s.parameterName=p,s.asserts=!0,s.typeAnnotation=null,p=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(p,s),p.asserts=!0),r.typeAnnotation=p,this.finishNode(r,"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,r.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(r,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,r);let u=this.tsParseTypeAnnotation(!1);return s.parameterName=a,s.typeAnnotation=u,s.asserts=i,r.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(r,"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(),!Ye(this.state.type)&&!this.match(78)?!1:(e&&this.raise(U.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,r=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),r.typeAnnotation=this.tsParseType()}),this.finishNode(r,"TSTypeAnnotation")}tsParseType(){lm(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let r=this.startNodeAtNode(e);return r.checkType=e,r.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),r.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),r.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(r,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}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(ye.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 r=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",()=>{{let i=super.parseExprSubscripts();Np(i)||this.raise(ye.InvalidHeritageClauseType,i.loc.start,{token:e});let a=e==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(i.type==="TSInstantiationExpression")return i.type=a,i;let u=this.startNodeAtNode(i);return u.expression=i,(this.match(47)||this.match(51))&&(u.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(u,a)}});return s.length||this.raise(ye.EmptyHeritageClauseType,r,{token:e}),s}tsParseInterfaceDeclaration(e,r={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),r.declare&&(e.declare=!0),Ye(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(ye.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.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()!==et.brace){let r=this.state.context;this.state.context=[r[0]];try{return e()}finally{this.state.context=r}}else return e()}tsInType(e){let r=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=r}}tsInDisallowConditionalTypesContext(e){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=r}}tsInAllowConditionalTypesContext(e){let r=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=r}}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(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,r={}){return r.const&&(e.const=!0),r.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),e.body=this.tsParseEnumBody(),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}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,r=!1){return e.id=this.tsParseEntityName(1),e.id.type==="Identifier"&&this.checkIdentifier(e.id,1024),this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,r,s){e.id=r||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let i=this.tsParseModuleReference();return e.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(ye.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(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let r=this.state.clone(),s=e();return this.state=r,s}tsTryParseAndCatch(e){let r=this.tryParse(s=>e()||s());if(!(r.aborted||!r.node))return r.error&&(this.state=r.failState),r.node}tsTryParse(e){let r=this.state.clone(),s=e();if(s!==void 0&&s!==!1)return s;this.state=r}tsTryParseDeclare(e){if(this.isLineTerminator())return;let r=this.state.type;return this.tsInAmbientContext(()=>{switch(r){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 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(ye.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(ye.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 129:{let s=this.tsParseInterfaceDeclaration(e,{declare:!0});if(s)return s}default:if(Ye(r))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,r,s,i){switch(r){case 124:if(this.tsCheckLineTerminator(s)&&(this.match(80)||Ye(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case 127:if(this.tsCheckLineTerminator(s)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(Ye(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case 128:if(this.tsCheckLineTerminator(s)&&Ye(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case 130:if(this.tsCheckLineTerminator(s)&&Ye(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 r=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=r,!!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.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(ye.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===et.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return hP(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,r){let s=r.length?r[0].loc.start:this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let a=i.accessibility,u=i.override,p=i.readonly;!(e&4)&&(a||p||u)&&this.raise(ye.UnexpectedParameterModifier,s);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let m=this.parseMaybeDefault(c.loc.start,c);if(a||p||u){let f=this.startNodeAt(s);return r.length&&(f.decorators=r),a&&(f.accessibility=a),p&&(f.readonly=p),u&&(f.override=u),m.type!=="Identifier"&&m.type!=="AssignmentPattern"&&this.raise(ye.UnsupportedParameterPropertyKind,f),f.parameter=m,this.finishNode(f,"TSParameterProperty")}return r.length&&(c.decorators=r),m}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let r of e.params)r.type!=="Identifier"&&r.optional&&!this.state.isAmbientContext&&this.raise(ye.PatternIsOptional,r)}setArrowFunctionParameters(e,r,s){super.setArrowFunctionParameters(e,r,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,r,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=r==="FunctionDeclaration"?"TSDeclareFunction":r==="ClassMethod"||r==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ye.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,r,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(r=>{r?.type==="TSTypeCastExpression"&&this.raise(ye.UnexpectedTypeAnnotation,r.typeAnnotation)})}toReferencedList(e,r){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,r,s){let i=super.parseArrayLike(e,r,s);return i.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(e,r,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let u=this.startNodeAt(r);return u.expression=e,this.finishNode(u,"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 u,p=this.tsTryParseAndCatch(()=>{if(!s&&this.atPossibleAsyncArrow(e)){let d=this.tsTryParseGenericAsyncArrowFunction(r);if(d)return i.stop=!0,d}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){u=this.state.curPosition();return}if(wp(this.state.type)){let d=super.parseTaggedTemplateExpression(e,r,i);return d.typeArguments=c,d}if(!s&&this.eat(10)){let d=this.startNodeAt(r);return d.callee=e,d.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeArguments=c,i.optionalChainMember&&(d.optional=a),this.finishCallExpression(d,i.optionalChainMember)}let m=this.state.type;if(m===48||m===52||m!==10&&ua(m)&&!this.hasPrecedingLineBreak())return;let f=this.startNodeAt(r);return f.expression=e,f.typeArguments=c,this.finishNode(f,"TSInstantiationExpression")});if(u&&this.unexpected(u,10),p)return p.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ye.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(p.expression=super.stopParseSubscript(e,i))),p}return super.parseSubscript(e,r,s,i)}parseNewCallee(e){super.parseNewCallee(e);let{callee:r}=e;r.type==="TSInstantiationExpression"&&!r.extra?.parenthesized&&(e.typeArguments=r.typeArguments,e.callee=r.expression)}parseExprOp(e,r,s){let i;if(Jo(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let a=this.startNodeAt(r);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise(U.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,r,s)}return super.parseExprOp(e,r,s)}checkReservedWord(e,r,s,i){this.state.isAmbientContext||super.checkReservedWord(e,r,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(ye.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let r=this.lookaheadCharCode();return e?r===123||r===42:r!==61}return!e&&this.isContextual(87)}applyImportPhase(e,r,s,i){super.applyImportPhase(e,r,s,i),r?e.exportKind=s==="type"?"type":"value":e.importKind=s==="type"||s==="typeof"?s:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let r;if(Ye(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);r=super.parseImportSpecifiersAndAfter(e,s)}else r=super.parseImport(e);return r.importKind==="type"&&r.specifiers.length>1&&r.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ye.TypeImportCannotSpecifyDefaultAndNamed,r),r}parseExport(e,r){if(this.match(83)){let s=this.startNode();this.next();let i=null;this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(s,!1):s.importKind="value";let a=this.tsParseImportEqualsDeclaration(s,i,!0);return e.attributes=[],e.declaration=a,e.exportKind="value",e.source=null,e.specifiers=[],this.finishNode(e,"ExportNamedDeclaration")}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,r)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}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,r,s=!1){let{isAmbientContext:i}=this.state,a=super.parseVarStatement(e,r,s||i);if(!i)return a;if(!e.declare&&(r==="using"||r==="await using"))return this.raiseOverwrite(ye.UsingDeclarationInAmbientContext,e,r),a;for(let{id:u,init:p}of a.declarations)p&&(r==="var"||r==="let"||u.typeAnnotation?this.raise(ye.InitializerNotAllowedInAmbientContext,p):uF(p,this.hasPlugin("estree"))||this.raise(ye.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,p));return a}parseStatementContent(e,r){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let s=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(s,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let s=this.state.type,i=this.startNode();this.next();let a=s===125?this.tsTryParseDeclare(i):this.tsParseAbstractDeclaration(i,r);return a?(s===125&&(a.declare=!0),a):(i.expression=this.createIdentifier(this.startNodeAt(i.loc.start),s===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(i,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let s=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(s)}break}case 129:{let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let s=this.startNode();return this.next(),this.tsParseDeclaration(s,127,!1,r)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let s=this.startNode();return this.next(),this.tsParseDeclaration(s,128,!1,r)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let s=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(s)}break}}return super.parseStatementContent(e,r)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,r){return r.some(s=>pm(s)?e.accessibility===s:!!e[s])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,r,s){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ye.InvalidModifierOnTypeParameterPositions},r);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(r,i)&&this.raise(ye.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,r)):this.parseClassMemberWithIsStatic(e,r,s,!!r.static)};r.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,r,s,i){let a=this.tsTryParseIndexSignature(r);if(a){e.body.push(a),r.abstract&&this.raise(ye.IndexSignatureHasAbstract,r),r.accessibility&&this.raise(ye.IndexSignatureHasAccessibility,r,{modifier:r.accessibility}),r.declare&&this.raise(ye.IndexSignatureHasDeclare,r),r.override&&this.raise(ye.IndexSignatureHasOverride,r);return}!this.state.inAbstractClass&&r.abstract&&this.raise(ye.NonAbstractClassHasAbstractMethod,r),r.override&&(s.hadSuperClass||this.raise(ye.OverrideNotInSubClass,r)),super.parseClassMemberWithIsStatic(e,r,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(ye.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(ye.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,r,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let i=this.lookaheadCharCode();if(i===44||i===61||i===58||i===41)return this.setOptionalParametersError(s),e}return super.parseConditional(e,r,s)}parseParenItem(e,r){let s=super.parseParenItem(e,r);if(this.eat(17)&&(s.optional=!0,this.resetEndLocation(e)),this.match(14)){let i=this.startNodeAt(r);return i.expression=e,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let r=this.state.startLoc,s=this.eatContextual(125);if(s&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ye.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let i=Ye(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return i?((i.type==="TSInterfaceDeclaration"||i.type==="TSTypeAliasDeclaration"||s)&&(e.exportKind="type"),s&&i.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(i,r),i.declare=!0),i):null}parseClassId(e,r,s,i){if((!r||s)&&this.isContextual(113))return;super.parseClassId(e,r,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 r=this.tsTryParseTypeAnnotation();r&&(e.typeAnnotation=r)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(ye.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:r}=e;this.raise(ye.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:r.type==="Identifier"&&!e.computed?r.name:`[${this.input.slice(this.offsetToSourcePos(r.start),this.offsetToSourcePos(r.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(ye.PrivateElementHasAbstract,e),e.accessibility&&this.raise(ye.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(ye.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,r,s,i,a,u){let p=this.tsTryParseTypeParameters(this.tsParseConstModifier);p&&a&&this.raise(ye.ConstructorHasTypeParameters,p);let{declare:c=!1,kind:m}=r;c&&(m==="get"||m==="set")&&this.raise(ye.DeclareAccessor,r,{kind:m}),p&&(r.typeParameters=p),super.pushClassMethod(e,r,s,i,a,u)}pushClassPrivateMethod(e,r,s,i){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(r.typeParameters=a),super.pushClassPrivateMethod(e,r,s,i)}declareClassPrivateMethodInScope(e,r){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&e.value.body==null||super.declareClassPrivateMethodInScope(e,r))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeArguments=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,r,s,i,a,u,p){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,r,s,i,a,u,p)}parseFunctionParams(e,r){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,r)}parseVarId(e,r){super.parseVarId(e,r),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,r){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,r)}parseMaybeAssign(e,r){let s,i,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(s=this.state.clone(),i=this.tryParse(()=>super.parseMaybeAssign(e,r),s),!i.error)return i.node;let{context:c}=this.state,m=c[c.length-1];(m===et.j_oTag||m===et.j_expr)&&c.pop()}if(!i?.error&&!this.match(47))return super.parseMaybeAssign(e,r);(!s||s===this.state)&&(s=this.state.clone());let u,p=this.tryParse(c=>{u=this.tsParseTypeParameters(this.tsParseConstModifier);let m=super.parseMaybeAssign(e,r);if((m.type!=="ArrowFunctionExpression"||m.extra?.parenthesized)&&c(),u?.params.length!==0&&this.resetStartLocationFromNode(m,u),m.typeParameters=u,this.hasPlugin("jsx")&&m.typeParameters.params.length===1&&!m.typeParameters.extra?.trailingComma){let f=m.typeParameters.params[0];f.constraint||this.raise(ye.SingleTypeParameterWithoutTrailingComma,fr(f.loc.end,1),{typeParameterName:f.name.name})}return m},s);if(!p.error&&!p.aborted)return u&&this.reportReservedArrowTypeParam(u),p.node;if(!i&&(lm(!this.hasPlugin("jsx")),a=this.tryParse(()=>super.parseMaybeAssign(e,r),s),!a.error))return a.node;if(i?.node)return this.state=i.failState,i.node;if(p.node)return this.state=p.failState,u&&this.reportReservedArrowTypeParam(u),p.node;if(a?.node)return this.state=a.failState,a.node;throw i?.error||p.error||a?.error}reportReservedArrowTypeParam(e){e.params.length===1&&!e.params[0].constraint&&!e.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ye.ReservedArrowTypeParam,e)}parseMaybeUnary(e,r){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,r)}parseArrow(e){if(this.match(14)){let r=this.tryParse(s=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&s(),i});if(r.aborted)return;r.thrown||(r.error&&(this.state=r.failState),e.returnType=r.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,r){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,r);case"TSParameterProperty":return!0;default:return super.isAssignable(e,r)}}toAssignable(e,r=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,r);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":r?this.expressionScope.recordArrowParameterBindingError(ye.UnexpectedTypeCastInParameter,e):this.raise(ye.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,r);break;case"AssignmentExpression":!r&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,r)}}toAssignableParenthesizedExpression(e,r){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,r);break;default:super.toAssignable(e,r)}}checkToRestConversion(e,r){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,r)}}isValidLVal(e,r,s,i){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!s)&&["expression",!0];default:return super.isValidLVal(e,r,s,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,r){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(e,r);return i.typeArguments=s,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,r)}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,r){let s=super.parseMaybeDefault(e,r);return s.type==="AssignmentPattern"&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(ye.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}toAssignableListItem(e,r,s){let i=e[r];i.type==="TSTypeCastExpression"&&(e[r]=this.typeCastToParameter(i)),super.toAssignableListItem(e,r,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(r=>this.isAssignable(r,!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 r=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());r&&(e.typeArguments=r)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let r=super.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e)[0];return s&&this.isThisParam(s)?r+1:r}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:r,strict:s}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=r,this.state.strict=s}}parseClass(e,r,s){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,r,s)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(e,r){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(r,this.parseClass(e,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(ye.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,80)}parseMethod(e,r,s,i,a,u,p){let c=super.parseMethod(e,r,s,i,a,u,p);if((c.abstract||c.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?c.value:c).body){let{key:m}=c;this.raise(ye.AbstractMethodHasImplementation,c,{methodName:m.type==="Identifier"&&!c.computed?m.name:`[${this.input.slice(this.offsetToSourcePos(m.start),this.offsetToSourcePos(m.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier()}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,r,s,i){return!r&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,r,s,i))}parseImportSpecifier(e,r,s,i,a){return!r&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,r,s,i,s?4098:4096))}parseTypeOnlyImportExportSpecifier(e,r,s){let i=r?"imported":"local",a=r?"local":"exported",u=e[i],p,c=!1,m=!0,f=u.loc.start;if(this.isContextual(93)){let D=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();br(this.state.type)?(c=!0,u=D,p=r?this.parseIdentifier():this.parseModuleExportName(),m=!1):(p=y,m=!1)}else br(this.state.type)?(m=!1,p=r?this.parseIdentifier():this.parseModuleExportName()):(c=!0,u=D)}else br(this.state.type)&&(c=!0,r?(u=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(u.name,u.loc.start,!0,!0)):u=this.parseModuleExportName());c&&s&&this.raise(r?ye.TypeModifierIsUsedInTypeImports:ye.TypeModifierIsUsedInTypeExports,f),e[i]=u,e[a]=p;let d=r?"importKind":"exportKind";e[d]=c?"type":"value",m&&this.eatContextual(93)&&(e[a]=r?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=this.cloneIdentifier(e[i])),r&&this.checkIdentifier(e[a],c?4098:4096)}fillOptionalPropertiesForTSESLint(e){switch(e.type){case"ExpressionStatement":e.directive??(e.directive=void 0);return;case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":e.decorators??(e.decorators=[]),e.optional??(e.optional=!1),e.typeAnnotation??(e.typeAnnotation=void 0);return;case"TSParameterProperty":e.accessibility??(e.accessibility=void 0),e.decorators??(e.decorators=[]),e.override??(e.override=!1),e.readonly??(e.readonly=!1),e.static??(e.static=!1);return;case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":e.declare??(e.declare=!1),e.returnType??(e.returnType=void 0),e.typeParameters??(e.typeParameters=void 0);return;case"Property":e.optional??(e.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":e.optional??(e.optional=!1);case"TSIndexSignature":e.accessibility??(e.accessibility=void 0),e.readonly??(e.readonly=!1),e.static??(e.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":e.declare??(e.declare=!1),e.definite??(e.definite=!1),e.readonly??(e.readonly=!1),e.typeAnnotation??(e.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":e.accessibility??(e.accessibility=void 0),e.decorators??(e.decorators=[]),e.override??(e.override=!1),e.optional??(e.optional=!1);return;case"ClassExpression":e.id??(e.id=null);case"ClassDeclaration":e.abstract??(e.abstract=!1),e.declare??(e.declare=!1),e.decorators??(e.decorators=[]),e.implements??(e.implements=[]),e.superTypeArguments??(e.superTypeArguments=void 0),e.typeParameters??(e.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":e.declare??(e.declare=!1);return;case"VariableDeclarator":e.definite??(e.definite=!1);return;case"TSEnumDeclaration":e.const??(e.const=!1),e.declare??(e.declare=!1);return;case"TSEnumMember":e.computed??(e.computed=!1);return;case"TSImportType":e.qualifier??(e.qualifier=null),e.options??(e.options=null),e.typeArguments??(e.typeArguments=null);return;case"TSInterfaceDeclaration":e.declare??(e.declare=!1),e.extends??(e.extends=[]);return;case"TSMappedType":e.optional??(e.optional=!1),e.readonly??(e.readonly=void 0);return;case"TSModuleDeclaration":e.declare??(e.declare=!1),e.global??(e.global=e.kind==="global");return;case"TSTypeParameter":e.const??(e.const=!1),e.in??(e.in=!1),e.out??(e.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(e,r){if($r(e)){if(Rl.lastIndex=r,Rl.test(this.input)){let s=this.codePointAtPos(Rl.lastIndex);if(!gi(s)&&s!==92)return!1}return!0}else return e===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(r,e)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return this.chStartsBindingIdentifier(r,e)||r===34||r===39}};function oF(t){if(t.type!=="MemberExpression")return!1;let{computed:e,property:r}=t;return e&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:FD(t.object)}function uF(t,e){let{type:r}=t;if(t.extra?.parenthesized)return!1;if(e){if(r==="Literal"){let{value:s}=t;if(typeof s=="string"||typeof s=="boolean")return!0}}else if(r==="StringLiteral"||r==="BooleanLiteral")return!0;return!!(PD(t,e)||lF(t,e)||r==="TemplateLiteral"&&t.expressions.length===0||oF(t))}function PD(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function lF(t,e){if(t.type==="UnaryExpression"){let{operator:r,argument:s}=t;if(r==="-"&&PD(s,e))return!0}return!1}function FD(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:FD(t.object)}var cm=Mr`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),pF=t=>class extends t{parsePlaceholder(e){if(this.match(133)){let r=this.startNode();return this.next(),this.assertNoSpace(),r.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(r,e)}}finishPlaceholder(e,r){let s=e;return(!s.expectedNode||!s.type)&&(s=this.finishNode(s,"Placeholder")),s.expectedNode=r,s}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,r,s,i){e!==void 0&&super.checkReservedWord(e,r,s,i)}cloneIdentifier(e){let r=super.cloneIdentifier(e);return r.type==="Placeholder"&&(r.expectedNode=e.expectedNode),r}cloneStringLiteral(e){return e.type==="Placeholder"?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,r,s,i){return e==="Placeholder"||super.isValidLVal(e,r,s,i)}toAssignable(e,r){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,r)}chStartsBindingIdentifier(e,r){if(super.chStartsBindingIdentifier(e,r))return!0;let s=this.nextTokenStart();return this.input.charCodeAt(s)===37&&this.input.charCodeAt(s+1)===37}verifyBreakContinue(e,r){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,r)}parseExpressionStatement(e,r){if(r.type!=="Placeholder"||r.extra?.parenthesized)return super.parseExpressionStatement(e,r);if(this.match(14)){let i=e;return i.label=this.finishPlaceholder(r,"Identifier"),this.next(),i.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(i,"LabeledStatement")}this.semicolon();let s=e;return s.name=r.name,this.finishPlaceholder(s,"Statement")}parseBlock(e,r,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,r,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,r,s){let i=r?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,u=this.parsePlaceholder("Identifier");if(u)if(this.match(81)||this.match(133)||this.match(5))e.id=u;else{if(s||!r)return e.id=null,e.body=this.finishPlaceholder(u,"ClassBody"),this.finishNode(e,i);throw this.raise(cm.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,r,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,i)}parseExport(e,r){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,r);let i=e;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=s,i.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(i,r)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(qs(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,r){return e.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(e,r)}checkExport(e){let{specifiers:r}=e;r?.length&&(e.specifiers=r.filter(s=>s.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=r}parseImport(e){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(r,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let s=this.startNodeAtNode(r);return s.local=r,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.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(cm.UnexpectedSpace,this.state.lastTokEndLoc)}},cF=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,r=this.startNode();if(this.next(),Ye(this.state.type)){let s=this.parseIdentifierName(),i=this.createIdentifier(r,s);if(this.castNodeTo(i,"V8IntrinsicIdentifier"),this.match(10))return i}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},hm=["fsharp","hack"],dm=["^^","@@","^","%","#"];function hF(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let e=t.get("decorators").decoratorsBeforeExport;if(e!=null&&typeof e!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=t.get("decorators").allowCallParenthesized;if(r!=null&&typeof r!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){let e=t.get("pipelineOperator").proposal;if(!hm.includes(e)){let r=hm.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}if(e==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=t.get("pipelineOperator").topicToken;if(!dm.includes(r)){let s=dm.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.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(t.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead. To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin.");if(!t.has("deprecatedImportAssert")&&t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax)throw new Error("The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin.");if(t.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}if(t.has("optionalChainingAssign")&&t.get("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'.");if(t.has("discardBinding")&&t.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");{if(t.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(t.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}}var kD={estree:tP,jsx:_P,flow:IP,typescript:aF,v8intrinsic:cF,placeholders:pF},dF=Object.keys(kD),fF=class extends rF{checkProto(e,r,s,i){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return s;let a=e.key;return(a.type==="Identifier"?a.name:a.value)==="__proto__"?r?(this.raise(U.RecordNoProto,a),!0):(s&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=a.loc.start):this.raise(U.DuplicateProto,a)),!0):s}shouldExitDescending(e,r){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===r}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(U.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise(U.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,r){return e?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(e){let r=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(12)){let i=this.startNodeAt(r);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,r){return this.disallowInAnd(()=>this.parseMaybeAssign(e,r))}parseMaybeAssignAllowIn(e,r){return this.allowInAnd(()=>this.parseMaybeAssign(e,r))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,r){let s=this.state.startLoc,i=this.isContextual(108);if(i&&this.prodParam.hasYield){this.next();let c=this.parseYield(s);return r&&(c=r.call(this,c,s)),c}let a;e?a=!1:(e=new Xo,a=!0);let{type:u}=this.state;(u===10||Ye(u))&&(this.state.potentialArrowAt=this.state.start);let p=this.parseMaybeConditional(e);if(r&&(p=r.call(this,p,s)),aP(this.state.type)){let c=this.startNodeAt(s),m=this.state.value;if(c.operator=m,this.match(29)){this.toAssignable(p,!0),c.left=p;let f=s.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=f&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=f&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=f&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=f&&(e.voidPatternLoc=null)}else c.left=p;return this.next(),c.right=this.parseMaybeAssign(),this.checkLVal(p,this.finishNode(c,"AssignmentExpression"),void 0,void 0,void 0,void 0,m==="||="||m==="&&="||m==="??="),c}else a&&this.checkExpressionErrors(e,!0);if(i){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?ua(c):ua(c)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(U.YieldNotInGeneratorFunction,s),this.parseYield(s)}return p}parseMaybeConditional(e){let r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,r,e)}parseConditional(e,r,s){if(this.eat(17)){let i=this.startNodeAt(r);return i.test=e,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,r,-1)}parseExprOp(e,r,s){if(this.isPrivateName(e)){let a=this.getPrivateNameSV(e);(s>=Jo(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(U.PrivateInExpectedIn,e,{identifierName:a}),this.classScope.usePrivateName(a,e.loc.start)}let i=this.state.type;if(uP(i)&&(this.prodParam.hasIn||!this.match(58))){let a=Jo(i);if(a>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,r)}let u=this.startNodeAt(r);u.left=e,u.operator=this.state.value;let p=i===41||i===42,c=i===40;c&&(a=Jo(42)),this.next(),u.right=this.parseExprOpRightExpr(i,a);let m=this.finishNode(u,p||c?"LogicalExpression":"BinaryExpression"),f=this.state.type;if(c&&(f===41||f===42)||p&&f===40)throw this.raise(U.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(m,r,s)}}return e}parseExprOpRightExpr(e,r){switch(this.state.startLoc,e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}default:return this.parseExprOpBaseRightExpr(e,r)}}parseExprOpBaseRightExpr(e,r){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,dP(e)?r-1:r)}parseHackPipeBody(){let{startLoc:e}=this.state,r=this.parseMaybeAssign();return Kw.has(r.type)&&!r.extra?.parenthesized&&this.raise(U.PipeUnparenthesizedBody,e,{type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(U.PipeTopicUnused,e),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(U.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,r){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(s);return r||this.checkExponentialAfterUnary(c),c}let a=this.match(34),u=this.startNode();if(pP(this.state.type)){u.operator=this.state.value,u.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let c=this.match(89);if(this.next(),u.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&c){let m=u.argument;m.type==="Identifier"?this.raise(U.StrictDelete,u):this.hasPropertyAsPrivateName(m)&&this.raise(U.DeletePrivateField,u)}if(!a)return r||this.checkExponentialAfterUnary(u),this.finishNode(u,"UnaryExpression")}let p=this.parseUpdate(u,a,e);if(i){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?ua(c):ua(c)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(U.AwaitNotInAsyncContext,s),this.parseAwait(s)}return p}parseUpdate(e,r,s){if(r){let u=e;return this.checkLVal(u.argument,this.finishNode(u,"UpdateExpression")),e}let i=this.state.startLoc,a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;lP(this.state.type)&&!this.canInsertSemicolon();){let u=this.startNodeAt(i);u.operator=this.state.value,u.prefix=!1,u.argument=a,this.next(),this.checkLVal(a,a=this.finishNode(u,"UpdateExpression"))}return a}parseExprSubscripts(e){let r=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,r)}parseSubscripts(e,r,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,r,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return e}parseSubscript(e,r,s,i){let{type:a}=this.state;if(!s&&a===15)return this.parseBind(e,r,s,i);if(wp(a))return this.parseTaggedTemplateExpression(e,r,i);let u=!1;if(a===18){if(s&&(this.raise(U.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,i);i.optionalChainMember=u=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,r,i,u);{let p=this.eat(0);return p||u||this.eat(16)?this.parseMember(e,r,i,p,u):this.stopParseSubscript(e,i)}}stopParseSubscript(e,r){return r.stop=!0,e}parseMember(e,r,s,i,a){let u=this.startNodeAt(r);return u.object=e,u.computed=i,i?(u.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise(U.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),u.property=this.parsePrivateName()):u.property=this.parseIdentifier(!0),s.optionalChainMember?(u.optional=a,this.finishNode(u,"OptionalMemberExpression")):this.finishNode(u,"MemberExpression")}parseBind(e,r,s,i){let a=this.startNodeAt(r);return a.object=e,this.next(),a.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),r,s)}parseCoverCallAndAsyncArrowHead(e,r,s,i){let a=this.state.maybeInArrowParameters,u=null;this.state.maybeInArrowParameters=!0,this.next();let p=this.startNodeAt(r);p.callee=e;let{maybeAsyncArrow:c,optionalChainMember:m}=s;c&&(this.expressionScope.enter(ZP()),u=new Xo),m&&(p.optional=i),i?p.arguments=this.parseCallExpressionArguments():p.arguments=this.parseCallExpressionArguments(e.type!=="Super",p,u);let f=this.finishCallExpression(p,m);return c&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),f=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),f)):(c&&(this.checkExpressionErrors(u,!0),this.expressionScope.exit()),this.toReferencedArguments(f)),this.state.maybeInArrowParameters=a,f}toReferencedArguments(e,r){this.toReferencedListDeep(e.arguments,r)}parseTaggedTemplateExpression(e,r,s){let i=this.startNodeAt(r);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(U.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,r){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise(U.ImportCallArity,e);else for(let s of e.arguments)s.type==="SpreadElement"&&this.raise(U.ImportCallSpreadArgument,s);return this.finishNode(e,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,r,s){let i=[],a=!0,u=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(a)a=!1;else if(this.expect(12),this.match(11)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(11,!1,s,e))}return this.state.inFSharpPipelineDirectBody=u,i}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,r){return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(e,r.arguments,!0,r.extra?.trailingCommaLoc),r.innerComments&&an(e,r.innerComments),r.callee.trailingComments&&an(e,r.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let r,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(r):this.match(10)?this.optionFlags&512?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(U.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134: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 a=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(a)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let a=r.callee=this.parseNoCallExpr();if(a.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(U.UnsupportedBind,a)}case 139:return this.raise(U.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 a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.parseTopicReference(a);throw this.unexpected()}case 47:{let a=this.input.codePointAt(this.nextTokenStart());throw $r(a)||a===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(Ye(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let a=this.state.potentialArrowAt===this.state.start,u=this.state.containsEsc,p=this.parseIdentifier();if(!u&&p.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===68)return this.resetPreviousNodeTrailingComments(p),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(p));if(Ye(c))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(p)):p;if(c===90)return this.resetPreviousNodeTrailingComments(p),this.parseDo(this.startNodeAtNode(p),!0)}return a&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(p),[p],!1)):p}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,r){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=fr(this.state.endLoc,-1),this.parseTopicReference(s);throw this.unexpected()}parseTopicReference(e){let r=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,s,e,i)}finishTopicReference(e,r,s,i){if(this.testTopicReferenceConfiguration(s,r,i))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(U.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(e,"TopicReference");throw this.raise(U.PipeTopicUnconfiguredToken,r,{token:qs(i)})}testTopicReferenceConfiguration(e,r,s){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:qs(s)}]);case"smart":return s===27;default:throw this.raise(U.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(Ko(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(U.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,r,!0)}parseDo(e,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),e.async=r,this.next();let s=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.raise(U.SuperNotAllowed,e):this.scope.allowSuper||this.raise(U.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(U.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),r=this.startNodeAt(fr(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(r,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,r,"sent")}return this.parseFunction(e)}parseMetaProperty(e,r,s){e.meta=r;let i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(U.UnsupportedMetaProperty,e.property,{target:r.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let r=this.isContextual(105);return this.expectPlugin(r?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=r?"source":"defer",this.parseImportCall(e)}else{let r=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(U.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,r,"meta")}}parseLiteralAtNode(e,r,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=e,this.next(),this.finishNode(s,r)}parseLiteral(e,r){let s=this.startNode();return this.parseLiteralAtNode(e,r,s)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){{let r;try{r=BigInt(e)}catch{r=null}return this.parseLiteral(r,"BigIntLiteral")}}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(this.offsetToSourcePos(r.start),this.state.end)),r.pattern=e.pattern,r.flags=e.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(e){let r=this.startNode();return r.value=e,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let r=this.state.startLoc,s;this.next(),this.expressionScope.enter(QP());let i=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let u=this.state.startLoc,p=[],c=new Xo,m=!0,f,d;for(;!this.match(11);){if(m)m=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){let x=this.state.startLoc;if(f=this.state.startLoc,p.push(this.parseParenItem(this.parseRestBinding(),x)),!this.checkCommaAfterRest(41))break}else p.push(this.parseMaybeAssignAllowInOrVoidPattern(11,c,this.parseParenItem))}let D=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=a;let y=this.startNodeAt(r);return e&&this.shouldParseArrow(p)&&(y=this.parseArrow(y))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(y,p,!1),y):(this.expressionScope.exit(),p.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),f&&this.unexpected(f),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(p,!0),p.length>1?(s=this.startNodeAt(u),s.expressions=p,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,D)):s=p[0],this.wrapParenthesis(r,s))}wrapParenthesis(e,r){if(!(this.optionFlags&1024))return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",e.index),this.takeSurroundingComments(r,e.index,this.state.lastTokEndLoc.index),r;let s=this.startNodeAt(e);return s.expression=r,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,r){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let s=this.parseMetaProperty(e,r,"target");return this.scope.allowNewTarget||this.raise(U.UnexpectedNewTarget,s),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),e.arguments=r}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let r=this.match(83),s=this.parseNoCallExpr();e.callee=s,r&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(U.ImportCallNotNewExpression,s)}parseTemplateElement(e){let{start:r,startLoc:s,end:i,value:a}=this.state,u=r+1,p=this.startNodeAt(fr(s,1));a===null&&(e||this.raise(U.InvalidEscapeSequenceTemplate,fr(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),m=c?-1:-2,f=i+m;p.value={raw:this.input.slice(u,f).replace(/\r\n?/g,`
|
|
36
|
-
`),cooked:a===null?null:a.slice(1,m)},p.tail=c,this.next();let d=this.finishNode(p,"TemplateElement");return this.resetEndLocation(d,fr(this.state.lastTokEndLoc,m)),d}parseTemplate(e){let r=this.startNode(),s=this.parseTemplateElement(e),i=[s],a=[];for(;!s.tail;)a.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return r.expressions=a,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,r,s,i){s&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let u=!1,p=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(e);){if(p)p=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(c);break}let f;r?f=this.parseBindingProperty():(f=this.parsePropertyDefinition(i),u=this.checkProto(f,s,u,i)),s&&!this.isObjectProperty(f)&&f.type!=="SpreadElement"&&this.raise(U.InvalidRecordProperty,f),c.properties.push(f)}this.next(),this.state.inFSharpPipelineDirectBody=a;let m="ObjectExpression";return r?m="ObjectPattern":s&&(m="RecordExpression"),this.finishNode(c,m)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(U.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let s=this.startNode(),i=!1,a=!1,u;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(s.decorators=r,r=[]),s.method=!1,e&&(u=this.state.startLoc);let p=this.eat(55);this.parsePropertyNamePrefixOperator(s);let c=this.state.containsEsc;if(this.parsePropertyName(s,e),!p&&!c&&this.maybeAsyncOrAccessorProp(s)){let{key:m}=s,f=m.name;f==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(m),p=this.eat(55),this.parsePropertyName(s)),(f==="get"||f==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(m),s.kind=f,this.match(55)&&(p=!0,this.raise(U.AccessorIsGenerator,this.state.curPosition(),{kind:f}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,u,p,i,!1,a,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let r=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==r&&this.raise(e.kind==="get"?U.BadGetterArity:U.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(U.BadSetterRestParameter,e)}parseObjectMethod(e,r,s,i,a){if(a){let u=this.parseMethod(e,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(u),u}if(s||r||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,r,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,r,s,i){if(e.shorthand=!1,this.eat(14))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),s)e.value=this.parseMaybeDefault(r,this.cloneIdentifier(e.key));else if(this.match(29)){let a=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=a):this.raise(U.InvalidCoverInitializedName,a),e.value=this.parseMaybeDefault(r,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,r,s,i,a,u,p){let c=this.parseObjectMethod(e,s,i,a,u)||this.parseObjectProperty(e,r,a,p);return c||this.unexpected(),c}parsePropertyName(e,r){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,a;if(br(s))a=this.parseIdentifier(!0);else switch(s){case 135:a=this.parseNumericLiteral(i);break;case 134:a=this.parseStringLiteral(i);break;case 136:a=this.parseBigIntLiteral(i);break;case 139:{let u=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=u):this.raise(U.UnexpectedPrivateField,u),a=this.parsePrivateName();break}default:this.unexpected()}e.key=a,s!==139&&(e.computed=!1)}}initFunction(e,r){e.id=null,e.generator=!1,e.async=r}parseMethod(e,r,s,i,a,u,p=!1){this.initFunction(e,s),e.generator=r,this.scope.enter(530|(p?576:0)|(a?32:0)),this.prodParam.enter(Ko(s,e.generator)),this.parseFunctionParams(e,i);let c=this.parseFunctionBodyAndFinish(e,u,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(e,r,s){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!r,s,a),this.state.inFSharpPipelineDirectBody=i,this.finishNode(a,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,r,s,i){this.scope.enter(518);let a=Ko(s,!1);!this.match(5)&&this.prodParam.hasIn&&(a|=8),this.prodParam.enter(a),this.initFunction(e,s);let u=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=u,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,r,s){this.toAssignableList(r,s,!1),e.params=r}parseFunctionBodyAndFinish(e,r,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,r)}parseFunctionBody(e,r,s=!1){let i=r&&!this.match(5);if(this.expressionScope.enter(wD()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,r,!1);else{let a=this.state.strict,u=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,p=>{let c=!this.isSimpleParamList(e.params);p&&c&&this.raise(U.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let m=!a&&this.state.strict;this.checkParams(e,!this.state.strict&&!r&&!s&&!c,r,m),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,m)}),this.prodParam.exit(),this.state.labels=u}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let r=0,s=e.length;r<s;r++)if(!this.isSimpleParameter(e[r]))return!1;return!0}checkParams(e,r,s,i=!0){let a=!r&&new Set,u={type:"FormalParameters"};for(let p of e.params)this.checkLVal(p,u,5,a,i)}parseExprList(e,r,s,i){let a=[],u=!0;for(;!this.eat(e);){if(u)u=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}a.push(this.parseExprListItem(e,r,s))}return a}parseExprListItem(e,r,s,i){let a;if(this.match(12))r||this.raise(U.UnexpectedToken,this.state.curPosition(),{unexpected:","}),a=null;else if(this.match(21)){let u=this.state.startLoc;a=this.parseParenItem(this.parseSpread(s),u)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(U.UnexpectedArgumentPlaceholder,this.state.startLoc);let u=this.startNode();this.next(),a=this.finishNode(u,"ArgumentPlaceholder")}else a=this.parseMaybeAssignAllowInOrVoidPattern(e,s,this.parseParenItem);return a}parseIdentifier(e){let r=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(r,s)}createIdentifier(e,r){return e.name=r,e.loc.identifierName=r,this.finishNode(e,"Identifier")}createIdentifierAt(e,r,s){return e.name=r,e.loc.identifierName=r,this.finishNodeAt(e,"Identifier",s)}parseIdentifierName(e){let r,{startLoc:s,type:i}=this.state;br(i)?r=this.state.value:this.unexpected();let a=iP(i);return e?a&&this.replaceToken(132):this.checkReservedWord(r,s,a,!1),this.next(),r}checkReservedWord(e,r,s,i){if(!(e.length>10||!bP(e))){if(s&&EP(e)){this.raise(U.UnexpectedKeyword,r,{keyword:e});return}if((this.state.strict?i?AD:xD:DD)(e,this.inModule)){this.raise(U.UnexpectedReservedWord,r,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise(U.YieldBindingIdentifier,r);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise(U.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(U.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(U.ArgumentsInClass,r);return}}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let r=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(U.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(U.ObsoleteAwaitStar,r),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||wp(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(e){let r=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError(U.YieldInParameter,r);let s=!1,i=null;if(!this.hasPrecedingLineBreak())switch(s=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!s)break;default:i=this.parseMaybeAssign()}return r.delegate=s,r.argument=i,this.finishNode(r,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(U.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise(U.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(e,r){if(this.isSimpleReference(e)){let s=this.startNodeAt(r);return s.callee=e,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),s.expression=e,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(U.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(U.PipelineTopicUnused,e)}withTopicBindingContext(e){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(e){return e()}withSoloAwaitPermittingContext(e){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=r}}allowInAnd(e){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return e()}finally{this.prodParam.exit()}}return e()}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(e){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,e);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(r,8,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let r=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(r,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,r,s){if(r!=null&&this.match(88)){let i=this.lookaheadCharCode();if(i===44||i===(e===3?93:e===8?125:41)||i===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(r))}return this.parseMaybeAssignAllowIn(r,s)}parsePropertyNamePrefixOperator(e){}},jl={kind:1},mF={kind:2},yF=/[\uD800-\uDFFF]/u,Ul=/in(?:stanceof)?/y;function gF(t,e,r){for(let s=0;s<t.length;s++){let i=t[s],{type:a}=i;typeof a=="number"&&(i.type=mD(a))}return t}var DF=class extends fF{parseTopLevel(e,r){return e.program=this.parseProgram(r,140,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&256&&(e.tokens=gF(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,r,s){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,r),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[a,u]of Array.from(this.scope.undefinedExports))this.raise(U.ModuleExportUndefined,u,{localName:a});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===140?i=this.finishNode(e,"Program"):i=this.finishNodeAt(e,"Program",fr(this.state.startLoc,-1)),i}stmtToDirective(e){let r=this.castNodeTo(e,"Directive"),s=this.castNodeTo(e.expression,"DirectiveLiteral"),i=s.value,a=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),u=s.value=a.slice(1,-1);return this.addExtra(s,"raw",a),this.addExtra(s,"rawValue",u),this.addExtra(s,"expressionValue",i),r.value=s,delete e.expression,r}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let s=this.lookaheadCharCodeSince(e+2);if(s!==61&&s!==58&&s!==59)return!1}return!!(this.chStartsBindingIdentifier(r,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return this.chStartsBindingIdentifier(r,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let r=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(r,e))return!0}return!1}chStartsBindingIdentifier(e,r){if($r(e)){if(Ul.lastIndex=r,Ul.test(this.input)){let s=this.codePointAtPos(Ul.lastIndex);if(!gi(s)&&s!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),r=this.codePointAtPos(e);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),r=this.codePointAtPos(e);return r===123||this.chStartsBindingIdentifier(r,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,e&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(e,r)}parseStatementContent(e,r){let s=this.state.type,i=this.startNode(),a=!!(e&2),u=!!(e&4),p=e&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return u||this.raise(this.state.strict?U.StrictFunction:this.options.annexB?U.SloppyFunctionAnnexB:U.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!a&&u);case 80:return a||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(this.isAwaitUsing())return this.allowsUsing()?a?this.recordAwaitIfAllowed()||this.raise(U.AwaitUsingNotInAsyncContext,i):this.raise(U.UnexpectedLexicalDeclaration,i):this.raise(U.UnexpectedUsingDeclaration,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?a||this.raise(U.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(U.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let f=this.nextTokenStart(),d=this.codePointAtPos(f);if(d!==91&&(!a&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,f)&&d!==123))break}case 75:a||this.raise(U.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let f=this.state.value;return this.parseVarStatement(i,f)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let f=this.lookaheadCharCode();if(f===40||f===46)break}case 82:{!(this.optionFlags&8)&&!p&&this.raise(U.UnexpectedImportExport,this.state.startLoc),this.next();let f;return s===83?f=this.parseImport(i):f=this.parseExport(i,r),this.assertModuleNodeAllowed(f),f}default:if(this.isAsyncFunction())return a||this.raise(U.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!a&&u)}let c=this.state.value,m=this.parseExpression();return Ye(s)&&m.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,m,e):this.parseExpressionStatement(i,m,r)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise(U.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,r,s){return e&&(r.decorators?.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(U.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...e)):r.decorators=e,this.resetStartLocationFromNode(r,e[0]),s&&this.resetStartLocationFromNode(s,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(U.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(U.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let a=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==s&&this.raise(U.DecoratorArgumentsOutsideParentheses,a)}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(r);i.object=s,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s,r)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,r){if(this.eat(10)){let s=this.startNodeAt(r);return s.callee=e,s.arguments=this.parseCallExpressionArguments(),this.toReferencedList(s.arguments),this.finishNode(s,"CallExpression")}return e}parseBreakContinueStatement(e,r){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,r),this.finishNode(e,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,r){let s;for(s=0;s<this.state.labels.length;++s){let i=this.state.labels[s];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(r||i.kind===1)||e.label&&r))break}if(s===this.state.labels.length){let i=r?"BreakStatement":"ContinueStatement";this.raise(U.IllegalBreakContinue,e,{type:i})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(jl),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(jl);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(e,null);let s=this.isContextual(100);{let c=this.isAwaitUsing(),m=c||this.isForUsing(),f=s&&this.hasFollowingBindingAtom()||m;if(this.match(74)||this.match(75)||f){let d=this.startNode(),D;c?(D="await using",this.recordAwaitIfAllowed()||this.raise(U.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):D=this.state.value,this.next(),this.parseVar(d,!0,D);let y=this.finishNode(d,"VariableDeclaration"),x=this.match(58);return x&&m&&this.raise(U.ForInUsing,y),(x||this.isContextual(102))&&y.declarations.length===1?this.parseForIn(e,y,r):(r!==null&&this.unexpected(r),this.parseFor(e,y))}}let i=this.isContextual(95),a=new Xo,u=this.parseExpression(!0,a),p=this.isContextual(102);if(p&&(s&&this.raise(U.ForOfLet,u),r===null&&i&&u.type==="Identifier"&&this.raise(U.ForOfAsync,u)),p||this.match(58)){this.checkDestructuringPrivate(a),this.toAssignable(u,!0);let c=p?"ForOfStatement":"ForInStatement";return this.checkLVal(u,{type:c}),this.parseForIn(e,u,r)}else this.checkExpressionErrors(a,!0);return r!==null&&this.unexpected(r),this.parseFor(e,u)}parseFunctionStatement(e,r,s){return this.next(),this.parseFunction(e,1|(s?2:0)|(r?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise(U.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let r=e.cases=[];this.expect(5),this.state.labels.push(mF),this.scope.enter(256);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let a=this.match(61);s&&this.finishNode(s,"SwitchCase"),r.push(s=this.startNode()),s.consequent=[],this.next(),a?s.test=this.parseExpression():(i&&this.raise(U.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(U.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(r,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(U.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,r,s=!1){return this.next(),this.parseVar(e,!1,r,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(jl),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(U.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,r,s,i){for(let u of this.state.labels)u.name===r&&this.raise(U.LabelRedeclaration,s,{labelName:r});let a=oP(this.state.type)?1:this.match(71)?2:null;for(let u=this.state.labels.length-1;u>=0;u--){let p=this.state.labels[u];if(p.statementStart===e.start)p.statementStart=this.sourceToOffsetPos(this.state.start),p.kind=a;else break}return this.state.labels.push({name:r,kind:a,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,r,s){return e.expression=r,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,r=!0,s){let i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,s),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,r,s,i,a){let u=e.body=[],p=e.directives=[];this.parseBlockOrModuleBlockBody(u,r?p:void 0,s,i,a)}parseBlockOrModuleBlockBody(e,r,s,i,a){let u=this.state.strict,p=!1,c=!1;for(;!this.match(i);){let m=s?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(m)){let f=this.stmtToDirective(m);r.push(f),!p&&f.value.value==="use strict"&&(p=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}e.push(m)}a?.call(this,p),u||this.setStrict(!1),this.next()}parseFor(e,r){return e.init=r,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,r,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):e.await=s!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(U.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(U.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),e.left=r,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,r,s,i=!1){let a=e.declarations=[];for(e.kind=s;;){let u=this.startNode();if(this.parseVarId(u,s),u.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,u.init===null&&!i&&(u.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(U.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(U.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),a.push(this.finishNode(u,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,r){let s=this.parseBindingAtom();r==="using"||r==="await using"?(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(U.UsingDeclarationHasBindingPattern,s.loc.start):s.type==="VoidPattern"&&this.raise(U.UnexpectedVoidPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},r==="var"?5:8201),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,r=0){let s=r&2,i=!!(r&1),a=i&&!(r&4),u=!!(r&8);this.initFunction(e,u),this.match(55)&&(s&&this.raise(U.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(a));let p=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(Ko(u,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=p,e}parseFunctionId(e){return e||Ye(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,r){this.expect(10),this.expressionScope.enter(YP()),e.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,r,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,r,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,r){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:e},i=[],a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(U.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let u=this.startNode();i.length&&(u.decorators=i,this.resetStartLocationFromNode(u,i[0]),i=[]),this.parseClassMember(a,u,s),u.kind==="constructor"&&u.decorators&&u.decorators.length>0&&this.raise(U.DecoratorConstructor,u)}}),this.state.strict=r,this.next(),i.length)throw this.raise(U.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(a,"ClassBody")}parseClassMemberFromModifier(e,r){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=r;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=r;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,r,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(e,r))return;if(this.eat(5)){this.parseClassStaticBlock(e,r);return}}this.parseClassMemberWithIsStatic(e,r,s,i)}parseClassMemberWithIsStatic(e,r,s,i){let a=r,u=r,p=r,c=r,m=r,f=a,d=a;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){f.kind="method";let b=this.match(139);if(this.parseClassElementName(f),this.parsePostMemberNameModifiers(f),b){this.pushClassPrivateMethod(e,u,!0,!1);return}this.isNonstaticConstructor(a)&&this.raise(U.ConstructorIsGenerator,a.key),this.pushClassMethod(e,a,!0,!1,!1,!1);return}let D=!this.state.containsEsc&&Ye(this.state.type),y=this.parseClassElementName(r),x=D?y.name:null,E=this.isPrivateName(y),C=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(f.kind="method",E){this.pushClassPrivateMethod(e,u,!1,!1);return}let b=this.isNonstaticConstructor(a),A=!1;b&&(a.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(U.DuplicateConstructor,y),b&&this.hasPlugin("typescript")&&r.override&&this.raise(U.OverrideOnConstructor,y),s.hadConstructor=!0,A=s.hadSuperClass),this.pushClassMethod(e,a,!1,!1,b,A)}else if(this.isClassProperty())E?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,p);else if(x==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(y);let b=this.eat(55);d.optional&&this.unexpected(C),f.kind="method";let A=this.match(139);this.parseClassElementName(f),this.parsePostMemberNameModifiers(d),A?this.pushClassPrivateMethod(e,u,b,!0):(this.isNonstaticConstructor(a)&&this.raise(U.ConstructorIsAsync,a.key),this.pushClassMethod(e,a,b,!0,!1,!1))}else if((x==="get"||x==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(y),f.kind=x;let b=this.match(139);this.parseClassElementName(a),b?this.pushClassPrivateMethod(e,u,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(U.ConstructorIsAccessor,a.key),this.pushClassMethod(e,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a)}else if(x==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(y);let b=this.match(139);this.parseClassElementName(p),this.pushClassAccessorProperty(e,m,b)}else this.isLineTerminator()?E?this.pushClassPrivateProperty(e,c):this.pushClassProperty(e,p):this.unexpected()}parseClassElementName(e){let{type:r,value:s}=this.state;if((r===132||r===134)&&e.static&&s==="prototype"&&this.raise(U.StaticPrototype,this.state.startLoc),r===139){s==="constructor"&&this.raise(U.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return e.key=i,i}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,r){this.scope.enter(720);let s=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=r.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=s,e.body.push(this.finishNode(r,"StaticBlock")),r.decorators?.length&&this.raise(U.DecoratorStaticBlock,r)}pushClassProperty(e,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(U.ConstructorClassField,r.key),e.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(e,r){let s=this.parseClassPrivateProperty(r);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(e,r,s){!s&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(U.ConstructorClassField,r.key);let i=this.parseClassAccessorProperty(r);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,r,s,i,a,u){e.body.push(this.parseMethod(r,s,i,a,u,"ClassMethod",!0))}pushClassPrivateMethod(e,r,s,i){let a=this.parseMethod(r,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(a);let u=a.kind==="get"?a.static?6:2:a.kind==="set"?a.static?5:1:0;this.declareClassPrivateMethodInScope(a,u)}declareClassPrivateMethodInScope(e,r){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),r,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(wD()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,r,s,i=8331){if(Ye(this.state.type))e.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(e.id,i);else if(s||!r)e.id=null;else throw this.raise(U.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,r){let s=this.parseMaybeImportPhase(e,!0),i=this.maybeParseExportDefaultSpecifier(e,s),a=!i||this.eat(12),u=a&&this.eatExportStar(e),p=u&&this.maybeParseExportNamespaceSpecifier(e),c=a&&(!p||this.eat(12)),m=i||u;if(u&&!p){if(i&&this.unexpected(),r)throw this.raise(U.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let f=this.maybeParseExportNamedSpecifiers(e);i&&a&&!u&&!f&&this.unexpected(null,5),p&&c&&this.unexpected(null,98);let d;if(m||f){if(d=!1,r)throw this.raise(U.UnsupportedDecoratorExport,e);this.parseExportFrom(e,m)}else d=this.maybeParseExportDeclaration(e);if(m||f||d){let D=e;if(this.checkExport(D,!0,!1,!!D.source),D.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(r,D.declaration,D);else if(r)throw this.raise(U.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(D,"ExportNamedDeclaration")}if(this.eat(65)){let D=e,y=this.parseExportDefaultExpression();if(D.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(r,y,D);else if(r)throw this.raise(U.UnsupportedDecoratorExport,e);return this.checkExport(D,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(D,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let s=r||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers??(e.specifiers=[]);let r=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),r.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(r,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let r=e;r.specifiers||(r.specifiers=[]);let s=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(s)),r.source=null,r.attributes=[],r.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(U.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(U.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(Ye(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let i=this.nextTokenStart(),a=this.input.charCodeAt(i);if(a===123||this.chStartsBindingIdentifier(a,i)&&!this.input.startsWith("from",i))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),s=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||Ye(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(e,r){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(U.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(U.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(U.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,r,s,i){if(r){if(s){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){let a=e.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!a.extra?.parenthesized&&this.raise(U.ExportDefaultFromAsIdentifier,a)}}else if(e.specifiers?.length)for(let a of e.specifiers){let{exported:u}=a,p=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(a,p),!i&&a.local){let{local:c}=a;c.type!=="Identifier"?this.raise(U.ExportBindingIsString,a,{localName:c.value,exportName:p}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(e.declaration){let a=e.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:u}=a;if(!u)throw new Error("Assertion failure");this.checkDuplicateExports(e,u.name)}else if(a.type==="VariableDeclaration")for(let u of a.declarations)this.checkDeclaration(u.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let r of e.properties)this.checkDeclaration(r);else if(e.type==="ArrayPattern")for(let r of e.elements)r&&this.checkDeclaration(r);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(U.DuplicateDefaultExport,e):this.raise(U.DuplicateExport,e,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(e){let r=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),a=this.match(134),u=this.startNode();u.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(u,a,e,i))}return r}parseExportSpecifier(e,r,s,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():r?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),r=yF.exec(e.value);return r&&this.raise(U.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:r[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:r,value:s})=>s.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(e){let{specifiers:r}=e,s=r.length===1?r[0].type:null;e.phase==="source"?s!=="ImportDefaultSpecifier"&&this.raise(U.SourcePhaseImportRequiresDefault,r[0].loc.start):e.phase==="defer"?s!=="ImportNamespaceSpecifier"&&this.raise(U.DeferImportRequiresNamespace,r[0].loc.start):e.module&&(s!=="ImportDefaultSpecifier"&&this.raise(U.ImportReflectionNotBinding,r[0].loc.start),e.assertions?.length>0&&this.raise(U.ImportReflectionHasAssertion,r[0].loc.start))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:r}=e;if(r!=null){let s=r.find(i=>{let a;if(i.type==="ExportSpecifier"?a=i.local:i.type==="ImportSpecifier"&&(a=i.imported),a!==void 0)return a.type==="Identifier"?a.name!=="default":a.value!=="default"});s!==void 0&&this.raise(U.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)}applyImportPhase(e,r,s,i){r||(this.hasPlugin("importReflection")&&(e.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),e.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(e,r,null),null;let s=this.startNode(),i=this.parseIdentifierName(!0),{type:a}=this.state;return(br(a)?a!==98||this.lookaheadCharCode()===102:a!==12)?(this.applyImportPhase(e,r,i,s.loc.start),null):(this.applyImportPhase(e,r,null),this.createIdentifier(s,i))}isPrecedingIdImportPhase(e){let{type:r}=this.state;return Ye(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,r){e.specifiers=[];let s=!this.maybeParseDefaultImportSpecifier(e,r)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(e);return s&&!i&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return e.specifiers??(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,r,s){r.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(r,s))}finishImportSpecifier(e,r,s=8201){return this.checkLVal(e.local,{type:r},s),this.finishNode(e,r)}parseImportAttributes(){this.expect(5);let e=[],r=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(U.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(134)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(U.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],r=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(U.ModuleAttributeDifferentFromType,s.key),r.has(s.key.name)&&this.raise(U.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),r.add(s.key.name),this.expect(14),!this.match(134))throw this.raise(U.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let r;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),r=this.parseImportAttributes()}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.raise(U.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),r=this.parseImportAttributes()):r=[];e.attributes=r}maybeParseDefaultImportSpecifier(e,r){if(r){let s=this.startNodeAtNode(r);return s.local=r,e.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(br(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(U.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(134),a=this.isContextual(130);s.imported=this.parseModuleExportName();let u=this.parseImportSpecifier(s,i,e.importKind==="type"||e.importKind==="typeof",a,void 0);e.specifiers.push(u)}}parseImportSpecifier(e,r,s,i,a){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:u}=e;if(r)throw this.raise(U.ImportBindingIsString,e,{importName:u.value});this.checkReservedWord(u.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(u))}return this.finishImportSpecifier(e,"ImportSpecifier",a)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},ID=class extends DF{constructor(e,r,s){let i=Zw(e);super(i,r),this.options=i,this.initializeScopes(),this.plugins=s,this.filename=i.sourceFilename,this.startIndex=i.startIndex;let a=0;i.allowAwaitOutsideFunction&&(a|=1),i.allowReturnOutsideFunction&&(a|=2),i.allowImportExportEverywhere&&(a|=8),i.allowSuperOutsideMethod&&(a|=16),i.allowUndeclaredExports&&(a|=64),i.allowNewTargetOutsideFunction&&(a|=4),i.allowYieldOutsideFunction&&(a|=32),i.ranges&&(a|=128),i.tokens&&(a|=256),i.createImportExpressions&&(a|=512),i.createParenthesizedExpressions&&(a|=1024),i.errorRecovery&&(a|=2048),i.attachComment&&(a|=4096),i.annexB&&(a|=8192),this.optionFlags=a}getScopeHandler(){return Jc}parse(){this.enterInitialScopes();let e=this.startNode(),r=this.startNode();this.nextToken(),e.errors=null;let s=this.parseTopLevel(e,r);return s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s}};function ND(t,e){if(e?.sourceType==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let r=la(e,t),s=r.parse();if(r.sawUnambiguousESM)return s;if(r.ambiguousScriptDifferentAst)try{return e.sourceType="script",la(e,t).parse()}catch{}else s.program.sourceType="script";return s}catch(r){try{return e.sourceType="script",la(e,t).parse()}catch{}throw r}}else return la(e,t).parse()}function BD(t,e){let r=la(e,t);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function xF(t){let e={};for(let r of Object.keys(t))e[r]=mD(t[r]);return e}xF(sP);function la(t,e){let r=ID,s=new Map;if(t?.plugins){for(let i of t.plugins){let a,u;typeof i=="string"?a=i:[a,u]=i,s.has(a)||s.set(a,u||{})}hF(s),r=EF(s)}return new r(t,e,s)}var fm=new Map;function EF(t){let e=[];for(let i of dF)t.has(i)&&e.push(i);let r=e.join("|"),s=fm.get(r);if(!s){s=ID;for(let i of e)s=kD[i](s);fm.set(r,s)}return s}function _D(t){return(e,r,s)=>{let i=!!s?.backwards;if(r===!1)return!1;let{length:a}=e,u=r;for(;u>=0&&u<a;){let p=e.charAt(u);if(t instanceof RegExp){if(!t.test(p))return u}else if(!t.includes(p))return u;i?u--:u++}return u===-1||u===a?u:!1}}var AF=_D(" "),CF=_D(/[^\n\r]/u);function bF(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let r=e+2;r<t.length;++r)if(t.charAt(r)==="*"&&t.charAt(r+1)==="/")return r+2}return e}var TF=bF,mm=t=>t===`
|
|
37
|
-
`||t==="\r"||t==="\u2028"||t==="\u2029";function vF(t,e,r){let s=!!r?.backwards;if(e===!1)return!1;let i=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&i===`
|
|
38
|
-
`)return e-2;if(mm(i))return e-1}else{if(i==="\r"&&t.charAt(e+1)===`
|
|
39
|
-
`)return e+2;if(mm(i))return e+1}return e}var SF=vF;function wF(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?CF(t,e):e}var PF=wF;function FF(t,e){let r=null,s=e;for(;s!==r;)r=s,s=AF(t,s),s=TF(t,s),s=PF(t,s),s=SF(t,s);return s}var kF=FF;function IF(t){let e=[];for(let r of t)try{return r()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function NF(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
|
40
|
-
`);return e===-1?t:t.slice(0,e)}var LD=NF,Kc=(t,e)=>(r,s,...i)=>r|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,i),BF=Array.prototype.findLast??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return r}},_F=Kc("findLast",function(){if(Array.isArray(this))return BF}),LF=_F;function OF(t){return this[t<0?this.length+t:t]}var MF=Kc("at",function(){if(Array.isArray(this)||typeof this=="string")return OF}),$F=MF;function ps(t){let e=t.range?.[0]??t.start,r=(t.declaration?.decorators??t.decorators)?.[0];return r?Math.min(ps(r),e):e}function Rr(t){return t.range?.[1]??t.end}function RF(t){let e=new Set(t);return r=>e.has(r?.type)}var Xc=RF,jF=Xc(["Block","CommentBlock","MultiLine"]),Gc=jF,UF=Xc(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),VF=UF,Vl=new WeakMap;function qF(t){return Vl.has(t)||Vl.set(t,Gc(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(t.value)),Vl.get(t)}var HF=qF;function zF(t){if(!Gc(t))return!1;let e=`*${t.value}*`.split(`
|
|
41
|
-
`);return e.length>1&&e.every(r=>r.trimStart()[0]==="*")}var ql=new WeakMap;function WF(t){return ql.has(t)||ql.set(t,zF(t)),ql.get(t)}var ym=WF;function JF(t){if(t.length<2)return;let e;for(let r=t.length-1;r>=0;r--){let s=t[r];if(e&&Rr(s)===ps(e)&&ym(s)&&ym(e)&&(t.splice(r+1,1),s.value+="*//*"+e.value,s.range=[ps(s),Rr(e)]),!VF(s)&&!Gc(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}var KF=JF;function XF(t){return t!==null&&typeof t=="object"}var GF=XF,Wn=null;function ya(t){if(Wn!==null&&typeof Wn.property){let e=Wn;return Wn=ya.prototype=null,e}return Wn=ya.prototype=t??Object.create(null),new ya}var YF=10;for(let t=0;t<=YF;t++)ya();function QF(t){return ya(t)}function ZF(t,e="type"){QF(t);function r(s){let i=s[e],a=t[i];if(!Array.isArray(a))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return a}return r}var ek=ZF,M=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],tk={AccessorProperty:M[0],AnyTypeAnnotation:M[1],ArgumentPlaceholder:M[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:M[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:M[3],AsExpression:M[4],AssignmentExpression:M[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:M[6],BigIntLiteral:M[1],BigIntLiteralTypeAnnotation:M[1],BigIntTypeAnnotation:M[1],BinaryExpression:M[5],BindExpression:["object","callee"],BlockStatement:M[7],BooleanLiteral:M[1],BooleanLiteralTypeAnnotation:M[1],BooleanTypeAnnotation:M[1],BreakStatement:M[8],CallExpression:M[9],CatchClause:["param","body"],ChainExpression:M[3],ClassAccessorProperty:M[0],ClassBody:M[10],ClassDeclaration:M[11],ClassExpression:M[11],ClassImplements:M[12],ClassMethod:M[13],ClassPrivateMethod:M[13],ClassPrivateProperty:M[14],ClassProperty:M[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:M[15],ConditionalExpression:M[16],ConditionalTypeAnnotation:M[17],ContinueStatement:M[8],DebuggerStatement:M[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:M[18],DeclareEnum:M[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:M[20],DeclareFunction:["id","predicate"],DeclareHook:M[21],DeclareInterface:M[22],DeclareModule:M[19],DeclareModuleExports:M[23],DeclareNamespace:M[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:M[24],DeclareVariable:M[21],Decorator:M[3],Directive:M[18],DirectiveLiteral:M[1],DoExpression:M[10],DoWhileStatement:M[25],EmptyStatement:M[1],EmptyTypeAnnotation:M[1],EnumBigIntBody:M[26],EnumBigIntMember:M[27],EnumBooleanBody:M[26],EnumBooleanMember:M[27],EnumDeclaration:M[19],EnumDefaultedMember:M[21],EnumNumberBody:M[26],EnumNumberMember:M[27],EnumStringBody:M[26],EnumStringMember:M[27],EnumSymbolBody:M[26],ExistsTypeAnnotation:M[1],ExperimentalRestProperty:M[6],ExperimentalSpreadProperty:M[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:M[28],ExportNamedDeclaration:M[20],ExportNamespaceSpecifier:M[28],ExportSpecifier:["local","exported"],ExpressionStatement:M[3],File:["program"],ForInStatement:M[29],ForOfStatement:M[29],ForStatement:["init","test","update","body"],FunctionDeclaration:M[30],FunctionExpression:M[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:M[15],GenericTypeAnnotation:M[12],HookDeclaration:M[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:M[16],ImportAttribute:M[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:M[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:M[33],ImportSpecifier:["imported","local"],IndexedAccessType:M[34],InferredPredicate:M[1],InferTypeAnnotation:M[35],InterfaceDeclaration:M[22],InterfaceExtends:M[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:M[1],IntersectionTypeAnnotation:M[36],JsExpressionRoot:M[37],JsonRoot:M[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:M[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:M[1],JSXExpressionContainer:M[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:M[1],JSXMemberExpression:M[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:M[1],JSXSpreadAttribute:M[6],JSXSpreadChild:M[3],JSXText:M[1],KeyofTypeAnnotation:M[6],LabeledStatement:["label","body"],Literal:M[1],LogicalExpression:M[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:M[21],MatchExpression:M[39],MatchExpressionCase:M[40],MatchIdentifierPattern:M[21],MatchLiteralPattern:M[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:M[6],MatchStatement:M[39],MatchStatementCase:M[40],MatchUnaryPattern:M[6],MatchWildcardPattern:M[1],MemberExpression:M[38],MetaProperty:["meta","property"],MethodDefinition:M[42],MixedTypeAnnotation:M[1],ModuleExpression:M[10],NeverTypeAnnotation:M[1],NewExpression:M[9],NGChainedExpression:M[43],NGEmptyExpression:M[1],NGMicrosyntax:M[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:M[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:M[32],NGPipeExpression:["left","right","arguments"],NGRoot:M[37],NullableTypeAnnotation:M[23],NullLiteral:M[1],NullLiteralTypeAnnotation:M[1],NumberLiteralTypeAnnotation:M[1],NumberTypeAnnotation:M[1],NumericLiteral:M[1],ObjectExpression:["properties"],ObjectMethod:M[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:M[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:M[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:M[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:M[9],OptionalIndexedAccessType:M[34],OptionalMemberExpression:M[38],ParenthesizedExpression:M[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:M[1],PipelineTopicExpression:M[3],Placeholder:M[1],PrivateIdentifier:M[1],PrivateName:M[21],Program:M[7],Property:M[32],PropertyDefinition:M[14],QualifiedTypeIdentifier:M[44],QualifiedTypeofIdentifier:M[44],RegExpLiteral:M[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:M[6],SatisfiesExpression:M[4],SequenceExpression:M[43],SpreadElement:M[6],StaticBlock:M[10],StringLiteral:M[1],StringLiteralTypeAnnotation:M[1],StringTypeAnnotation:M[1],Super:M[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:M[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:M[1],TemplateLiteral:["quasis","expressions"],ThisExpression:M[1],ThisTypeAnnotation:M[1],ThrowStatement:M[6],TopicReference:M[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:M[45],TSAbstractKeyword:M[1],TSAbstractMethodDefinition:M[32],TSAbstractPropertyDefinition:M[45],TSAnyKeyword:M[1],TSArrayType:M[2],TSAsExpression:M[4],TSAsyncKeyword:M[1],TSBigIntKeyword:M[1],TSBooleanKeyword:M[1],TSCallSignatureDeclaration:M[46],TSClassImplements:M[47],TSConditionalType:M[17],TSConstructorType:M[46],TSConstructSignatureDeclaration:M[46],TSDeclareFunction:M[31],TSDeclareKeyword:M[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:M[26],TSEnumDeclaration:M[19],TSEnumMember:["id","initializer"],TSExportAssignment:M[3],TSExportKeyword:M[1],TSExternalModuleReference:M[3],TSFunctionType:M[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:M[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:M[35],TSInstantiationExpression:M[47],TSInterfaceBody:M[10],TSInterfaceDeclaration:M[22],TSInterfaceHeritage:M[47],TSIntersectionType:M[36],TSIntrinsicKeyword:M[1],TSJSDocAllType:M[1],TSJSDocNonNullableType:M[23],TSJSDocNullableType:M[23],TSJSDocUnknownType:M[1],TSLiteralType:M[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:M[10],TSModuleDeclaration:M[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:M[21],TSNeverKeyword:M[1],TSNonNullExpression:M[3],TSNullKeyword:M[1],TSNumberKeyword:M[1],TSObjectKeyword:M[1],TSOptionalType:M[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:M[23],TSPrivateKeyword:M[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:M[1],TSPublicKeyword:M[1],TSQualifiedName:M[5],TSReadonlyKeyword:M[1],TSRestType:M[23],TSSatisfiesExpression:M[4],TSStaticKeyword:M[1],TSStringKeyword:M[1],TSSymbolKeyword:M[1],TSTemplateLiteralType:["quasis","types"],TSThisType:M[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:M[23],TSTypeAssertion:M[4],TSTypeLiteral:M[26],TSTypeOperator:M[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:M[48],TSTypeParameterInstantiation:M[48],TSTypePredicate:M[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:M[1],TSUnionType:M[36],TSUnknownKeyword:M[1],TSVoidKeyword:M[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:M[24],TypeAnnotation:M[23],TypeCastExpression:M[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:M[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:M[48],TypeParameterInstantiation:M[48],TypePredicate:M[49],UnaryExpression:M[6],UndefinedTypeAnnotation:M[1],UnionTypeAnnotation:M[36],UnknownTypeAnnotation:M[1],UpdateExpression:M[6],V8IntrinsicIdentifier:M[1],VariableDeclaration:["declarations"],VariableDeclarator:M[27],Variance:M[1],VoidPattern:M[1],VoidTypeAnnotation:M[1],WhileStatement:M[25],WithStatement:["object","body"],YieldExpression:M[6]},rk=ek(tk),sk=rk;function Go(t,e){if(!GF(t))return t;if(Array.isArray(t)){for(let s=0;s<t.length;s++)t[s]=Go(t[s],e);return t}if(e.onEnter){let s=e.onEnter(t)??t;if(s!==t)return Go(s,e);t=s}let r=sk(t);for(let s=0;s<r.length;s++)t[r[s]]=Go(t[r[s]],e);return e.onLeave&&(t=e.onLeave(t)||t),t}var ik=Go;Xc(["RegExpLiteral","BigIntLiteral","NumericLiteral","StringLiteral","DirectiveLiteral","Literal","JSXText","TemplateElement","StringLiteralTypeAnnotation","NumberLiteralTypeAnnotation","BigIntLiteralTypeAnnotation"]);function nk(t,e){let{parser:r,text:s}=e,{comments:i}=t,a=r==="oxc"&&e.oxcAstType==="ts";KF(i);let u=t.type==="File"?t.program:t;u.interpreter&&(i.unshift(u.interpreter),delete u.interpreter),a&&t.hashbang&&(i.unshift(t.hashbang),delete t.hashbang),t.type==="Program"&&(t.range=[0,s.length]);let p;return t=ik(t,{onEnter(c){switch(c.type){case"ParenthesizedExpression":{let{expression:m}=c,f=ps(c);if(m.type==="TypeCastExpression")return m.range=[f,Rr(c)],m;let d=!1;if(!a){if(!p){p=[];for(let y of i)HF(y)&&p.push(Rr(y))}let D=LF(0,p,y=>y<=f);d=D&&s.slice(D,f).trim().length===0}return d?void 0:(m.extra={...m.extra,parenthesized:!0},m)}case"TemplateLiteral":if(c.expressions.length!==c.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(r==="flow"||r==="hermes"||r==="espree"||r==="typescript"||a){let m=ps(c)+1,f=Rr(c)-(c.tail?1:2);c.range=[m,f]}break;case"VariableDeclaration":{let m=$F(0,c.declarations,-1);m?.init&&s[Rr(m)]!==";"&&(c.range=[ps(c),Rr(m)]);break}case"TSParenthesizedType":return c.typeAnnotation;case"TopicReference":t.extra={...t.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(c.types.length===1)return c.types[0];break;case"ImportExpression":r==="hermes"&&c.attributes&&!c.options&&(c.options=c.attributes);break}},onLeave(c){switch(c.type){case"LogicalExpression":if(OD(c))return Bp(c);break;case"TSImportType":!c.source&&c.argument.type==="TSLiteralType"&&(c.source=c.argument.literal,delete c.argument);break}}}),t}function OD(t){return t.type==="LogicalExpression"&&t.right.type==="LogicalExpression"&&t.operator===t.right.operator}function Bp(t){return OD(t)?Bp({type:"LogicalExpression",operator:t.operator,left:Bp({type:"LogicalExpression",operator:t.operator,left:t.left,right:t.right.left,range:[ps(t.left),Rr(t.right.left)]}),right:t.right.right,range:[ps(t),Rr(t)]}):t}var ak=nk;function ok(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var MD=ok,gm="Unexpected parseExpression() input: ";function uk(t){let{message:e,loc:r,reasonCode:s}=t;if(!r)return t;let{line:i,column:a}=r,u=t;(s==="MissingPlugin"||s==="MissingOneOfPlugins")&&(e="Unexpected token.",u=void 0);let p=` (${i}:${a})`;return e.endsWith(p)&&(e=e.slice(0,-p.length)),e.startsWith(gm)&&(e=e.slice(gm.length)),MD(e,{loc:{start:{line:i,column:a+1}},cause:u})}var $D=uk,lk=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},pk=Kc("replaceAll",function(){if(typeof this=="string")return lk}),wo=pk,ck=/\*\/$/,hk=/^\/\*\*?/,dk=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,fk=/(^|\s+)\/\/([^\n\r]*)/g,Dm=/^(\r?\n)+/,mk=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,xm=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,yk=/(\r?\n|^) *\* ?/g,gk=[];function Dk(t){let e=t.match(dk);return e?e[0].trimStart():""}function xk(t){t=wo(0,t.replace(hk,"").replace(ck,""),yk,"$1");let e="";for(;e!==t;)e=t,t=wo(0,t,mk,`
|
|
42
|
-
$1 $2
|
|
43
|
-
`);t=t.replace(Dm,"").trimEnd();let r=Object.create(null),s=wo(0,t,xm,"").replace(Dm,"").trimEnd(),i;for(;i=xm.exec(t);){let a=wo(0,i[2],fk,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...gk,...Array.isArray(u)?u:[u],a]}else r[i[1]]=a}return{comments:s,pragmas:r}}var Ek=["noformat","noprettier"],Ak=["format","prettier"];function RD(t){let e=LD(t);e&&(t=t.slice(e.length+1));let r=Dk(t),{pragmas:s,comments:i}=xk(r);return{shebang:e,text:t,pragmas:s,comments:i}}function Ck(t){let{pragmas:e}=RD(t);return Ak.some(r=>Object.prototype.hasOwnProperty.call(e,r))}function bk(t){let{pragmas:e}=RD(t);return Ek.some(r=>Object.prototype.hasOwnProperty.call(e,r))}function Tk(t){return t=typeof t=="function"?{parse:t}:t,{astFormat:"estree",hasPragma:Ck,hasIgnorePragma:bk,locStart:ps,locEnd:Rr,...t}}var za=Tk,Yc="module",jD="commonjs";function vk(t){if(typeof t=="string"){if(t=t.toLowerCase(),/\.(?:mjs|mts)$/iu.test(t))return Yc;if(/\.(?:cjs|cts)$/iu.test(t))return jD}}function Sk(t,e){let{type:r="JsExpressionRoot",rootMarker:s,text:i}=e,{tokens:a,comments:u}=t;return delete t.tokens,delete t.comments,{tokens:a,comments:u,type:r,node:t,range:[0,i.length],rootMarker:s}}var UD=Sk,Cn=t=>za(Ik(t)),wk={sourceType:Yc,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Em="v8intrinsic",Am=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],hs=(t,e=wk)=>({...e,plugins:[...e.plugins,...t]}),Pk=/@(?:no)?flow\b/u;function Fk(t,e){if(e?.endsWith(".js.flow"))return!0;let r=LD(t);r&&(t=t.slice(r.length));let s=kF(t,0);return s!==!1&&(t=t.slice(0,s)),Pk.test(t)}function kk(t,e,r){let s=t(e,r),i=s.errors.find(a=>!Nk.has(a.reasonCode));if(i)throw i;return s}function Ik({isExpression:t=!1,optionsCombinations:e}){return(r,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&Fk(r,i))return s.parser="babel-flow",qD.parse(r,s);let a=e,u=s.__babelSourceType??vk(i);u&&u!==Yc&&(a=a.map(f=>({...f,sourceType:u,...u===jD?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let p=/%[A-Z]/u.test(r);r.includes("|>")?a=(p?[...Am,Em]:Am).flatMap(f=>a.map(d=>hs([f],d))):p&&(a=a.map(f=>hs([Em],f)));let c=t?BD:ND,m;try{m=IF(a.map(f=>()=>kk(c,r,f)))}catch({errors:[f]}){throw $D(f)}return t&&(m=UD(m,{text:r,rootMarker:s.rootMarker})),ak(m,{text:r})}}var Nk=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),VD=[hs(["jsx"])],Cm=Cn({optionsCombinations:VD}),bm=Cn({optionsCombinations:[hs(["jsx","typescript"]),hs(["typescript"])]}),Tm=Cn({isExpression:!0,optionsCombinations:[hs(["jsx"])]}),vm=Cn({isExpression:!0,optionsCombinations:[hs(["typescript"])]}),qD=Cn({optionsCombinations:[hs(["jsx",["flow",{all:!0}],"flowComments"])]}),Bk=Cn({optionsCombinations:VD.map(t=>hs(["estree"],t))}),HD={};Lc(HD,{json:()=>Ok,"json-stringify":()=>Rk,json5:()=>Mk,jsonc:()=>$k});function _k(t){return Array.isArray(t)&&t.length>0}var zD=_k,WD={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function Lk(t){let e=ND(t,WD),{program:r}=e;if(r.body.length===0&&r.directives.length===0&&!r.interpreter)return e}function Pu(t,e={}){let{allowComments:r=!0,allowEmpty:s=!1}=e,i;try{i=BD(t,WD)}catch(a){if(s&&a.code==="BABEL_PARSER_SYNTAX_ERROR"&&a.reasonCode==="ParseExpressionEmptyInput")try{i=Lk(t)}catch{}if(!i)throw $D(a)}if(!r&&zD(i.comments))throw Ls(i.comments[0],"Comment");return i=UD(i,{type:"JsonRoot",text:t}),i.node.type==="File"?delete i.node:Xi(i.node),i}function Ls(t,e){let[r,s]=[t.loc.start,t.loc.end].map(({line:i,column:a})=>({line:i,column:a+1}));return MD(`${e} is not allowed in JSON.`,{loc:{start:r,end:s}})}function Xi(t){switch(t.type){case"ArrayExpression":for(let e of t.elements)e!==null&&Xi(e);return;case"ObjectExpression":for(let e of t.properties)Xi(e);return;case"ObjectProperty":if(t.computed)throw Ls(t.key,"Computed key");if(t.shorthand)throw Ls(t.key,"Shorthand property");t.key.type!=="Identifier"&&Xi(t.key),Xi(t.value);return;case"UnaryExpression":{let{operator:e,argument:r}=t;if(e!=="+"&&e!=="-")throw Ls(t,`Operator '${t.operator}'`);if(r.type==="NumericLiteral"||r.type==="Identifier"&&(r.name==="Infinity"||r.name==="NaN"))return;throw Ls(r,`Operator '${e}' before '${r.type}'`)}case"Identifier":if(t.name!=="Infinity"&&t.name!=="NaN"&&t.name!=="undefined")throw Ls(t,`Identifier '${t.name}'`);return;case"TemplateLiteral":if(zD(t.expressions))throw Ls(t.expressions[0],"'TemplateLiteral' with expression");for(let e of t.quasis)Xi(e);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Ls(t,`'${t.type}'`)}}var Ok=za({parse:t=>Pu(t),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),Mk=za(t=>Pu(t)),$k=za(t=>Pu(t,{allowEmpty:!0})),Rk=za({parse:t=>Pu(t,{allowComments:!1}),astFormat:"estree-json"}),JD={...hD,...HD};const Hl=Object.freeze(Object.defineProperty({__proto__:null,default:cD,parsers:JD},Symbol.toStringTag,{value:"Module"}));var jk=Object.defineProperty,Qc=(t,e)=>{for(var r in e)jk(t,r,{get:e[r],enumerable:!0})},KD={};Qc(KD,{languages:()=>ix,options:()=>rx,printers:()=>sx});var Uk=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}],XD={};Qc(XD,{canAttachComment:()=>u3,embed:()=>ZN,features:()=>B4,getVisitorKeys:()=>r1,handleComments:()=>q3,hasPrettierIgnore:()=>vh,insertPragma:()=>dB,isBlockComment:()=>Fr,isGap:()=>z3,massageAstNode:()=>r3,print:()=>ey,printComment:()=>gB,printPrettierIgnored:()=>ey,willPrintOwnComments:()=>K3});var Zc=(t,e)=>(r,s,...i)=>r|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,i),Vk=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},qk=Zc("replaceAll",function(){if(typeof this=="string")return Vk}),bt=qk;function Hk(t){return this[t<0?this.length+t:t]}var zk=Zc("at",function(){if(Array.isArray(this)||typeof this=="string")return Hk}),Ge=zk;function Wk(t){return t!==null&&typeof t=="object"}var GD=Wk;function*Jk(t,e){let{getVisitorKeys:r,filter:s=()=>!0}=e,i=a=>GD(a)&&s(a);for(let a of r(t)){let u=t[a];if(Array.isArray(u))for(let p of u)i(p)&&(yield p);else i(u)&&(yield u)}}function*Kk(t,e){let r=[t];for(let s=0;s<r.length;s++){let i=r[s];for(let a of Jk(i,e))yield a,r.push(a)}}function Xk(t,{getVisitorKeys:e,predicate:r}){for(let s of Kk(t,{getVisitorKeys:e}))if(r(s))return!0;return!1}var Gk=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function Yk(t){return t===12288||t>=65281&&t<=65376||t>=65504&&t<=65510}function Qk(t){return t>=4352&&t<=4447||t===8986||t===8987||t===9001||t===9002||t>=9193&&t<=9196||t===9200||t===9203||t===9725||t===9726||t===9748||t===9749||t>=9776&&t<=9783||t>=9800&&t<=9811||t===9855||t>=9866&&t<=9871||t===9875||t===9889||t===9898||t===9899||t===9917||t===9918||t===9924||t===9925||t===9934||t===9940||t===9962||t===9970||t===9971||t===9973||t===9978||t===9981||t===9989||t===9994||t===9995||t===10024||t===10060||t===10062||t>=10067&&t<=10069||t===10071||t>=10133&&t<=10135||t===10160||t===10175||t===11035||t===11036||t===11088||t===11093||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12287||t>=12289&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12591||t>=12593&&t<=12686||t>=12688&&t<=12773||t>=12783&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=94176&&t<=94180||t>=94192&&t<=94198||t>=94208&&t<=101589||t>=101631&&t<=101662||t>=101760&&t<=101874||t>=110576&&t<=110579||t>=110581&&t<=110587||t===110589||t===110590||t>=110592&&t<=110882||t===110898||t>=110928&&t<=110930||t===110933||t>=110948&&t<=110951||t>=110960&&t<=111355||t>=119552&&t<=119638||t>=119648&&t<=119670||t===126980||t===127183||t===127374||t>=127377&&t<=127386||t>=127488&&t<=127490||t>=127504&&t<=127547||t>=127552&&t<=127560||t===127568||t===127569||t>=127584&&t<=127589||t>=127744&&t<=127776||t>=127789&&t<=127797||t>=127799&&t<=127868||t>=127870&&t<=127891||t>=127904&&t<=127946||t>=127951&&t<=127955||t>=127968&&t<=127984||t===127988||t>=127992&&t<=128062||t===128064||t>=128066&&t<=128252||t>=128255&&t<=128317||t>=128331&&t<=128334||t>=128336&&t<=128359||t===128378||t===128405||t===128406||t===128420||t>=128507&&t<=128591||t>=128640&&t<=128709||t===128716||t>=128720&&t<=128722||t>=128725&&t<=128728||t>=128732&&t<=128735||t===128747||t===128748||t>=128756&&t<=128764||t>=128992&&t<=129003||t===129008||t>=129292&&t<=129338||t>=129340&&t<=129349||t>=129351&&t<=129535||t>=129648&&t<=129660||t>=129664&&t<=129674||t>=129678&&t<=129734||t===129736||t>=129741&&t<=129756||t>=129759&&t<=129770||t>=129775&&t<=129784||t>=131072&&t<=196605||t>=196608&&t<=262141}var Zk="©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇",eI=/[^\x20-\x7F]/u,tI=new Set(Zk);function rI(t){if(!t)return 0;if(!eI.test(t))return t.length;t=t.replace(Gk(),r=>tI.has(r)?" ":" ");let e=0;for(let r of t){let s=r.codePointAt(0);s<=31||s>=127&&s<=159||s>=768&&s<=879||s>=65024&&s<=65039||(e+=Yk(s)||Qk(s)?2:1)}return e}var hn=rI;function eh(t){return(e,r,s)=>{let i=!!s?.backwards;if(r===!1)return!1;let{length:a}=e,u=r;for(;u>=0&&u<a;){let p=e.charAt(u);if(t instanceof RegExp){if(!t.test(p))return u}else if(!t.includes(p))return u;i?u--:u++}return u===-1||u===a?u:!1}}var dn=eh(" "),sI=eh(",; "),iI=eh(/[^\n\r]/u),Sm=t=>t===`
|
|
44
|
-
`||t==="\r"||t==="\u2028"||t==="\u2029";function nI(t,e,r){let s=!!r?.backwards;if(e===!1)return!1;let i=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&i===`
|
|
45
|
-
`)return e-2;if(Sm(i))return e-1}else{if(i==="\r"&&t.charAt(e+1)===`
|
|
46
|
-
`)return e+2;if(Sm(i))return e+1}return e}var fn=nI;function aI(t,e,r={}){let s=dn(t,r.backwards?e-1:e,r),i=fn(t,s,r);return s!==i}var Wt=aI;function oI(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let r=e+2;r<t.length;++r)if(t.charAt(r)==="*"&&t.charAt(r+1)==="/")return r+2}return e}var th=oI;function uI(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?iI(t,e):e}var rh=uI;function lI(t,e){let r=null,s=e;for(;s!==r;)r=s,s=sI(t,s),s=th(t,s),s=dn(t,s);return s=rh(t,s),s=fn(t,s),s!==!1&&Wt(t,s)}var sh=lI;function pI(t){return Array.isArray(t)&&t.length>0}var st=pI,cI=()=>{},hI=cI,YD=Object.freeze({character:"'",codePoint:39}),QD=Object.freeze({character:'"',codePoint:34}),dI=Object.freeze({preferred:YD,alternate:QD}),fI=Object.freeze({preferred:QD,alternate:YD});function mI(t,e){let{preferred:r,alternate:s}=e===!0||e==="'"?dI:fI,{length:i}=t,a=0,u=0;for(let p=0;p<i;p++){let c=t.charCodeAt(p);c===r.codePoint?a++:c===s.codePoint&&u++}return(a>u?s:r).character}var ZD=mI,yI=/\\(["'\\])|(["'])/gu;function gI(t,e){let r=e==='"'?"'":'"',s=bt(0,t,yI,(i,a,u)=>a?a===r?r:i:u===e?"\\"+u:u);return e+s+e}var DI=gI;function xI(t,e){let r=t.slice(1,-1),s=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":ZD(r,e.singleQuote);return t.charAt(0)===s?t:DI(r,s)}var mn=xI,e1=t=>Number.isInteger(t)&&t>=0;function Re(t){let e=t.range?.[0]??t.start,r=(t.declaration?.decorators??t.decorators)?.[0];return r?Math.min(Re(r),e):e}function Me(t){return t.range?.[1]??t.end}function Fu(t,e){let r=Re(t);return e1(r)&&r===Re(e)}function EI(t,e){let r=Me(t);return e1(r)&&r===Me(e)}function AI(t,e){return Fu(t,e)&&EI(t,e)}var Jn=null;function ga(t){if(Jn!==null&&typeof Jn.property){let e=Jn;return Jn=ga.prototype=null,e}return Jn=ga.prototype=t??Object.create(null),new ga}var CI=10;for(let t=0;t<=CI;t++)ga();function bI(t){return ga(t)}function TI(t,e="type"){bI(t);function r(s){let i=s[e],a=t[i];if(!Array.isArray(a))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return a}return r}var t1=TI,$=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],vI={AccessorProperty:$[0],AnyTypeAnnotation:$[1],ArgumentPlaceholder:$[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:$[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:$[3],AsExpression:$[4],AssignmentExpression:$[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:$[6],BigIntLiteral:$[1],BigIntLiteralTypeAnnotation:$[1],BigIntTypeAnnotation:$[1],BinaryExpression:$[5],BindExpression:["object","callee"],BlockStatement:$[7],BooleanLiteral:$[1],BooleanLiteralTypeAnnotation:$[1],BooleanTypeAnnotation:$[1],BreakStatement:$[8],CallExpression:$[9],CatchClause:["param","body"],ChainExpression:$[3],ClassAccessorProperty:$[0],ClassBody:$[10],ClassDeclaration:$[11],ClassExpression:$[11],ClassImplements:$[12],ClassMethod:$[13],ClassPrivateMethod:$[13],ClassPrivateProperty:$[14],ClassProperty:$[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:$[15],ConditionalExpression:$[16],ConditionalTypeAnnotation:$[17],ContinueStatement:$[8],DebuggerStatement:$[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:$[18],DeclareEnum:$[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:$[20],DeclareFunction:["id","predicate"],DeclareHook:$[21],DeclareInterface:$[22],DeclareModule:$[19],DeclareModuleExports:$[23],DeclareNamespace:$[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:$[24],DeclareVariable:$[21],Decorator:$[3],Directive:$[18],DirectiveLiteral:$[1],DoExpression:$[10],DoWhileStatement:$[25],EmptyStatement:$[1],EmptyTypeAnnotation:$[1],EnumBigIntBody:$[26],EnumBigIntMember:$[27],EnumBooleanBody:$[26],EnumBooleanMember:$[27],EnumDeclaration:$[19],EnumDefaultedMember:$[21],EnumNumberBody:$[26],EnumNumberMember:$[27],EnumStringBody:$[26],EnumStringMember:$[27],EnumSymbolBody:$[26],ExistsTypeAnnotation:$[1],ExperimentalRestProperty:$[6],ExperimentalSpreadProperty:$[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:$[28],ExportNamedDeclaration:$[20],ExportNamespaceSpecifier:$[28],ExportSpecifier:["local","exported"],ExpressionStatement:$[3],File:["program"],ForInStatement:$[29],ForOfStatement:$[29],ForStatement:["init","test","update","body"],FunctionDeclaration:$[30],FunctionExpression:$[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:$[15],GenericTypeAnnotation:$[12],HookDeclaration:$[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:$[16],ImportAttribute:$[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:$[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:$[33],ImportSpecifier:["imported","local"],IndexedAccessType:$[34],InferredPredicate:$[1],InferTypeAnnotation:$[35],InterfaceDeclaration:$[22],InterfaceExtends:$[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:$[1],IntersectionTypeAnnotation:$[36],JsExpressionRoot:$[37],JsonRoot:$[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:$[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:$[1],JSXExpressionContainer:$[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:$[1],JSXMemberExpression:$[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:$[1],JSXSpreadAttribute:$[6],JSXSpreadChild:$[3],JSXText:$[1],KeyofTypeAnnotation:$[6],LabeledStatement:["label","body"],Literal:$[1],LogicalExpression:$[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:$[21],MatchExpression:$[39],MatchExpressionCase:$[40],MatchIdentifierPattern:$[21],MatchLiteralPattern:$[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:$[6],MatchStatement:$[39],MatchStatementCase:$[40],MatchUnaryPattern:$[6],MatchWildcardPattern:$[1],MemberExpression:$[38],MetaProperty:["meta","property"],MethodDefinition:$[42],MixedTypeAnnotation:$[1],ModuleExpression:$[10],NeverTypeAnnotation:$[1],NewExpression:$[9],NGChainedExpression:$[43],NGEmptyExpression:$[1],NGMicrosyntax:$[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:$[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:$[32],NGPipeExpression:["left","right","arguments"],NGRoot:$[37],NullableTypeAnnotation:$[23],NullLiteral:$[1],NullLiteralTypeAnnotation:$[1],NumberLiteralTypeAnnotation:$[1],NumberTypeAnnotation:$[1],NumericLiteral:$[1],ObjectExpression:["properties"],ObjectMethod:$[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:$[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:$[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:$[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:$[9],OptionalIndexedAccessType:$[34],OptionalMemberExpression:$[38],ParenthesizedExpression:$[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:$[1],PipelineTopicExpression:$[3],Placeholder:$[1],PrivateIdentifier:$[1],PrivateName:$[21],Program:$[7],Property:$[32],PropertyDefinition:$[14],QualifiedTypeIdentifier:$[44],QualifiedTypeofIdentifier:$[44],RegExpLiteral:$[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:$[6],SatisfiesExpression:$[4],SequenceExpression:$[43],SpreadElement:$[6],StaticBlock:$[10],StringLiteral:$[1],StringLiteralTypeAnnotation:$[1],StringTypeAnnotation:$[1],Super:$[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:$[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:$[1],TemplateLiteral:["quasis","expressions"],ThisExpression:$[1],ThisTypeAnnotation:$[1],ThrowStatement:$[6],TopicReference:$[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:$[45],TSAbstractKeyword:$[1],TSAbstractMethodDefinition:$[32],TSAbstractPropertyDefinition:$[45],TSAnyKeyword:$[1],TSArrayType:$[2],TSAsExpression:$[4],TSAsyncKeyword:$[1],TSBigIntKeyword:$[1],TSBooleanKeyword:$[1],TSCallSignatureDeclaration:$[46],TSClassImplements:$[47],TSConditionalType:$[17],TSConstructorType:$[46],TSConstructSignatureDeclaration:$[46],TSDeclareFunction:$[31],TSDeclareKeyword:$[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:$[26],TSEnumDeclaration:$[19],TSEnumMember:["id","initializer"],TSExportAssignment:$[3],TSExportKeyword:$[1],TSExternalModuleReference:$[3],TSFunctionType:$[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:$[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:$[35],TSInstantiationExpression:$[47],TSInterfaceBody:$[10],TSInterfaceDeclaration:$[22],TSInterfaceHeritage:$[47],TSIntersectionType:$[36],TSIntrinsicKeyword:$[1],TSJSDocAllType:$[1],TSJSDocNonNullableType:$[23],TSJSDocNullableType:$[23],TSJSDocUnknownType:$[1],TSLiteralType:$[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:$[10],TSModuleDeclaration:$[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:$[21],TSNeverKeyword:$[1],TSNonNullExpression:$[3],TSNullKeyword:$[1],TSNumberKeyword:$[1],TSObjectKeyword:$[1],TSOptionalType:$[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:$[23],TSPrivateKeyword:$[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:$[1],TSPublicKeyword:$[1],TSQualifiedName:$[5],TSReadonlyKeyword:$[1],TSRestType:$[23],TSSatisfiesExpression:$[4],TSStaticKeyword:$[1],TSStringKeyword:$[1],TSSymbolKeyword:$[1],TSTemplateLiteralType:["quasis","types"],TSThisType:$[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:$[23],TSTypeAssertion:$[4],TSTypeLiteral:$[26],TSTypeOperator:$[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:$[48],TSTypeParameterInstantiation:$[48],TSTypePredicate:$[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:$[1],TSUnionType:$[36],TSUnknownKeyword:$[1],TSVoidKeyword:$[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:$[24],TypeAnnotation:$[23],TypeCastExpression:$[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:$[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:$[48],TypeParameterInstantiation:$[48],TypePredicate:$[49],UnaryExpression:$[6],UndefinedTypeAnnotation:$[1],UnionTypeAnnotation:$[36],UnknownTypeAnnotation:$[1],UpdateExpression:$[6],V8IntrinsicIdentifier:$[1],VariableDeclaration:["declarations"],VariableDeclarator:$[27],Variance:$[1],VoidPattern:$[1],VoidTypeAnnotation:$[1],WhileStatement:$[25],WithStatement:["object","body"],YieldExpression:$[6]},SI=t1(vI),r1=SI;function wI(t){let e=new Set(t);return r=>e.has(r?.type)}var Ne=wI;function PI(t){return t.extra?.raw??t.raw}var Jt=PI,FI=Ne(["Block","CommentBlock","MultiLine"]),Fr=FI,kI=Ne(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),s1=kI,II=Ne(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Wa=II;function NI(t,e){let r=e.split(".");for(let s=r.length-1;s>=0;s--){let i=r[s];if(s===0)return t.type==="Identifier"&&t.name===i;if(s===1&&t.type==="MetaProperty"&&t.property.type==="Identifier"&&t.property.name===i){t=t.meta;continue}if(t.type==="MemberExpression"&&!t.optional&&!t.computed&&t.property.type==="Identifier"&&t.property.name===i){t=t.object;continue}return!1}}function BI(t,e){return e.some(r=>NI(t,r))}var ih=BI;function _I({type:t}){return t.startsWith("TS")&&t.endsWith("Keyword")}var i1=_I;function LI({node:t,parent:e}){return t?.type!=="EmptyStatement"?!1:e.type==="IfStatement"?e.consequent===t||e.alternate===t:e.type==="DoWhileStatement"||e.type==="ForInStatement"||e.type==="ForOfStatement"||e.type==="ForStatement"||e.type==="LabeledStatement"||e.type==="WithStatement"||e.type==="WhileStatement"?e.body===t:!1}var nh=LI;function _p(t,e){return e(t)||Xk(t,{getVisitorKeys:r1,predicate:e})}function ah(t){return t.type==="AssignmentExpression"||t.type==="BinaryExpression"||t.type==="LogicalExpression"||t.type==="NGPipeExpression"||t.type==="ConditionalExpression"||Xe(t)||rt(t)||t.type==="SequenceExpression"||t.type==="TaggedTemplateExpression"||t.type==="BindExpression"||t.type==="UpdateExpression"&&!t.prefix||Tr(t)||t.type==="TSNonNullExpression"||t.type==="ChainExpression"}function OI(t){return t.expressions?t.expressions[0]:t.left??t.test??t.callee??t.object??t.tag??t.argument??t.expression}function n1(t){if(t.expressions)return["expressions",0];if(t.left)return["left"];if(t.test)return["test"];if(t.object)return["object"];if(t.callee)return["callee"];if(t.tag)return["tag"];if(t.argument)return["argument"];if(t.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var MI=Ne(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),kt=Ne(["ArrayExpression"]),Sr=Ne(["ObjectExpression"]);function $I(t){return t.type==="LogicalExpression"&&t.operator==="??"}function zr(t){return t.type==="NumericLiteral"||t.type==="Literal"&&typeof t.value=="number"}function RI(t){return t.type==="BooleanLiteral"||t.type==="Literal"&&typeof t.value=="boolean"}function a1(t){return t.type==="UnaryExpression"&&(t.operator==="+"||t.operator==="-")&&zr(t.argument)}function vt(t){return!!(t&&(t.type==="StringLiteral"||t.type==="Literal"&&typeof t.value=="string"))}function o1(t){return t.type==="RegExpLiteral"||t.type==="Literal"&&!!t.regex}var oh=Ne(["Literal","BooleanLiteral","BigIntLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]),jI=Ne(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]),Ws=Ne(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Ia=Ne(["FunctionExpression","ArrowFunctionExpression"]);function UI(t){return t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement"}function zl(t){return Xe(t)&&t.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(t.callee.name)}var Tt=Ne(["JSXElement","JSXFragment"]);function Ja(t){return t.method&&t.kind==="init"||t.kind==="get"||t.kind==="set"}function u1(t){return(t.type==="ObjectTypeProperty"||t.type==="ObjectTypeInternalSlot")&&!t.static&&!t.method&&t.kind!=="get"&&t.kind!=="set"&&t.value.type==="FunctionTypeAnnotation"}function VI(t){return(t.type==="TypeAnnotation"||t.type==="TSTypeAnnotation")&&t.typeAnnotation.type==="FunctionTypeAnnotation"&&!t.static&&!Fu(t,t.typeAnnotation)}var ds=Ne(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Gi(t){return rt(t)||t.type==="BindExpression"&&!!t.object}var qI=Ne(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function uh(t){return i1(t)||s1(t)||qI(t)||t.type==="GenericTypeAnnotation"&&!t.typeParameters||t.type==="TSTypeReference"&&!t.typeArguments}function HI(t){return t.type==="Identifier"&&(t.name==="beforeEach"||t.name==="beforeAll"||t.name==="afterEach"||t.name==="afterAll")}var zI=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function WI(t){return ih(t,zI)}function ku(t,e){if(t?.type!=="CallExpression"||t.optional)return!1;let r=ur(t);if(r.length===1){if(zl(t)&&ku(e))return Ia(r[0]);if(HI(t.callee))return zl(r[0])}else if((r.length===2||r.length===3)&&(r[0].type==="TemplateLiteral"||vt(r[0]))&&WI(t.callee))return r[2]&&!zr(r[2])?!1:(r.length===2?Ia(r[1]):UI(r[1])&&_t(r[1]).length<=1)||zl(r[1]);return!1}var l1=t=>e=>(e?.type==="ChainExpression"&&(e=e.expression),t(e)),Xe=l1(Ne(["CallExpression","OptionalCallExpression"])),rt=l1(Ne(["MemberExpression","OptionalMemberExpression"]));function wm(t,e=5){return p1(t,e)<=e}function p1(t,e){let r=0;for(let s in t){let i=t[s];if(GD(i)&&typeof i.type=="string"&&(r++,r+=p1(i,e-r)),r>e)return r}return r}var JI=.25;function lh(t,e){let{printWidth:r}=e;if(ue(t))return!1;let s=r*JI;if(t.type==="ThisExpression"||t.type==="Identifier"&&t.name.length<=s||a1(t)&&!ue(t.argument))return!0;let i=t.type==="Literal"&&"regex"in t&&t.regex.pattern||t.type==="RegExpLiteral"&&t.pattern;return i?i.length<=s:vt(t)?mn(Jt(t),e).length<=s:t.type==="TemplateLiteral"?t.expressions.length===0&&t.quasis[0].value.raw.length<=s&&!t.quasis[0].value.raw.includes(`
|
|
47
|
-
`):t.type==="UnaryExpression"?lh(t.argument,{printWidth:r}):t.type==="CallExpression"&&t.arguments.length===0&&t.callee.type==="Identifier"?t.callee.name.length<=s-2:oh(t)}function vr(t,e){return Tt(e)?Iu(e):ue(e,fe.Leading,r=>Wt(t,Me(r)))}function Pm(t){return t.quasis.some(e=>e.value.raw.includes(`
|
|
48
|
-
`))}function c1(t,e){return(t.type==="TemplateLiteral"&&Pm(t)||t.type==="TaggedTemplateExpression"&&Pm(t.quasi))&&!Wt(e,Re(t),{backwards:!0})}function h1(t){if(!ue(t))return!1;let e=Ge(0,Di(t,fe.Dangling),-1);return e&&!Fr(e)}function KI(t){if(t.length<=1)return!1;let e=0;for(let r of t)if(Ia(r)){if(e+=1,e>1)return!0}else if(Xe(r)){for(let s of ur(r))if(Ia(s))return!0}return!1}function d1(t){let{node:e,parent:r,key:s}=t;return s==="callee"&&Xe(e)&&Xe(r)&&r.arguments.length>0&&e.arguments.length>r.arguments.length}var XI=new Set(["!","-","+","~"]);function Cr(t,e=2){if(e<=0)return!1;if(t.type==="ChainExpression"||t.type==="TSNonNullExpression")return Cr(t.expression,e);let r=s=>Cr(s,e-1);if(o1(t))return hn(t.pattern??t.regex.pattern)<=5;if(oh(t)||jI(t)||t.type==="ArgumentPlaceholder")return!0;if(t.type==="TemplateLiteral")return t.quasis.every(s=>!s.value.raw.includes(`
|
|
49
|
-
`))&&t.expressions.every(r);if(Sr(t))return t.properties.every(s=>!s.computed&&(s.shorthand||s.value&&r(s.value)));if(kt(t))return t.elements.every(s=>s===null||r(s));if(gn(t)){if(t.type==="ImportExpression"||Cr(t.callee,e)){let s=ur(t);return s.length<=e&&s.every(r)}return!1}return rt(t)?Cr(t.object,e)&&Cr(t.property,e):t.type==="UnaryExpression"&&XI.has(t.operator)||t.type==="UpdateExpression"?Cr(t.argument,e):!1}function Gr(t,e="es5"){return t.trailingComma==="es5"&&e==="es5"||t.trailingComma==="all"&&(e==="all"||e==="es5")}function Mt(t,e){switch(t.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Mt(t.left,e);case"MemberExpression":case"OptionalMemberExpression":return Mt(t.object,e);case"TaggedTemplateExpression":return t.tag.type==="FunctionExpression"?!1:Mt(t.tag,e);case"CallExpression":case"OptionalCallExpression":return t.callee.type==="FunctionExpression"?!1:Mt(t.callee,e);case"ConditionalExpression":return Mt(t.test,e);case"UpdateExpression":return!t.prefix&&Mt(t.argument,e);case"BindExpression":return t.object&&Mt(t.object,e);case"SequenceExpression":return Mt(t.expressions[0],e);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return Mt(t.expression,e);default:return e(t)}}var Fm={"==":!0,"!=":!0,"===":!0,"!==":!0},Po={"*":!0,"/":!0,"%":!0},Lp={">>":!0,">>>":!0,"<<":!0};function ph(t,e){return!(uu(e)!==uu(t)||t==="**"||Fm[t]&&Fm[e]||e==="%"&&Po[t]||t==="%"&&Po[e]||e!==t&&Po[e]&&Po[t]||Lp[t]&&Lp[e])}var GI=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((t,e)=>t.map(r=>[r,e])));function uu(t){return GI.get(t)}function YI(t){return!!Lp[t]||t==="|"||t==="^"||t==="&"}function QI(t){if(t.rest)return!0;let e=_t(t);return Ge(0,e,-1)?.type==="RestElement"}var Wl=new WeakMap;function _t(t){if(Wl.has(t))return Wl.get(t);let e=[];return t.this&&e.push(t.this),e.push(...t.params),t.rest&&e.push(t.rest),Wl.set(t,e),e}function ZI(t,e){let{node:r}=t,s=0,i=()=>e(t,s++);r.this&&t.call(i,"this"),t.each(i,"params"),r.rest&&t.call(i,"rest")}var Jl=new WeakMap;function ur(t){if(Jl.has(t))return Jl.get(t);if(t.type==="ChainExpression")return ur(t.expression);let e;return t.type==="ImportExpression"||t.type==="TSImportType"?(e=[t.source],t.options&&e.push(t.options)):t.type==="TSExternalModuleReference"?e=[t.expression]:e=t.arguments,Jl.set(t,e),e}function lu(t,e){let{node:r}=t;if(r.type==="ChainExpression")return t.call(()=>lu(t,e),"expression");r.type==="ImportExpression"||r.type==="TSImportType"?(t.call(()=>e(t,0),"source"),r.options&&t.call(()=>e(t,1),"options")):r.type==="TSExternalModuleReference"?t.call(()=>e(t,0),"expression"):t.each(e,"arguments")}function km(t,e){let r=[];if(t.type==="ChainExpression"&&(t=t.expression,r.push("expression")),t.type==="ImportExpression"||t.type==="TSImportType"){if(e===0||e===(t.options?-2:-1))return[...r,"source"];if(t.options&&(e===1||e===-1))return[...r,"options"];throw new RangeError("Invalid argument index")}else if(t.type==="TSExternalModuleReference"){if(e===0||e===-1)return[...r,"expression"]}else if(e<0&&(e=t.arguments.length+e),e>=0&&e<t.arguments.length)return[...r,"arguments",e];throw new RangeError("Invalid argument index")}function yn(t){return t.value.trim()==="prettier-ignore"&&!t.unignore}function Iu(t){return t?.prettierIgnore||ue(t,fe.PrettierIgnore)}var fe={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},f1=(t,e)=>{if(typeof t=="function"&&(e=t,t=0),t||e)return(r,s,i)=>!(t&fe.Leading&&!r.leading||t&fe.Trailing&&!r.trailing||t&fe.Dangling&&(r.leading||r.trailing)||t&fe.Block&&!Fr(r)||t&fe.Line&&!Wa(r)||t&fe.First&&s!==0||t&fe.Last&&s!==i.length-1||t&fe.PrettierIgnore&&!yn(r)||e&&!e(r))};function ue(t,e,r){if(!st(t?.comments))return!1;let s=f1(e,r);return s?t.comments.some(s):!0}function Di(t,e,r){if(!Array.isArray(t?.comments))return[];let s=f1(e,r);return s?t.comments.filter(s):t.comments}var Yr=(t,{originalText:e})=>sh(e,Me(t));function gn(t){return Xe(t)||t.type==="NewExpression"||t.type==="ImportExpression"}function Ys(t){return t&&(t.type==="ObjectProperty"||t.type==="Property"&&!Ja(t))}var Tr=Ne(["TSAsExpression","TSSatisfiesExpression","AsExpression","AsConstExpression","SatisfiesExpression"]),Wr=Ne(["TSUnionType","UnionTypeAnnotation"]),Ka=Ne(["TSIntersectionType","IntersectionTypeAnnotation"]),Js=Ne(["TSConditionalType","ConditionalTypeAnnotation"]),e3=t=>t?.type==="TSAsExpression"&&t.typeAnnotation.type==="TSTypeReference"&&t.typeAnnotation.typeName.type==="Identifier"&&t.typeAnnotation.typeName.name==="const",Op=Ne(["TSTypeAliasDeclaration","TypeAlias"]);function m1({key:t,parent:e}){return!(t==="types"&&Wr(e)||t==="types"&&Ka(e))}var t3=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),zi=t=>{for(let e of t.quasis)delete e.value};function y1(t,e,r){if(t.type==="Program"&&delete e.sourceType,(t.type==="BigIntLiteral"||t.type==="Literal")&&t.bigint&&(e.bigint=t.bigint.toLowerCase()),t.type==="EmptyStatement"&&!nh({node:t,parent:r})||t.type==="JSXText"||t.type==="JSXExpressionContainer"&&(t.expression.type==="Literal"||t.expression.type==="StringLiteral")&&t.expression.value===" ")return null;if((t.type==="Property"||t.type==="ObjectProperty"||t.type==="MethodDefinition"||t.type==="ClassProperty"||t.type==="ClassMethod"||t.type==="PropertyDefinition"||t.type==="TSDeclareMethod"||t.type==="TSPropertySignature"||t.type==="ObjectTypeProperty"||t.type==="ImportAttribute")&&t.key&&!t.computed){let{key:i}=t;vt(i)||zr(i)?e.key=String(i.value):i.type==="Identifier"&&(e.key=i.name)}if(t.type==="JSXElement"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(i=>i.type==="JSXAttribute"&&i.name.name==="jsx"))for(let{type:i,expression:a}of e.children)i==="JSXExpressionContainer"&&a.type==="TemplateLiteral"&&zi(a);t.type==="JSXAttribute"&&t.name.name==="css"&&t.value.type==="JSXExpressionContainer"&&t.value.expression.type==="TemplateLiteral"&&zi(e.value.expression),t.type==="JSXAttribute"&&t.value?.type==="Literal"&&/["']|"|'/u.test(t.value.value)&&(e.value.value=bt(0,t.value.value,/["']|"|'/gu,'"'));let s=t.expression||t.callee;if(t.type==="Decorator"&&s.type==="CallExpression"&&s.callee.name==="Component"&&s.arguments.length===1){let i=t.expression.arguments[0].properties;for(let[a,u]of e.expression.arguments[0].properties.entries())switch(i[a].key.name){case"styles":kt(u.value)&&zi(u.value.elements[0]);break;case"template":u.value.type==="TemplateLiteral"&&zi(u.value);break}}t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"||t.tag.name==="css"||t.tag.name==="md"||t.tag.name==="markdown"||t.tag.name==="html")||t.tag.type==="CallExpression")&&zi(e.quasi),t.type==="TemplateLiteral"&&zi(e),t.type==="ChainExpression"&&t.expression.type==="TSNonNullExpression"&&(e.type="TSNonNullExpression",e.expression.type="ChainExpression")}y1.ignoredProperties=t3;var r3=y1,s3=Ne(["File","TemplateElement","TSEmptyBodyFunctionExpression","ChainExpression"]),i3=(t,[e])=>e?.type==="ComponentParameter"&&e.shorthand&&e.name===t&&e.local!==e.name||e?.type==="MatchObjectPatternProperty"&&e.shorthand&&e.key===t&&e.value!==e.key||e?.type==="ObjectProperty"&&e.shorthand&&e.key===t&&e.value!==e.key||e?.type==="Property"&&e.shorthand&&e.key===t&&!Ja(e)&&e.value!==e.key,n3=(t,[e])=>!!(t.type==="FunctionExpression"&&e.type==="MethodDefinition"&&e.value===t&&_t(t).length===0&&!t.returnType&&!st(t.typeParameters)&&t.body),Im=(t,[e])=>e?.typeAnnotation===t&&e3(e),a3=(t,[e,...r])=>Im(t,[e])||e?.typeName===t&&Im(e,r);function o3(t,e){return s3(t)||i3(t,e)||n3(t,e)?!1:t.type==="EmptyStatement"?nh({node:t,parent:e[0]}):!(a3(t,e)||t.type==="TSTypeAnnotation"&&e[0].type==="TSPropertySignature")}var u3=o3;function l3(t){let e=t.type||t.kind||"(unknown type)",r=String(t.name||t.id&&(typeof t.id=="object"?t.id.name:t.id)||t.key&&(typeof t.key=="object"?t.key.name:t.key)||t.value&&(typeof t.value=="object"?"":String(t.value))||t.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),e+(r?" "+r:"")}function ch(t,e){(t.comments??(t.comments=[])).push(e),e.printed=!1,e.nodeDescription=l3(t)}function ct(t,e){e.leading=!0,e.trailing=!1,ch(t,e)}function nr(t,e,r){e.leading=!1,e.trailing=!1,r&&(e.marker=r),ch(t,e)}function it(t,e){e.leading=!1,e.trailing=!0,ch(t,e)}function p3(t,e){let r=null,s=e;for(;s!==r;)r=s,s=dn(t,s),s=th(t,s),s=rh(t,s),s=fn(t,s);return s}var bn=p3;function c3(t,e){let r=bn(t,e);return r===!1?"":t.charAt(r)}var wr=c3;function h3(t,e,r){for(let s=e;s<r;++s)if(t.charAt(s)===`
|
|
50
|
-
`)return!0;return!1}var ar=h3,Kl=new WeakMap;function d3(t){return Kl.has(t)||Kl.set(t,Fr(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(t.value)),Kl.get(t)}var g1=d3,hh=(t,e)=>Wa(t)||!ar(e,Re(t),Me(t));function f3(t){return[S1,x1,b1,v3,D3,dh,fh,D1,E1,k3,w3,P3,yh,v1,I3,A1,T1,mh,x3,$3,w1,gh].some(e=>e(t))}function m3(t){return[g3,b1,x1,v1,dh,fh,D1,E1,T1,S3,F3,yh,_3,mh,O3,M3,R3,w1,U3,j3,gh].some(e=>e(t))}function y3(t){return[S1,dh,fh,T3,A1,yh,b3,C3,mh,L3,gh].some(e=>e(t))}function wi(t,e){let r=(t.body||t.properties).find(({type:s})=>s!=="EmptyStatement");r?ct(r,e):nr(t,e)}function Mp(t,e){t.type==="BlockStatement"?wi(t,e):ct(t,e)}function g3({comment:t,followingNode:e}){return e&&g1(t)?(ct(e,t),!0):!1}function dh({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i}){if(r?.type!=="IfStatement"||!s)return!1;if(wr(i,Me(t))===")")return it(e,t),!0;if(s.type==="BlockStatement"&&s===r.consequent&&Re(t)>=Me(e)&&Me(t)<=Re(s))return ct(s,t),!0;if(e===r.consequent&&s===r.alternate){let a=bn(i,Me(r.consequent));if(s.type==="BlockStatement"&&Re(t)>=a&&Me(t)<=Re(s))return ct(s,t),!0;if(Re(t)<a||r.alternate.type==="BlockStatement")return e.type==="BlockStatement"||hh(t,i)&&!ar(i,Re(e),Re(t))?(it(e,t),!0):(nr(r,t),!0)}return s.type==="BlockStatement"?(wi(s,t),!0):s.type==="IfStatement"?(Mp(s.consequent,t),!0):r.consequent===s?(ct(s,t),!0):!1}function fh({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i}){return r?.type!=="WhileStatement"||!s?!1:wr(i,Me(t))===")"?(it(e,t),!0):s.type==="BlockStatement"?(wi(s,t),!0):r.body===s?(ct(s,t),!0):!1}function D1({comment:t,precedingNode:e,enclosingNode:r,followingNode:s}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!s?!1:r.type==="CatchClause"&&e?(it(e,t),!0):s.type==="BlockStatement"?(wi(s,t),!0):s.type==="TryStatement"?(Mp(s.finalizer,t),!0):s.type==="CatchClause"?(Mp(s.body,t),!0):!1}function D3({comment:t,enclosingNode:e,followingNode:r}){return rt(e)&&r?.type==="Identifier"?(ct(e,t),!0):!1}function x3({comment:t,enclosingNode:e,followingNode:r,options:s}){return!s.experimentalTernaries||!(e?.type==="ConditionalExpression"||Js(e))?!1:r?.type==="ConditionalExpression"||Js(r)?(nr(e,t),!0):!1}function x1({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i,options:a}){let u=e&&!ar(i,Me(e),Re(t));return(!e||!u)&&(r?.type==="ConditionalExpression"||Js(r))&&s?a.experimentalTernaries&&r.alternate===s&&!(Fr(t)&&!ar(a.originalText,Re(t),Me(t)))?(nr(r,t),!0):(ct(s,t),!0):!1}var E3=Ne(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function E1({comment:t,precedingNode:e,enclosingNode:r,followingNode:s}){if(E3(r)){if(st(r.decorators)&&s?.type!=="Decorator")return it(Ge(0,r.decorators,-1),t),!0;if(r.body&&s===r.body)return wi(r.body,t),!0;if(s){if(r.superClass&&s===r.superClass&&e&&(e===r.id||e===r.typeParameters))return it(e,t),!0;for(let i of["implements","extends","mixins"])if(r[i]&&s===r[i][0])return e&&(e===r.id||e===r.typeParameters||e===r.superClass)?it(e,t):nr(r,t,i),!0}}return!1}var A3=Ne(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","TSParameterProperty"]);function A1({comment:t,precedingNode:e,enclosingNode:r,text:s}){return r&&e&&wr(s,Me(t))==="("&&(r.type==="Property"||r.type==="TSDeclareMethod"||r.type==="TSAbstractMethodDefinition")&&e.type==="Identifier"&&r.key===e&&wr(s,Me(e))!==":"||e?.type==="Decorator"&&A3(r)&&(Wa(t)||t.placement==="ownLine")?(it(e,t),!0):!1}var C1=Ne(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function C3({comment:t,precedingNode:e,enclosingNode:r,text:s}){return wr(s,Me(t))!=="("?!1:e&&C1(r)?(it(e,t),!0):!1}function b3({comment:t,enclosingNode:e,text:r}){if(e?.type!=="ArrowFunctionExpression")return!1;let s=bn(r,Me(t));return s!==!1&&r.slice(s,s+2)==="=>"?(nr(e,t),!0):!1}function T3({comment:t,enclosingNode:e,text:r}){return wr(r,Me(t))!==")"?!1:e&&(P1(e)&&_t(e).length===0||gn(e)&&ur(e).length===0)?(nr(e,t),!0):(e?.type==="MethodDefinition"||e?.type==="TSAbstractMethodDefinition")&&_t(e.value).length===0?(nr(e.value,t),!0):!1}function v3({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i}){return e?.type==="ComponentTypeParameter"&&(r?.type==="DeclareComponent"||r?.type==="ComponentTypeAnnotation")&&s?.type!=="ComponentTypeParameter"||(e?.type==="ComponentParameter"||e?.type==="RestElement")&&r?.type==="ComponentDeclaration"&&wr(i,Me(t))===")"?(it(e,t),!0):!1}function b1({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i}){return e?.type==="FunctionTypeParam"&&r?.type==="FunctionTypeAnnotation"&&s?.type!=="FunctionTypeParam"||(e?.type==="Identifier"||e?.type==="AssignmentPattern"||e?.type==="ObjectPattern"||e?.type==="ArrayPattern"||e?.type==="RestElement"||e?.type==="TSParameterProperty")&&P1(r)&&wr(i,Me(t))===")"?(it(e,t),!0):!Fr(t)&&s?.type==="BlockStatement"&&C1(r)&&(r.type==="MethodDefinition"?r.value.body:r.body)===s&&bn(i,Me(t))===Re(s)?(wi(s,t),!0):!1}function T1({comment:t,enclosingNode:e}){return e?.type==="LabeledStatement"?(ct(e,t),!0):!1}function mh({comment:t,enclosingNode:e}){return(e?.type==="ContinueStatement"||e?.type==="BreakStatement")&&!e.label?(it(e,t),!0):!1}function S3({comment:t,precedingNode:e,enclosingNode:r}){return Xe(r)&&e&&r.callee===e&&r.arguments.length>0?(ct(r.arguments[0],t),!0):!1}function w3({comment:t,precedingNode:e,enclosingNode:r,followingNode:s}){return Wr(r)?(yn(t)&&(s.prettierIgnore=!0,t.unignore=!0),e?(it(e,t),!0):!1):(Wr(s)&&yn(t)&&(s.types[0].prettierIgnore=!0,t.unignore=!0),!1)}function P3({comment:t,precedingNode:e,enclosingNode:r,followingNode:s}){return r&&r.type==="MatchOrPattern"?(yn(t)&&(s.prettierIgnore=!0,t.unignore=!0),e?(it(e,t),!0):!1):(s&&s.type==="MatchOrPattern"&&yn(t)&&(s.types[0].prettierIgnore=!0,t.unignore=!0),!1)}function F3({comment:t,enclosingNode:e}){return Ys(e)?(ct(e,t),!0):!1}function yh({comment:t,enclosingNode:e,ast:r,isLastComment:s}){return r?.body?.length===0?(s?nr(r,t):ct(r,t),!0):e?.type==="Program"&&e.body.length===0&&!st(e.directives)?(s?nr(e,t):ct(e,t),!0):!1}function k3({comment:t,enclosingNode:e,followingNode:r}){return(e?.type==="ForInStatement"||e?.type==="ForOfStatement")&&r!==e.body?(ct(e,t),!0):!1}function v1({comment:t,precedingNode:e,enclosingNode:r,text:s}){if(r?.type==="ImportSpecifier"||r?.type==="ExportSpecifier")return ct(r,t),!0;let i=e?.type==="ImportSpecifier"&&r?.type==="ImportDeclaration",a=e?.type==="ExportSpecifier"&&r?.type==="ExportNamedDeclaration";return(i||a)&&Wt(s,Me(t))?(it(e,t),!0):!1}function I3({comment:t,enclosingNode:e}){return e?.type==="AssignmentPattern"?(ct(e,t),!0):!1}var N3=Ne(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),B3=Ne(["ObjectExpression","ArrayExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function _3({comment:t,enclosingNode:e,followingNode:r}){return N3(e)&&r&&(B3(r)||Fr(t))?(ct(r,t),!0):!1}function L3({comment:t,enclosingNode:e,precedingNode:r,followingNode:s,text:i}){return!s&&(e?.type==="TSMethodSignature"||e?.type==="TSDeclareFunction"||e?.type==="TSAbstractMethodDefinition")&&(!r||r!==e.returnType)&&wr(i,Me(t))===";"?(it(e,t),!0):!1}function S1({comment:t,enclosingNode:e,followingNode:r}){if(yn(t)&&e?.type==="TSMappedType"&&r===e.key)return e.prettierIgnore=!0,t.unignore=!0,!0}function w1({comment:t,precedingNode:e,enclosingNode:r}){if(r?.type==="TSMappedType"&&!e)return nr(r,t),!0}function O3({comment:t,enclosingNode:e,followingNode:r}){return!e||e.type!=="SwitchCase"||e.test||!r||r!==e.consequent[0]?!1:(r.type==="BlockStatement"&&Wa(t)?wi(r,t):nr(e,t),!0)}function M3({comment:t,precedingNode:e,enclosingNode:r,followingNode:s}){return Wr(e)&&((r.type==="TSArrayType"||r.type==="ArrayTypeAnnotation")&&!s||Ka(r))?(it(Ge(0,e.types,-1),t),!0):!1}function $3({comment:t,enclosingNode:e,precedingNode:r,followingNode:s}){if((e?.type==="ObjectPattern"||e?.type==="ArrayPattern")&&s?.type==="TSTypeAnnotation")return r?it(r,t):nr(e,t),!0}function R3({comment:t,precedingNode:e,enclosingNode:r,followingNode:s,text:i}){return!s&&r?.type==="UnaryExpression"&&(e?.type==="LogicalExpression"||e?.type==="BinaryExpression")&&ar(i,Re(r.argument),Re(e.right))&&hh(t,i)&&!ar(i,Re(e.right),Re(t))?(it(e.right,t),!0):!1}function j3({enclosingNode:t,followingNode:e,comment:r}){if(t&&(t.type==="TSPropertySignature"||t.type==="ObjectTypeProperty")&&(Wr(e)||Ka(e)))return ct(e,r),!0}function gh({enclosingNode:t,precedingNode:e,followingNode:r,comment:s,text:i}){if(Tr(t)&&e===t.expression&&!hh(s,i))return r?ct(r,s):it(t,s),!0}function U3({comment:t,enclosingNode:e,followingNode:r,precedingNode:s}){return e&&r&&s&&e.type==="ArrowFunctionExpression"&&e.returnType===s&&(s.type==="TSTypeAnnotation"||s.type==="TypeAnnotation")?(ct(r,t),!0):!1}var P1=Ne(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]),V3={endOfLine:m3,ownLine:f3,remaining:y3},q3=V3;function H3(t,{parser:e}){if(e==="flow"||e==="hermes"||e==="babel-flow")return t=bt(0,t,/[\s(]/gu,""),t===""||t==="/*"||t==="/*::"}var z3=H3,W3=Ne(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function J3(t){let{key:e,parent:r}=t;if(e==="types"&&Wr(r)||e==="argument"&&r.type==="JSXSpreadAttribute"||e==="expression"&&r.type==="JSXSpreadChild"||e==="superClass"&&(r.type==="ClassDeclaration"||r.type==="ClassExpression")||(e==="id"||e==="typeParameters")&&W3(r)||e==="patterns"&&r.type==="MatchOrPattern")return!0;let{node:s}=t;return Iu(s)?!1:Wr(s)?m1(t):!!Tt(s)}var K3=J3,Pi="string",fs="array",Tn="cursor",Fi="indent",ki="align",Ii="trim",xr="group",Qs="fill",Vr="if-break",Ni="indent-if-break",Bi="line-suffix",Zs="line-suffix-boundary",Gt="line",bs="label",Ts="break-parent",F1=new Set([Tn,Fi,ki,Ii,xr,Qs,Vr,Ni,Bi,Zs,Gt,bs,Ts]);function X3(t){if(typeof t=="string")return Pi;if(Array.isArray(t))return fs;if(!t)return;let{type:e}=t;if(F1.has(e))return e}var ei=X3,G3=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Y3(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
51
|
-
Expected it to be 'string' or 'object'.`;if(ei(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=G3([...F1].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
|
|
52
|
-
Expected it to be ${s}.`}var Q3=class extends Error{name="InvalidDocError";constructor(e){super(Y3(e)),this.doc=e}},Na=Q3,Nm={};function Z3(t,e,r,s){let i=[t];for(;i.length>0;){let a=i.pop();if(a===Nm){r(i.pop());continue}r&&i.push(a,Nm);let u=ei(a);if(!u)throw new Na(a);if(e?.(a)!==!1)switch(u){case fs:case Qs:{let p=u===fs?a:a.parts;for(let c=p.length,m=c-1;m>=0;--m)i.push(p[m]);break}case Vr:i.push(a.flatContents,a.breakContents);break;case xr:if(s&&a.expandedStates)for(let p=a.expandedStates.length,c=p-1;c>=0;--c)i.push(a.expandedStates[c]);else i.push(a.contents);break;case ki:case Fi:case Ni:case bs:case Bi:i.push(a.contents);break;case Pi:case Tn:case Ii:case Zs:case Gt:case Ts:break;default:throw new Na(a)}}}var Dh=Z3;function vn(t,e){if(typeof t=="string")return e(t);let r=new Map;return s(t);function s(a){if(r.has(a))return r.get(a);let u=i(a);return r.set(a,u),u}function i(a){switch(ei(a)){case fs:return e(a.map(s));case Qs:return e({...a,parts:a.parts.map(s)});case Vr:return e({...a,breakContents:s(a.breakContents),flatContents:s(a.flatContents)});case xr:{let{expandedStates:u,contents:p}=a;return u?(u=u.map(s),p=u[0]):p=s(p),e({...a,contents:p,expandedStates:u})}case ki:case Fi:case Ni:case bs:case Bi:return e({...a,contents:s(a.contents)});case Pi:case Tn:case Ii:case Zs:case Gt:case Ts:return e(a);default:throw new Na(a)}}}function k1(t,e,r){let s=r,i=!1;function a(u){if(i)return!1;let p=e(u);p!==void 0&&(i=!0,s=p)}return Dh(t,a),s}function eN(t){if(t.type===xr&&t.break||t.type===Gt&&t.hard||t.type===Ts)return!0}function Rt(t){return k1(t,eN,!1)}function Bm(t){if(t.length>0){let e=Ge(0,t,-1);!e.expandedStates&&!e.break&&(e.break="propagated")}return null}function tN(t){let e=new Set,r=[];function s(a){if(a.type===Ts&&Bm(r),a.type===xr){if(r.push(a),e.has(a))return!1;e.add(a)}}function i(a){a.type===xr&&r.pop().break&&Bm(r)}Dh(t,s,i,!0)}function rN(t){return t.type===Gt&&!t.hard?t.soft?"":" ":t.type===Vr?t.flatContents:t}function pu(t){return vn(t,rN)}function sN(t){switch(ei(t)){case Qs:if(t.parts.every(e=>e===""))return"";break;case xr:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===xr&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case ki:case Fi:case Ni:case Bi:if(!t.contents)return"";break;case Vr:if(!t.flatContents&&!t.breakContents)return"";break;case fs:{let e=[];for(let r of t){if(!r)continue;let[s,...i]=Array.isArray(r)?r:[r];typeof s=="string"&&typeof Ge(0,e,-1)=="string"?e[e.length-1]+=s:e.push(s),e.push(...i)}return e.length===0?"":e.length===1?e[0]:e}case Pi:case Tn:case Ii:case Zs:case Gt:case bs:case Ts:break;default:throw new Na(t)}return t}function xh(t){return vn(t,e=>sN(e))}function Ei(t,e=_1){return vn(t,r=>typeof r=="string"?qe(e,r.split(`
|
|
53
|
-
`)):r)}function iN(t){if(t.type===Gt)return!0}function nN(t){return k1(t,iN,!1)}function $p(t,e){return t.type===bs?{...t,contents:e(t.contents)}:e(t)}function aN(t){let e=!0;return Dh(t,r=>{switch(ei(r)){case Pi:if(r==="")break;case Ii:case Zs:case Gt:case Ts:return e=!1,!1}}),e}var oN=hI;function ee(t){return{type:Fi,contents:t}}function Pr(t,e){return{type:ki,contents:e,n:t}}function uN(t){return Pr(Number.NEGATIVE_INFINITY,t)}function I1(t){return Pr(-1,t)}function lN(t,e,r){let s=t;if(e>0){for(let i=0;i<Math.floor(e/r);++i)s=ee(s);s=Pr(e%r,s),s=Pr(Number.NEGATIVE_INFINITY,s)}return s}var ms={type:Ts},Fo={type:Tn};function N1(t){return{type:Qs,parts:t}}function z(t,e={}){return oN(e.expandedStates),{type:xr,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function yi(t,e){return z(t[0],{...e,expandedStates:t})}function Fe(t,e="",r={}){return{type:Vr,breakContents:t,flatContents:e,groupId:r.groupId}}function Ba(t,e){return{type:Ni,contents:t,groupId:e.groupId,negate:e.negate}}function qe(t,e){let r=[];for(let s=0;s<e.length;s++)s!==0&&r.push(t),r.push(e[s]);return r}function Xa(t,e){return t?{type:bs,label:t,contents:e}:e}var pe={type:Gt},Z={type:Gt,soft:!0},B1={type:Gt,hard:!0},re=[B1,ms],pN={type:Gt,hard:!0,literal:!0},_1=[pN,ms];function _m(t){return{type:Bi,contents:t}}var Jr={type:Zs},cN="cr",hN="crlf",dN="\r",fN=`\r
|
|
54
|
-
`,mN=`
|
|
55
|
-
`,yN=mN;function gN(t){return t===cN?dN:t===hN?fN:yN}var DN={type:0},xN={type:1},L1={value:"",length:0,queue:[],get root(){return L1}};function O1(t,e,r){let s=e.type===1?t.queue.slice(0,-1):[...t.queue,e],i="",a=0,u=0,p=0;for(let x of s)switch(x.type){case 0:f(),r.useTabs?c(1):m(r.tabWidth);break;case 3:{let{string:E}=x;f(),i+=E,a+=E.length;break}case 2:{let{width:E}=x;u+=1,p+=E;break}default:throw new Error(`Unexpected indent comment '${x.type}'.`)}return D(),{...t,value:i,length:a,queue:s};function c(x){i+=" ".repeat(x),a+=r.tabWidth*x}function m(x){i+=" ".repeat(x),a+=x}function f(){r.useTabs?d():D()}function d(){u>0&&c(u),y()}function D(){p>0&&m(p),y()}function y(){u=0,p=0}}function EN(t,e,r){if(!e)return t;if(e.type==="root")return{...t,root:t};if(e===Number.NEGATIVE_INFINITY)return t.root;let s;return typeof e=="number"?e<0?s=xN:s={type:2,width:e}:s={type:3,string:e},O1(t,s,r)}function AN(t,e){return O1(t,DN,e)}function CN(t){let e=0;for(let r=t.length-1;r>=0;r--){let s=t[r];if(s===" "||s===" ")e++;else break}return e}function M1(t){let e=CN(t);return{text:e===0?t:t.slice(0,t.length-e),count:e}}var qt=Symbol("MODE_BREAK"),Lr=Symbol("MODE_FLAT"),Rp=Symbol("DOC_FILL_PRINTED_LENGTH");function ko(t,e,r,s,i,a){if(r===Number.POSITIVE_INFINITY)return!0;let u=e.length,p=!1,c=[t],m="";for(;r>=0;){if(c.length===0){if(u===0)return!0;c.push(e[--u]);continue}let{mode:f,doc:d}=c.pop(),D=ei(d);switch(D){case Pi:d&&(p&&(m+=" ",r-=1,p=!1),m+=d,r-=hn(d));break;case fs:case Qs:{let y=D===fs?d:d.parts,x=d[Rp]??0;for(let E=y.length-1;E>=x;E--)c.push({mode:f,doc:y[E]});break}case Fi:case ki:case Ni:case bs:c.push({mode:f,doc:d.contents});break;case Ii:{let{text:y,count:x}=M1(m);m=y,r+=x;break}case xr:{if(a&&d.break)return!1;let y=d.break?qt:f,x=d.expandedStates&&y===qt?Ge(0,d.expandedStates,-1):d.contents;c.push({mode:y,doc:x});break}case Vr:{let y=(d.groupId?i[d.groupId]||Lr:f)===qt?d.breakContents:d.flatContents;y&&c.push({mode:f,doc:y});break}case Gt:if(f===qt||d.hard)return!0;d.soft||(p=!0);break;case Bi:s=!0;break;case Zs:if(s)return!1;break}}return!1}function $1(t,e){let r=Object.create(null),s=e.printWidth,i=gN(e.endOfLine),a=0,u=[{indent:L1,mode:qt,doc:t}],p="",c=!1,m=[],f=[],d=[],D=[],y=0;for(tN(t);u.length>0;){let{indent:A,mode:v,doc:P}=u.pop();switch(ei(P)){case Pi:{let S=i!==`
|
|
56
|
-
`?bt(0,P,`
|
|
57
|
-
`,i):P;S&&(p+=S,u.length>0&&(a+=hn(S)));break}case fs:for(let S=P.length-1;S>=0;S--)u.push({indent:A,mode:v,doc:P[S]});break;case Tn:if(f.length>=2)throw new Error("There are too many 'cursor' in doc.");f.push(y+p.length);break;case Fi:u.push({indent:AN(A,e),mode:v,doc:P.contents});break;case ki:u.push({indent:EN(A,P.n,e),mode:v,doc:P.contents});break;case Ii:b();break;case xr:switch(v){case Lr:if(!c){u.push({indent:A,mode:P.break?qt:Lr,doc:P.contents});break}case qt:{c=!1;let S={indent:A,mode:Lr,doc:P.contents},F=s-a,B=m.length>0;if(!P.break&&ko(S,u,F,B,r))u.push(S);else if(P.expandedStates){let I=Ge(0,P.expandedStates,-1);if(P.break){u.push({indent:A,mode:qt,doc:I});break}else for(let R=1;R<P.expandedStates.length+1;R++)if(R>=P.expandedStates.length){u.push({indent:A,mode:qt,doc:I});break}else{let j=P.expandedStates[R],V={indent:A,mode:Lr,doc:j};if(ko(V,u,F,B,r)){u.push(V);break}}}else u.push({indent:A,mode:qt,doc:P.contents});break}}P.id&&(r[P.id]=Ge(0,u,-1).mode);break;case Qs:{let S=s-a,F=P[Rp]??0,{parts:B}=P,I=B.length-F;if(I===0)break;let R=B[F+0],j=B[F+1],V={indent:A,mode:Lr,doc:R},N={indent:A,mode:qt,doc:R},q=ko(V,[],S,m.length>0,r,!0);if(I===1){q?u.push(V):u.push(N);break}let te={indent:A,mode:Lr,doc:j},W={indent:A,mode:qt,doc:j};if(I===2){q?u.push(te,V):u.push(W,N);break}let Y=B[F+2],ge={indent:A,mode:v,doc:{...P,[Rp]:F+2}},Ae=ko({indent:A,mode:Lr,doc:[R,j,Y]},[],S,m.length>0,r,!0);u.push(ge),Ae?u.push(te,V):q?u.push(W,V):u.push(W,N);break}case Vr:case Ni:{let S=P.groupId?r[P.groupId]:v;if(S===qt){let F=P.type===Vr?P.breakContents:P.negate?P.contents:ee(P.contents);F&&u.push({indent:A,mode:v,doc:F})}if(S===Lr){let F=P.type===Vr?P.flatContents:P.negate?ee(P.contents):P.contents;F&&u.push({indent:A,mode:v,doc:F})}break}case Bi:m.push({indent:A,mode:v,doc:P.contents});break;case Zs:m.length>0&&u.push({indent:A,mode:v,doc:B1});break;case Gt:switch(v){case Lr:if(P.hard)c=!0;else{P.soft||(p+=" ",a+=1);break}case qt:if(m.length>0){u.push({indent:A,mode:v,doc:P},...m.reverse()),m.length=0;break}P.literal?(p+=i,a=0,A.root&&(A.root.value&&(p+=A.root.value),a=A.root.length)):(b(),p+=i+A.value,a=A.length);break}break;case bs:u.push({indent:A,mode:v,doc:P.contents});break;case Ts:break;default:throw new Na(P)}u.length===0&&m.length>0&&(u.push(...m.reverse()),m.length=0)}let x=d.join("")+p,E=[...D,...f];if(E.length!==2)return{formatted:x};let C=E[0];return{formatted:x,cursorNodeStart:C,cursorNodeText:x.slice(C,Ge(0,E,-1))};function b(){let{text:A,count:v}=M1(p);A&&(d.push(A),y+=A.length),p="",a-=v,f.length>0&&(D.push(...f.map(P=>Math.min(P,y))),f.length=0)}}function bN(t,e,r=0){let s=0;for(let i=r;i<t.length;++i)t[i]===" "?s=s+e-s%e:s++;return s}var TN=bN;function vN(t,e){let r=t.lastIndexOf(`
|
|
58
|
-
`);return r===-1?0:TN(t.slice(r+1).match(/^[\t ]*/u)[0],e)}var SN=vN;function R1(t,e,r){let{node:s}=t;if(s.type==="TemplateLiteral"&&kN(t)){let c=PN(t,e,r);if(c)return c}let i="expressions";s.type==="TSTemplateLiteralType"&&(i="types");let a=[],u=t.map(r,i);a.push(Jr,"`");let p=0;return t.each(({index:c,node:m})=>{if(a.push(r()),m.tail)return;let{tabWidth:f}=e,d=m.value.raw,D=d.includes(`
|
|
59
|
-
`)?SN(d,f):p;p=D;let y=u[c],x=s[i][c],E=ar(e.originalText,Me(m),Re(s.quasis[c+1]));if(!E){let b=$1(y,{...e,printWidth:Number.POSITIVE_INFINITY}).formatted;b.includes(`
|
|
60
|
-
`)?E=!0:y=b}E&&(ue(x)||x.type==="Identifier"||rt(x)||x.type==="ConditionalExpression"||x.type==="SequenceExpression"||Tr(x)||ds(x))&&(y=[ee([Z,y]),Z]);let C=D===0&&d.endsWith(`
|
|
61
|
-
`)?Pr(Number.NEGATIVE_INFINITY,y):lN(y,D,f);a.push(z(["${",C,Jr,"}"]))},"quasis"),a.push("`"),a}function wN(t,e,r){let s=r("quasi"),{node:i}=t,a="",u=Di(i.quasi,fe.Leading)[0];return u&&(ar(e.originalText,Me(i.typeArguments??i.tag),Re(u))?a=Z:a=" "),Xa(s.label&&{tagged:!0,...s.label},[r("tag"),r("typeArguments"),a,Jr,s])}function PN(t,e,r){let{node:s}=t,i=s.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(i.length>1||i.some(a=>a.length>0)){e.__inJestEach=!0;let a=t.map(r,"expressions");e.__inJestEach=!1;let u=a.map(d=>"${"+$1(d,{...e,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}"),p=[{hasLineBreak:!1,cells:[]}];for(let d=1;d<s.quasis.length;d++){let D=Ge(0,p,-1),y=u[d-1];D.cells.push(y),y.includes(`
|
|
62
|
-
`)&&(D.hasLineBreak=!0),s.quasis[d].value.raw.includes(`
|
|
63
|
-
`)&&p.push({hasLineBreak:!1,cells:[]})}let c=Math.max(i.length,...p.map(d=>d.cells.length)),m=Array.from({length:c}).fill(0),f=[{cells:i},...p.filter(d=>d.cells.length>0)];for(let{cells:d}of f.filter(D=>!D.hasLineBreak))for(let[D,y]of d.entries())m[D]=Math.max(m[D],hn(y));return[Jr,"`",ee([re,qe(re,f.map(d=>qe(" | ",d.cells.map((D,y)=>d.hasLineBreak?D:D+" ".repeat(m[y]-hn(D))))))]),re,"`"]}}function FN(t,e){let{node:r}=t,s=e();return ue(r)&&(s=z([ee([Z,s]),Z])),["${",s,Jr,"}"]}function Eh(t,e){return t.map(()=>FN(t,e),"expressions")}function j1(t,e){return vn(t,r=>typeof r=="string"?e?bt(0,r,/(\\*)`/gu,"$1$1\\`"):U1(r):r)}function U1(t){return bt(0,t,/([\\`]|\$\{)/gu,"\\$1")}function kN({node:t,parent:e}){let r=/^[fx]?(?:describe|it|test)$/u;return e.type==="TaggedTemplateExpression"&&e.quasi===t&&e.tag.type==="MemberExpression"&&e.tag.property.type==="Identifier"&&e.tag.property.name==="each"&&(e.tag.object.type==="Identifier"&&r.test(e.tag.object.name)||e.tag.object.type==="MemberExpression"&&e.tag.object.property.type==="Identifier"&&(e.tag.object.property.name==="only"||e.tag.object.property.name==="skip")&&e.tag.object.object.type==="Identifier"&&r.test(e.tag.object.object.name))}var jp=[(t,e)=>t.type==="ObjectExpression"&&e==="properties",(t,e)=>t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="Component"&&e==="arguments",(t,e)=>t.type==="Decorator"&&e==="expression"];function IN(t){let e=s=>s.type==="TemplateLiteral",r=(s,i)=>Ys(s)&&!s.computed&&s.key.type==="Identifier"&&s.key.name==="styles"&&i==="value";return t.match(e,(s,i)=>kt(s)&&i==="elements",r,...jp)||t.match(e,r,...jp)}function NN(t){return t.match(e=>e.type==="TemplateLiteral",(e,r)=>Ys(e)&&!e.computed&&e.key.type==="Identifier"&&e.key.name==="template"&&r==="value",...jp)}function Xl(t,e){return ue(t,fe.Block|fe.Leading,({value:r})=>r===` ${e} `)}function V1({node:t,parent:e},r){return Xl(t,r)||BN(e)&&Xl(e,r)||e.type==="ExpressionStatement"&&Xl(e,r)}function BN(t){return t.type==="AsConstExpression"||t.type==="TSAsExpression"&&t.typeAnnotation.type==="TSTypeReference"&&t.typeAnnotation.typeName.type==="Identifier"&&t.typeAnnotation.typeName.name==="const"}async function _N(t,e,r){let{node:s}=r,i="";for(let[c,m]of s.quasis.entries()){let{raw:f}=m.value;c>0&&(i+="@prettier-placeholder-"+(c-1)+"-id"),i+=f}let a=await t(i,{parser:"scss"}),u=Eh(r,e),p=LN(a,u);if(!p)throw new Error("Couldn't insert all the expressions");return["`",ee([re,p]),Z,"`"]}function LN(t,e){if(!st(e))return t;let r=0,s=vn(xh(t),i=>typeof i!="string"||!i.includes("@prettier-placeholder")?i:i.split(/@prettier-placeholder-(\d+)-id/u).map((a,u)=>u%2===0?Ei(a):(r++,e[a])));return e.length===r?s:null}function ON(t){return t.match(void 0,(e,r)=>r==="quasi"&&e.type==="TaggedTemplateExpression"&&ih(e.tag,["css","css.global","css.resolve"]))||t.match(void 0,(e,r)=>r==="expression"&&e.type==="JSXExpressionContainer",(e,r)=>r==="children"&&e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(s=>s.type==="JSXAttribute"&&s.name.type==="JSXIdentifier"&&s.name.name==="jsx"))}function Io(t){return t.type==="Identifier"&&t.name==="styled"}function Lm(t){return/^[A-Z]/u.test(t.object.name)&&t.property.name==="extend"}function MN({parent:t}){if(!t||t.type!=="TaggedTemplateExpression")return!1;let e=t.tag.type==="ParenthesizedExpression"?t.tag.expression:t.tag;switch(e.type){case"MemberExpression":return Io(e.object)||Lm(e);case"CallExpression":return Io(e.callee)||e.callee.type==="MemberExpression"&&(e.callee.object.type==="MemberExpression"&&(Io(e.callee.object.object)||Lm(e.callee.object))||e.callee.object.type==="CallExpression"&&Io(e.callee.object.callee));case"Identifier":return e.name==="css";default:return!1}}function $N({parent:t,grandparent:e}){return e?.type==="JSXAttribute"&&t.type==="JSXExpressionContainer"&&e.name.type==="JSXIdentifier"&&e.name.name==="css"}var RN=t=>ON(t)||MN(t)||$N(t)||IN(t);async function jN(t,e,r){let{node:s}=r,i=s.quasis.length,a=Eh(r,e),u=[];for(let p=0;p<i;p++){let c=s.quasis[p],m=p===0,f=p===i-1,d=c.value.cooked,D=d.split(`
|
|
64
|
-
`),y=D.length,x=a[p],E=y>2&&D[0].trim()===""&&D[1].trim()==="",C=y>2&&D[y-1].trim()===""&&D[y-2].trim()==="",b=D.every(v=>/^\s*(?:#[^\n\r]*)?$/u.test(v));if(!f&&/#[^\n\r]*$/u.test(D[y-1]))return null;let A=null;b?A=UN(D):A=await t(d,{parser:"graphql"}),A?(A=j1(A,!1),!m&&E&&u.push(""),u.push(A),!f&&C&&u.push("")):!m&&!f&&E&&u.push(""),x&&u.push(x)}return["`",ee([re,qe(re,u)]),re,"`"]}function UN(t){let e=[],r=!1,s=t.map(i=>i.trim());for(let[i,a]of s.entries())a!==""&&(s[i-1]===""&&r?e.push([re,a]):e.push(a),r=!0);return e.length===0?null:qe(re,e)}function VN({node:t,parent:e}){return V1({node:t,parent:e},"GraphQL")||e&&(e.type==="TaggedTemplateExpression"&&(e.tag.type==="MemberExpression"&&e.tag.object.name==="graphql"&&e.tag.property.name==="experimental"||e.tag.type==="Identifier"&&(e.tag.name==="gql"||e.tag.name==="graphql"))||e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="graphql")}var Gl=0;async function q1(t,e,r,s,i){let{node:a}=s,u=Gl;Gl=Gl+1>>>0;let p=b=>`PRETTIER_HTML_PLACEHOLDER_${b}_${u}_IN_JS`,c=a.quasis.map((b,A,v)=>A===v.length-1?b.value.cooked:b.value.cooked+p(A)).join(""),m=Eh(s,r),f=new RegExp(p("(\\d+)"),"gu"),d=0,D=await e(c,{parser:t,__onHtmlRoot(b){d=b.children.length}}),y=vn(D,b=>{if(typeof b!="string")return b;let A=[],v=b.split(f);for(let P=0;P<v.length;P++){let S=v[P];if(P%2===0){S&&(S=U1(S),i.__embeddedInHtml&&(S=bt(0,S,/<\/(?=script\b)/giu,"<\\/")),A.push(S));continue}let F=Number(S);A.push(m[F])}return A}),x=/^\s/u.test(c)?" ":"",E=/\s$/u.test(c)?" ":"",C=i.htmlWhitespaceSensitivity==="ignore"?re:x&&E?pe:null;return C?z(["`",ee([C,z(y)]),C,"`"]):Xa({hug:!1},z(["`",x,d>1?ee(z(y)):z(y),E,"`"]))}function qN(t){return V1(t,"HTML")||t.match(e=>e.type==="TemplateLiteral",(e,r)=>e.type==="TaggedTemplateExpression"&&e.tag.type==="Identifier"&&e.tag.name==="html"&&r==="quasi")}var HN=q1.bind(void 0,"html"),zN=q1.bind(void 0,"angular");async function WN(t,e,r){let{node:s}=r,i=bt(0,s.quasis[0].value.raw,/((?:\\\\)*)\\`/gu,(c,m)=>"\\".repeat(m.length/2)+"`"),a=JN(i),u=a!=="";u&&(i=bt(0,i,new RegExp(`^${a}`,"gmu"),""));let p=j1(await t(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",u?ee([Z,p]):[_1,uN(p)],Z,"`"]}function JN(t){let e=t.match(/^([^\S\n]*)\S/mu);return e===null?"":e[1]}function KN({node:t,parent:e}){return e?.type==="TaggedTemplateExpression"&&t.quasis.length===1&&e.tag.type==="Identifier"&&(e.tag.name==="md"||e.tag.name==="markdown")}var XN=[{test:RN,print:_N},{test:VN,print:jN},{test:qN,print:HN},{test:NN,print:zN},{test:KN,print:WN}].map(({test:t,print:e})=>({test:t,print:YN(e)}));function GN(t){let{node:e}=t;if(e.type!=="TemplateLiteral"||QN(e))return;let r=XN.find(({test:s})=>s(t));if(r)return e.quasis.length===1&&e.quasis[0].value.raw.trim()===""?"``":r.print}function YN(t){return async(...e)=>{let r=await t(...e);return r&&Xa({embed:!0,...r.label},r)}}function QN({quasis:t}){return t.some(({value:{cooked:e}})=>e===null)}var ZN=GN,eB=/\*\/$/,tB=/^\/\*\*?/,H1=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,rB=/(^|\s+)\/\/([^\n\r]*)/g,Om=/^(\r?\n)+/,sB=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Mm=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,iB=/(\r?\n|^) *\* ?/g,z1=[];function nB(t){let e=t.match(H1);return e?e[0].trimStart():""}function aB(t){let e=t.match(H1)?.[0];return e==null?t:t.slice(e.length)}function oB(t){t=bt(0,t.replace(tB,"").replace(eB,""),iB,"$1");let e="";for(;e!==t;)e=t,t=bt(0,t,sB,`
|
|
65
|
-
$1 $2
|
|
66
|
-
`);t=t.replace(Om,"").trimEnd();let r=Object.create(null),s=bt(0,t,Mm,"").replace(Om,"").trimEnd(),i;for(;i=Mm.exec(t);){let a=bt(0,i[2],rB,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...z1,...Array.isArray(u)?u:[u],a]}else r[i[1]]=a}return{comments:s,pragmas:r}}function uB({comments:t="",pragmas:e={}}){let r=Object.keys(e),s=r.flatMap(a=>$m(a,e[a])).map(a=>` * ${a}
|
|
67
|
-
`).join("");if(!t){if(r.length===0)return"";if(r.length===1&&!Array.isArray(e[r[0]])){let a=e[r[0]];return`/** ${$m(r[0],a)[0]} */`}}let i=t.split(`
|
|
68
|
-
`).map(a=>` * ${a}`).join(`
|
|
69
|
-
`)+`
|
|
70
|
-
`;return`/**
|
|
71
|
-
`+(t?i:"")+(t&&r.length>0?` *
|
|
72
|
-
`:"")+s+" */"}function $m(t,e){return[...z1,...Array.isArray(e)?e:[e]].map(r=>`@${t} ${r}`.trim())}var lB="format";function pB(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
|
73
|
-
`);return e===-1?t:t.slice(0,e)}var cB=pB;function hB(t){let e=cB(t);e&&(t=t.slice(e.length+1));let r=nB(t),{pragmas:s,comments:i}=oB(r);return{shebang:e,text:t,pragmas:s,comments:i}}function dB(t){let{shebang:e,text:r,pragmas:s,comments:i}=hB(t),a=aB(r),u=uB({pragmas:{[lB]:"",...s},comments:i.trimStart()});return(e?`${e}
|
|
74
|
-
`:"")+u+(a.startsWith(`
|
|
75
|
-
`)?`
|
|
76
|
-
`:`
|
|
77
|
-
|
|
78
|
-
`)+a}function fB(t){if(!Fr(t))return!1;let e=`*${t.value}*`.split(`
|
|
79
|
-
`);return e.length>1&&e.every(r=>r.trimStart()[0]==="*")}var Yl=new WeakMap;function mB(t){return Yl.has(t)||Yl.set(t,fB(t)),Yl.get(t)}var yB=mB;function gB(t,e){let r=t.node;if(Wa(r))return e.originalText.slice(Re(r),Me(r)).trimEnd();if(yB(r))return DB(r);if(Fr(r))return["/*",Ei(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function DB(t){let e=t.value.split(`
|
|
80
|
-
`);return["/*",qe(re,e.map((r,s)=>s===0?r.trimEnd():" "+(s<e.length-1?r.trim():r.trimStart()))),"*/"]}function Up(t,e){if(t.isRoot)return!1;let{node:r,key:s,parent:i}=t;if(e.__isInHtmlInterpolation&&!e.bracketSpacing&&CB(r)&&pa(t))return!0;if(xB(r))return!1;if(r.type==="Identifier"){if(r.extra?.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r.name)||s==="left"&&(r.name==="async"&&!i.await||r.name==="let")&&i.type==="ForOfStatement")return!0;if(r.name==="let"){let a=t.findAncestor(u=>u.type==="ForOfStatement")?.left;if(a&&Mt(a,u=>u===r))return!0}if(s==="object"&&r.name==="let"&&i.type==="MemberExpression"&&i.computed&&!i.optional){let a=t.findAncestor(p=>p.type==="ExpressionStatement"||p.type==="ForStatement"||p.type==="ForInStatement"),u=a?a.type==="ExpressionStatement"?a.expression:a.type==="ForStatement"?a.init:a.left:void 0;if(u&&Mt(u,p=>p===r))return!0}if(s==="expression")switch(r.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let a=t.findAncestor(u=>!Tr(u));if(a!==i&&a.type==="ExpressionStatement")return!0}}return!1}if(r.type==="ObjectExpression"||r.type==="FunctionExpression"||r.type==="ClassExpression"||r.type==="DoExpression"){let a=t.findAncestor(u=>u.type==="ExpressionStatement")?.expression;if(a&&Mt(a,u=>u===r))return!0}if(r.type==="ObjectExpression"){let a=t.findAncestor(u=>u.type==="ArrowFunctionExpression")?.body;if(a&&a.type!=="SequenceExpression"&&a.type!=="AssignmentExpression"&&Mt(a,u=>u===r))return!0}switch(i.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(s==="superClass"&&(r.type==="ArrowFunctionExpression"||r.type==="AssignmentExpression"||r.type==="AwaitExpression"||r.type==="BinaryExpression"||r.type==="ConditionalExpression"||r.type==="LogicalExpression"||r.type==="NewExpression"||r.type==="ObjectExpression"||r.type==="SequenceExpression"||r.type==="TaggedTemplateExpression"||r.type==="UnaryExpression"||r.type==="UpdateExpression"||r.type==="YieldExpression"||r.type==="TSNonNullExpression"||r.type==="ClassExpression"&&st(r.decorators)))return!0;break;case"ExportDefaultDeclaration":return W1(t,e)||r.type==="SequenceExpression";case"Decorator":if(s==="expression"&&!TB(r))return!0;break;case"TypeAnnotation":if(t.match(void 0,void 0,(a,u)=>u==="returnType"&&a.type==="ArrowFunctionExpression")&&AB(r))return!0;break;case"BinaryExpression":if(s==="left"&&(i.operator==="in"||i.operator==="instanceof")&&r.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(s==="init"&&t.match(void 0,void 0,(a,u)=>u==="declarations"&&a.type==="VariableDeclaration",(a,u)=>u==="left"&&a.type==="ForInStatement"))return!0;break}switch(r.type){case"UpdateExpression":if(i.type==="UnaryExpression")return r.prefix&&(r.operator==="++"&&i.operator==="+"||r.operator==="--"&&i.operator==="-");case"UnaryExpression":switch(i.type){case"UnaryExpression":return r.operator===i.operator&&(r.operator==="+"||r.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return s==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return s==="callee";case"BinaryExpression":return s==="left"&&i.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(i.type==="UpdateExpression"||r.operator==="in"&&EB(t))return!0;if(r.operator==="|>"&&r.extra?.parenthesized){let a=t.grandparent;if(a.type==="BinaryExpression"&&a.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"LogicalExpression":switch(i.type){case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return!Tr(r);case"ConditionalExpression":return Tr(r)||$I(r);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return s==="callee";case"ClassExpression":case"ClassDeclaration":return s==="superClass";case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return s==="object";case"AssignmentExpression":case"AssignmentPattern":return s==="left"&&(r.type==="TSTypeAssertion"||Tr(r));case"LogicalExpression":if(r.type==="LogicalExpression")return i.operator!==r.operator;case"BinaryExpression":{let{operator:a,type:u}=r;if(!a&&u!=="TSTypeAssertion")return!0;let p=uu(a),c=i.operator,m=uu(c);return!!(m>p||s==="right"&&m===p||m===p&&!ph(c,a)||m<p&&a==="%"&&(c==="+"||c==="-")||YI(c))}default:return!1}case"SequenceExpression":return i.type!=="ForStatement";case"YieldExpression":if(i.type==="AwaitExpression"||i.type==="TSTypeAssertion")return!0;case"AwaitExpression":switch(i.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return s==="object";case"NewExpression":case"CallExpression":case"OptionalCallExpression":return s==="callee";case"ConditionalExpression":return s==="test";case"BinaryExpression":return!(!r.argument&&i.operator==="|>");default:return!1}case"TSFunctionType":if(t.match(a=>a.type==="TSFunctionType",(a,u)=>u==="typeAnnotation"&&a.type==="TSTypeAnnotation",(a,u)=>u==="returnType"&&a.type==="ArrowFunctionExpression"))return!0;case"TSConditionalType":case"TSConstructorType":case"ConditionalTypeAnnotation":if(s==="extendsType"&&Js(r)&&i.type===r.type||s==="checkType"&&Js(i))return!0;if(s==="extendsType"&&i.type==="TSConditionalType"){let{typeAnnotation:a}=r.returnType||r.typeAnnotation;if(a.type==="TSTypePredicate"&&a.typeAnnotation&&(a=a.typeAnnotation.typeAnnotation),a.type==="TSInferType"&&a.typeParameter.constraint)return!0}case"TSUnionType":case"TSIntersectionType":if(Wr(i)||Ka(i))return!0;case"TSInferType":if(r.type==="TSInferType"){if(i.type==="TSRestType")return!1;if(s==="types"&&(i.type==="TSUnionType"||i.type==="TSIntersectionType")&&r.typeParameter.type==="TSTypeParameter"&&r.typeParameter.constraint)return!0}case"TSTypeOperator":return i.type==="TSArrayType"||i.type==="TSOptionalType"||i.type==="TSRestType"||s==="objectType"&&i.type==="TSIndexedAccessType"||i.type==="TSTypeOperator"||i.type==="TSTypeAnnotation"&&t.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return s==="objectType"&&i.type==="TSIndexedAccessType"||s==="elementType"&&i.type==="TSArrayType";case"TypeOperator":return i.type==="ArrayTypeAnnotation"||i.type==="NullableTypeAnnotation"||s==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType")||i.type==="TypeOperator";case"TypeofTypeAnnotation":return s==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType")||s==="elementType"&&i.type==="ArrayTypeAnnotation";case"ArrayTypeAnnotation":return i.type==="NullableTypeAnnotation";case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return i.type==="TypeOperator"||i.type==="KeyofTypeAnnotation"||i.type==="ArrayTypeAnnotation"||i.type==="NullableTypeAnnotation"||i.type==="IntersectionTypeAnnotation"||i.type==="UnionTypeAnnotation"||s==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType");case"InferTypeAnnotation":case"NullableTypeAnnotation":return i.type==="ArrayTypeAnnotation"||s==="objectType"&&(i.type==="IndexedAccessType"||i.type==="OptionalIndexedAccessType");case"ComponentTypeAnnotation":case"FunctionTypeAnnotation":{if(r.type==="ComponentTypeAnnotation"&&(r.rendersType===null||r.rendersType===void 0))return!1;if(t.match(void 0,(u,p)=>p==="typeAnnotation"&&u.type==="TypeAnnotation",(u,p)=>p==="returnType"&&u.type==="ArrowFunctionExpression")||t.match(void 0,(u,p)=>p==="typeAnnotation"&&u.type==="TypePredicate",(u,p)=>p==="typeAnnotation"&&u.type==="TypeAnnotation",(u,p)=>p==="returnType"&&u.type==="ArrowFunctionExpression"))return!0;let a=i.type==="NullableTypeAnnotation"?t.grandparent:i;return a.type==="UnionTypeAnnotation"||a.type==="IntersectionTypeAnnotation"||a.type==="ArrayTypeAnnotation"||s==="objectType"&&(a.type==="IndexedAccessType"||a.type==="OptionalIndexedAccessType")||s==="checkType"&&i.type==="ConditionalTypeAnnotation"||s==="extendsType"&&i.type==="ConditionalTypeAnnotation"&&r.returnType?.type==="InferTypeAnnotation"&&r.returnType?.typeParameter.bound||a.type==="NullableTypeAnnotation"||i.type==="FunctionTypeParam"&&i.name===null&&_t(r).some(u=>u.typeAnnotation?.type==="NullableTypeAnnotation")}case"OptionalIndexedAccessType":return s==="objectType"&&i.type==="IndexedAccessType";case"StringLiteral":case"NumericLiteral":case"Literal":if(typeof r.value=="string"&&i.type==="ExpressionStatement"&&typeof i.directive!="string"){let a=t.grandparent;return a.type==="Program"||a.type==="BlockStatement"}return s==="object"&&rt(i)&&zr(r);case"AssignmentExpression":return!((s==="init"||s==="update")&&i.type==="ForStatement"||s==="expression"&&r.left.type!=="ObjectPattern"&&i.type==="ExpressionStatement"||s==="key"&&i.type==="TSPropertySignature"||i.type==="AssignmentExpression"||s==="expressions"&&i.type==="SequenceExpression"&&t.match(void 0,void 0,(a,u)=>(u==="init"||u==="update")&&a.type==="ForStatement")||s==="value"&&i.type==="Property"&&t.match(void 0,void 0,(a,u)=>u==="properties"&&a.type==="ObjectPattern")||i.type==="NGChainedExpression"||s==="node"&&i.type==="JsExpressionRoot");case"ConditionalExpression":switch(i.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return s==="callee";case"ConditionalExpression":return e.experimentalTernaries?!1:s==="test";case"MemberExpression":case"OptionalMemberExpression":return s==="object";default:return!1}case"FunctionExpression":switch(i.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return s==="callee";case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(i.type){case"BinaryExpression":return i.operator!=="|>"||r.extra?.parenthesized;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return s==="callee";case"MemberExpression":case"OptionalMemberExpression":return s==="object";case"TSAsExpression":case"TSSatisfiesExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":case"MatchExpressionCase":return!0;case"TSInstantiationExpression":return s==="expression";case"ConditionalExpression":return s==="test";default:return!1}case"ClassExpression":return i.type==="NewExpression"?s==="callee":!1;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(bB(t))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if(s==="callee"&&(i.type==="BindExpression"||i.type==="NewExpression")){let a=r;for(;a;)switch(a.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":a=a.object;break;case"TaggedTemplateExpression":a=a.tag;break;case"TSNonNullExpression":a=a.expression;break;default:return!1}}return!1;case"BindExpression":return s==="callee"&&(i.type==="BindExpression"||i.type==="NewExpression")||s==="object"&&rt(i);case"NGPipeExpression":return!(i.type==="NGRoot"||i.type==="NGMicrosyntaxExpression"||i.type==="ObjectProperty"&&!r.extra?.parenthesized||kt(i)||s==="arguments"&&Xe(i)||s==="right"&&i.type==="NGPipeExpression"||s==="property"&&i.type==="MemberExpression"||i.type==="AssignmentExpression");case"JSXFragment":case"JSXElement":return s==="callee"||s==="left"&&i.type==="BinaryExpression"&&i.operator==="<"||!kt(i)&&i.type!=="ArrowFunctionExpression"&&i.type!=="AssignmentExpression"&&i.type!=="AssignmentPattern"&&i.type!=="BinaryExpression"&&i.type!=="NewExpression"&&i.type!=="ConditionalExpression"&&i.type!=="ExpressionStatement"&&i.type!=="JsExpressionRoot"&&i.type!=="JSXAttribute"&&i.type!=="JSXElement"&&i.type!=="JSXExpressionContainer"&&i.type!=="JSXFragment"&&i.type!=="LogicalExpression"&&!Xe(i)&&!Ys(i)&&i.type!=="ReturnStatement"&&i.type!=="ThrowStatement"&&i.type!=="TypeCastExpression"&&i.type!=="VariableDeclarator"&&i.type!=="YieldExpression"&&i.type!=="MatchExpressionCase";case"TSInstantiationExpression":return s==="object"&&rt(i);case"MatchOrPattern":return i.type==="MatchAsPattern"}return!1}var xB=Ne(["BlockStatement","BreakStatement","ComponentDeclaration","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareComponent","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareHook","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareNamespace","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","HookDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function EB(t){let e=0,{node:r}=t;for(;r;){let s=t.getParentNode(e++);if(s?.type==="ForStatement"&&s.init===r)return!0;r=s}return!1}function AB(t){return _p(t,e=>e.type==="ObjectTypeAnnotation"&&_p(e,r=>r.type==="FunctionTypeAnnotation"))}function CB(t){return Sr(t)}function pa(t){let{parent:e,key:r}=t;switch(e.type){case"NGPipeExpression":if(r==="arguments"&&t.isLast)return t.callParent(pa);break;case"ObjectProperty":if(r==="value")return t.callParent(()=>t.key==="properties"&&t.isLast);break;case"BinaryExpression":case"LogicalExpression":if(r==="right")return t.callParent(pa);break;case"ConditionalExpression":if(r==="alternate")return t.callParent(pa);break;case"UnaryExpression":if(e.prefix)return t.callParent(pa);break}return!1}function W1(t,e){let{node:r,parent:s}=t;return r.type==="FunctionExpression"||r.type==="ClassExpression"?s.type==="ExportDefaultDeclaration"||!Up(t,e):!ah(r)||s.type!=="ExportDefaultDeclaration"&&Up(t,e)?!1:t.call(()=>W1(t,e),...n1(r))}function bB(t){return!!(t.match(void 0,(e,r)=>r==="expression"&&e.type==="ChainExpression",(e,r)=>r==="tag"&&e.type==="TaggedTemplateExpression")||t.match(e=>e.type==="OptionalCallExpression"||e.type==="OptionalMemberExpression",(e,r)=>r==="tag"&&e.type==="TaggedTemplateExpression")||t.match(e=>e.type==="OptionalCallExpression"||e.type==="OptionalMemberExpression",(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="tag"&&e.type==="TaggedTemplateExpression")||t.match(void 0,(e,r)=>r==="expression"&&e.type==="ChainExpression",(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="tag"&&e.type==="TaggedTemplateExpression")||t.match(void 0,(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="expression"&&e.type==="ChainExpression",(e,r)=>r==="tag"&&e.type==="TaggedTemplateExpression")||t.match(e=>e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression",(e,r)=>r==="object"&&e.type==="MemberExpression"||r==="callee"&&(e.type==="CallExpression"||e.type==="NewExpression"))||t.match(e=>e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression",(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="object"&&e.type==="MemberExpression"||r==="callee"&&e.type==="CallExpression")||t.match(e=>e.type==="CallExpression"||e.type==="MemberExpression",(e,r)=>r==="expression"&&e.type==="ChainExpression")&&(t.match(void 0,void 0,(e,r)=>r==="callee"&&(e.type==="CallExpression"&&!e.optional||e.type==="NewExpression")||r==="object"&&e.type==="MemberExpression"&&!e.optional)||t.match(void 0,void 0,(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="object"&&e.type==="MemberExpression"||r==="callee"&&e.type==="CallExpression"))||t.match(e=>e.type==="CallExpression"||e.type==="MemberExpression",(e,r)=>r==="expression"&&e.type==="TSNonNullExpression",(e,r)=>r==="expression"&&e.type==="ChainExpression",(e,r)=>r==="object"&&e.type==="MemberExpression"||r==="callee"&&e.type==="CallExpression"))}function Vp(t){return t.type==="Identifier"?!0:rt(t)?!t.computed&&!t.optional&&t.property.type==="Identifier"&&Vp(t.object):!1}function TB(t){return t.type==="ChainExpression"&&(t=t.expression),Vp(t)||Xe(t)&&!t.optional&&Vp(t.callee)}var ti=Up;function vB(t,e){let r=e-1;r=dn(t,r,{backwards:!0}),r=fn(t,r,{backwards:!0}),r=dn(t,r,{backwards:!0});let s=fn(t,r,{backwards:!0});return r!==s}var SB=vB,wB=()=>!0;function Ah(t,e){let r=t.node;return r.printed=!0,e.printer.printComment(t,e)}function PB(t,e){let r=t.node,s=[Ah(t,e)],{printer:i,originalText:a,locStart:u,locEnd:p}=e;if(i.isBlockComment?.(r)){let m=Wt(a,p(r))?Wt(a,u(r),{backwards:!0})?re:pe:" ";s.push(m)}else s.push(re);let c=fn(a,dn(a,p(r)));return c!==!1&&Wt(a,c)&&s.push(re),s}function FB(t,e,r){let s=t.node,i=Ah(t,e),{printer:a,originalText:u,locStart:p}=e,c=a.isBlockComment?.(s);if(r?.hasLineSuffix&&!r?.isBlock||Wt(u,p(s),{backwards:!0})){let m=SB(u,p(s));return{doc:_m([re,m?re:"",i]),isBlock:c,hasLineSuffix:!0}}return!c||r?.hasLineSuffix?{doc:[_m([" ",i]),ms],isBlock:c,hasLineSuffix:!0}:{doc:[" ",i],isBlock:c,hasLineSuffix:!1}}function tt(t,e,r={}){let{node:s}=t;if(!st(s?.comments))return"";let{indent:i=!1,marker:a,filter:u=wB}=r,p=[];if(t.each(({node:m})=>{m.leading||m.trailing||m.marker!==a||!u(m)||p.push(Ah(t,e))},"comments"),p.length===0)return"";let c=qe(re,p);return i?ee([re,c]):c}function Nu(t,e){let r=t.node;if(!r)return{};let s=e[Symbol.for("printedComments")];if((r.comments||[]).filter(p=>!s.has(p)).length===0)return{leading:"",trailing:""};let i=[],a=[],u;return t.each(()=>{let p=t.node;if(s?.has(p))return;let{leading:c,trailing:m}=p;c?i.push(PB(t,e)):m&&(u=FB(t,e,u),a.push(u.doc))},"comments"),{leading:i,trailing:a}}function gr(t,e,r){let{leading:s,trailing:i}=Nu(t,r);return!s&&!i?e:$p(e,a=>[s,a,i])}var cu=class extends Error{name="ArgExpansionBailout"};function _i(t,e,r,s,i){let a=t.node,u=_t(a),p=i&&a.typeParameters?r("typeParameters"):"";if(u.length===0)return[p,"(",tt(t,e,{filter:y=>wr(e.originalText,Me(y))===")"}),")"];let{parent:c}=t,m=ku(c),f=J1(a),d=[];if(ZI(t,(y,x)=>{let E=x===u.length-1;E&&a.rest&&d.push("..."),d.push(r()),!E&&(d.push(","),m||f?d.push(" "):Yr(u[x],e)?d.push(re,re):d.push(pe))}),s&&!IB(t)){if(Rt(p)||Rt(d))throw new cu;return z([pu(p),"(",pu(d),")"])}let D=u.every(y=>!st(y.decorators));return f&&D?[p,"(",...d,")"]:m?[p,"(",...d,")"]:(u1(c)||VI(c)||c.type==="TypeAlias"||c.type==="UnionTypeAnnotation"||c.type==="IntersectionTypeAnnotation"||c.type==="FunctionTypeAnnotation"&&c.returnType===a)&&u.length===1&&u[0].name===null&&a.this!==u[0]&&u[0].typeAnnotation&&a.typeParameters===null&&uh(u[0].typeAnnotation)&&!a.rest?e.arrowParens==="always"||a.type==="HookTypeAnnotation"?["(",...d,")"]:d:[p,"(",ee([Z,...d]),Fe(!QI(a)&&Gr(e,"all")&&t.root.type!=="NGRoot"?",":""),Z,")"]}function J1(t){if(!t)return!1;let e=_t(t);if(e.length!==1)return!1;let[r]=e;return!ue(r)&&(r.type==="ObjectPattern"||r.type==="ArrayPattern"||r.type==="Identifier"&&r.typeAnnotation&&(r.typeAnnotation.type==="TypeAnnotation"||r.typeAnnotation.type==="TSTypeAnnotation")&&Ws(r.typeAnnotation.typeAnnotation)||r.type==="FunctionTypeParam"&&Ws(r.typeAnnotation)&&r!==t.rest||r.type==="AssignmentPattern"&&(r.left.type==="ObjectPattern"||r.left.type==="ArrayPattern")&&(r.right.type==="Identifier"||Sr(r.right)&&r.right.properties.length===0||kt(r.right)&&r.right.elements.length===0))}function kB(t){let e;return t.returnType?(e=t.returnType,e.typeAnnotation&&(e=e.typeAnnotation)):t.typeAnnotation&&(e=t.typeAnnotation),e}function Sn(t,e){let r=kB(t);if(!r)return!1;let s=t.typeParameters?.params;if(s){if(s.length>1)return!1;if(s.length===1){let i=s[0];if(i.constraint||i.default)return!1}}return _t(t).length===1&&(Ws(r)||Rt(e))}function IB(t){return t.match(e=>e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement",(e,r)=>{if(e.type==="CallExpression"&&r==="arguments"&&e.arguments.length===1&&e.callee.type==="CallExpression"){let s=e.callee.callee;return s.type==="Identifier"||s.type==="MemberExpression"&&!s.computed&&s.object.type==="Identifier"&&s.property.type==="Identifier"}return!1},(e,r)=>e.type==="VariableDeclarator"&&r==="init"||e.type==="ExportDefaultDeclaration"&&r==="declaration"||e.type==="TSExportAssignment"&&r==="expression"||e.type==="AssignmentExpression"&&r==="right"&&e.left.type==="MemberExpression"&&e.left.object.type==="Identifier"&&e.left.object.name==="module"&&e.left.property.type==="Identifier"&&e.left.property.name==="exports",e=>e.type!=="VariableDeclaration"||e.kind==="const"&&e.declarations.length===1)}function NB(t){let e=_t(t);return e.length>1&&e.some(r=>r.type==="TSParameterProperty")}function Da(t,e){return(e==="params"||e==="this"||e==="rest")&&J1(t)}function jt(t){let{node:e}=t;return!e.optional||e.type==="Identifier"&&e===t.parent.key?"":Xe(e)||rt(e)&&e.computed||e.type==="OptionalIndexedAccessType"?"?.":"?"}function K1(t){return t.node.definite||t.match(void 0,(e,r)=>r==="id"&&e.type==="VariableDeclarator"&&e.definite)?"!":""}var BB=Ne(["DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function or(t){let{node:e}=t;return e.declare||BB(e)&&t.parent.type!=="DeclareExportDeclaration"?"declare ":""}var _B=Ne(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Bu({node:t}){return t.abstract||_B(t)?"abstract ":""}function Is(t,e,r){return t.type==="EmptyStatement"?ue(t,fe.Leading)?[" ",e]:e:t.type==="BlockStatement"||r?[" ",e]:ee([pe,e])}function _u(t){return t.accessibility?t.accessibility+" ":""}var LB=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,OB=t=>LB.test(t),MB=OB;function $B(t){return t.length===1?t:t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var Dn=$B,RB=0;function X1(t,e,r){let{node:s,parent:i,grandparent:a,key:u}=t,p=u!=="body"&&(i.type==="IfStatement"||i.type==="WhileStatement"||i.type==="SwitchStatement"||i.type==="DoWhileStatement"),c=s.operator==="|>"&&t.root.extra?.__isUsingHackPipeline,m=qp(t,e,r,!1,p);if(p)return m;if(c)return z(m);if(u==="callee"&&(Xe(i)||i.type==="NewExpression")||i.type==="UnaryExpression"||rt(i)&&!i.computed)return z([ee([Z,...m]),Z]);let f=i.type==="ReturnStatement"||i.type==="ThrowStatement"||i.type==="JSXExpressionContainer"&&a.type==="JSXAttribute"||s.operator!=="|"&&i.type==="JsExpressionRoot"||s.type!=="NGPipeExpression"&&(i.type==="NGRoot"&&e.parser==="__ng_binding"||i.type==="NGMicrosyntaxExpression"&&a.type==="NGMicrosyntax"&&a.body.length===1)||s===i.body&&i.type==="ArrowFunctionExpression"||s!==i.body&&i.type==="ForStatement"||i.type==="ConditionalExpression"&&a.type!=="ReturnStatement"&&a.type!=="ThrowStatement"&&!Xe(a)&&a.type!=="NewExpression"||i.type==="TemplateLiteral"||UB(t),d=i.type==="AssignmentExpression"||i.type==="VariableDeclarator"||i.type==="ClassProperty"||i.type==="PropertyDefinition"||i.type==="TSAbstractPropertyDefinition"||i.type==="ClassPrivateProperty"||Ys(i),D=ds(s.left)&&ph(s.operator,s.left.operator);if(f||_a(s)&&!D||!_a(s)&&d)return z(m);if(m.length===0)return"";let y=Tt(s.right),x=m.findIndex(P=>typeof P!="string"&&!Array.isArray(P)&&P.type===xr),E=m.slice(0,x===-1?1:x+1),C=m.slice(E.length,y?-1:void 0),b=Symbol("logicalChain-"+ ++RB),A=z([...E,ee(C)],{id:b});if(!y)return A;let v=Ge(0,m,-1);return z([A,Ba(v,{groupId:b})])}function qp(t,e,r,s,i){let{node:a}=t;if(!ds(a))return[z(r())];let u=[];ph(a.operator,a.left.operator)?u=t.call(()=>qp(t,e,r,!0,i),"left"):u.push(z(r("left")));let p=_a(a),c=a.right.type==="ChainExpression"?a.right.expression:a.right,m=(a.operator==="|>"||a.type==="NGPipeExpression"||jB(t,e))&&!vr(e.originalText,c),f=!ue(c,fe.Leading,g1)&&vr(e.originalText,c),d=a.type==="NGPipeExpression"?"|":a.operator,D=a.type==="NGPipeExpression"&&a.arguments.length>0?z(ee([Z,": ",qe([pe,": "],t.map(()=>Pr(2,z(r())),"arguments"))])):"",y;if(p)y=[d,vr(e.originalText,c)?ee([pe,r("right"),D]):[" ",r("right"),D]];else{let C=d==="|>"&&t.root.extra?.__isUsingHackPipeline?t.call(()=>qp(t,e,r,!0,i),"right"):r("right");if(e.experimentalOperatorPosition==="start"){let b="";if(f)switch(ei(C)){case fs:b=C.splice(0,1)[0];break;case bs:b=C.contents.splice(0,1)[0];break}y=[pe,b,d," ",C,D]}else y=[m?pe:"",d,m?" ":pe,C,D]}let{parent:x}=t,E=ue(a.left,fe.Trailing|fe.Line);if((E||!(i&&a.type==="LogicalExpression")&&x.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type)&&(y=z(y,{shouldBreak:E})),e.experimentalOperatorPosition==="start"?u.push(p||f?" ":"",y):u.push(m?"":" ",y),s&&ue(a)){let C=xh(gr(t,u,e));return C.type===Qs?C.parts:Array.isArray(C)?C:[C]}return u}function _a(t){return t.type!=="LogicalExpression"?!1:!!(Sr(t.right)&&t.right.properties.length>0||kt(t.right)&&t.right.elements.length>0||Tt(t.right))}var Rm=t=>t.type==="BinaryExpression"&&t.operator==="|";function jB(t,e){return(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&Rm(t.node)&&!t.hasAncestor(r=>!Rm(r)&&r.type!=="JsExpressionRoot")}function UB(t){if(t.key!=="arguments")return!1;let{parent:e}=t;if(!(Xe(e)&&!e.optional&&e.arguments.length===1))return!1;let{callee:r}=e;return r.type==="Identifier"&&r.name==="Boolean"}function G1(t,e,r){let{node:s}=t,{parent:i}=t,a=i.type!=="TypeParameterInstantiation"&&(!Js(i)||!e.experimentalTernaries)&&i.type!=="TSTypeParameterInstantiation"&&i.type!=="GenericTypeAnnotation"&&i.type!=="TSTypeReference"&&i.type!=="TSTypeAssertion"&&i.type!=="TupleTypeAnnotation"&&i.type!=="TSTupleType"&&!(i.type==="FunctionTypeParam"&&!i.name&&t.grandparent.this!==i)&&!((Op(i)||i.type==="VariableDeclarator")&&vr(e.originalText,s))&&!(Op(i)&&ue(i.id,fe.Trailing|fe.Line)),u=Y1(s),p=t.map(()=>{let y=r();return u||(y=Pr(2,y)),gr(t,y,e)},"types"),c="",m="";if(m1(t)&&({leading:c,trailing:m}=Nu(t,e)),u)return[c,qe(" | ",p),m];let f=a&&!vr(e.originalText,s),d=[Fe([f?pe:"","| "]),qe([pe,"| "],p)];if(ti(t,e))return[c,z([ee(d),Z]),m];let D=[c,z(d)];return(i.type==="TupleTypeAnnotation"||i.type==="TSTupleType")&&i[i.type==="TupleTypeAnnotation"&&i.types?"types":"elementTypes"].length>1?[z([ee([Fe(["(",Z]),D]),Z,Fe(")")]),m]:[z(a?ee(D):D),m]}var VB=Ne(["VoidTypeAnnotation","TSVoidKeyword","NullLiteralTypeAnnotation","TSNullKeyword"]),qB=Ne(["ObjectTypeAnnotation","TSTypeLiteral","GenericTypeAnnotation","TSTypeReference"]);function Y1(t){let{types:e}=t;if(e.some(s=>ue(s)))return!1;let r=e.find(s=>qB(s));return r?e.every(s=>s===r||VB(s)):!1}function HB(t){return uh(t)||Ws(t)?!0:Wr(t)?Y1(t):!1}var zB=new WeakSet;function Pt(t,e,r="typeAnnotation"){let{node:{[r]:s}}=t;if(!s)return"";let i=!1;if(s.type==="TSTypeAnnotation"||s.type==="TypeAnnotation"){let a=t.call(Q1,r);(a==="=>"||a===":"&&ue(s,fe.Leading))&&(i=!0),zB.add(s)}return i?[" ",e(r)]:e(r)}var Q1=t=>t.match(e=>e.type==="TSTypeAnnotation",(e,r)=>(r==="returnType"||r==="typeAnnotation")&&(e.type==="TSFunctionType"||e.type==="TSConstructorType"))?"=>":t.match(e=>e.type==="TSTypeAnnotation",(e,r)=>r==="typeAnnotation"&&(e.type==="TSJSDocNullableType"||e.type==="TSJSDocNonNullableType"||e.type==="TSTypePredicate"))||t.match(e=>e.type==="TypeAnnotation",(e,r)=>r==="typeAnnotation"&&e.type==="Identifier",(e,r)=>r==="id"&&e.type==="DeclareFunction")||t.match(e=>e.type==="TypeAnnotation",(e,r)=>r==="typeAnnotation"&&e.type==="Identifier",(e,r)=>r==="id"&&e.type==="DeclareHook")||t.match(e=>e.type==="TypeAnnotation",(e,r)=>r==="bound"&&e.type==="TypeParameter"&&e.usesExtendsBound)?"":":";function Z1(t,e,r){let s=Q1(t);return s?[s," ",r("typeAnnotation")]:r("typeAnnotation")}function WB(t,e,r,s){let{node:i}=t,a=i.inexact?"...":"";return ue(i,fe.Dangling)?z([r,a,tt(t,e,{indent:!0}),Z,s]):[r,a,s]}function Ch(t,e,r){let{node:s}=t,i=[],a="[",u="]",p=s.type==="TupleTypeAnnotation"&&s.types?"types":s.type==="TSTupleType"||s.type==="TupleTypeAnnotation"?"elementTypes":"elements",c=s[p];if(c.length===0)i.push(WB(t,e,a,u));else{let m=Ge(0,c,-1),f=m?.type!=="RestElement"&&!s.inexact,d=m===null,D=Symbol("array"),y=!e.__inJestEach&&c.length>1&&c.every((C,b,A)=>{let v=C?.type;if(!kt(C)&&!Sr(C))return!1;let P=A[b+1];if(P&&v!==P.type)return!1;let S=kt(C)?"elements":"properties";return C[S]&&C[S].length>1}),x=e0(s,e),E=f?d?",":Gr(e)?x?Fe(",","",{groupId:D}):Fe(","):"":"";i.push(z([a,ee([Z,x?KB(t,e,r,E):[JB(t,e,r,p,s.inexact),E],tt(t,e)]),Z,u],{shouldBreak:y,id:D}))}return i.push(jt(t),Pt(t,r)),i}function e0(t,e){return kt(t)&&t.elements.length>0&&t.elements.every(r=>r&&(zr(r)||a1(r)&&!ue(r.argument))&&!ue(r,fe.Trailing|fe.Line,s=>!Wt(e.originalText,Re(s),{backwards:!0})))}function t0({node:t},{originalText:e}){let r=Me(t);if(r===Re(t))return!1;let{length:s}=e;for(;r<s&&e[r]!==",";)r=th(e,rh(e,r+1));return sh(e,r)}function JB(t,e,r,s,i){let a=[];return t.each(({node:u,isLast:p})=>{a.push(u?z(r()):""),(!p||i)&&a.push([",",pe,u&&t0(t,e)?Z:""])},s),i&&a.push("..."),a}function KB(t,e,r,s){let i=[];return t.each(({isLast:a,next:u})=>{i.push([r(),a?s:","]),a||i.push(t0(t,e)?[re,re]:ue(u,fe.Leading|fe.Line)?re:pe)},"elements"),N1(i)}function XB(t,e,r){let{node:s}=t,i=ur(s);if(i.length===0)return["(",tt(t,e),")"];let a=i.length-1;if(QB(i)){let d=["("];return lu(t,(D,y)=>{d.push(r()),y!==a&&d.push(", ")}),d.push(")"),d}let u=!1,p=[];lu(t,({node:d},D)=>{let y=r();D===a||(Yr(d,e)?(u=!0,y=[y,",",re,re]):y=[y,",",pe]),p.push(y)});let c=!e.parser.startsWith("__ng_")&&s.type!=="ImportExpression"&&s.type!=="TSImportType"&&s.type!=="TSExternalModuleReference"&&Gr(e,"all")?",":"";function m(){return z(["(",ee([pe,...p]),c,pe,")"],{shouldBreak:!0})}if(u||t.parent.type!=="Decorator"&&KI(i))return m();if(YB(i)){let d=p.slice(1);if(d.some(Rt))return m();let D;try{D=r(km(s,0),{expandFirstArg:!0})}catch(y){if(y instanceof cu)return m();throw y}return Rt(D)?[ms,yi([["(",z(D,{shouldBreak:!0}),", ",...d,")"],m()])]:yi([["(",D,", ",...d,")"],["(",z(D,{shouldBreak:!0}),", ",...d,")"],m()])}if(GB(i,p,e)){let d=p.slice(0,-1);if(d.some(Rt))return m();let D;try{D=r(km(s,-1),{expandLastArg:!0})}catch(y){if(y instanceof cu)return m();throw y}return Rt(D)?[ms,yi([["(",...d,z(D,{shouldBreak:!0}),")"],m()])]:yi([["(",...d,D,")"],["(",...d,z(D,{shouldBreak:!0}),")"],m()])}let f=["(",ee([Z,...p]),Fe(c),Z,")"];return d1(t)?f:z(f,{shouldBreak:p.some(Rt)||u})}function xa(t,e=!1){return Sr(t)&&(t.properties.length>0||ue(t))||kt(t)&&(t.elements.length>0||ue(t))||t.type==="TSTypeAssertion"&&xa(t.expression)||Tr(t)&&xa(t.expression)||t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&(!t.returnType||!t.returnType.typeAnnotation||t.returnType.typeAnnotation.type!=="TSTypeReference"||ZB(t.body))&&(t.body.type==="BlockStatement"||t.body.type==="ArrowFunctionExpression"&&xa(t.body,!0)||Sr(t.body)||kt(t.body)||!e&&(Xe(t.body)||t.body.type==="ConditionalExpression")||Tt(t.body))||t.type==="DoExpression"||t.type==="ModuleExpression"}function GB(t,e,r){let s=Ge(0,t,-1);if(t.length===1){let a=Ge(0,e,-1);if(a.label?.embed&&a.label?.hug!==!1)return!0}let i=Ge(0,t,-2);return!ue(s,fe.Leading)&&!ue(s,fe.Trailing)&&xa(s)&&(!i||i.type!==s.type)&&(t.length!==2||i.type!=="ArrowFunctionExpression"||!kt(s))&&!(t.length>1&&e0(s,r))}function YB(t){if(t.length!==2)return!1;let[e,r]=t;return e.type==="ModuleExpression"&&e_(r)?!0:!ue(e)&&(e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&r0(r)&&!xa(r)}function r0(t){if(t.type==="ParenthesizedExpression")return r0(t.expression);if(Tr(t)||t.type==="TypeCastExpression"){let{typeAnnotation:e}=t;if(e.type==="TypeAnnotation"&&(e=e.typeAnnotation),e.type==="TSArrayType"&&(e=e.elementType,e.type==="TSArrayType"&&(e=e.elementType)),e.type==="GenericTypeAnnotation"||e.type==="TSTypeReference"){let r=e.type==="GenericTypeAnnotation"?e.typeParameters:e.typeArguments;r?.params.length===1&&(e=r.params[0])}return uh(e)&&Cr(t.expression,1)}return gn(t)&&ur(t).length>1?!1:ds(t)?Cr(t.left,1)&&Cr(t.right,1):o1(t)||Cr(t)}function QB(t){return t.length===2?jm(t,0):t.length===3?t[0].type==="Identifier"&&jm(t,1):!1}function jm(t,e){let r=t[e],s=t[e+1];return r.type==="ArrowFunctionExpression"&&_t(r).length===0&&r.body.type==="BlockStatement"&&s.type==="ArrayExpression"&&!t.some(i=>ue(i))}function ZB(t){return t.type==="BlockStatement"&&(t.body.some(e=>e.type!=="EmptyStatement")||ue(t,fe.Dangling))}function e_(t){if(!(t.type==="ObjectExpression"&&t.properties.length===1))return!1;let[e]=t.properties;return Ys(e)?!e.computed&&(e.key.type==="Identifier"&&e.key.name==="type"||vt(e.key)&&e.key.value==="type")&&vt(e.value)&&e.value.value==="module":!1}var Hp=XB;function t_(t,e,r){return[r("object"),z(ee([Z,s0(t,e,r)]))]}function s0(t,e,r){return["::",r("callee")]}var r_=t=>((t.type==="ChainExpression"||t.type==="TSNonNullExpression")&&(t=t.expression),Xe(t)&&ur(t).length>0);function s_(t){let{node:e,ancestors:r}=t;for(let s of r){if(!(rt(s)&&s.object===e||s.type==="TSNonNullExpression"&&s.expression===e))return s.type==="NewExpression"&&s.callee===e;e=s}return!1}function i_(t,e,r){let s=r("object"),i=i0(t,e,r),{node:a}=t,u=t.findAncestor(m=>!(rt(m)||m.type==="TSNonNullExpression")),p=t.findAncestor(m=>!(m.type==="ChainExpression"||m.type==="TSNonNullExpression")),c=u.type==="BindExpression"||u.type==="AssignmentExpression"&&u.left.type!=="Identifier"||s_(t)||a.computed||a.object.type==="Identifier"&&a.property.type==="Identifier"&&!rt(p)||(p.type==="AssignmentExpression"||p.type==="VariableDeclarator")&&(r_(a.object)||s.label?.memberChain);return Xa(s.label,[s,c?i:z(ee([Z,i]))])}function i0(t,e,r){let s=r("property"),{node:i}=t,a=jt(t);return i.computed?!i.property||zr(i.property)?[a,"[",s,"]"]:z([a,"[",ee([Z,s]),Z,"]"]):[a,".",s]}function n0(t,e,r){if(t.node.type==="ChainExpression")return t.call(()=>n0(t,e,r),"expression");let s=(t.parent.type==="ChainExpression"?t.grandparent:t.parent).type==="ExpressionStatement",i=[];function a(q){let{originalText:te}=e,W=bn(te,Me(q));return te.charAt(W)===")"?W!==!1&&sh(te,W+1):Yr(q,e)}function u(){let{node:q}=t;if(q.type==="ChainExpression")return t.call(u,"expression");if(Xe(q)&&(Gi(q.callee)||Xe(q.callee))){let te=a(q);i.unshift({node:q,hasTrailingEmptyLine:te,printed:[gr(t,[jt(t),r("typeArguments"),Hp(t,e,r)],e),te?re:""]}),t.call(u,"callee")}else Gi(q)?(i.unshift({node:q,needsParens:ti(t,e),printed:gr(t,rt(q)?i0(t,e,r):s0(t,e,r),e)}),t.call(u,"object")):q.type==="TSNonNullExpression"?(i.unshift({node:q,printed:gr(t,"!",e)}),t.call(u,"expression")):i.unshift({node:q,printed:r()})}let{node:p}=t;i.unshift({node:p,printed:[jt(t),r("typeArguments"),Hp(t,e,r)]}),p.callee&&t.call(u,"callee");let c=[],m=[i[0]],f=1;for(;f<i.length&&(i[f].node.type==="TSNonNullExpression"||Xe(i[f].node)||rt(i[f].node)&&i[f].node.computed&&zr(i[f].node.property));++f)m.push(i[f]);if(!Xe(i[0].node))for(;f+1<i.length&&Gi(i[f].node)&&Gi(i[f+1].node);++f)m.push(i[f]);c.push(m),m=[];let d=!1;for(;f<i.length;++f){if(d&&Gi(i[f].node)){if(i[f].node.computed&&zr(i[f].node.property)){m.push(i[f]);continue}c.push(m),m=[],d=!1}(Xe(i[f].node)||i[f].node.type==="ImportExpression")&&(d=!0),m.push(i[f]),ue(i[f].node,fe.Trailing)&&(c.push(m),m=[],d=!1)}m.length>0&&c.push(m);function D(q){return/^[A-Z]|^[$_]+$/u.test(q)}function y(q){return q.length<=e.tabWidth}function x(q){let te=q[1][0]?.node.computed;if(q[0].length===1){let Y=q[0][0].node;return Y.type==="ThisExpression"||Y.type==="Identifier"&&(D(Y.name)||s&&y(Y.name)||te)}let W=Ge(0,q[0],-1).node;return rt(W)&&W.property.type==="Identifier"&&(D(W.property.name)||te)}let E=c.length>=2&&!ue(c[1][0].node)&&x(c);function C(q){let te=q.map(W=>W.printed);return q.length>0&&Ge(0,q,-1).needsParens?["(",...te,")"]:te}function b(q){return q.length===0?"":ee([re,qe(re,q.map(C))])}let A=c.map(C),v=A,P=E?3:2,S=c.flat(),F=S.slice(1,-1).some(q=>ue(q.node,fe.Leading))||S.slice(0,-1).some(q=>ue(q.node,fe.Trailing))||c[P]&&ue(c[P][0].node,fe.Leading);if(c.length<=P&&!F&&!c.some(q=>Ge(0,q,-1).hasTrailingEmptyLine))return d1(t)?v:z(v);let B=Ge(0,c[E?1:0],-1).node,I=!Xe(B)&&a(B),R=[C(c[0]),E?c.slice(1,2).map(C):"",I?re:"",b(c.slice(E?2:1))],j=i.map(({node:q})=>q).filter(Xe);function V(){let q=Ge(0,Ge(0,c,-1),-1).node,te=Ge(0,A,-1);return Xe(q)&&Rt(te)&&j.slice(0,-1).some(W=>W.arguments.some(Ia))}let N;return F||j.length>2&&j.some(q=>!q.arguments.every(te=>Cr(te)))||A.slice(0,-1).some(Rt)||V()?N=z(R):N=[Rt(v)||I?ms:"",yi([v,R])],Xa({memberChain:!0},N)}var n_=n0;function hu(t,e,r){let{node:s}=t,i=s.type==="NewExpression",a=jt(t),u=ur(s),p=s.type!=="TSImportType"&&s.typeArguments?r("typeArguments"):"",c=u.length===1&&c1(u[0],e.originalText);if(c||o_(t)||u_(t)||ku(s,t.parent)){let d=[];if(lu(t,()=>{d.push(r())}),!(c&&d[0].label?.embed))return[i?"new ":"",Um(t,r),a,p,"(",qe(", ",d),")"]}let m=s.type==="ImportExpression"||s.type==="TSImportType"||s.type==="TSExternalModuleReference";if(!m&&!i&&Gi(s.callee)&&!t.call(()=>ti(t,e),"callee",...s.callee.type==="ChainExpression"?["expression"]:[]))return n_(t,e,r);let f=[i?"new ":"",Um(t,r),a,p,Hp(t,e,r)];return m||Xe(s.callee)?z(f):f}function Um(t,e){let{node:r}=t;return r.type==="ImportExpression"?`import${r.phase?`.${r.phase}`:""}`:r.type==="TSImportType"?"import":r.type==="TSExternalModuleReference"?"require":e("callee")}var a_=["require","require.resolve","require.resolve.paths","import.meta.resolve"];function o_(t){let{node:e}=t;if(!(e.type==="ImportExpression"||e.type==="TSImportType"||e.type==="TSExternalModuleReference"||e.type==="CallExpression"&&!e.optional&&ih(e.callee,a_)))return!1;let r=ur(e);return r.length===1&&vt(r[0])&&!ue(r[0])}function u_(t){let{node:e}=t;if(e.type!=="CallExpression"||e.optional||e.callee.type!=="Identifier")return!1;let r=ur(e);return e.callee.name==="require"?(r.length===1&&vt(r[0])||r.length>1)&&!ue(r[0]):e.callee.name==="define"&&t.parent.type==="ExpressionStatement"?r.length===1||r.length===2&&r[0].type==="ArrayExpression"||r.length===3&&vt(r[0])&&r[1].type==="ArrayExpression":!1}function Ga(t,e,r,s,i,a){let u=c_(t,e,r,s,a),p=a?r(a,{assignmentLayout:u}):"";switch(u){case"break-after-operator":return z([z(s),i,z(ee([pe,p]))]);case"never-break-after-operator":return z([z(s),i," ",p]);case"fluid":{let c=Symbol("assignment");return z([z(s),i,z(ee(pe),{id:c}),Jr,Ba(p,{groupId:c})])}case"break-lhs":return z([s,i," ",z(p)]);case"chain":return[z(s),i,pe,p];case"chain-tail":return[z(s),i,ee([pe,p])];case"chain-tail-arrow-chain":return[z(s),i,p];case"only-left":return s}}function l_(t,e,r){let{node:s}=t;return Ga(t,e,r,r("left"),[" ",s.operator],"right")}function p_(t,e,r){return Ga(t,e,r,r("id")," =","init")}function c_(t,e,r,s,i){let{node:a}=t,u=a[i];if(!u)return"only-left";let p=!Yo(u);if(t.match(Yo,a0,f=>!p||f.type!=="ExpressionStatement"&&f.type!=="VariableDeclaration"))return p?u.type==="ArrowFunctionExpression"&&u.body.type==="ArrowFunctionExpression"?"chain-tail-arrow-chain":"chain-tail":"chain";if(!p&&Yo(u.right)||vr(e.originalText,u))return"break-after-operator";if(a.type==="ImportAttribute"||u.type==="CallExpression"&&u.callee.name==="require"||e.parser==="json5"||e.parser==="jsonc"||e.parser==="json")return"never-break-after-operator";let c=nN(s);if(d_(a)||y_(a)||o0(a)&&c)return"break-lhs";let m=g_(a,s,e);return t.call(()=>h_(t,e,r,m),i)?"break-after-operator":f_(a)?"break-lhs":!c&&(m||u.type==="TemplateLiteral"||u.type==="TaggedTemplateExpression"||RI(u)||zr(u)||u.type==="ClassExpression")?"never-break-after-operator":"fluid"}function h_(t,e,r,s){let i=t.node;if(ds(i)&&!_a(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"TSConditionalType":case"ConditionalTypeAnnotation":if(!e.experimentalTernaries&&!E_(i))break;return!0;case"ConditionalExpression":{if(!e.experimentalTernaries){let{test:m}=i;return ds(m)&&!_a(m)}let{consequent:p,alternate:c}=i;return p.type==="ConditionalExpression"||c.type==="ConditionalExpression"}case"ClassExpression":return st(i.decorators)}if(s)return!1;let a=i,u=[];for(;;)if(a.type==="UnaryExpression"||a.type==="AwaitExpression"||a.type==="YieldExpression"&&a.argument!==null)a=a.argument,u.push("argument");else if(a.type==="TSNonNullExpression")a=a.expression,u.push("expression");else break;return!!(vt(a)||t.call(()=>u0(t,e,r),...u))}function d_(t){if(a0(t)){let e=t.left||t.id;return e.type==="ObjectPattern"&&e.properties.length>2&&e.properties.some(r=>Ys(r)&&(!r.shorthand||r.value?.type==="AssignmentPattern"))}return!1}function Yo(t){return t.type==="AssignmentExpression"}function a0(t){return Yo(t)||t.type==="VariableDeclarator"}function f_(t){let e=m_(t);if(st(e)){let r=t.type==="TSTypeAliasDeclaration"?"constraint":"bound";if(e.length>1&&e.some(s=>s[r]||s.default))return!0}return!1}function m_(t){if(Op(t))return t.typeParameters?.params}function y_(t){if(t.type!=="VariableDeclarator")return!1;let{typeAnnotation:e}=t.id;if(!e||!e.typeAnnotation)return!1;let r=Vm(e.typeAnnotation);return st(r)&&r.length>1&&r.some(s=>st(Vm(s))||s.type==="TSConditionalType")}function o0(t){return t.type==="VariableDeclarator"&&t.init?.type==="ArrowFunctionExpression"}function Vm(t){let e;switch(t.type){case"GenericTypeAnnotation":e=t.typeParameters;break;case"TSTypeReference":e=t.typeArguments;break}return e?.params}function u0(t,e,r,s=!1){let{node:i}=t,a=()=>u0(t,e,r,!0);if(i.type==="ChainExpression"||i.type==="TSNonNullExpression")return t.call(a,"expression");if(Xe(i)){if(hu(t,e,r).label?.memberChain)return!1;let u=ur(i);return!(u.length===0||u.length===1&&lh(u[0],e))||D_(i,r)?!1:t.call(a,"callee")}return rt(i)?t.call(a,"object"):s&&(i.type==="Identifier"||i.type==="ThisExpression")}function g_(t,e,r){return Ys(t)?(e=xh(e),typeof e=="string"&&hn(e)<r.tabWidth+3):!1}function D_(t,e){let r=x_(t);if(st(r)){if(r.length>1)return!0;if(r.length===1){let i=r[0];if(Wr(i)||Ka(i)||i.type==="TSTypeLiteral"||i.type==="ObjectTypeAnnotation")return!0}let s=t.typeParameters?"typeParameters":"typeArguments";if(Rt(e(s)))return!0}return!1}function x_(t){return(t.typeParameters??t.typeArguments)?.params}function qm(t){switch(t.type){case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"TSFunctionType":return!!t.typeParameters;case"TSTypeReference":return!!t.typeArguments;default:return!1}}function E_(t){return qm(t.checkType)||qm(t.extendsType)}var Qo=new WeakMap;function l0(t){return/^(?:\d+|\d+\.\d+)$/u.test(t)}function Hm(t,e){return e.parser==="json"||e.parser==="jsonc"||!vt(t.key)||mn(Jt(t.key),e).slice(1,-1)!==t.key.value?!1:!!(MB(t.key.value)&&!(e.parser==="babel-ts"&&t.type==="ClassProperty"||(e.parser==="typescript"||e.parser==="oxc-ts")&&t.type==="PropertyDefinition")||l0(t.key.value)&&String(Number(t.key.value))===t.key.value&&t.type!=="ImportAttribute"&&(e.parser==="babel"||e.parser==="acorn"||e.parser==="oxc"||e.parser==="espree"||e.parser==="meriyah"||e.parser==="__babel_estree"))}function A_(t,e){let{key:r}=t.node;return(r.type==="Identifier"||zr(r)&&l0(Dn(Jt(r)))&&String(r.value)===Dn(Jt(r))&&!(e.parser==="typescript"||e.parser==="babel-ts"||e.parser==="oxc-ts"))&&(e.parser==="json"||e.parser==="jsonc"||e.quoteProps==="consistent"&&Qo.get(t.parent))}function Ya(t,e,r){let{node:s}=t;if(s.computed)return["[",r("key"),"]"];let{parent:i}=t,{key:a}=s;if(e.quoteProps==="consistent"&&!Qo.has(i)){let u=t.siblings.some(p=>!p.computed&&vt(p.key)&&!Hm(p,e));Qo.set(i,u)}if(A_(t,e)){let u=mn(JSON.stringify(a.type==="Identifier"?a.name:a.value.toString()),e);return t.call(()=>gr(t,u,e),"key")}return Hm(s,e)&&(e.quoteProps==="as-needed"||e.quoteProps==="consistent"&&!Qo.get(i))?t.call(()=>gr(t,/^\d/u.test(a.value)?Dn(a.value):a.value,e),"key"):r("key")}function Ql(t,e,r){let{node:s}=t;return s.shorthand?r("value"):Ga(t,e,r,Ya(t,e,r),":","value")}var C_=({node:t,key:e,parent:r})=>e==="value"&&t.type==="FunctionExpression"&&(r.type==="ObjectMethod"||r.type==="ClassMethod"||r.type==="ClassPrivateMethod"||r.type==="MethodDefinition"||r.type==="TSAbstractMethodDefinition"||r.type==="TSDeclareMethod"||r.type==="Property"&&Ja(r));function p0(t,e,r,s){if(C_(t))return bh(t,e,r);let{node:i}=t,a=!1;if((i.type==="FunctionDeclaration"||i.type==="FunctionExpression")&&s?.expandLastArg){let{parent:f}=t;Xe(f)&&(ur(f).length>1||_t(i).every(d=>d.type==="Identifier"&&!d.typeAnnotation))&&(a=!0)}let u=[or(t),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?r("id"):""],p=_i(t,e,r,a),c=Lu(t,r),m=Sn(i,c);return u.push(r("typeParameters"),z([m?z(p):p,c]),i.body?" ":"",r("body")),e.semi&&(i.declare||!i.body)&&u.push(";"),u}function zp(t,e,r){let{node:s}=t,{kind:i}=s,a=s.value||s,u=[];return!i||i==="init"||i==="method"||i==="constructor"?a.async&&u.push("async "):u.push(i," "),a.generator&&u.push("*"),u.push(Ya(t,e,r),s.optional?"?":"",s===a?bh(t,e,r):r("value")),u}function bh(t,e,r){let{node:s}=t,i=_i(t,e,r),a=Lu(t,r),u=NB(s),p=Sn(s,a),c=[r("typeParameters"),z([u?z(i,{shouldBreak:!0}):p?z(i):i,a])];return s.body?c.push(" ",r("body")):c.push(e.semi?";":""),c}function b_(t){let e=_t(t);return e.length===1&&!t.typeParameters&&!ue(t,fe.Dangling)&&e[0].type==="Identifier"&&!e[0].typeAnnotation&&!ue(e[0])&&!e[0].optional&&!t.predicate&&!t.returnType}function c0(t,e){if(e.arrowParens==="always")return!1;if(e.arrowParens==="avoid"){let{node:r}=t;return b_(r)}return!1}function Lu(t,e){let{node:r}=t,s=[Pt(t,e,"returnType")];return r.predicate&&s.push(e("predicate")),s}function h0(t,e,r){let{node:s}=t,i=[];if(s.argument){let p=r("argument");S_(e,s.argument)?p=["(",ee([re,p]),re,")"]:(ds(s.argument)||e.experimentalTernaries&&s.argument.type==="ConditionalExpression"&&(s.argument.consequent.type==="ConditionalExpression"||s.argument.alternate.type==="ConditionalExpression"))&&(p=z([Fe("("),ee([Z,p]),Z,Fe(")")])),i.push(" ",p)}let a=ue(s,fe.Dangling),u=e.semi&&a&&ue(s,fe.Last|fe.Line);return u&&i.push(";"),a&&i.push(" ",tt(t,e)),!u&&e.semi&&i.push(";"),i}function T_(t,e,r){return["return",h0(t,e,r)]}function v_(t,e,r){return["throw",h0(t,e,r)]}function S_(t,e){if(vr(t.originalText,e)||ue(e,fe.Leading,r=>ar(t.originalText,Re(r),Me(r)))&&!Tt(e))return!0;if(ah(e)){let r=e,s;for(;s=OI(r);)if(r=s,vr(t.originalText,r))return!0}return!1}function w_(t,e){if(e.semi||f0(t,e)||y0(t,e)||m0(t,e))return!1;let{node:r,key:s,parent:i}=t;return!!(r.type==="ExpressionStatement"&&(s==="body"&&(i.type==="Program"||i.type==="BlockStatement"||i.type==="StaticBlock"||i.type==="TSModuleBlock")||s==="consequent"&&i.type==="SwitchCase")&&t.call(()=>d0(t,e),"expression"))}function d0(t,e){let{node:r}=t;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!c0(t,e))return!0;break;case"UnaryExpression":{let{prefix:s,operator:i}=r;if(s&&(i==="+"||i==="-"))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(Tt(r))return!0}return ti(t,e)?!0:ah(r)?t.call(()=>d0(t,e),...n1(r)):!1}var Th=({node:t,parent:e})=>t.type==="ExpressionStatement"&&e.type==="Program"&&e.body.length===1&&(Array.isArray(e.directives)&&e.directives.length===0||!e.directives);function f0(t,e){return(e.parentParser==="markdown"||e.parentParser==="mdx")&&Th(t)&&Tt(t.node.expression)}function m0(t,e){return e.__isHtmlInlineEventHandler&&Th(t)}function y0(t,e){return(e.parser==="__vue_event_binding"||e.parser==="__vue_ts_event_binding")&&Th(t)}var P_=class extends Error{name="UnexpectedNodeError";constructor(e,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},wn=P_;function F_(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var k_=class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let r=this.#e,s=0;for(let i=0;i<e.length&&r.has(e.charAt(i));i++)s++;return s}getTrailingWhitespaceCount(e){let r=this.#e,s=0;for(let i=e.length-1;i>=0&&r.has(e.charAt(i));i--)s++;return s}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(Ge(0,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let s=`[${F_([...this.#e].join(""))}]+`,i=new RegExp(r?`(${s})`:s,"u");return e.split(i)}hasWhitespaceCharacter(e){let r=this.#e;return Array.prototype.some.call(e,s=>r.has(s))}hasNonWhitespaceCharacter(e){let r=this.#e;return Array.prototype.some.call(e,s=>!r.has(s))}isWhitespaceOnly(e){let r=this.#e;return Array.prototype.every.call(e,s=>r.has(s))}#t(e){let r=Number.POSITIVE_INFINITY;for(let s of e.split(`
|
|
81
|
-
`)){if(s.length===0)continue;let i=this.getLeadingWhitespaceCount(s);if(i===0)return 0;s.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(e){let r=this.#t(e);return r===0?e:e.split(`
|
|
82
|
-
`).map(s=>s.slice(r)).join(`
|
|
83
|
-
`)}},I_=k_,Zo=new I_(`
|
|
84
|
-
\r `),Zl=t=>t===""||t===pe||t===re||t===Z;function N_(t,e,r){let{node:s}=t;if(s.type==="JSXElement"&&K_(s))return[r("openingElement"),r("closingElement")];let i=s.type==="JSXElement"?r("openingElement"):r("openingFragment"),a=s.type==="JSXElement"?r("closingElement"):r("closingFragment");if(s.children.length===1&&s.children[0].type==="JSXExpressionContainer"&&(s.children[0].expression.type==="TemplateLiteral"||s.children[0].expression.type==="TaggedTemplateExpression"))return[i,...t.map(r,"children"),a];s.children=s.children.map(v=>X_(v)?{type:"JSXText",value:" ",raw:" "}:v);let u=s.children.some(Tt),p=s.children.filter(v=>v.type==="JSXExpressionContainer").length>1,c=s.type==="JSXElement"&&s.openingElement.attributes.length>1,m=Rt(i)||u||c||p,f=t.parent.rootMarker==="mdx",d=e.singleQuote?"{' '}":'{" "}',D=f?pe:Fe([d,Z]," "),y=s.openingElement?.name?.name==="fbt",x=B_(t,e,r,D,y),E=s.children.some(v=>La(v));for(let v=x.length-2;v>=0;v--){let P=x[v]===""&&x[v+1]==="",S=x[v]===re&&x[v+1]===""&&x[v+2]===re,F=(x[v]===Z||x[v]===re)&&x[v+1]===""&&x[v+2]===D,B=x[v]===D&&x[v+1]===""&&(x[v+2]===Z||x[v+2]===re),I=x[v]===D&&x[v+1]===""&&x[v+2]===D,R=x[v]===Z&&x[v+1]===""&&x[v+2]===re||x[v]===re&&x[v+1]===""&&x[v+2]===Z;S&&E||P||F||I||R?x.splice(v,2):B&&x.splice(v+1,2)}for(;x.length>0&&Zl(Ge(0,x,-1));)x.pop();for(;x.length>1&&Zl(x[0])&&Zl(x[1]);)x.shift(),x.shift();let C=[""];for(let[v,P]of x.entries()){if(P===D){if(v===1&&aN(x[v-1])){if(x.length===2){C.push([C.pop(),d]);continue}C.push([d,re],"");continue}else if(v===x.length-1){C.push([C.pop(),d]);continue}else if(x[v-1]===""&&x[v-2]===re){C.push([C.pop(),d]);continue}}v%2===0?C.push([C.pop(),P]):C.push(P,""),Rt(P)&&(m=!0)}let b=E?N1(C):z(C,{shouldBreak:!0});if(e.cursorNode?.type==="JSXText"&&s.children.includes(e.cursorNode)?b=[Fo,b,Fo]:e.nodeBeforeCursor?.type==="JSXText"&&s.children.includes(e.nodeBeforeCursor)?b=[Fo,b]:e.nodeAfterCursor?.type==="JSXText"&&s.children.includes(e.nodeAfterCursor)&&(b=[b,Fo]),f)return b;let A=z([i,ee([re,b]),re,a]);return m?A:yi([z([i,...x,a]),A])}function B_(t,e,r,s,i){let a="",u=[a];function p(m){a=m,u.push([u.pop(),m])}function c(m){m!==""&&(a=m,u.push(m,""))}return t.each(({node:m,next:f})=>{if(m.type==="JSXText"){let d=Jt(m);if(La(m)){let D=Zo.split(d,!0);D[0]===""&&(D.shift(),/\n/u.test(D[0])?c(Wm(i,D[1],m,f)):c(s),D.shift());let y;if(Ge(0,D,-1)===""&&(D.pop(),y=D.pop()),D.length===0)return;for(let[x,E]of D.entries())x%2===1?c(pe):p(E);y!==void 0?/\n/u.test(y)?c(Wm(i,a,m,f)):c(s):c(zm(i,a,m,f))}else/\n/u.test(d)?d.match(/\n/gu).length>1&&c(re):c(s)}else{let d=r();if(p(d),f&&La(f)){let D=Zo.trim(Jt(f)),[y]=Zo.split(D);c(zm(i,y,m,f))}else c(re)}},"children"),u}function zm(t,e,r,s){return t?"":r.type==="JSXElement"&&!r.closingElement||s?.type==="JSXElement"&&!s.closingElement?e.length===1?Z:re:Z}function Wm(t,e,r,s){return t?re:e.length===1?r.type==="JSXElement"&&!r.closingElement||s?.type==="JSXElement"&&!s.closingElement?re:Z:re}var __=Ne(["ArrayExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","NewExpression","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot","MatchExpressionCase"]);function L_(t,e,r){let{parent:s}=t;if(__(s))return e;let i=O_(t),a=ti(t,r);return z([a?"":Fe("("),ee([Z,e]),Z,a?"":Fe(")")],{shouldBreak:i})}function O_(t){return t.match(void 0,(e,r)=>r==="body"&&e.type==="ArrowFunctionExpression",(e,r)=>r==="arguments"&&Xe(e))&&(t.match(void 0,void 0,void 0,(e,r)=>r==="expression"&&e.type==="JSXExpressionContainer")||t.match(void 0,void 0,void 0,(e,r)=>r==="expression"&&e.type==="ChainExpression",(e,r)=>r==="expression"&&e.type==="JSXExpressionContainer"))}function M_(t,e,r){let{node:s}=t,i=[r("name")];if(s.value){let a;if(vt(s.value)){let u=Jt(s.value),p=bt(0,bt(0,u.slice(1,-1),"'","'"),""",'"'),c=ZD(p,e.jsxSingleQuote);p=c==='"'?bt(0,p,'"',"""):bt(0,p,"'","'"),a=t.call(()=>gr(t,Ei(c+p+c),e),"value")}else a=r("value");i.push("=",a)}return i}function $_(t,e,r){let{node:s}=t,i=(a,u)=>a.type==="JSXEmptyExpression"||!ue(a)&&(kt(a)||Sr(a)||a.type==="ArrowFunctionExpression"||a.type==="AwaitExpression"&&(i(a.argument,a)||a.argument.type==="JSXElement")||Xe(a)||a.type==="ChainExpression"&&Xe(a.expression)||a.type==="FunctionExpression"||a.type==="TemplateLiteral"||a.type==="TaggedTemplateExpression"||a.type==="DoExpression"||Tt(u)&&(a.type==="ConditionalExpression"||ds(a)));return i(s.expression,t.parent)?z(["{",r("expression"),Jr,"}"]):z(["{",ee([Z,r("expression")]),Z,Jr,"}"])}function R_(t,e,r){let{node:s}=t,i=ue(s.name)||ue(s.typeArguments);if(s.selfClosing&&s.attributes.length===0&&!i)return["<",r("name"),r("typeArguments")," />"];if(s.attributes?.length===1&&vt(s.attributes[0].value)&&!s.attributes[0].value.value.includes(`
|
|
85
|
-
`)&&!i&&!ue(s.attributes[0]))return z(["<",r("name"),r("typeArguments")," ",...t.map(r,"attributes"),s.selfClosing?" />":">"]);let a=s.attributes?.some(p=>vt(p.value)&&p.value.value.includes(`
|
|
86
|
-
`)),u=e.singleAttributePerLine&&s.attributes.length>1?re:pe;return z(["<",r("name"),r("typeArguments"),ee(t.map(()=>[u,r()],"attributes")),...j_(s,e,i)],{shouldBreak:a})}function j_(t,e,r){return t.selfClosing?[pe,"/>"]:U_(t,e,r)?[">"]:[Z,">"]}function U_(t,e,r){let s=t.attributes.length>0&&ue(Ge(0,t.attributes,-1),fe.Trailing);return t.attributes.length===0&&!r||(e.bracketSameLine||e.jsxBracketSameLine)&&(!r||t.attributes.length>0)&&!s}function V_(t,e,r){let{node:s}=t,i=["</"],a=r("name");return ue(s.name,fe.Leading|fe.Line)?i.push(ee([re,a]),re):ue(s.name,fe.Leading|fe.Block)?i.push(" ",a):i.push(a),i.push(">"),i}function q_(t,e){let{node:r}=t,s=ue(r),i=ue(r,fe.Line),a=r.type==="JSXOpeningFragment";return[a?"<":"</",ee([i?re:s&&!a?" ":"",tt(t,e)]),i?re:"",">"]}function H_(t,e,r){let s=gr(t,N_(t,e,r),e);return L_(t,s,e)}function z_(t,e){let{node:r}=t,s=ue(r,fe.Line);return[tt(t,e,{indent:s}),s?re:""]}function W_(t,e,r){let{node:s}=t;return["{",t.call(({node:i})=>{let a=["...",r()];return ue(i)?[ee([Z,gr(t,a,e)]),Z]:a},s.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function J_(t,e,r){let{node:s}=t;if(s.type.startsWith("JSX"))switch(s.type){case"JSXAttribute":return M_(t,e,r);case"JSXIdentifier":return s.name;case"JSXNamespacedName":return qe(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return qe(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return W_(t,e,r);case"JSXExpressionContainer":return $_(t,e,r);case"JSXFragment":case"JSXElement":return H_(t,e,r);case"JSXOpeningElement":return R_(t,e,r);case"JSXClosingElement":return V_(t,e,r);case"JSXOpeningFragment":case"JSXClosingFragment":return q_(t,e);case"JSXEmptyExpression":return z_(t,e);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new wn(s,"JSX")}}function K_(t){if(t.children.length===0)return!0;if(t.children.length>1)return!1;let e=t.children[0];return e.type==="JSXText"&&!La(e)}function La(t){return t.type==="JSXText"&&(Zo.hasNonWhitespaceCharacter(Jt(t))||!/\n/u.test(Jt(t)))}function X_(t){return t.type==="JSXExpressionContainer"&&vt(t.expression)&&t.expression.value===" "&&!ue(t.expression)}function G_(t){let{node:e,parent:r}=t;if(!Tt(e)||!Tt(r))return!1;let{index:s,siblings:i}=t,a;for(let u=s;u>0;u--){let p=i[u-1];if(!(p.type==="JSXText"&&!La(p))){a=p;break}}return a?.type==="JSXExpressionContainer"&&a.expression.type==="JSXEmptyExpression"&&Iu(a.expression)}function Y_(t){return Iu(t.node)||G_(t)}var vh=Y_;function Q_(t,e,r){let{node:s}=t;if(s.type.startsWith("NG"))switch(s.type){case"NGRoot":return r("node");case"NGPipeExpression":return X1(t,e,r);case"NGChainedExpression":return z(qe([";",pe],t.map(()=>t8(t)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return t.map(()=>[t.isFirst?"":Jm(t)?" ":[";",pe],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/iu.test(s.name)?s.name:JSON.stringify(s.name);case"NGMicrosyntaxExpression":return[r("expression"),s.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:i,parent:a}=t,u=Jm(t)||Z_(t)||(i===1&&(s.key.name==="then"||s.key.name==="else"||s.key.name==="as")||i===2&&(s.key.name==="else"&&a.body[i-1].type==="NGMicrosyntaxKeyedExpression"&&a.body[i-1].key.name==="then"||s.key.name==="track"))&&a.body[0].type==="NGMicrosyntaxExpression";return[r("key"),u?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),s.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new wn(s,"Angular")}}function Jm({node:t,index:e}){return t.type==="NGMicrosyntaxKeyedExpression"&&t.key.name==="of"&&e===1}function Z_(t){let{node:e}=t;return t.parent.body[1].key.name==="of"&&e.type==="NGMicrosyntaxKeyedExpression"&&e.key.name==="track"&&e.key.type==="NGMicrosyntaxKey"}var e8=Ne(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function t8({node:t}){return _p(t,e8)}function g0(t,e,r){let{node:s}=t;return z([qe(pe,t.map(r,"decorators")),D0(s,e)?re:pe])}function r8(t,e,r){return x0(t.node)?[qe(re,t.map(r,"declaration","decorators")),re]:""}function s8(t,e,r){let{node:s,parent:i}=t,{decorators:a}=s;if(!st(a)||x0(i)||vh(t))return"";let u=s.type==="ClassExpression"||s.type==="ClassDeclaration"||D0(s,e);return[t.key==="declaration"&&MI(i)?re:u?ms:"",qe(pe,t.map(r,"decorators")),pe]}function D0(t,e){return t.decorators.some(r=>Wt(e.originalText,Me(r)))}function x0(t){if(t.type!=="ExportDefaultDeclaration"&&t.type!=="ExportNamedDeclaration"&&t.type!=="DeclareExportDeclaration")return!1;let e=t.declaration?.decorators;return st(e)&&Fu(t,e[0])}var ep=new WeakMap;function E0(t){return ep.has(t)||ep.set(t,t.type==="ConditionalExpression"&&!Mt(t,e=>e.type==="ObjectExpression")),ep.get(t)}var i8=t=>t.type==="SequenceExpression";function n8(t,e,r,s={}){let i=[],a,u=[],p=!1,c=!s.expandLastArg&&t.node.body.type==="ArrowFunctionExpression",m;(function b(){let{node:A}=t,v=a8(t,e,r,s);if(i.length===0)i.push(v);else{let{leading:P,trailing:S}=Nu(t,e);i.push([P,v]),u.unshift(S)}c&&(p||(p=A.returnType&&_t(A).length>0||A.typeParameters||_t(A).some(P=>P.type!=="Identifier"))),!c||A.body.type!=="ArrowFunctionExpression"?(a=r("body",s),m=A.body):t.call(b,"body")})();let f=!vr(e.originalText,m)&&(i8(m)||o8(m,a,e)||!p&&E0(m)),d=t.key==="callee"&&gn(t.parent),D=Symbol("arrow-chain"),y=u8(t,s,{signatureDocs:i,shouldBreak:p}),x=!1,E=!1,C=!1;return c&&(d||s.assignmentLayout)&&(E=!0,C=!ue(t.node,fe.Leading&fe.Line),x=s.assignmentLayout==="chain-tail-arrow-chain"||d&&!f),a=l8(t,e,s,{bodyDoc:a,bodyComments:u,functionBody:m,shouldPutBodyOnSameLine:f}),z([z(E?ee([C?Z:"",y]):y,{shouldBreak:x,id:D})," =>",c?Ba(a,{groupId:D}):z(a),c&&d?Fe(Z,"",{groupId:D}):""])}function a8(t,e,r,s){let{node:i}=t,a=[];if(i.async&&a.push("async "),c0(t,e))a.push(r(["params",0]));else{let p=s.expandLastArg||s.expandFirstArg,c=Lu(t,r);if(p){if(Rt(c))throw new cu;c=z(pu(c))}a.push(z([_i(t,e,r,p,!0),c]))}let u=tt(t,e,{filter(p){let c=bn(e.originalText,Me(p));return c!==!1&&e.originalText.slice(c,c+2)==="=>"}});return u&&a.push(" ",u),a}function o8(t,e,r){return kt(t)||Sr(t)||t.type==="ArrowFunctionExpression"||t.type==="DoExpression"||t.type==="BlockStatement"||Tt(t)||e.label?.hug!==!1&&(e.label?.embed||c1(t,r.originalText))}function u8(t,e,{signatureDocs:r,shouldBreak:s}){if(r.length===1)return r[0];let{parent:i,key:a}=t;return a!=="callee"&&gn(i)||ds(i)?z([r[0]," =>",ee([pe,qe([" =>",pe],r.slice(1))])],{shouldBreak:s}):a==="callee"&&gn(i)||e.assignmentLayout?z(qe([" =>",pe],r),{shouldBreak:s}):z(ee(qe([" =>",pe],r)),{shouldBreak:s})}function l8(t,e,r,{bodyDoc:s,bodyComments:i,functionBody:a,shouldPutBodyOnSameLine:u}){let{node:p,parent:c}=t,m=r.expandLastArg&&Gr(e,"all")?Fe(","):"",f=(r.expandLastArg||c.type==="JSXExpressionContainer")&&!ue(p)?Z:"";return u&&E0(a)?[" ",z([Fe("","("),ee([Z,s]),Fe("",")"),m,f]),i]:u?[" ",s,i]:[ee([pe,s,i]),m,f]}var p8=Array.prototype.findLast??function(t){for(let e=this.length-1;e>=0;e--){let r=this[e];if(t(r,e,this))return r}},c8=Zc("findLast",function(){if(Array.isArray(this))return p8}),h8=c8;function Wp(t,e,r,s){let{node:i}=t,a=[],u=h8(0,i[s],p=>p.type!=="EmptyStatement");return t.each(({node:p})=>{p.type!=="EmptyStatement"&&(a.push(r()),p!==u&&(a.push(re),Yr(p,e)&&a.push(re)))},s),a}function A0(t,e,r){let s=d8(t,e,r),{node:i,parent:a}=t;if(i.type==="Program"&&a?.type!=="ModuleExpression")return s?[s,re]:"";let u=[];if(i.type==="StaticBlock"&&u.push("static "),u.push("{"),s)u.push(ee([re,s]),re);else{let p=t.grandparent;a.type==="ArrowFunctionExpression"||a.type==="FunctionExpression"||a.type==="FunctionDeclaration"||a.type==="ComponentDeclaration"||a.type==="HookDeclaration"||a.type==="ObjectMethod"||a.type==="ClassMethod"||a.type==="ClassPrivateMethod"||a.type==="ForStatement"||a.type==="WhileStatement"||a.type==="DoWhileStatement"||a.type==="DoExpression"||a.type==="ModuleExpression"||a.type==="CatchClause"&&!p.finalizer||a.type==="TSModuleDeclaration"||a.type==="MatchStatementCase"||i.type==="StaticBlock"||u.push(re)}return u.push("}"),u}function d8(t,e,r){let{node:s}=t,i=st(s.directives),a=s.body.some(c=>c.type!=="EmptyStatement"),u=ue(s,fe.Dangling);if(!i&&!a&&!u)return"";let p=[];return i&&(p.push(Wp(t,e,r,"directives")),(a||u)&&(p.push(re),Yr(Ge(0,s.directives,-1),e)&&p.push(re))),a&&p.push(Wp(t,e,r,"body")),u&&p.push(tt(t,e)),p}function f8(t){let e=new WeakMap;return function(r){return e.has(r)||e.set(r,Symbol(t)),e.get(r)}}var m8=f8;function Sh(t,e,r){let{node:s}=t,i=[],a=s.type==="ObjectTypeAnnotation",u=!C0(t),p=u?pe:re,c=ue(s,fe.Dangling),[m,f]=a&&s.exact?["{|","|}"]:"{}",d;if(y8(t,({node:D,next:y,isLast:x})=>{if(d??(d=D),i.push(r()),u&&a){let{parent:E}=t;E.inexact||!x?i.push(","):Gr(e)&&i.push(Fe(","))}!u&&(g8({node:D,next:y},e)||T0({node:D,next:y},e))&&i.push(";"),x||(i.push(p),Yr(D,e)&&i.push(re))}),c&&i.push(tt(t,e)),s.type==="ObjectTypeAnnotation"&&s.inexact){let D;ue(s,fe.Dangling)?D=[ue(s,fe.Line)||Wt(e.originalText,Me(Ge(0,Di(s),-1)))?re:pe,"..."]:D=[d?pe:"","..."],i.push(D)}if(u){let D=c||e.objectWrap==="preserve"&&d&&ar(e.originalText,Re(s),Re(d)),y;if(i.length===0)y=m+f;else{let x=e.bracketSpacing?pe:Z;y=[m,ee([x,...i]),x,f]}return t.match(void 0,(x,E)=>E==="typeAnnotation",(x,E)=>E==="typeAnnotation",Da)||t.match(void 0,(x,E)=>x.type==="FunctionTypeParam"&&E==="typeAnnotation",Da)?y:z(y,{shouldBreak:D})}return[m,i.length>0?[ee([re,i]),re]:"",f]}function C0(t){let{node:e}=t;if(e.type==="ObjectTypeAnnotation"){let{key:r,parent:s}=t;return r==="body"&&(s.type==="InterfaceDeclaration"||s.type==="DeclareInterface"||s.type==="DeclareClass")}return e.type==="ClassBody"||e.type==="TSInterfaceBody"}function y8(t,e){let{node:r}=t;if(r.type==="ClassBody"||r.type==="TSInterfaceBody"){t.each(e,"body");return}if(r.type==="TSTypeLiteral"){t.each(e,"members");return}if(r.type==="ObjectTypeAnnotation"){let s=["properties","indexers","callProperties","internalSlots"].flatMap(i=>t.map(({node:a,index:u})=>({node:a,loc:Re(a),selector:[i,u]}),i)).sort((i,a)=>i.loc-a.loc);for(let[i,{node:a,selector:u}]of s.entries())t.call(()=>e({node:a,next:s[i+1]?.node,isLast:i===s.length-1}),...u)}}function us(t,e){let{parent:r}=t;return t.callParent(C0)?e.semi||r.type==="ObjectTypeAnnotation"?";":"":r.type==="TSTypeLiteral"?t.isLast?e.semi?Fe(";"):"":e.semi||T0({node:t.node,next:t.next},e)?";":Fe("",";"):""}var Km=Ne(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]),b0=t=>{if(t.computed||t.typeAnnotation)return!1;let{type:e,name:r}=t.key;return e==="Identifier"&&(r==="static"||r==="get"||r==="set")};function g8({node:t,next:e},r){if(r.semi||!Km(t))return!1;if(!t.value&&b0(t))return!0;if(!e||e.static||e.accessibility||e.readonly)return!1;if(!e.computed){let s=e.key?.name;if(s==="in"||s==="instanceof")return!0}if(Km(e)&&e.variance&&!e.static&&!e.declare)return!0;switch(e.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return e.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((e.value?e.value.async:e.async)||e.kind==="get"||e.kind==="set")return!1;let s=e.value?e.value.generator:e.generator;return!!(e.computed||s)}case"TSIndexSignature":return!0}return!1}var D8=Ne(["TSPropertySignature"]);function T0({node:t,next:e},r){return r.semi||!D8(t)?!1:b0(t)?!0:e?e.type==="TSCallSignatureDeclaration":!1}var x8=m8("heritageGroup"),E8=Ne(["TSInterfaceDeclaration","DeclareInterface","InterfaceDeclaration","InterfaceTypeAnnotation"]);function wh(t,e,r){let{node:s}=t,i=E8(s),a=[or(t),Bu(t),i?"interface":"class"],u=S0(t),p=[],c=[];if(s.type!=="InterfaceTypeAnnotation"){s.id&&p.push(" ");for(let f of["id","typeParameters"])if(s[f]){let{leading:d,trailing:D}=t.call(()=>Nu(t,e),f);p.push(d,r(f),ee(D))}}if(s.superClass){let f=[b8(t,e,r),r(s.superTypeArguments?"superTypeArguments":"superTypeParameters")],d=t.call(()=>["extends ",gr(t,f,e)],"superClass");u?c.push(pe,z(d)):c.push(" ",d)}else c.push(rp(t,e,r,"extends"));c.push(rp(t,e,r,"mixins"),rp(t,e,r,"implements"));let m;return u?(m=x8(s),a.push(z([...p,ee(c)],{id:m}))):a.push(...p,...c),!i&&u&&A8(s.body)?a.push(Fe(re," ",{groupId:m})):a.push(" "),a.push(r("body")),a}function A8(t){return t.type==="ObjectTypeAnnotation"?["properties","indexers","callProperties","internalSlots"].some(e=>st(t[e])):st(t.body)}function v0(t){let e=t.superClass?1:0;for(let r of["extends","mixins","implements"])if(Array.isArray(t[r])&&(e+=t[r].length),e>1)return!0;return e>1}function C8(t){let{node:e}=t;if(ue(e.id,fe.Trailing)||ue(e.typeParameters,fe.Trailing)||ue(e.superClass)||v0(e))return!0;if(e.superClass)return t.parent.type==="AssignmentExpression"?!1:!(e.superTypeArguments??e.superTypeParameters)&&rt(e.superClass);let r=e.extends?.[0]??e.mixins?.[0]??e.implements?.[0];return r?r.type==="InterfaceExtends"&&r.id.type==="QualifiedTypeIdentifier"&&!r.typeParameters||(r.type==="TSClassImplements"||r.type==="TSInterfaceHeritage")&&rt(r.expression)&&!r.typeArguments:!1}var tp=new WeakMap;function S0(t){let{node:e}=t;return tp.has(e)||tp.set(e,C8(t)),tp.get(e)}function rp(t,e,r,s){let{node:i}=t;if(!st(i[s]))return"";let a=tt(t,e,{marker:s}),u=qe([",",pe],t.map(r,s));if(!v0(i)){let p=[`${s} `,a,u];return S0(t)?[pe,z(p)]:[" ",p]}return[pe,a,a&&re,s,z(ee([pe,u]))]}function b8(t,e,r){let s=r("superClass"),{parent:i}=t;return i.type==="AssignmentExpression"?z(Fe(["(",ee([Z,s]),Z,")"],s)):s}function w0(t,e,r){let{node:s}=t,i=[];return st(s.decorators)&&i.push(g0(t,e,r)),i.push(_u(s)),s.static&&i.push("static "),i.push(Bu(t)),s.override&&i.push("override "),i.push(zp(t,e,r)),i}function P0(t,e,r){let{node:s}=t,i=[];st(s.decorators)&&i.push(g0(t,e,r)),i.push(or(t),_u(s)),s.static&&i.push("static "),i.push(Bu(t)),s.override&&i.push("override "),s.readonly&&i.push("readonly "),s.variance&&i.push(r("variance")),(s.type==="ClassAccessorProperty"||s.type==="AccessorProperty"||s.type==="TSAbstractAccessorProperty")&&i.push("accessor "),i.push(Ya(t,e,r),jt(t),K1(t),Pt(t,r));let a=s.type==="TSAbstractPropertyDefinition"||s.type==="TSAbstractAccessorProperty";return[Ga(t,e,r,i," =",a?void 0:"value"),e.semi?";":""]}var T8=Ne(["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"]);function F0(t){return T8(t)?F0(t.expression):t}var v8=Ne(["FunctionExpression","ArrowFunctionExpression"]);function S8(t){return t.type==="MemberExpression"||t.type==="OptionalMemberExpression"||t.type==="Identifier"&&t.name!=="undefined"}function w8(t,e){if(y0(t,e)){let r=F0(t.node.expression);return v8(r)||S8(r)}return!(!e.semi||f0(t,e)||m0(t,e))}function P8(t,e,r){return[r("expression"),w8(t,e)?";":""]}function F8(t,e,r){if(e.__isVueBindings||e.__isVueForBindingLeft){let s=t.map(r,"program","body",0,"params");if(s.length===1)return s[0];let i=qe([",",pe],s);return e.__isVueForBindingLeft?["(",ee([Z,z(i)]),Z,")"]:i}if(e.__isEmbeddedTypescriptGenericParameters){let s=t.map(r,"program","body",0,"typeParameters","params");return qe([",",pe],s)}}function k8(t,e){let{node:r}=t;switch(r.type){case"RegExpLiteral":return Xm(r);case"BigIntLiteral":return Jp(r.extra.raw);case"NumericLiteral":return Dn(r.extra.raw);case"StringLiteral":return Ei(mn(r.extra.raw,e));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DirectiveLiteral":return Gm(r.extra.raw,e);case"Literal":{if(r.regex)return Xm(r.regex);if(r.bigint)return Jp(r.raw);let{value:s}=r;return typeof s=="number"?Dn(r.raw):typeof s=="string"?I8(t)?Gm(r.raw,e):Ei(mn(r.raw,e)):String(s)}}}function I8(t){if(t.key!=="expression")return;let{parent:e}=t;return e.type==="ExpressionStatement"&&typeof e.directive=="string"}function Jp(t){return t.toLowerCase()}function Xm({pattern:t,flags:e}){return e=[...e].sort().join(""),`/${t}/${e}`}var N8="use strict";function Gm(t,e){let r=t.slice(1,-1);if(r===N8||!(r.includes('"')||r.includes("'"))){let s=e.singleQuote?"'":'"';return s+r+s}return t}function B8(t,e,r){let s=t.originalText.slice(e,r);for(let i of t[Symbol.for("comments")]){let a=Re(i);if(a>r)break;let u=Me(i);if(u<e)continue;let p=a-e,c=u-e;s=s.slice(0,p)+bt(0,s.slice(p,c),/[^\n]/gu," ")+s.slice(c)}return s}var Ou=B8,k0=Ne(["ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportDeclaration","DeclareExportAllDeclaration"]),_8=Ne(["EnumBooleanBody","EnumNumberBody","EnumBigIntBody","EnumStringBody","EnumSymbolBody"]);function Ph(t,e,r){let{node:s,parent:i}=t,a=_8(s),u=s.type==="TSEnumBody"||a,p=k0(s),c=a&&s.hasUnknownMembers,m=u?"members":p?"attributes":"properties",f=s[m],d=u||s.type==="ObjectPattern"&&i.type!=="FunctionDeclaration"&&i.type!=="FunctionExpression"&&i.type!=="ArrowFunctionExpression"&&i.type!=="ObjectMethod"&&i.type!=="ClassMethod"&&i.type!=="ClassPrivateMethod"&&i.type!=="AssignmentPattern"&&i.type!=="CatchClause"&&s.properties.some(C=>C.value&&(C.value.type==="ObjectPattern"||C.value.type==="ArrayPattern"))||s.type!=="ObjectPattern"&&e.objectWrap==="preserve"&&f.length>0&&L8(s,f[0],e),D=[],y=t.map(({node:C})=>{let b=[...D,z(r())];return D=[",",pe],Yr(C,e)&&D.push(re),b},m);if(c){let C;if(ue(s,fe.Dangling)){let b=ue(s,fe.Line);C=[tt(t,e),b||Wt(e.originalText,Me(Ge(0,Di(s),-1)))?re:pe,"..."]}else C=["..."];y.push([...D,...C])}let x=!(c||Ge(0,f,-1)?.type==="RestElement"),E;if(y.length===0){if(!ue(s,fe.Dangling))return["{}",Pt(t,r)];E=z(["{",tt(t,e,{indent:!0}),Z,"}",jt(t),Pt(t,r)])}else{let C=e.bracketSpacing?pe:Z;E=["{",ee([C,...y]),Fe(x&&Gr(e)?",":""),C,"}",jt(t),Pt(t,r)]}return t.match(C=>C.type==="ObjectPattern"&&!st(C.decorators),Da)||Ws(s)&&(t.match(void 0,(C,b)=>b==="typeAnnotation",(C,b)=>b==="typeAnnotation",Da)||t.match(void 0,(C,b)=>C.type==="FunctionTypeParam"&&b==="typeAnnotation",Da))||!d&&t.match(C=>C.type==="ObjectPattern",C=>C.type==="AssignmentExpression"||C.type==="VariableDeclarator")?E:z(E,{shouldBreak:d})}function L8(t,e,r){let s=r.originalText,i=Re(t),a=Re(e);if(k0(t)){let u=Re(t),p=Ou(r,u,a);i=u+p.lastIndexOf("{")}return ar(s,i,a)}function O8(t,e,r){let{node:s}=t;return["import",s.phase?` ${s.phase}`:"",B0(s),L0(t,e,r),_0(t,e,r),M0(t,e,r),e.semi?";":""]}var I0=t=>t.type==="ExportDefaultDeclaration"||t.type==="DeclareExportDeclaration"&&t.default;function N0(t,e,r){let{node:s}=t,i=[r8(t,e,r),or(t),"export",I0(s)?" default":""],{declaration:a,exported:u}=s;return ue(s,fe.Dangling)&&(i.push(" ",tt(t,e)),h1(s)&&i.push(re)),a?i.push(" ",r("declaration")):(i.push(R8(s)),s.type==="ExportAllDeclaration"||s.type==="DeclareExportAllDeclaration"?(i.push(" *"),u&&i.push(" as ",r("exported"))):i.push(L0(t,e,r)),i.push(_0(t,e,r),M0(t,e,r))),i.push($8(s,e)),i}var M8=Ne(["ClassDeclaration","ComponentDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareComponent","DeclareFunction","DeclareHook","HookDeclaration","TSDeclareFunction","EnumDeclaration"]);function $8(t,e){return e.semi&&(!t.declaration||I0(t)&&!M8(t.declaration))?";":""}function Fh(t,e=!0){return t&&t!=="value"?`${e?" ":""}${t}${e?"":" "}`:""}function B0(t,e){return Fh(t.importKind,e)}function R8(t){return Fh(t.exportKind)}function _0(t,e,r){let{node:s}=t;return s.source?[O0(s,e)?" from":""," ",r("source")]:""}function L0(t,e,r){let{node:s}=t;if(!O0(s,e))return"";let i=[" "];if(st(s.specifiers)){let a=[],u=[];t.each(()=>{let p=t.node.type;if(p==="ExportNamespaceSpecifier"||p==="ExportDefaultSpecifier"||p==="ImportNamespaceSpecifier"||p==="ImportDefaultSpecifier")a.push(r());else if(p==="ExportSpecifier"||p==="ImportSpecifier")u.push(r());else throw new wn(s,"specifier")},"specifiers"),i.push(qe(", ",a)),u.length>0&&(a.length>0&&i.push(", "),u.length>1||a.length>0||s.specifiers.some(p=>ue(p))?i.push(z(["{",ee([e.bracketSpacing?pe:Z,qe([",",pe],u)]),Fe(Gr(e)?",":""),e.bracketSpacing?pe:Z,"}"])):i.push(["{",e.bracketSpacing?" ":"",...u,e.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function O0(t,e){return t.type!=="ImportDeclaration"||st(t.specifiers)||t.importKind==="type"?!0:Ou(e,Re(t),Re(t.source)).trimEnd().endsWith("from")}function j8(t,e){if(t.extra?.deprecatedAssertSyntax)return"assert";let r=Ou(e,Me(t.source),t.attributes?.[0]?Re(t.attributes[0]):Me(t)).trimStart();return r.startsWith("assert")?"assert":r.startsWith("with")||st(t.attributes)?"with":void 0}var U8=t=>{let{attributes:e}=t;if(e.length!==1)return!1;let[r]=e,{type:s,key:i,value:a}=r;return s==="ImportAttribute"&&(i.type==="Identifier"&&i.name==="type"||vt(i)&&i.value==="type")&&vt(a)&&!ue(r)&&!ue(i)&&!ue(a)};function M0(t,e,r){let{node:s}=t;if(!s.source)return"";let i=j8(s,e);if(!i)return"";let a=Ph(t,e,r);return U8(s)&&(a=pu(a)),[` ${i} `,a]}function V8(t,e,r){let{node:s}=t,{type:i}=s,a=i.startsWith("Import"),u=a?"imported":"local",p=a?"local":"exported",c=s[u],m=s[p],f="",d="";return i==="ExportNamespaceSpecifier"||i==="ImportNamespaceSpecifier"?f="*":c&&(f=r(u)),m&&!q8(s)&&(d=r(p)),[Fh(i==="ImportSpecifier"?s.importKind:s.exportKind,!1),f,f&&d?" as ":"",d]}function q8(t){if(t.type!=="ImportSpecifier"&&t.type!=="ExportSpecifier")return!1;let{local:e,[t.type==="ImportSpecifier"?"imported":"exported"]:r}=t;return e.type!==r.type||!AI(e,r)?!1:vt(e)?e.value===r.value&&Jt(e)===Jt(r):e.type==="Identifier"?e.name===r.name:!1}function Kp(t,e){return["...",e("argument"),Pt(t,e)]}function H8(t){let e=[t];for(let r=0;r<e.length;r++){let s=e[r];for(let i of["test","consequent","alternate"]){let a=s[i];if(Tt(a))return!0;a.type==="ConditionalExpression"&&e.push(a)}}return!1}function z8(t,e,r){let{node:s}=t,i=s.type==="ConditionalExpression",a=i?"alternate":"falseType",{parent:u}=t,p=i?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return u.type===s.type&&u[a]===s?Pr(2,p):p}var W8=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function J8(t){let{node:e}=t;if(e.type!=="ConditionalExpression")return!1;let r,s=e;for(let i=0;!r;i++){let a=t.getParentNode(i);if(a.type==="ChainExpression"&&a.expression===s||Xe(a)&&a.callee===s||rt(a)&&a.object===s||a.type==="TSNonNullExpression"&&a.expression===s){s=a;continue}a.type==="NewExpression"&&a.callee===s||Tr(a)&&a.expression===s?(r=t.getParentNode(i+1),s=a):r=a}return s===e?!1:r[W8.get(r.type)]===s}function K8(t,e,r){let{node:s}=t,i=s.type==="ConditionalExpression",a=i?"consequent":"trueType",u=i?"alternate":"falseType",p=i?["test"]:["checkType","extendsType"],c=s[a],m=s[u],f=[],d=!1,{parent:D}=t,y=D.type===s.type&&p.some(I=>D[I]===s),x=D.type===s.type&&!y,E,C,b=0;do C=E||s,E=t.getParentNode(b),b++;while(E&&E.type===s.type&&p.every(I=>E[I]!==C));let A=E||D,v=C;if(i&&(Tt(s[p[0]])||Tt(c)||Tt(m)||H8(v))){d=!0,x=!0;let I=j=>[Fe("("),ee([Z,j]),Z,Fe(")")],R=j=>j.type==="NullLiteral"||j.type==="Literal"&&j.value===null||j.type==="Identifier"&&j.name==="undefined";f.push(" ? ",R(c)?r(a):I(r(a))," : ",m.type===s.type||R(m)?r(u):I(r(u)))}else{let I=j=>e.useTabs?ee(r(j)):Pr(2,r(j)),R=[pe,"? ",c.type===s.type?Fe("","("):"",I(a),c.type===s.type?Fe("",")"):"",pe,": ",I(u)];f.push(D.type!==s.type||D[u]===s||y?R:e.useTabs?I1(ee(R)):Pr(Math.max(0,e.tabWidth-2),R))}let P=I=>D===A?z(I):I,S=!d&&(rt(D)||D.type==="NGPipeExpression"&&D.left===s)&&!D.computed,F=J8(t),B=P([z8(t,e,r),x?f:ee(f),i&&S&&!F?Z:""]);return y||F?z([ee([Z,B]),Z]):B}function X8(t,e){return(rt(e)||e.type==="NGPipeExpression"&&e.left===t)&&!e.computed}function G8(t,e,r,s){return[...t.map(i=>Di(i)),Di(e),Di(r)].flat().some(i=>Fr(i)&&ar(s.originalText,Re(i),Me(i)))}var Y8=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"],["AwaitExpression","argument"]]);function Q8(t){let{node:e}=t;if(e.type!=="ConditionalExpression")return!1;let r,s=e;for(let i=0;!r;i++){let a=t.getParentNode(i);if(a.type==="ChainExpression"&&a.expression===s||Xe(a)&&a.callee===s||rt(a)&&a.object===s||a.type==="TSNonNullExpression"&&a.expression===s){s=a;continue}a.type==="NewExpression"&&a.callee===s||Tr(a)&&a.expression===s?(r=t.getParentNode(i+1),s=a):r=a}return s===e?!1:r[Y8.get(r.type)]===s}var sp=t=>[Fe("("),ee([Z,t]),Z,Fe(")")];function kh(t,e,r,s){if(!e.experimentalTernaries)return K8(t,e,r);let{node:i}=t,a=i.type==="ConditionalExpression",u=Js(i),p=a?"consequent":"trueType",c=a?"alternate":"falseType",m=a?["test"]:["checkType","extendsType"],f=i[p],d=i[c],D=m.map(je=>i[je]),{parent:y}=t,x=y.type===i.type,E=x&&m.some(je=>y[je]===i),C=x&&y[c]===i,b=f.type===i.type,A=d.type===i.type,v=A||C,P=e.tabWidth>2||e.useTabs,S,F,B=0;do F=S||i,S=t.getParentNode(B),B++;while(S&&S.type===i.type&&m.every(je=>S[je]!==F));let I=S||y,R=s&&s.assignmentLayout&&s.assignmentLayout!=="break-after-operator"&&(y.type==="AssignmentExpression"||y.type==="VariableDeclarator"||y.type==="ClassProperty"||y.type==="PropertyDefinition"||y.type==="ClassPrivateProperty"||y.type==="ObjectProperty"||y.type==="Property"),j=(y.type==="ReturnStatement"||y.type==="ThrowStatement")&&!(b||A),V=a&&I.type==="JSXExpressionContainer"&&t.grandparent.type!=="JSXAttribute",N=Q8(t),q=X8(i,y),te=u&&ti(t,e),W=P?e.useTabs?" ":" ".repeat(e.tabWidth-1):"",Y=G8(D,f,d,e)||b||A,ge=!v&&!x&&!u&&(V?f.type==="NullLiteral"||f.type==="Literal"&&f.value===null:lh(f,e)&&wm(i.test,3)),Ae=v||C||u&&!x||x&&a&&wm(i.test,1)||ge,Ie=[];!b&&ue(f,fe.Dangling)&&t.call(()=>{Ie.push(tt(t,e),re)},"consequent");let he=[];ue(i.test,fe.Dangling)&&t.call(()=>{he.push(tt(t,e))},"test"),!A&&ue(d,fe.Dangling)&&t.call(()=>{he.push(tt(t,e))},"alternate"),ue(i,fe.Dangling)&&he.push(tt(t,e));let G=Symbol("test"),X=Symbol("consequent"),le=Symbol("test-and-consequent"),we=a?[sp(r("test")),i.test.type==="ConditionalExpression"?ms:""]:[r("checkType")," ","extends"," ",Js(i.extendsType)||i.extendsType.type==="TSMappedType"?r("extendsType"):z(sp(r("extendsType")))],Qe=z([we," ?"],{id:G}),gt=r(p),se=ee([b||V&&(Tt(f)||x||v)?re:pe,Ie,gt]),K=Ae?z([Qe,v?se:Fe(se,z(se,{id:X}),{groupId:G})],{id:le}):[Qe,se],H=r(c),De=ge?Fe(H,I1(sp(H)),{groupId:le}):H,Pe=[K,he.length>0?[ee([re,he]),re]:A?re:ge?Fe(pe," ",{groupId:le}):pe,":",A?" ":P?Ae?Fe(W,Fe(v||ge?" ":W," "),{groupId:le}):Fe(W," "):" ",A?De:z([ee(De),V&&!ge?Z:""]),q&&!N?Z:"",Y?ms:""];return R&&!Y?z(ee([Z,z(Pe)])):R||j?z(ee(Pe)):N||u&&E?z([ee([Z,Pe]),te?Z:""]):y===I?z(Pe):Pe}function Z8(t,e,r,s){let{node:i}=t;if(oh(i))return k8(t,e);switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[tt(t,e),r("node"),re];case"File":return F8(t,e,r)??r("program");case"ExpressionStatement":return P8(t,e,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return!ue(i.expression)&&(Sr(i.expression)||kt(i.expression))?["(",r("expression"),")"]:z(["(",ee([Z,r("expression")]),Z,")"]);case"AssignmentExpression":return l_(t,e,r);case"VariableDeclarator":return p_(t,e,r);case"BinaryExpression":case"LogicalExpression":return X1(t,e,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return i_(t,e,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return t_(t,e,r);case"Identifier":return[i.name,jt(t),K1(t),Pt(t,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":return Kp(t,r);case"RestElement":return Kp(t,r);case"FunctionDeclaration":case"FunctionExpression":return p0(t,e,r,s);case"ArrowFunctionExpression":return n8(t,e,r,s);case"YieldExpression":return[`yield${i.delegate?"*":""}`,i.argument?[" ",r("argument")]:""];case"AwaitExpression":{let a=["await"];if(i.argument){a.push(" ",r("argument"));let{parent:u}=t;if(Xe(u)&&u.callee===i||rt(u)&&u.object===i){a=[ee([Z,...a]),Z];let p=t.findAncestor(c=>c.type==="AwaitExpression"||c.type==="BlockStatement");if(p?.type!=="AwaitExpression"||!Mt(p.argument,c=>c===i))return z(a)}}return a}case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return N0(t,e,r);case"ImportDeclaration":return O8(t,e,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return V8(t,e,r);case"ImportAttribute":return Ql(t,e,r);case"Program":case"BlockStatement":case"StaticBlock":return A0(t,e,r);case"ClassBody":return Sh(t,e,r);case"ThrowStatement":return v_(t,e,r);case"ReturnStatement":return T_(t,e,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return hu(t,e,r);case"ObjectExpression":case"ObjectPattern":return Ph(t,e,r);case"Property":return Ja(i)?zp(t,e,r):Ql(t,e,r);case"ObjectProperty":return Ql(t,e,r);case"ObjectMethod":return zp(t,e,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":return Ch(t,e,r);case"SequenceExpression":{let{parent:a}=t;if(a.type==="ExpressionStatement"||a.type==="ForStatement"){let p=[];return t.each(({isFirst:c})=>{c?p.push(r()):p.push(",",ee([pe,r()]))},"expressions"),z(p)}let u=qe([",",pe],t.map(r,"expressions"));return(a.type==="ReturnStatement"||a.type==="ThrowStatement")&&t.key==="argument"||a.type==="ArrowFunctionExpression"&&t.key==="body"?z(Fe([ee([Z,u]),Z],u)):z(u)}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),e.semi?";":""];case"UnaryExpression":{let a=[i.operator];return/[a-z]$/u.test(i.operator)&&a.push(" "),ue(i.argument)?a.push(z(["(",ee([Z,r("argument")]),Z,")"])):a.push(r("argument")),a}case"UpdateExpression":return[i.prefix?i.operator:"",r("argument"),i.prefix?"":i.operator];case"ConditionalExpression":return kh(t,e,r,s);case"VariableDeclaration":{let a=t.map(r,"declarations"),u=t.parent,p=u.type==="ForStatement"||u.type==="ForInStatement"||u.type==="ForOfStatement",c=i.declarations.some(f=>f.init),m;return a.length===1&&!ue(i.declarations[0])?m=a[0]:a.length>0&&(m=ee(a[0])),z([or(t),i.kind,m?[" ",m]:"",ee(a.slice(1).map(f=>[",",c&&!p?re:pe,f])),e.semi&&!(p&&u.body!==i)?";":""])}case"WithStatement":return z(["with (",r("object"),")",Is(i.body,r("body"))]);case"IfStatement":{let a=Is(i.consequent,r("consequent")),u=[z(["if (",z([ee([Z,r("test")]),Z]),")",a])];if(i.alternate){let p=ue(i.consequent,fe.Trailing|fe.Line)||h1(i),c=i.consequent.type==="BlockStatement"&&!p;u.push(c?" ":re),ue(i,fe.Dangling)&&u.push(tt(t,e),p?re:" "),u.push("else",z(Is(i.alternate,r("alternate"),i.alternate.type==="IfStatement")))}return u}case"ForStatement":{let a=Is(i.body,r("body")),u=tt(t,e),p=u?[u,Z]:"";return!i.init&&!i.test&&!i.update?[p,z(["for (;;)",a])]:[p,z(["for (",z([ee([Z,r("init"),";",pe,r("test"),";",i.update?[pe,r("update")]:Fe("",pe)]),Z]),")",a])]}case"WhileStatement":return z(["while (",z([ee([Z,r("test")]),Z]),")",Is(i.body,r("body"))]);case"ForInStatement":return z(["for (",r("left")," in ",r("right"),")",Is(i.body,r("body"))]);case"ForOfStatement":return z(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Is(i.body,r("body"))]);case"DoWhileStatement":{let a=Is(i.body,r("body"));return[z(["do",a]),i.body.type==="BlockStatement"?" ":re,"while (",z([ee([Z,r("test")]),Z]),")",e.semi?";":""]}case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return[i.type==="BreakStatement"?"break":"continue",i.label?[" ",r("label")]:"",e.semi?";":""];case"LabeledStatement":return[r("label"),`:${i.body.type==="EmptyStatement"&&!ue(i.body,fe.Leading)?"":" "}`,r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let a=ue(i.param,p=>!Fr(p)||p.leading&&Wt(e.originalText,Me(p))||p.trailing&&Wt(e.originalText,Re(p),{backwards:!0})),u=r("param");return["catch ",a?["(",ee([Z,u]),Z,") "]:["(",u,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[z(["switch (",ee([Z,r("discriminant")]),Z,")"])," {",i.cases.length>0?ee([re,qe(re,t.map(({node:a,isLast:u})=>[r(),!u&&Yr(a,e)?re:""],"cases"))]):"",re,"}"];case"SwitchCase":{let a=[];i.test?a.push("case ",r("test"),":"):a.push("default:"),ue(i,fe.Dangling)&&a.push(" ",tt(t,e));let u=i.consequent.filter(p=>p.type!=="EmptyStatement");if(u.length>0){let p=Wp(t,e,r,"consequent");a.push(u.length===1&&u[0].type==="BlockStatement"?[" ",p]:ee([re,p]))}return a}case"DebuggerStatement":return["debugger",e.semi?";":""];case"ClassDeclaration":case"ClassExpression":return wh(t,e,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return w0(t,e,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return P0(t,e,r);case"TemplateElement":return Ei(i.value.raw);case"TemplateLiteral":return R1(t,e,r);case"TaggedTemplateExpression":return wN(t,e,r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":return["module ",r("body")];case"VoidPattern":return"void";case"EmptyStatement":if(nh(t))return";";default:throw new wn(i,"ESTree")}}function $0(t){return[t("elementType"),"[]"]}var e4=Ne(["SatisfiesExpression","TSSatisfiesExpression"]);function R0(t,e,r){let{parent:s,node:i,key:a}=t,u=i.type==="AsConstExpression"?"const":r("typeAnnotation"),p=[r("expression")," ",e4(i)?"satisfies":"as"," ",u];return a==="callee"&&Xe(s)||a==="object"&&rt(s)?z([ee([Z,...p]),Z]):p}function t4(t,e,r){let{node:s}=t,i=[or(t),"component"];s.id&&i.push(" ",r("id")),i.push(r("typeParameters"));let a=r4(t,e,r);return s.rendersType?i.push(z([a," ",r("rendersType")])):i.push(z([a])),s.body&&i.push(" ",r("body")),e.semi&&s.type==="DeclareComponent"&&i.push(";"),i}function r4(t,e,r){let{node:s}=t,i=s.params;if(s.rest&&(i=[...i,s.rest]),i.length===0)return["(",tt(t,e,{filter:u=>wr(e.originalText,Me(u))===")"}),")"];let a=[];return i4(t,(u,p)=>{let c=p===i.length-1;c&&s.rest&&a.push("..."),a.push(r()),!c&&(a.push(","),Yr(i[p],e)?a.push(re,re):a.push(pe))}),["(",ee([Z,...a]),Fe(Gr(e,"all")&&!s4(s,i)?",":""),Z,")"]}function s4(t,e){return t.rest||Ge(0,e,-1)?.type==="RestElement"}function i4(t,e){let{node:r}=t,s=0,i=a=>e(a,s++);t.each(i,"params"),r.rest&&t.call(i,"rest")}function n4(t,e,r){let{node:s}=t;return s.shorthand?r("local"):[r("name")," as ",r("local")]}function a4(t,e,r){let{node:s}=t,i=[];return s.name&&i.push(r("name"),s.optional?"?: ":": "),i.push(r("typeAnnotation")),i}function j0(t,e,r){return Ph(t,e,r)}function o4(t,e,r){let{node:s}=t;return[s.type==="EnumSymbolBody"||s.explicitType?`of ${s.type.slice(4,-4).toLowerCase()} `:"",j0(t,e,r)]}function U0(t,e){let{node:r}=t,s=e("id");r.computed&&(s=["[",s,"]"]);let i="";return r.initializer&&(i=e("initializer")),r.init&&(i=e("init")),i?[s," = ",i]:s}function V0(t,e){let{node:r}=t;return[or(t),r.const?"const ":"","enum ",e("id")," ",e("body")]}function q0(t,e,r){let{node:s}=t,i=[Bu(t)];(s.type==="TSConstructorType"||s.type==="TSConstructSignatureDeclaration")&&i.push("new ");let a=_i(t,e,r,!1,!0),u=[];return s.type==="FunctionTypeAnnotation"?u.push(u4(t)?" => ":": ",r("returnType")):u.push(Pt(t,r,"returnType")),Sn(s,u)&&(a=z(a)),i.push(a,u),[z(i),s.type==="TSConstructSignatureDeclaration"||s.type==="TSCallSignatureDeclaration"?us(t,e):""]}function u4(t){let{node:e,parent:r}=t;return e.type==="FunctionTypeAnnotation"&&(u1(r)||!((r.type==="ObjectTypeProperty"||r.type==="ObjectTypeInternalSlot")&&!r.variance&&!r.optional&&Fu(r,e)||r.type==="ObjectTypeCallProperty"||t.getParentNode(2)?.type==="DeclareFunction"))}function l4(t,e,r){let{node:s}=t,i=["hook"];s.id&&i.push(" ",r("id"));let a=_i(t,e,r,!1,!0),u=Lu(t,r),p=Sn(s,u);return i.push(z([p?z(a):a,u]),s.body?" ":"",r("body")),i}function p4(t,e,r){let{node:s}=t,i=[or(t),"hook"];return s.id&&i.push(" ",r("id")),e.semi&&i.push(";"),i}function Ym(t){let{node:e}=t;return e.type==="HookTypeAnnotation"&&t.getParentNode(2)?.type==="DeclareHook"}function c4(t,e,r){let{node:s}=t,i=_i(t,e,r,!1,!0),a=[Ym(t)?": ":" => ",r("returnType")];return z([Ym(t)?"":"hook ",Sn(s,a)?z(i):i,a])}function H0(t,e,r){return[r("objectType"),jt(t),"[",r("indexType"),"]"]}function z0(t,e,r){return["infer ",r("typeParameter")]}function W0(t,e,r){let s=!1;return z(t.map(({isFirst:i,previous:a,node:u,index:p})=>{let c=r();if(i)return c;let m=Ws(u),f=Ws(a);return f&&m?[" & ",s?ee(c):c]:!f&&!m||vr(e.originalText,u)?e.experimentalOperatorPosition==="start"?ee([pe,"& ",c]):ee([" &",pe,c]):(p>1&&(s=!0),[" & ",p>1?ee(c):c])},"types"))}function h4(t){switch(t){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function d4(t,e,r){let{node:s}=t;return[z([s.variance?r("variance"):"","[",ee([r("keyTparam")," in ",r("sourceType")]),"]",h4(s.optional),": ",r("propType")]),us(t,e)]}function Qm(t,e){return t==="+"||t==="-"?t+e:e}function f4(t,e,r){let{node:s}=t,i=!1;if(e.objectWrap==="preserve"){let a=Re(s),u=Ou(e,a+1,Re(s.key)),p=a+1+u.search(/\S/u);ar(e.originalText,a,p)&&(i=!0)}return z(["{",ee([e.bracketSpacing?pe:Z,ue(s,fe.Dangling)?z([tt(t,e),re]):"",z([s.readonly?[Qm(s.readonly,"readonly")," "]:"","[",r("key")," in ",r("constraint"),s.nameType?[" as ",r("nameType")]:"","]",s.optional?Qm(s.optional,"?"):"",s.typeAnnotation?": ":"",r("typeAnnotation")]),e.semi?Fe(";"):""]),e.bracketSpacing?pe:Z,"}"],{shouldBreak:i})}function m4(t,e,r){let{node:s}=t;return[z(["match (",ee([Z,r("argument")]),Z,")"])," {",s.cases.length>0?ee([re,qe(re,t.map(({node:i,isLast:a})=>[r(),!a&&Yr(i,e)?re:""],"cases"))]):"",re,"}"]}function y4(t,e,r){let{node:s}=t,i=ue(s,fe.Dangling)?[" ",tt(t,e)]:[],a=s.type==="MatchStatementCase"?[" ",r("body")]:ee([pe,r("body"),","]);return[r("pattern"),s.guard?z([ee([pe,"if (",r("guard"),")"])]):"",z([" =>",i,a])]}function g4(t,e,r){let{node:s}=t;switch(s.type){case"MatchOrPattern":return E4(t,e,r);case"MatchAsPattern":return[r("pattern")," as ",r("target")];case"MatchWildcardPattern":return["_"];case"MatchLiteralPattern":return r("literal");case"MatchUnaryPattern":return[s.operator,r("argument")];case"MatchIdentifierPattern":return r("id");case"MatchMemberPattern":{let i=s.property.type==="Identifier"?[".",r("property")]:["[",ee([Z,r("property")]),Z,"]"];return z([r("base"),i])}case"MatchBindingPattern":return[s.kind," ",r("id")];case"MatchObjectPattern":{let i=t.map(r,"properties");return s.rest&&i.push(r("rest")),z(["{",ee([Z,qe([",",pe],i)]),s.rest?"":Fe(","),Z,"}"])}case"MatchArrayPattern":{let i=t.map(r,"elements");return s.rest&&i.push(r("rest")),z(["[",ee([Z,qe([",",pe],i)]),s.rest?"":Fe(","),Z,"]"])}case"MatchObjectPatternProperty":return s.shorthand?r("pattern"):z([r("key"),":",ee([pe,r("pattern")])]);case"MatchRestPattern":{let i=["..."];return s.argument&&i.push(r("argument")),i}}}var J0=Ne(["MatchWildcardPattern","MatchLiteralPattern","MatchUnaryPattern","MatchIdentifierPattern"]);function D4(t){let{patterns:e}=t;if(e.some(s=>ue(s)))return!1;let r=e.find(s=>s.type==="MatchObjectPattern");return r?e.every(s=>s===r||J0(s)):!1}function x4(t){return J0(t)||t.type==="MatchObjectPattern"?!0:t.type==="MatchOrPattern"?D4(t):!1}function E4(t,e,r){let{node:s}=t,{parent:i}=t,a=i.type!=="MatchStatementCase"&&i.type!=="MatchExpressionCase"&&i.type!=="MatchArrayPattern"&&i.type!=="MatchObjectPatternProperty"&&!vr(e.originalText,s),u=x4(s),p=t.map(()=>{let m=r();return u||(m=Pr(2,m)),gr(t,m,e)},"patterns");if(u)return qe(" | ",p);let c=[Fe(["| "]),qe([pe,"| "],p)];return ti(t,e)?z([ee([Fe([Z]),c]),Z]):i.type==="MatchArrayPattern"&&i.elements.length>1?z([ee([Fe(["(",Z]),c]),Z,Fe(")")]):z(a?ee(c):c)}function A4(t,e,r){let{node:s}=t,i=[or(t),"opaque type ",r("id"),r("typeParameters")];if(s.supertype&&i.push(": ",r("supertype")),s.lowerBound||s.upperBound){let a=[];s.lowerBound&&a.push(ee([pe,"super ",r("lowerBound")])),s.upperBound&&a.push(ee([pe,"extends ",r("upperBound")])),i.push(z(a))}return s.impltype&&i.push(" = ",r("impltype")),i.push(e.semi?";":""),i}function K0(t,e,r){let{node:s}=t;return["...",...s.type==="TupleTypeSpreadElement"&&s.label?[r("label"),": "]:[],r("typeAnnotation")]}function X0(t,e,r){let{node:s}=t;return[s.variance?r("variance"):"",r("label"),s.optional?"?":"",": ",r("elementType")]}function G0(t,e,r){let{node:s}=t,i=[or(t),"type ",r("id"),r("typeParameters")],a=s.type==="TSTypeAliasDeclaration"?"typeAnnotation":"right";return[Ga(t,e,r,i," =",a),e.semi?";":""]}function C4(t,e,r){let{node:s}=t;return _t(s).length===1&&s.type.startsWith("TS")&&!s[r][0].constraint&&t.parent.type==="ArrowFunctionExpression"&&!(e.filepath&&/\.ts$/u.test(e.filepath))}function Ea(t,e,r,s){let{node:i}=t;if(!i[s])return"";if(!Array.isArray(i[s]))return r(s);let a=ku(t.grandparent),u=t.match(c=>!(c[s].length===1&&Ws(c[s][0])),void 0,(c,m)=>m==="typeAnnotation",c=>c.type==="Identifier",o0);if(i[s].length===0||!u&&(a||i[s].length===1&&(i[s][0].type==="NullableTypeAnnotation"||HB(i[s][0]))))return["<",qe(", ",t.map(r,s)),b4(t,e),">"];let p=i.type==="TSTypeParameterInstantiation"?"":C4(t,e,s)?",":Gr(e)?Fe(","):"";return z(["<",ee([Z,qe([",",pe],t.map(r,s))]),p,Z,">"])}function b4(t,e){let{node:r}=t;if(!ue(r,fe.Dangling))return"";let s=!ue(r,fe.Line),i=tt(t,e,{indent:!s});return s?i:[i,re]}function Y0(t,e,r){let{node:s}=t,i=[s.const?"const ":""],a=s.type==="TSTypeParameter"?r("name"):s.name;if(s.variance&&i.push(r("variance")),s.in&&i.push("in "),s.out&&i.push("out "),i.push(a),s.bound&&(s.usesExtendsBound&&i.push(" extends "),i.push(Pt(t,r,"bound"))),s.constraint){let u=Symbol("constraint");i.push(" extends",z(ee(pe),{id:u}),Jr,Ba(r("constraint"),{groupId:u}))}if(s.default){let u=Symbol("default");i.push(" =",z(ee(pe),{id:u}),Jr,Ba(r("default"),{groupId:u}))}return z(i)}function Q0(t,e){let{node:r}=t;return[r.type==="TSTypePredicate"&&r.asserts?"asserts ":r.type==="TypePredicate"&&r.kind?`${r.kind} `:"",e("parameterName"),r.typeAnnotation?[" is ",Pt(t,e)]:""]}function Z0({node:t},e){let r=t.type==="TSTypeQuery"?"exprName":"argument";return["typeof ",e(r),e("typeArguments")]}function T4(t,e,r){let{node:s}=t;if(s1(s))return s.type.slice(0,-14).toLowerCase();switch(s.type){case"ComponentDeclaration":case"DeclareComponent":case"ComponentTypeAnnotation":return t4(t,e,r);case"ComponentParameter":return n4(t,e,r);case"ComponentTypeParameter":return a4(t,e,r);case"HookDeclaration":return l4(t,e,r);case"DeclareHook":return p4(t,e,r);case"HookTypeAnnotation":return c4(t,e,r);case"DeclareFunction":return[or(t),"function ",r("id"),r("predicate"),e.semi?";":""];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Pt(t,r),e.semi?";":""];case"DeclareNamespace":return["declare namespace ",r("id")," ",r("body")];case"DeclareVariable":return[or(t),s.kind??"var"," ",r("id"),e.semi?";":""];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return N0(t,e,r);case"DeclareOpaqueType":case"OpaqueType":return A4(t,e,r);case"DeclareTypeAlias":case"TypeAlias":return G0(t,e,r);case"IntersectionTypeAnnotation":return W0(t,e,r);case"UnionTypeAnnotation":return G1(t,e,r);case"ConditionalTypeAnnotation":return kh(t,e,r);case"InferTypeAnnotation":return z0(t,e,r);case"FunctionTypeAnnotation":return q0(t,e,r);case"TupleTypeAnnotation":return Ch(t,e,r);case"TupleTypeLabeledElement":return X0(t,e,r);case"TupleTypeSpreadElement":return K0(t,e,r);case"GenericTypeAnnotation":return[r("id"),Ea(t,e,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return H0(t,e,r);case"TypeAnnotation":return Z1(t,e,r);case"TypeParameter":return Y0(t,e,r);case"TypeofTypeAnnotation":return Z0(t,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return $0(r);case"DeclareEnum":case"EnumDeclaration":return V0(t,r);case"EnumBooleanBody":case"EnumNumberBody":case"EnumBigIntBody":case"EnumStringBody":case"EnumSymbolBody":return o4(t,e,r);case"EnumBooleanMember":case"EnumNumberMember":case"EnumBigIntMember":case"EnumStringMember":case"EnumDefaultedMember":return U0(t,r);case"FunctionTypeParam":{let i=s.name?r("name"):t.parent.this===s?"this":"";return[i,jt(t),i?": ":"",r("typeAnnotation")]}case"DeclareClass":case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return wh(t,e,r);case"ObjectTypeAnnotation":return Sh(t,e,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:i}=s;return i==="plus"?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[s.static?"static ":"",r("value"),us(t,e)];case"ObjectTypeMappedTypeProperty":return d4(t,e,r);case"ObjectTypeIndexer":return[s.static?"static ":"",s.variance?r("variance"):"","[",r("id"),s.id?": ":"",r("key"),"]: ",r("value"),us(t,e)];case"ObjectTypeProperty":{let i="";return s.proto?i="proto ":s.static&&(i="static "),[i,s.kind!=="init"?s.kind+" ":"",s.variance?r("variance"):"",Ya(t,e,r),jt(t),Ja(s)?"":": ",r("value"),us(t,e)]}case"ObjectTypeInternalSlot":return[s.static?"static ":"","[[",r("id"),"]]",jt(t),s.method?"":": ",r("value"),us(t,e)];case"ObjectTypeSpreadProperty":return Kp(t,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(s.value);case"StringLiteralTypeAnnotation":return Ei(mn(Jt(s),e));case"NumberLiteralTypeAnnotation":return Dn(Jt(s));case"BigIntLiteralTypeAnnotation":return Jp(Jt(s));case"TypeCastExpression":return["(",r("expression"),Pt(t,r),")"];case"TypePredicate":return Q0(t,r);case"TypeOperator":return[s.operator," ",r("typeAnnotation")];case"TypeParameterDeclaration":case"TypeParameterInstantiation":return Ea(t,e,r,"params");case"InferredPredicate":case"DeclaredPredicate":return[t.key==="predicate"&&t.parent.type!=="DeclareFunction"&&!t.parent.returnType?": ":" ","%checks",...s.type==="DeclaredPredicate"?["(",r("value"),")"]:[]];case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return R0(t,e,r);case"MatchExpression":case"MatchStatement":return m4(t,e,r);case"MatchExpressionCase":case"MatchStatementCase":return y4(t,e,r);case"MatchOrPattern":case"MatchAsPattern":case"MatchWildcardPattern":case"MatchLiteralPattern":case"MatchUnaryPattern":case"MatchIdentifierPattern":case"MatchMemberPattern":case"MatchBindingPattern":case"MatchObjectPattern":case"MatchObjectPatternProperty":case"MatchRestPattern":case"MatchArrayPattern":return g4(t,e,r)}}function v4(t,e,r){let{node:s}=t,i=s.parameters.length>1?Fe(Gr(e)?",":""):"",a=z([ee([Z,qe([", ",Z],t.map(r,"parameters"))]),i,Z]);return[t.key==="body"&&t.parent.type==="ClassBody"&&s.static?"static ":"",s.readonly?"readonly ":"","[",s.parameters?a:"","]",Pt(t,r),us(t,e)]}function Zm(t,e,r){let{node:s}=t;return[s.postfix?"":r,Pt(t,e),s.postfix?r:""]}function S4(t,e,r){let{node:s}=t,i=[],a=s.kind&&s.kind!=="method"?`${s.kind} `:"";i.push(_u(s),a,s.computed?"[":"",r("key"),s.computed?"]":"",jt(t));let u=_i(t,e,r,!1,!0),p=Pt(t,r,"returnType"),c=Sn(s,p);return i.push(c?z(u):u),s.returnType&&i.push(z(p)),[z(i),us(t,e)]}function w4(t,e,r){let{node:s}=t;return[or(t),s.kind==="global"?"":`${s.kind} `,r("id"),s.body?[" ",z(r("body"))]:e.semi?";":""]}function P4(t,e,r){let{node:s}=t,i=!(kt(s.expression)||Sr(s.expression)),a=z(["<",ee([Z,r("typeAnnotation")]),Z,">"]),u=[Fe("("),ee([Z,r("expression")]),Z,Fe(")")];return i?yi([[a,r("expression")],[a,z(u,{shouldBreak:!0})],[a,r("expression")]]):z([a,r("expression")])}function F4(t,e,r){let{node:s}=t;if(s.type.startsWith("TS")){if(i1(s))return s.type.slice(2,-7).toLowerCase();switch(s.type){case"TSThisType":return"this";case"TSTypeAssertion":return P4(t,e,r);case"TSDeclareFunction":return p0(t,e,r);case"TSExportAssignment":return["export = ",r("expression"),e.semi?";":""];case"TSModuleBlock":return A0(t,e,r);case"TSInterfaceBody":case"TSTypeLiteral":return Sh(t,e,r);case"TSTypeAliasDeclaration":return G0(t,e,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return w0(t,e,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return P0(t,e,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[r("expression"),r("typeArguments")];case"TSTemplateLiteralType":return R1(t,e,r);case"TSNamedTupleMember":return X0(t,e,r);case"TSRestType":return K0(t,e,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return wh(t,e,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Ea(t,e,r,"params");case"TSTypeParameter":return Y0(t,e,r);case"TSAsExpression":case"TSSatisfiesExpression":return R0(t,e,r);case"TSArrayType":return $0(r);case"TSPropertySignature":return[s.readonly?"readonly ":"",Ya(t,e,r),jt(t),Pt(t,r),us(t,e)];case"TSParameterProperty":return[_u(s),s.static?"static ":"",s.override?"override ":"",s.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Z0(t,r);case"TSIndexSignature":return v4(t,e,r);case"TSTypePredicate":return Q0(t,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[hu(t,e,r),s.qualifier?[".",r("qualifier")]:"",Ea(t,e,r,"typeArguments")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return H0(t,e,r);case"TSTypeOperator":return[s.operator," ",r("typeAnnotation")];case"TSMappedType":return f4(t,e,r);case"TSMethodSignature":return S4(t,e,r);case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),e.semi?";":""];case"TSEnumDeclaration":return V0(t,r);case"TSEnumBody":return j0(t,e,r);case"TSEnumMember":return U0(t,r);case"TSImportEqualsDeclaration":return["import ",B0(s,!1),r("id")," = ",r("moduleReference"),e.semi?";":""];case"TSExternalModuleReference":return hu(t,e,r);case"TSModuleDeclaration":return w4(t,e,r);case"TSConditionalType":return kh(t,e,r);case"TSInferType":return z0(t,e,r);case"TSIntersectionType":return W0(t,e,r);case"TSUnionType":return G1(t,e,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return q0(t,e,r);case"TSTupleType":return Ch(t,e,r);case"TSTypeReference":return[r("typeName"),Ea(t,e,r,"typeArguments")];case"TSTypeAnnotation":return Z1(t,e,r);case"TSEmptyBodyFunctionExpression":return bh(t,e,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Zm(t,r,"?");case"TSJSDocNonNullableType":return Zm(t,r,"!");default:throw new wn(s,"TypeScript")}}}function k4(t,e,r,s){for(let i of[Q_,J_,T4,F4,Z8]){let a=i(t,e,r,s);if(a!==void 0)return a}}var I4=Ne(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);function N4(t,e,r,s){t.isRoot&&e.__onHtmlBindingRoot?.(t.node,e);let{node:i}=t,a=vh(t)?e.originalText.slice(Re(i),Me(i)):k4(t,e,r,s);if(!a)return"";if(I4(i))return a;let u=st(i.decorators),p=s8(t,e,r),c=i.type==="ClassExpression";if(u&&!c)return $p(a,d=>z([p,d]));let m=ti(t,e),f=w_(t,e);return!p&&!m&&!f?a:$p(a,d=>[f?";":"",m?"(":"",m&&c&&u?[ee([pe,p,d]),pe]:[p,d],m?")":""])}var ey=N4,B4={experimental_avoidAstMutation:!0},_4=[{name:"JSON.stringify",type:"data",aceMode:"json",extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json-stringify"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON",type:"data",aceMode:"json",extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".json.example",".mcmeta",".sarif",".tact",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig",".babelrc",".jscsrc",".jshintrc",".jslintrc",".swcrc"],tmScope:"source.json",aliases:["geojson","jsonl","sarif","topojson"],codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json"],vscodeLanguageIds:["json"],linguistLanguageId:174},{name:"JSON with Comments",type:"data",aceMode:"javascript",extensions:[".jsonc",".code-snippets",".code-workspace",".sublime-build",".sublime-color-scheme",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[],tmScope:"source.json.comments",aliases:["jsonc"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",group:"JSON",parsers:["jsonc"],vscodeLanguageIds:["jsonc"],linguistLanguageId:423},{name:"JSON5",type:"data",aceMode:"json5",extensions:[".json5"],tmScope:"source.js",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"],linguistLanguageId:175}],ex={};Qc(ex,{getVisitorKeys:()=>M4,massageAstNode:()=>tx,print:()=>$4});var Wi=[[]],L4={JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:Wi[0],BooleanLiteral:Wi[0],StringLiteral:Wi[0],NumericLiteral:Wi[0],Identifier:Wi[0],TemplateLiteral:["quasis"],TemplateElement:Wi[0]},O4=t1(L4),M4=O4;function $4(t,e,r){let{node:s}=t;switch(s.type){case"JsonRoot":return[r("node"),re];case"ArrayExpression":{if(s.elements.length===0)return"[]";let i=t.map(()=>t.node===null?"null":r(),"elements");return["[",ee([re,qe([",",re],i)]),re,"]"]}case"ObjectExpression":return s.properties.length===0?"{}":["{",ee([re,qe([",",re],t.map(r,"properties"))]),re,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return[s.operator==="+"?"":s.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return s.value?"true":"false";case"StringLiteral":return JSON.stringify(s.value);case"NumericLiteral":return ty(t)?JSON.stringify(String(s.value)):JSON.stringify(s.value);case"Identifier":return ty(t)?JSON.stringify(s.name):s.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(s.value.cooked);default:throw new wn(s,"JSON")}}function ty(t){return t.key==="key"&&t.parent.type==="ObjectProperty"}var R4=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function tx(t,e){let{type:r}=t;if(r==="ObjectProperty"){let{key:s}=t;s.type==="Identifier"?e.key={type:"StringLiteral",value:s.name}:s.type==="NumericLiteral"&&(e.key={type:"StringLiteral",value:String(s.value)});return}if(r==="UnaryExpression"&&t.operator==="+")return e.argument;if(r==="ArrayExpression"){for(let[s,i]of t.elements.entries())i===null&&e.elements.splice(s,0,{type:"NullLiteral"});return}if(r==="TemplateLiteral")return{type:"StringLiteral",value:t.quasis[0].value.cooked}}tx.ignoredProperties=R4;var Kn={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Ns="JavaScript",j4={arrowParens:{category:Ns,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Kn.bracketSameLine,objectWrap:Kn.objectWrap,bracketSpacing:Kn.bracketSpacing,jsxBracketSameLine:{category:Ns,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Ns,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},experimentalOperatorPosition:{category:Ns,type:"choice",default:"end",description:"Where to print operators when binary expressions wrap lines.",choices:[{value:"start",description:"Print operators at the start of new lines."},{value:"end",description:"Print operators at the end of previous lines."}]},experimentalTernaries:{category:Ns,type:"boolean",default:!1,description:"Use curious ternaries, with the question mark after the condition.",oppositeDescription:"Default behavior of ternaries; keep question marks on the same line as the consequent."},singleQuote:Kn.singleQuote,jsxSingleQuote:{category:Ns,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Ns,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Ns,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Kn.singleAttributePerLine},rx=j4,sx={estree:XD,"estree-json":ex},ix=[...Uk,..._4];const No=Object.freeze(Object.defineProperty({__proto__:null,default:KD,languages:ix,options:rx,printers:sx},Symbol.toStringTag,{value:"Module"}));var nx=Object.defineProperty,ax=t=>{throw TypeError(t)},U4=(t,e,r)=>e in t?nx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ox=(t,e)=>{for(var r in e)nx(t,r,{get:e[r],enumerable:!0})},ry=(t,e,r)=>U4(t,typeof e!="symbol"?e+"":e,r),V4=(t,e,r)=>e.has(t)||ax("Cannot "+r),Bo=(t,e,r)=>(V4(t,e,"read from private field"),r?r.call(t):e.get(t)),q4=(t,e,r)=>e.has(t)?ax("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ux={};ox(ux,{languages:()=>Zx,options:()=>e2,parsers:()=>Kh,printers:()=>n2});var Ih=(t,e)=>(r,s,...i)=>r|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,i),H4=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},z4=Ih("replaceAll",function(){if(typeof this=="string")return H4}),Ut=z4;function W4(t){return this[t<0?this.length+t:t]}var J4=Ih("at",function(){if(Array.isArray(this)||typeof this=="string")return W4}),Pn=J4,K4=()=>{},X4=K4,lx="string",px="array",cx="cursor",Nh="indent",Bh="align",hx="trim",_h="group",Lh="fill",Oh="if-break",Mh="indent-if-break",dx="line-suffix",fx="line-suffix-boundary",Fn="line",mx="label",$h="break-parent",yx=new Set([cx,Nh,Bh,hx,_h,Lh,Oh,Mh,dx,fx,Fn,mx,$h]);function G4(t){if(typeof t=="string")return lx;if(Array.isArray(t))return px;if(!t)return;let{type:e}=t;if(yx.has(e))return e}var gx=G4,Y4=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function Q4(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
87
|
-
Expected it to be 'string' or 'object'.`;if(gx(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=Y4([...yx].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
|
|
88
|
-
Expected it to be ${s}.`}var Z4=class extends Error{name="InvalidDocError";constructor(e){super(Q4(e)),this.doc=e}},eL=Z4;function Dx(t,e){if(typeof t=="string")return e(t);let r=new Map;return s(t);function s(a){if(r.has(a))return r.get(a);let u=i(a);return r.set(a,u),u}function i(a){switch(gx(a)){case px:return e(a.map(s));case Lh:return e({...a,parts:a.parts.map(s)});case Oh:return e({...a,breakContents:s(a.breakContents),flatContents:s(a.flatContents)});case _h:{let{expandedStates:u,contents:p}=a;return u?(u=u.map(s),p=u[0]):p=s(p),e({...a,contents:p,expandedStates:u})}case Bh:case Nh:case Mh:case mx:case dx:return e({...a,contents:s(a.contents)});case lx:case cx:case hx:case fx:case Fn:case $h:return e(a);default:throw new eL(a)}}}function qr(t,e=oL){return Dx(t,r=>typeof r=="string"?kn(e,r.split(`
|
|
89
|
-
`)):r)}var tL=X4;function Qr(t){return{type:Nh,contents:t}}function rL(t,e){return{type:Bh,contents:e,n:t}}function sL(t){return rL(Number.NEGATIVE_INFINITY,t)}var Qa={type:$h};function xx(t){return{type:Lh,parts:t}}function At(t,e={}){return tL(e.expandedStates),{type:_h,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Oa(t,e="",r={}){return{type:Oh,breakContents:t,flatContents:e,groupId:r.groupId}}function iL(t,e){return{type:Mh,contents:t,groupId:e.groupId,negate:e.negate}}function kn(t,e){let r=[];for(let s=0;s<e.length;s++)s!==0&&r.push(t),r.push(e[s]);return r}var ht={type:Fn},Bt={type:Fn,soft:!0},nL={type:Fn,hard:!0},at=[nL,Qa],aL={type:Fn,hard:!0,literal:!0},oL=[aL,Qa],Ex=Object.freeze({character:"'",codePoint:39}),Ax=Object.freeze({character:'"',codePoint:34}),uL=Object.freeze({preferred:Ex,alternate:Ax}),lL=Object.freeze({preferred:Ax,alternate:Ex});function pL(t,e){let{preferred:r,alternate:s}=e===!0||e==="'"?uL:lL,{length:i}=t,a=0,u=0;for(let p=0;p<i;p++){let c=t.charCodeAt(p);c===r.codePoint?a++:c===s.codePoint&&u++}return(a>u?s:r).character}var cL=pL;function hL(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var dL=class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let r=this.#e,s=0;for(let i=0;i<e.length&&r.has(e.charAt(i));i++)s++;return s}getTrailingWhitespaceCount(e){let r=this.#e,s=0;for(let i=e.length-1;i>=0&&r.has(e.charAt(i));i--)s++;return s}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(Pn(0,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let s=`[${hL([...this.#e].join(""))}]+`,i=new RegExp(r?`(${s})`:s,"u");return e.split(i)}hasWhitespaceCharacter(e){let r=this.#e;return Array.prototype.some.call(e,s=>r.has(s))}hasNonWhitespaceCharacter(e){let r=this.#e;return Array.prototype.some.call(e,s=>!r.has(s))}isWhitespaceOnly(e){let r=this.#e;return Array.prototype.every.call(e,s=>r.has(s))}#t(e){let r=Number.POSITIVE_INFINITY;for(let s of e.split(`
|
|
90
|
-
`)){if(s.length===0)continue;let i=this.getLeadingWhitespaceCount(s);if(i===0)return 0;s.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(e){let r=this.#t(e);return r===0?e:e.split(`
|
|
91
|
-
`).map(s=>s.slice(r)).join(`
|
|
92
|
-
`)}},fL=dL,mL=[" ",`
|
|
93
|
-
`,"\f","\r"," "],yL=new fL(mL),Er=yL,gL=class extends Error{name="UnexpectedNodeError";constructor(e,r,s="type"){super(`Unexpected ${r} node ${s}: ${JSON.stringify(e[s])}.`),this.node=e}},DL=gL,xL=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),EL=new Set(["if","else if","for","switch","case"]);function Cx(t,e,r){if(t.kind==="text"||t.kind==="comment")return null;if(t.kind==="yaml"&&delete e.value,t.kind==="attribute"){let{fullName:s,value:i}=t;s==="style"||s==="class"||s==="srcset"&&(r.fullName==="img"||r.fullName==="source")||s==="allow"&&r.fullName==="iframe"||s.startsWith("on")||s.startsWith("@")||s.startsWith(":")||s.startsWith(".")||s.startsWith("#")||s.startsWith("v-")||s==="vars"&&r.fullName==="style"||(s==="setup"||s==="generic")&&r.fullName==="script"||s==="slot-scope"||s.startsWith("(")||s.startsWith("[")||s.startsWith("*")||s.startsWith("bind")||s.startsWith("i18n")||s.startsWith("on-")||s.startsWith("ng-")||i?.includes("{{")?delete e.value:i&&(e.value=Ut(0,i,/'|"|'/gu,'"'))}if(t.kind==="docType"&&(e.value=Ut(0,t.value.toLowerCase(),/\s+/gu," ")),t.kind==="angularControlFlowBlock"&&t.parameters?.children)for(let s of e.parameters.children)EL.has(t.name)?delete s.expression:s.expression=s.expression.trim();t.kind==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.kind==="angularLetDeclarationInitializer"&&delete e.value,t.kind==="element"&&t.isVoid&&!t.isSelfClosing&&(e.isSelfClosing=!0)}Cx.ignoredProperties=xL;var AL=Cx;function Za(t,e=!0){return[Qr([Bt,t]),e?Bt:""]}function In(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression"||e.parser==="__ng_binding"||e.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function Ar(t,e,r,s){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;s&&(r.__onHtmlBindingRoot=(u,p)=>{i=s(u,p)});let a=await e(t,r,e);return i?At(a):Za(a)}function CL(t,e,r,s){let{node:i}=r,a=s.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/u.test(a)?"":Ar(a,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},In)}var bL=CL,TL=Array.prototype.toReversed??function(){return[...this].reverse()},vL=Ih("toReversed",function(){if(Array.isArray(this))return TL}),SL=vL;function wL(){let t=globalThis,e=t.Deno?.build?.os;return typeof e=="string"?e==="windows":t.navigator?.platform?.startsWith("Win")??t.process?.platform?.startsWith("win")??!1}var PL=wL();function bx(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function FL(t){return t=bx(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function kL(t){t=bx(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function IL(t){return PL?kL(t):FL(t)}var NL=t=>String(t).split(/[/\\]/u).pop(),BL=t=>String(t).startsWith("file:");function _L(t){return Array.isArray(t)&&t.length>0}var Rh=_L;function sy(t,e){if(!e)return;let r=NL(e).toLowerCase();return t.find(({filenames:s})=>s?.some(i=>i.toLowerCase()===r))??t.find(({extensions:s})=>s?.some(i=>r.endsWith(i)))}function LL(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r?.includes(e))??t.find(({extensions:r})=>r?.includes(`.${e}`))}var OL=void 0;function iy(t,e){if(e){if(BL(e))try{e=IL(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r?.({filepath:e}))}}function ML(t,e){let r=SL(0,t.plugins).flatMap(s=>s.languages??[]);return(LL(r,e.language)??sy(r,e.physicalFile)??sy(r,e.file)??iy(r,e.physicalFile)??iy(r,e.file)??OL?.(r,e.physicalFile))?.parsers[0]}var jh=ML,Tx=Symbol.for("PRETTIER_IS_FRONT_MATTER");function $L(t){return!!t?.[Tx]}var Mu=$L,Xn=3;function RL(t){let e=t.slice(0,Xn);if(e!=="---"&&e!=="+++")return;let r=t.indexOf(`
|
|
94
|
-
`,Xn);if(r===-1)return;let s=t.slice(Xn,r).trim(),i=t.indexOf(`
|
|
95
|
-
${e}`,r),a=s;if(a||(a=e==="+++"?"toml":"yaml"),i===-1&&e==="---"&&a==="yaml"&&(i=t.indexOf(`
|
|
96
|
-
...`,r)),i===-1)return;let u=i+1+Xn,p=t.charAt(u+1);if(!/\s?/u.test(p))return;let c=t.slice(0,u),m;return{language:a,explicitLanguage:s||null,value:t.slice(r+1,i),startDelimiter:e,endDelimiter:c.slice(-Xn),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return m??(m=c.split(`
|
|
97
|
-
`)),m.length},get column(){return m??(m=c.split(`
|
|
98
|
-
`)),Pn(0,m,-1).length}},[Tx]:!0}}function jL(t){let e=RL(t);return e?{frontMatter:e,get content(){let{raw:r}=e;return Ut(0,r,/[^\n]/gu," ")+t.slice(r.length)}}:{content:t}}var UL=jL,VL="inline",ny={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",option:"block",optgroup:"block"},qL="normal",ay={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function HL(t){return t.kind==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var eo=HL,zL=t=>Ut(0,t,/^[\t\f\r ]*\n/gu,""),vx=t=>zL(Er.trimEnd(t)),WL=t=>{let e=t,r=Er.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let s=Er.getTrailingWhitespace(e);return s&&(e=e.slice(0,-s.length)),{leadingWhitespace:r,trailingWhitespace:s,text:e}};function Sx(t,e){return!!(t.kind==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.kind==="ieConditionalComment"&&!t.complete||xn(t)&&t.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||Vh(t,e)&&!ys(t,e)&&t.kind!=="interpolation")}function $u(t){return t.kind==="attribute"||!t.parent||!t.prev?!1:JL(t.prev)}function JL(t){return t.kind==="comment"&&t.value.trim()==="prettier-ignore"}function mr(t){return t.kind==="text"||t.kind==="comment"}function ys(t,e){return t.kind==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||t.fullName==="mj-style"&&e.parser==="mjml"||eo(t)&&(t.name==="script"||t.name==="style"))}function KL(t,e){return t.children&&!ys(t,e)}function XL(t,e){return ys(t,e)||t.kind==="interpolation"||wx(t)}function wx(t){return _x(t).startsWith("pre")}function GL(t,e){let r=s();if(r&&!t.prev&&t.parent?.tagDefinition?.ignoreFirstLf)return t.kind==="interpolation";return r;function s(){return Mu(t)||t.kind==="angularControlFlowBlock"?!1:(t.kind==="text"||t.kind==="interpolation")&&t.prev&&(t.prev.kind==="text"||t.prev.kind==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:xn(t.parent)?!0:!(!t.prev&&(t.parent.kind==="root"||xn(t)&&t.parent||ys(t.parent,e)||Ru(t.parent,e)||!n6(t.parent.cssDisplay))||t.prev&&!u6(t.prev.cssDisplay))}}function YL(t,e){return Mu(t)||t.kind==="angularControlFlowBlock"?!1:(t.kind==="text"||t.kind==="interpolation")&&t.next&&(t.next.kind==="text"||t.next.kind==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:xn(t.parent)?!0:!(!t.next&&(t.parent.kind==="root"||xn(t)&&t.parent||ys(t.parent,e)||Ru(t.parent,e)||!a6(t.parent.cssDisplay))||t.next&&!o6(t.next.cssDisplay))}function QL(t,e){return l6(t.cssDisplay)&&!ys(t,e)}function _o(t){return Mu(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+1<t.next.sourceSpan.start.line}function ZL(t){return Px(t)||t.kind==="element"&&t.children.length>0&&(["body","script","style"].includes(t.name)||t.children.some(e=>t6(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.kind!=="text"&&kx(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||Ix(t.lastChild))}function Px(t){return t.kind==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function ip(t){return Nx(t)||t.prev&&e6(t.prev)||Fx(t)}function e6(t){return Nx(t)||t.kind==="element"&&t.fullName==="br"||Fx(t)}function Fx(t){return kx(t)&&Ix(t)}function kx(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.line<t.sourceSpan.start.line:t.parent.kind==="root"||t.parent.startSourceSpan.end.line<t.sourceSpan.start.line)}function Ix(t){return t.hasTrailingSpaces&&(t.next?t.next.sourceSpan.start.line>t.sourceSpan.end.line:t.parent.kind==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function Nx(t){switch(t.kind){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Uh(t){return t.lastChild?Uh(t.lastChild):t}function t6(t){return t.children?.some(e=>e.kind!=="text")}function Bx(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function r6(t,e){let{name:r,attrMap:s}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(s,"src"))return;let{type:i,lang:a}=t.attrMap;return!a&&!i?"babel":jh(e,{language:a})??Bx(i)}function s6(t,e){if(!Vh(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:s,lang:i}=r;return jh(e,{language:i})??Bx(s)}function i6(t,e){if(t.name==="style"){let{lang:r}=t.attrMap;return r?jh(e,{language:r}):"css"}if(t.name==="mj-style"&&e.parser==="mjml")return"css"}function oy(t,e){return r6(t,e)??i6(t,e)??s6(t,e)}function to(t){return t==="block"||t==="list-item"||t.startsWith("table")}function n6(t){return!to(t)&&t!=="inline-block"}function a6(t){return!to(t)&&t!=="inline-block"}function o6(t){return!to(t)}function u6(t){return!to(t)}function l6(t){return!to(t)&&t!=="inline-block"}function xn(t){return _x(t).startsWith("pre")}function p6(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function c6(t,e){if(Nn(t,e))return"block";if(t.prev?.kind==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(s)return s[1]}let r=!1;if(t.kind==="element"&&t.namespace==="svg")if(p6(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(t.kind==="element"&&(!t.namespace||r||eo(t))&&Object.prototype.hasOwnProperty.call(ny,t.name))return ny[t.name]}return VL}function _x(t){return t.kind==="element"&&(!t.namespace||eo(t))&&Object.prototype.hasOwnProperty.call(ay,t.name)?ay[t.name]:qL}function Lx(t){return Ut(0,Ut(0,t,"'","'"),""",'"')}function Yt(t){return Lx(t.value)}var h6=new Set(["template","style","script"]);function Ru(t,e){return Nn(t,e)&&!h6.has(t.fullName)}function Nn(t,e){return e.parser==="vue"&&t.kind==="element"&&t.parent.kind==="root"&&t.fullName.toLowerCase()!=="html"}function Vh(t,e){return Nn(t,e)&&(Ru(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function d6(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function f6(t,e){let r=t.parent;if(!Nn(r,e))return!1;let s=r.fullName,i=t.fullName;return s==="script"&&i==="setup"||s==="style"&&i==="vars"}function Ox(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?qr(e):qr(Er.dedentString(vx(e)),at):kn(ht,Er.split(e))}function Mx(t,e){return Nn(t,e)&&t.name==="script"}function m6(t){let{valueSpan:e,value:r}=t;return e.end.offset-e.start.offset===r.length+2}function $x(t,e){if(m6(t))return!1;let{value:r}=t;return/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r)||e.parser==="lwc"&&r.startsWith("{")&&r.endsWith("}")}var Rx=/\{\{(.+?)\}\}/su,y6=({node:{value:t}})=>Rx.test(t);async function g6(t,e,r){let s=Yt(r.node),i=[];for(let[a,u]of s.split(Rx).entries())if(a%2===0)i.push(qr(u));else try{i.push(At(["{{",Qr([ht,await Ar(u,t,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),ht,"}}"]))}catch{i.push("{{",qr(u),"}}")}return i}var np=t=>(e,r,s)=>Ar(Yt(s.node),e,{parser:t},In),D6=[{test(t){let e=t.node.fullName;return e.startsWith("(")&&e.endsWith(")")||e.startsWith("on-")},print:np("__ng_action")},{test(t){let e=t.node.fullName;return e.startsWith("[")&&e.endsWith("]")||/^bind(?:on)?-/u.test(e)||/^ng-(?:if|show|hide|class|style)$/u.test(e)},print:np("__ng_binding")},{test:t=>t.node.fullName.startsWith("*"),print:np("__ng_directive")},{test:t=>/^i18n(?:-.+)?$/u.test(t.node.fullName),print:x6},{test:y6,print:g6}].map(({test:t,print:e})=>({test:(r,s)=>s.parser==="angular"&&t(r),print:e}));function x6(t,e,{node:r}){let s=Yt(r);return Za(xx(Ox(r,s.trim())),!s.includes("@@"))}var E6=D6,A6=({node:t},e)=>!e.parentParser&&t.fullName==="class"&&!t.value.includes("{{"),C6=(t,e,r)=>Yt(r.node).trim().split(/\s+/u).join(" "),b6=["onabort","onafterprint","onauxclick","onbeforeinput","onbeforematch","onbeforeprint","onbeforetoggle","onbeforeunload","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncommand","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpagereveal","onpageshow","onpageswap","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onrejectionhandled","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],T6=new Set(b6),v6=({node:t},e)=>T6.has(t.fullName)&&!e.parentParser&&!t.value.includes("{{"),S6=(t,e,r)=>Ar(Yt(r.node),t,{parser:"babel",__isHtmlInlineEventHandler:!0},()=>!1);function w6(t){let e=[];for(let r of t.split(";")){if(r=Er.trim(r),!r)continue;let[s,...i]=Er.split(r);e.push({name:s,value:i})}return e}var P6=w6,F6=({node:t},e)=>t.fullName==="allow"&&!e.parentParser&&t.parent.fullName==="iframe"&&!t.value.includes("{{");function k6(t,e,r){let{node:s}=r,i=P6(Yt(s));return i.length===0?[""]:Za(i.map(({name:a,value:u},p)=>[[a,...u].join(" "),p===i.length-1?Oa(";"):[";",ht]]))}function uy(t){return t===" "||t===`
|
|
99
|
-
`||t==="\f"||t==="\r"||t===" "}var I6=/^[ \t\n\r\u000c]+/,N6=/^[, \t\n\r\u000c]+/,B6=/^[^ \t\n\r\u000c]+/,_6=/[,]+$/,ly=/^\d+$/,L6=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function O6(t){let e=t.length,r,s,i,a,u,p=0,c;function m(y){let x,E=y.exec(t.substring(p));if(E)return[x]=E,p+=x.length,x}let f=[];for(;;){if(m(N6),p>=e){if(f.length===0)throw new Error("Must contain one or more image candidate strings.");return f}c=p,r=m(B6),s=[],r.slice(-1)===","?(r=r.replace(_6,""),D()):d()}function d(){for(m(I6),i="",a="in descriptor";;){if(u=t.charAt(p),a==="in descriptor")if(uy(u))i&&(s.push(i),i="",a="after descriptor");else if(u===","){p+=1,i&&s.push(i),D();return}else if(u==="(")i+=u,a="in parens";else if(u===""){i&&s.push(i),D();return}else i+=u;else if(a==="in parens")if(u===")")i+=u,a="in descriptor";else if(u===""){s.push(i),D();return}else i+=u;else if(a==="after descriptor"&&!uy(u))if(u===""){D();return}else a="in descriptor",p-=1;p+=1}}function D(){let y=!1,x,E,C,b,A={},v,P,S,F,B;for(b=0;b<s.length;b++)v=s[b],P=v[v.length-1],S=v.substring(0,v.length-1),F=parseInt(S,10),B=parseFloat(S),ly.test(S)&&P==="w"?((x||E)&&(y=!0),F===0?y=!0:x=F):L6.test(S)&&P==="x"?((x||E||C)&&(y=!0),B<0?y=!0:E=B):ly.test(S)&&P==="h"?((C||E)&&(y=!0),F===0?y=!0:C=F):y=!0;if(!y)A.source={value:r,startOffset:c},x&&(A.width={value:x}),E&&(A.density={value:E}),C&&(A.height={value:C}),f.push(A);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${v}".`)}}var M6=O6,$6=t=>t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"),jx={width:"w",height:"h",density:"x"},R6=Object.keys(jx);function j6(t,e,r){let s=Yt(r.node),i=M6(s),a=R6.filter(y=>i.some(x=>Object.prototype.hasOwnProperty.call(x,y)));if(a.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[u]=a,p=jx[u],c=i.map(y=>y.source.value),m=Math.max(...c.map(y=>y.length)),f=i.map(y=>y[u]?String(y[u].value):""),d=f.map(y=>{let x=y.indexOf(".");return x===-1?y.length:x}),D=Math.max(...d);return Za(kn([",",ht],c.map((y,x)=>{let E=[y],C=f[x];if(C){let b=m-y.length+1,A=D-d[x],v=" ".repeat(b+A);E.push(Oa(v," "),C+p)}return E})))}var U6=({node:t},e)=>t.fullName==="style"&&!e.parentParser&&!t.value.includes("{{"),V6=async(t,e,r)=>Za(await t(Yt(r.node),{parser:"css",__isHTMLStyleAttribute:!0})),ap=new WeakMap;function q6(t,e){let{root:r}=t;return ap.has(r)||ap.set(r,r.children.some(s=>Mx(s,e)&&["ts","typescript"].includes(s.attrMap.lang))),ap.get(r)}var Bn=q6;function H6(t,e,r){let s=Yt(r.node);return Ar(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},In)}function z6(t,e,r,s){let i=Yt(r.node),a=Bn(r,s)?"babel-ts":"babel";return Ar(`function _(${i}) {}`,t,{parser:a,__isVueBindings:!0})}async function W6(t,e,r,s){let i=Yt(r.node),{left:a,operator:u,right:p}=J6(i),c=Bn(r,s);return[At(await Ar(`function _(${a}) {}`,t,{parser:c?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",u," ",await Ar(p,t,{parser:c?"__ts_expression":"__js_expression"})]}function J6(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,s=/^\(|\)$/gu,i=t.match(e);if(!i)return;let a={for:i[3].trim()};if(!a.for)return;let u=Ut(0,i[1].trim(),s,""),p=u.match(r);p?(a.alias=u.replace(r,""),a.iterator1=p[1].trim(),p[2]&&(a.iterator2=p[2].trim())):a.alias=u;let c=[a.alias,a.iterator1,a.iterator2];if(!c.some((m,f)=>!m&&(f===0||c.slice(f+1).some(Boolean))))return{left:c.filter(Boolean).join(","),operator:i[2],right:a.for}}var K6=[{test:t=>t.node.fullName==="v-for",print:W6},{test:(t,e)=>t.node.fullName==="generic"&&Mx(t.parent,e),print:H6},{test:({node:t},e)=>d6(t)||f6(t,e),print:z6},{test(t){let e=t.node.fullName;return e.startsWith("@")||e.startsWith("v-on:")},print:X6},{test(t){let e=t.node.fullName;return e.startsWith(":")||e.startsWith(".")||e.startsWith("v-bind:")},print:G6},{test:t=>t.node.fullName.startsWith("v-"),print:Ux}].map(({test:t,print:e})=>({test:(r,s)=>s.parser==="vue"&&t(r,s),print:e}));async function X6(t,e,r,s){try{return await Ux(t,e,r,s)}catch(u){if(u.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw u}let i=Yt(r.node),a=Bn(r,s)?"__vue_ts_event_binding":"__vue_event_binding";return Ar(i,t,{parser:a},In)}function G6(t,e,r,s){let i=Yt(r.node),a=Bn(r,s)?"__vue_ts_expression":"__vue_expression";return Ar(i,t,{parser:a},In)}function Ux(t,e,r,s){let i=Yt(r.node),a=Bn(r,s)?"__ts_expression":"__js_expression";return Ar(i,t,{parser:a},In)}var Y6=K6,Q6=[{test:$6,print:j6},{test:U6,print:V6},{test:v6,print:S6},{test:A6,print:C6},{test:F6,print:k6},...Y6,...E6].map(({test:t,print:e})=>({test:t,print:eO(e)}));function Z6(t,e){let{node:r}=t,{value:s}=r;if(s)return $x(r,e)?[r.rawName,"=",s]:Q6.find(({test:i})=>i(t,e))?.print}function eO(t){return async(e,r,s,i)=>{let a=await t(e,r,s,i);if(a)return a=Dx(a,u=>typeof u=="string"?Ut(0,u,'"',"""):u),[s.node.rawName,'="',At(a),'"']}}var tO=Z6,ro=t=>t.sourceSpan.start.offset,ju=t=>t.sourceSpan.end.offset;function Xp(t,e){return[t.isSelfClosing?"":rO(t,e),Aa(t,e)]}function rO(t,e){return t.lastChild&&Ma(t.lastChild)?"":[sO(t,e),qh(t,e)]}function Aa(t,e){return(t.next?Ci(t.next):io(t.parent))?"":[so(t,e),Ai(t,e)]}function sO(t,e){return io(t)?so(t.lastChild,e):""}function Ai(t,e){return Ma(t)?qh(t.parent,e):Uu(t)?Hh(t.next,e):""}function qh(t,e){if(Vx(t,e))return"";switch(t.kind){case"ieConditionalComment":return"<!";case"element":if(t.hasHtmComponentClosingTag)return"<//";default:return`</${t.rawName}`}}function so(t,e){if(Vx(t,e))return"";switch(t.kind){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Vx(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&($u(t)||Sx(t.parent,e))}function Ci(t){return t.prev&&t.prev.kind!=="docType"&&t.kind!=="angularControlFlowBlock"&&!mr(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function io(t){return t.lastChild?.isTrailingSpaceSensitive&&!t.lastChild.hasTrailingSpaces&&!mr(Uh(t.lastChild))&&!xn(t)}function Ma(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&mr(Uh(t))}function Uu(t){return t.next&&!mr(t.next)&&mr(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function iO(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return e?e[1]?e[1].split(/\s+/u):!0:!1}function Vu(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function nO(t,e,r){let{node:s}=t;if(!Rh(s.attrs))return s.isSelfClosing?" ":"";let i=s.prev?.kind==="comment"&&iO(s.prev.value),a=typeof i=="boolean"?()=>i:Array.isArray(i)?f=>i.includes(f.rawName):()=>!1,u=t.map(({node:f})=>a(f)?qr(e.originalText.slice(ro(f),ju(f))):r(),"attrs"),p=s.kind==="element"&&s.fullName==="script"&&s.attrs.length===1&&s.attrs[0].fullName==="src"&&s.children.length===0,c=e.singleAttributePerLine&&s.attrs.length>1&&!Nn(s,e)?at:ht,m=[Qr([p?" ":ht,kn(c,u)])];return s.firstChild&&Vu(s.firstChild)||s.isSelfClosing&&io(s.parent)||p?m.push(s.isSelfClosing?" ":""):m.push(e.bracketSameLine?s.isSelfClosing?" ":"":s.isSelfClosing?ht:Bt),m}function aO(t){return t.firstChild&&Vu(t.firstChild)?"":zh(t)}function Gp(t,e,r){let{node:s}=t;return[Ca(s,e),nO(t,e,r),s.isSelfClosing?"":aO(s)]}function Ca(t,e){return t.prev&&Uu(t.prev)?"":[bi(t,e),Hh(t,e)]}function bi(t,e){return Vu(t)?zh(t.parent):Ci(t)?so(t.prev,e):""}var py="<!doctype";function Hh(t,e){switch(t.kind){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${t.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(t.value==="html"){let{filepath:s}=e;if(s&&/\.html?$/u.test(s))return py}let r=ro(t);return e.originalText.slice(r,r+py.length)}case"angularIcuExpression":return"{";case"element":if(t.condition)return`<!--[if ${t.condition}]><!--><${t.rawName}`;default:return`<${t.rawName}`}}function zh(t){switch(t.kind){case"ieConditionalComment":return"]>";case"element":if(t.condition)return"><!--<![endif]-->";default:return">"}}function oO(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&Vu(t.firstChild)&&(r-=zh(t).length);let s=t.endSourceSpan.start.offset;return t.lastChild&&Ma(t.lastChild)?s+=qh(t,e).length:io(t)&&(s-=so(t.lastChild,e).length),e.originalText.slice(r,s)}var qx=oO,uO=new Set(["if","else if","for","switch","case"]);function lO(t,e){let{node:r}=t;switch(r.kind){case"element":if(ys(r,e)||r.kind==="interpolation")return;if(!r.isSelfClosing&&Vh(r,e)){let s=oy(r,e);return s?async(i,a)=>{let u=qx(r,e),p=/^\s*$/u.test(u),c="";return p||(c=await i(vx(u),{parser:s,__embeddedInHtml:!0}),p=c===""),[bi(r,e),At(Gp(t,e,a)),p?"":at,c,p?"":at,Xp(r,e),Ai(r,e)]}:void 0}break;case"text":if(ys(r.parent,e)){let s=oy(r.parent,e);if(s)return async i=>{let a=s==="markdown"?Er.dedentString(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,u={parser:s,__embeddedInHtml:!0};if(e.parser==="html"&&s==="babel"){let p="script",{attrMap:c}=r.parent;c&&(c.type==="module"||(c.type==="text/babel"||c.type==="text/jsx")&&c["data-type"]==="module")&&(p="module"),u.__babelSourceType=p}return[Qa,bi(r,e),await i(a,u),Ai(r,e)]}}else if(r.parent.kind==="interpolation")return async s=>{let i={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?i.parser="__ng_interpolation":e.parser==="vue"?i.parser=Bn(t,e)?"__vue_ts_expression":"__vue_expression":i.parser="__js_expression",[Qr([ht,await s(r.value,i)]),r.parent.next&&Ci(r.parent.next)?" ":ht]};break;case"attribute":return tO(t,e);case"angularControlFlowBlockParameters":return uO.has(t.parent.name)?bL:void 0;case"angularLetDeclarationInitializer":return s=>Ar(r.value,s,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var pO=lO,Gn=null;function ba(t){if(Gn!==null&&typeof Gn.property){let e=Gn;return Gn=ba.prototype=null,e}return Gn=ba.prototype=t??Object.create(null),new ba}var cO=10;for(let t=0;t<=cO;t++)ba();function hO(t){return ba(t)}function dO(t,e="type"){hO(t);function r(s){let i=s[e],a=t[i];if(!Array.isArray(a))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return a}return r}var fO=dO,er=[["children"],[]],mO={root:er[0],element:["attrs","children"],ieConditionalComment:er[0],ieConditionalStartComment:er[1],ieConditionalEndComment:er[1],interpolation:er[0],text:er[0],docType:er[1],comment:er[1],attribute:er[1],cdata:er[1],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:er[0],angularControlFlowBlockParameter:er[1],angularLetDeclaration:["init"],angularLetDeclarationInitializer:er[1],angularIcuExpression:["cases"],angularIcuCase:["expression"]},yO=fO(mO,"kind"),gO=yO,DO="format",xO=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,EO=/^\s*<!--\s*@(?:format|prettier)\s*-->/u,AO=t=>EO.test(t),CO=t=>xO.test(t),bO=t=>`<!-- @${DO} -->
|
|
100
|
-
|
|
101
|
-
${t}`,TO=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function Hx(t){let e=ju(t);return t.kind==="element"&&!t.endSourceSpan&&Rh(t.children)?Math.max(e,Hx(Pn(0,t.children,-1))):e}function Yn(t,e,r){let s=t.node;if($u(s)){let i=Hx(s);return[bi(s,e),qr(Er.trimEnd(e.originalText.slice(ro(s)+(s.prev&&Uu(s.prev)?Hh(s).length:0),i-(s.next&&Ci(s.next)?so(s,e).length:0)))),Ai(s,e)]}return r()}function Lo(t,e){return mr(t)&&mr(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?ip(e)?at:ht:"":ip(e)?at:Bt:Uu(t)&&($u(e)||e.firstChild||e.isSelfClosing||e.kind==="element"&&e.attrs.length>0)||t.kind==="element"&&t.isSelfClosing&&Ci(e)?"":!e.isLeadingSpaceSensitive||ip(e)||Ci(e)&&t.lastChild&&Ma(t.lastChild)&&t.lastChild.lastChild&&Ma(t.lastChild.lastChild)?at:e.hasLeadingSpaces?ht:Bt}function Wh(t,e,r){let{node:s}=t;if(Px(s))return[Qa,...t.map(()=>{let a=t.node,u=a.prev?Lo(a.prev,a):"";return[u?[u,_o(a.prev)?at:""]:"",Yn(t,e,r)]},"children")];let i=s.children.map(()=>Symbol(""));return t.map(({node:a,index:u})=>{if(mr(a)){if(a.prev&&mr(a.prev)){let y=Lo(a.prev,a);if(y)return _o(a.prev)?[at,at,Yn(t,e,r)]:[y,Yn(t,e,r)]}return Yn(t,e,r)}let p=[],c=[],m=[],f=[],d=a.prev?Lo(a.prev,a):"",D=a.next?Lo(a,a.next):"";return d&&(_o(a.prev)?p.push(at,at):d===at?p.push(at):mr(a.prev)?c.push(d):c.push(Oa("",Bt,{groupId:i[u-1]}))),D&&(_o(a)?mr(a.next)&&f.push(at,at):D===at?mr(a.next)&&f.push(at):m.push(D)),[...p,At([...c,At([Yn(t,e,r),...m],{id:i[u]})]),...f]},"children")}function vO(t,e,r){let{node:s}=t,i=[];if(FO(t)&&i.push("} "),i.push("@",s.name),wO(s))return i.push(";"),i;if(s.parameters&&i.push(" (",At(r("parameters")),")"),!PO(s)){i.push(" {");let a=zx(s);s.children.length>0?(s.firstChild.hasLeadingSpaces=!0,s.lastChild.hasTrailingSpaces=!0,i.push(Qr([at,Wh(t,e,r)])),a&&i.push(at,"}")):a&&i.push("}")}return At(i,{shouldBreak:!0})}function zx(t){return!(t.next?.kind==="angularControlFlowBlock"&&TO.get(t.name)?.has(t.next.name))}var SO=t=>t?.kind==="angularControlFlowBlock"&&(t.name==="case"||t.name==="default"),wO=t=>t?.kind==="angularControlFlowBlock"&&t.name==="default never";function PO(t){return SO(t)&&t.endSourceSpan&&t.endSourceSpan.start.offset===t.endSourceSpan.end.offset}function FO(t){let{previous:e}=t;return e?.kind==="angularControlFlowBlock"&&!$u(e)&&!zx(e)}function kO(t,e,r){return[Qr([Bt,kn([";",ht],t.map(r,"children"))]),Bt]}function IO(t,e,r){let{node:s}=t;return[Ca(s,e),At([s.switchValue.trim(),", ",s.type,s.cases.length>0?[",",Qr([ht,kn(ht,t.map(r,"cases"))])]:"",Bt]),Aa(s,e)]}function NO(t,e,r){let{node:s}=t;return[s.value," {",At([Qr([Bt,t.map(({node:i,isLast:a})=>{let u=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&u.unshift(ht),i.hasTrailingSpaces&&!a&&u.push(ht)),u},"expression")]),Bt]),"}"]}function BO(t,e,r){let{node:s}=t;if(Sx(s,e))return[bi(s,e),At(Gp(t,e,r)),qr(qx(s,e)),...Xp(s,e),Ai(s,e)];let i=s.children.length===1&&(s.firstChild.kind==="interpolation"||s.firstChild.kind==="angularIcuExpression")&&s.firstChild.isLeadingSpaceSensitive&&!s.firstChild.hasLeadingSpaces&&s.lastChild.isTrailingSpaceSensitive&&!s.lastChild.hasTrailingSpaces,a=Symbol("element-attr-group-id"),u=f=>At([At(Gp(t,e,r),{id:a}),f,Xp(s,e)]),p=f=>i?iL(f,{groupId:a}):(ys(s,e)||Ru(s,e))&&s.parent.kind==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?f:Qr(f),c=()=>i?Oa(Bt,"",{groupId:a}):s.firstChild.hasLeadingSpaces&&s.firstChild.isLeadingSpaceSensitive?ht:s.firstChild.kind==="text"&&s.isWhitespaceSensitive&&s.isIndentationSensitive?sL(Bt):Bt,m=()=>(s.next?Ci(s.next):io(s.parent))?s.lastChild.hasTrailingSpaces&&s.lastChild.isTrailingSpaceSensitive?" ":"":i?Oa(Bt,"",{groupId:a}):s.lastChild.hasTrailingSpaces&&s.lastChild.isTrailingSpaceSensitive?ht:(s.lastChild.kind==="comment"||s.lastChild.kind==="text"&&s.isWhitespaceSensitive&&s.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(s.lastChild.value)?"":Bt;return s.children.length===0?u(s.hasDanglingSpaces&&s.isDanglingSpaceSensitive?ht:""):u([ZL(s)?Qa:"",p([c(),Wh(t,e,r)]),m()])}var os=(function(t){return t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA",t})({});function qu(t,e=!0){if(t[0]!=":")return[null,t];let r=t.indexOf(":",1);if(r===-1){if(e)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,r),t.slice(r+1)]}function cy(t){return qu(t)[1]==="ng-container"}function hy(t){return qu(t)[1]==="ng-content"}function eu(t){return t===null?null:qu(t)[0]}function Ta(t,e){return t?`:${t}:${e}`:e}var dy={name:"custom-elements"},fy={name:"no-errors-schema"},Yi=(function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t[t.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",t})({}),_O=/-+([a-z0-9])/g;function LO(t){return t.replace(_O,(...e)=>e[1].toUpperCase())}var tu;function my(){return tu||(tu={},Qn(Yi.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),Qn(Yi.STYLE,["*|style"]),Qn(Yi.URL,["*|formAction","area|href","a|href","a|xlink:href","form|action","annotation|href","annotation|xlink:href","annotation-xml|href","annotation-xml|xlink:href","maction|href","maction|xlink:href","malignmark|href","malignmark|xlink:href","math|href","math|xlink:href","mroot|href","mroot|xlink:href","msqrt|href","msqrt|xlink:href","merror|href","merror|xlink:href","mfrac|href","mfrac|xlink:href","mglyph|href","mglyph|xlink:href","msub|href","msub|xlink:href","msup|href","msup|xlink:href","msubsup|href","msubsup|xlink:href","mmultiscripts|href","mmultiscripts|xlink:href","mprescripts|href","mprescripts|xlink:href","mi|href","mi|xlink:href","mn|href","mn|xlink:href","mo|href","mo|xlink:href","mpadded|href","mpadded|xlink:href","mphantom|href","mphantom|xlink:href","mrow|href","mrow|xlink:href","ms|href","ms|xlink:href","mspace|href","mspace|xlink:href","mstyle|href","mstyle|xlink:href","mtable|href","mtable|xlink:href","mtd|href","mtd|xlink:href","mtr|href","mtr|xlink:href","mtext|href","mtext|xlink:href","mover|href","mover|xlink:href","munder|href","munder|xlink:href","munderover|href","munderover|xlink:href","semantics|href","semantics|xlink:href","none|href","none|xlink:href","img|src","video|src"]),Qn(Yi.RESOURCE_URL,["base|href","embed|src","frame|src","iframe|src","link|href","object|codebase","object|data","script|src","script|href","script|xlink:href"]),Qn(Yi.ATTRIBUTE_NO_BINDING,["animate|attributeName","animate|values","animate|to","animate|from","set|to","set|attributeName","animateMotion|attributeName","animateTransform|attributeName","unknown|attributeName","unknown|values","unknown|to","unknown|from","iframe|sandbox","iframe|allow","iframe|allowFullscreen","iframe|referrerPolicy","iframe|csp","iframe|fetchPriority","unknown|sandbox","unknown|allow","unknown|allowFullscreen","unknown|referrerPolicy","unknown|csp","unknown|fetchPriority"])),tu}function Qn(t,e){for(let r of e)tu[r.toLowerCase()]=t}var OO=class{},MO="boolean",$O="number",RO="string",jO="object",UO=["[Element]|textContent,%ariaActiveDescendantElement,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColIndexText,%ariaColSpan,%ariaControlsElements,%ariaCurrent,%ariaDescribedByElements,%ariaDescription,%ariaDetailsElements,%ariaDisabled,%ariaErrorMessageElements,%ariaExpanded,%ariaFlowToElements,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLabelledByElements,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaOwnsElements,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowIndexText,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,search,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":svg:graphics^:svg:|",":svg:animation^:svg:|*begin,*end,*repeat",":svg:geometry^:svg:|",":svg:componentTransferFunction^:svg:|",":svg:gradient^:svg:|",":svg:textContent^:svg:graphics|",":svg:textPositioning^:svg:textContent|","a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,rev,search,shape,target,text,type,username","area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,%relList,search,shape,target,username","audio^media|","br^[HTMLElement]|clear","base^[HTMLElement]|href,target","body^[HTMLElement]|aLink,background,bgColor,link,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink","button^[HTMLElement]|!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value","canvas^[HTMLElement]|#height,#width","content^[HTMLElement]|select","dl^[HTMLElement]|!compact","data^[HTMLElement]|value","datalist^[HTMLElement]|","details^[HTMLElement]|!open","dialog^[HTMLElement]|!open,returnValue","dir^[HTMLElement]|!compact","div^[HTMLElement]|align","embed^[HTMLElement]|align,height,name,src,type,width","fieldset^[HTMLElement]|!disabled,name","font^[HTMLElement]|color,face,size","form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target","frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src","frameset^[HTMLElement]|cols,*afterprint,*beforeprint,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*messageerror,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows","geolocation^[HTMLElement]|accuracymode,!autolocate,*location,*promptaction,*promptdismiss,*validationstatuschange,!watch","hr^[HTMLElement]|align,color,!noShade,size,width","head^[HTMLElement]|","h1,h2,h3,h4,h5,h6^[HTMLElement]|align","html^[HTMLElement]|version","iframe^[HTMLElement]|align,allow,!allowFullscreen,!allowPaymentRequest,csp,frameBorder,height,loading,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width","img^[HTMLElement]|align,alt,border,%crossOrigin,decoding,#height,#hspace,!isMap,loading,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width","input^[HTMLElement]|accept,align,alt,autocomplete,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width","li^[HTMLElement]|type,#value","label^[HTMLElement]|htmlFor","legend^[HTMLElement]|align","link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,imageSizes,imageSrcset,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type","map^[HTMLElement]|name","marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width","menu^[HTMLElement]|!compact","meta^[HTMLElement]|content,httpEquiv,media,name,scheme","meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value","ins,del^[HTMLElement]|cite,dateTime","ol^[HTMLElement]|!compact,!reversed,#start,type","object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width","optgroup^[HTMLElement]|!disabled,label","option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value","output^[HTMLElement]|defaultValue,%htmlFor,name,value","p^[HTMLElement]|align","param^[HTMLElement]|name,type,value,valueType","picture^[HTMLElement]|","pre^[HTMLElement]|#width","progress^[HTMLElement]|#max,#value","q,blockquote,cite^[HTMLElement]|","script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,!noModule,%referrerPolicy,src,text,type","select^[HTMLElement]|autocomplete,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value","selectedcontent^[HTMLElement]|","slot^[HTMLElement]|name","source^[HTMLElement]|#height,media,sizes,src,srcset,type,#width","span^[HTMLElement]|","style^[HTMLElement]|!disabled,media,type","search^[HTMLELement]|","caption^[HTMLElement]|align","th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width","col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width","table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width","tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign","tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign","template^[HTMLElement]|","textarea^[HTMLElement]|autocomplete,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap","time^[HTMLElement]|dateTime","title^[HTMLElement]|text","track^[HTMLElement]|!default,kind,label,src,srclang","ul^[HTMLElement]|!compact,type","unknown^[HTMLElement]|","video^media|!disablePictureInPicture,#height,*enterpictureinpicture,*leavepictureinpicture,!playsInline,poster,#width",":svg:a^:svg:graphics|",":svg:animate^:svg:animation|",":svg:animateMotion^:svg:animation|",":svg:animateTransform^:svg:animation|",":svg:circle^:svg:geometry|",":svg:clipPath^:svg:graphics|",":svg:defs^:svg:graphics|",":svg:desc^:svg:|",":svg:discard^:svg:|",":svg:ellipse^:svg:geometry|",":svg:feBlend^:svg:|",":svg:feColorMatrix^:svg:|",":svg:feComponentTransfer^:svg:|",":svg:feComposite^:svg:|",":svg:feConvolveMatrix^:svg:|",":svg:feDiffuseLighting^:svg:|",":svg:feDisplacementMap^:svg:|",":svg:feDistantLight^:svg:|",":svg:feDropShadow^:svg:|",":svg:feFlood^:svg:|",":svg:feFuncA^:svg:componentTransferFunction|",":svg:feFuncB^:svg:componentTransferFunction|",":svg:feFuncG^:svg:componentTransferFunction|",":svg:feFuncR^:svg:componentTransferFunction|",":svg:feGaussianBlur^:svg:|",":svg:feImage^:svg:|",":svg:feMerge^:svg:|",":svg:feMergeNode^:svg:|",":svg:feMorphology^:svg:|",":svg:feOffset^:svg:|",":svg:fePointLight^:svg:|",":svg:feSpecularLighting^:svg:|",":svg:feSpotLight^:svg:|",":svg:feTile^:svg:|",":svg:feTurbulence^:svg:|",":svg:filter^:svg:|",":svg:foreignObject^:svg:graphics|",":svg:g^:svg:graphics|",":svg:image^:svg:graphics|decoding",":svg:line^:svg:geometry|",":svg:linearGradient^:svg:gradient|",":svg:mpath^:svg:|",":svg:marker^:svg:|",":svg:mask^:svg:|",":svg:metadata^:svg:|",":svg:path^:svg:geometry|",":svg:pattern^:svg:|",":svg:polygon^:svg:geometry|",":svg:polyline^:svg:geometry|",":svg:radialGradient^:svg:gradient|",":svg:rect^:svg:geometry|",":svg:svg^:svg:graphics|#currentScale,#zoomAndPan",":svg:script^:svg:|type",":svg:set^:svg:animation|",":svg:stop^:svg:|",":svg:style^:svg:|!disabled,media,title,type",":svg:switch^:svg:graphics|",":svg:symbol^:svg:|",":svg:tspan^:svg:textPositioning|",":svg:text^:svg:textPositioning|",":svg:textPath^:svg:textContent|",":svg:title^:svg:|",":svg:use^:svg:graphics|",":svg:view^:svg:|#zoomAndPan","data^[HTMLElement]|value","keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name","menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default","summary^[HTMLElement]|","time^[HTMLElement]|dateTime",":svg:cursor^:svg:|",":math:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforeinput,*beforematch,*beforetoggle,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contentvisibilityautostatechange,*contextlost,*contextmenu,*contextrestored,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*scrollend,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,%style,#tabIndex",":math:math^:math:|",":math:maction^:math:|",":math:menclose^:math:|",":math:merror^:math:|",":math:mfenced^:math:|",":math:mfrac^:math:|",":math:mi^:math:|",":math:mmultiscripts^:math:|",":math:mn^:math:|",":math:mo^:math:|",":math:mover^:math:|",":math:mpadded^:math:|",":math:mphantom^:math:|",":math:mroot^:math:|",":math:mrow^:math:|",":math:ms^:math:|",":math:mspace^:math:|",":math:msqrt^:math:|",":math:mstyle^:math:|",":math:msub^:math:|",":math:msubsup^:math:|",":math:msup^:math:|",":math:mtable^:math:|",":math:mtd^:math:|",":math:mtext^:math:|",":math:mtr^:math:|",":math:munder^:math:|",":math:munderover^:math:|",":math:semantics^:math:|"],Wx=new Map(Object.entries({class:"className",for:"htmlFor",formaction:"formAction",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex","aria-activedescendant":"ariaActiveDescendantElement","aria-atomic":"ariaAtomic","aria-autocomplete":"ariaAutoComplete","aria-busy":"ariaBusy","aria-checked":"ariaChecked","aria-colcount":"ariaColCount","aria-colindex":"ariaColIndex","aria-colindextext":"ariaColIndexText","aria-colspan":"ariaColSpan","aria-controls":"ariaControlsElements","aria-current":"ariaCurrent","aria-describedby":"ariaDescribedByElements","aria-description":"ariaDescription","aria-details":"ariaDetailsElements","aria-disabled":"ariaDisabled","aria-errormessage":"ariaErrorMessageElements","aria-expanded":"ariaExpanded","aria-flowto":"ariaFlowToElements","aria-haspopup":"ariaHasPopup","aria-hidden":"ariaHidden","aria-invalid":"ariaInvalid","aria-keyshortcuts":"ariaKeyShortcuts","aria-label":"ariaLabel","aria-labelledby":"ariaLabelledByElements","aria-level":"ariaLevel","aria-live":"ariaLive","aria-modal":"ariaModal","aria-multiline":"ariaMultiLine","aria-multiselectable":"ariaMultiSelectable","aria-orientation":"ariaOrientation","aria-owns":"ariaOwnsElements","aria-placeholder":"ariaPlaceholder","aria-posinset":"ariaPosInSet","aria-pressed":"ariaPressed","aria-readonly":"ariaReadOnly","aria-required":"ariaRequired","aria-roledescription":"ariaRoleDescription","aria-rowcount":"ariaRowCount","aria-rowindex":"ariaRowIndex","aria-rowindextext":"ariaRowIndexText","aria-rowspan":"ariaRowSpan","aria-selected":"ariaSelected","aria-setsize":"ariaSetSize","aria-sort":"ariaSort","aria-valuemax":"ariaValueMax","aria-valuemin":"ariaValueMin","aria-valuenow":"ariaValueNow","aria-valuetext":"ariaValueText"})),VO=Array.from(Wx).reduce((t,[e,r])=>(t.set(e,r),t),new Map),qO=class extends OO{_schema=new Map;_eventSchema=new Map;constructor(){super(),UO.forEach(e=>{let r=new Map,s=new Set,[i,a]=e.split("|"),u=a.split(","),[p,c]=i.split("^");p.split(",").forEach(f=>{this._schema.set(f.toLowerCase(),r),this._eventSchema.set(f.toLowerCase(),s)});let m=c&&this._schema.get(c.toLowerCase());if(m){for(let[f,d]of m)r.set(f,d);for(let f of this._eventSchema.get(c.toLowerCase()))s.add(f)}u.forEach(f=>{if(f.length>0)switch(f[0]){case"*":s.add(f.substring(1));break;case"!":r.set(f.substring(1),MO);break;case"#":r.set(f.substring(1),$O);break;case"%":r.set(f.substring(1),jO);break;default:r.set(f,RO)}})})}hasProperty(e,r,s){if(s.some(i=>i.name===fy.name))return!0;if(e.indexOf("-")>-1){if(cy(e)||hy(e))return!1;if(s.some(i=>i.name===dy.name))return!0}return(this._schema.get(e.toLowerCase())||this._schema.get("unknown")).has(r)}hasElement(e,r){return r.some(s=>s.name===fy.name)||e.indexOf("-")>-1&&(cy(e)||hy(e)||r.some(s=>s.name===dy.name))?!0:this._schema.has(e.toLowerCase())}securityContext(e,r,s){s&&(r=this.getMappedPropName(r)),e=e.toLowerCase(),r=r.toLowerCase();let i=my()[e+"|"+r];return i||(i=my()["*|"+r],i||Yi.NONE)}getMappedPropName(e){return Wx.get(e)??e}getDefaultComponentElementName(){return"ng-component"}validateProperty(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event property '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...
|
|
102
|
-
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(s=>VO.get(s)??s)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return LO(e)}normalizeAnimationStyleValue(e,r,s){let i="",a=s.toString().trim(),u=null;if(HO(e)&&s!==0&&s!=="0")if(typeof s=="number")i="px";else{let p=s.match(/^[+-]?[\d\.]+([a-z]*)$/);p&&p[1].length==0&&(u=`Please provide a CSS unit value for ${r}:${s}`)}return{error:u,value:a+i}}};function HO(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var Oe=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:t,implicitNamespacePrefix:e,contentType:r=os.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:u=!1,canSelfClose:p=!1}={}){t&&t.length>0&&t.forEach(c=>this.closedByChildren[c]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=e||null,this.contentType=r,this.ignoreFirstLf=a,this.preventNamespaceInheritance=u,this.canSelfClose=p??i}isClosedByChild(t){return this.isVoid||t.toLowerCase()in this.closedByChildren}getContentType(t){return typeof this.contentType=="object"?(t===void 0?void 0:this.contentType[t])??this.contentType.default:this.contentType}},yy,Zn;function Yp(t){return Zn||(yy=new Oe({canSelfClose:!0}),Zn=Object.assign(Object.create(null),{base:new Oe({isVoid:!0}),meta:new Oe({isVoid:!0}),area:new Oe({isVoid:!0}),embed:new Oe({isVoid:!0}),link:new Oe({isVoid:!0}),img:new Oe({isVoid:!0}),input:new Oe({isVoid:!0}),param:new Oe({isVoid:!0}),hr:new Oe({isVoid:!0}),br:new Oe({isVoid:!0}),source:new Oe({isVoid:!0}),track:new Oe({isVoid:!0}),wbr:new Oe({isVoid:!0}),p:new Oe({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new Oe({closedByChildren:["tbody","tfoot"]}),tbody:new Oe({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new Oe({closedByChildren:["tbody"],closedByParent:!0}),tr:new Oe({closedByChildren:["tr"],closedByParent:!0}),td:new Oe({closedByChildren:["td","th"],closedByParent:!0}),th:new Oe({closedByChildren:["td","th"],closedByParent:!0}),col:new Oe({isVoid:!0}),svg:new Oe({implicitNamespacePrefix:"svg"}),foreignObject:new Oe({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new Oe({implicitNamespacePrefix:"math"}),li:new Oe({closedByChildren:["li"],closedByParent:!0}),dt:new Oe({closedByChildren:["dt","dd"]}),dd:new Oe({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new Oe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new Oe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new Oe({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new Oe({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new Oe({closedByChildren:["optgroup"],closedByParent:!0}),option:new Oe({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new Oe({ignoreFirstLf:!0}),listing:new Oe({ignoreFirstLf:!0}),style:new Oe({contentType:os.RAW_TEXT}),script:new Oe({contentType:os.RAW_TEXT}),title:new Oe({contentType:{default:os.ESCAPABLE_RAW_TEXT,svg:os.PARSABLE_DATA}}),textarea:new Oe({contentType:os.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new qO().allKnownElementNames().forEach(e=>{!Zn[e]&&eu(e)===null&&(Zn[e]=new Oe({canSelfClose:!1}))})),Zn[t]??yy}var Qp=class Jx{constructor(e,r,s,i){this.file=e,this.offset=r,this.line=s,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,s=r.length,i=this.offset,a=this.line,u=this.col;for(;i>0&&e<0;)if(i--,e++,r.charCodeAt(i)==10){a--;let p=r.substring(0,i-1).lastIndexOf(`
|
|
103
|
-
`);u=p>0?i-p:i}else u--;for(;i<s&&e>0;){let p=r.charCodeAt(i);i++,e--,p==10?(a++,u=0):u++}return new Jx(this.file,i,a,u)}getContext(e,r){let s=this.file.content,i=this.offset;if(i!=null){i>s.length-1&&(i=s.length-1);let a=i,u=0,p=0;for(;u<e&&i>0&&(i--,u++,!(s[i]==`
|
|
104
|
-
`&&++p==r)););for(u=0,p=0;u<e&&a<s.length-1&&(a++,u++,!(s[a]==`
|
|
105
|
-
`&&++p==r)););return{before:s.substring(i,this.offset),after:s.substring(this.offset,a+1)}}return null}},Kx=class{constructor(t,e){this.content=t,this.url=e}},_e=class{constructor(t,e,r=t,s=null){this.start=t,this.end=e,this.fullStart=r,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},gy=(function(t){return t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR",t})({}),Qi=class extends Error{constructor(t,e,r=gy.ERROR,s){super(e),this.span=t,this.msg=e,this.level=r,this.relatedError=s,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let t=this.span.start.getContext(100,3);return t?`${this.msg} ("${t.before}[${gy[this.level]} ->]${t.after}")`:this.msg}toString(){let t=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${t}`}},Li=class{constructor(e,r){this.sourceSpan=e,this.i18n=r}},zO=class extends Li{constructor(e,r,s,i){super(r,i),this.value=e,this.tokens=s}visit(e,r){return e.visitText(this,r)}kind="text"},WO=class extends Li{constructor(e,r,s,i){super(r,i),this.value=e,this.tokens=s}visit(e,r){return e.visitCdata(this,r)}kind="cdata"},JO=class extends Li{constructor(e,r,s,i,a,u){super(i,u),this.switchValue=e,this.type=r,this.cases=s,this.switchValueSourceSpan=a}visit(e,r){return e.visitExpansion(this,r)}kind="expansion"},KO=class{constructor(t,e,r,s,i){this.value=t,this.expression=e,this.sourceSpan=r,this.valueSourceSpan=s,this.expSourceSpan=i}visit(t,e){return t.visitExpansionCase(this,e)}kind="expansionCase"},XO=class extends Li{constructor(e,r,s,i,a,u,p){super(s,p),this.name=e,this.value=r,this.keySpan=i,this.valueSpan=a,this.valueTokens=u}visit(e,r){return e.visitAttribute(this,r)}kind="attribute";get nameSpan(){return this.keySpan}},ai=class extends Li{constructor(e,r,s,i,a,u,p,c=null,m=null,f,d){super(u,d),this.name=e,this.attrs=r,this.directives=s,this.children=i,this.isSelfClosing=a,this.startSourceSpan=p,this.endSourceSpan=c,this.nameSpan=m,this.isVoid=f}visit(e,r){return e.visitElement(this,r)}kind="element"},GO=class{constructor(e,r){this.value=e,this.sourceSpan=r}visit(e,r){return e.visitComment(this,r)}kind="comment"},YO=class{constructor(e,r){this.value=e,this.sourceSpan=r}visit(e,r){return e.visitDocType(this,r)}kind="docType"},Ji=class extends Li{constructor(e,r,s,i,a,u,p=null,c){super(i,c),this.name=e,this.parameters=r,this.children=s,this.nameSpan=a,this.startSourceSpan=u,this.endSourceSpan=p}visit(e,r){return e.visitBlock(this,r)}kind="block"},is=class extends Li{constructor(e,r,s,i,a,u,p,c,m,f=null,d){super(c,d),this.componentName=e,this.tagName=r,this.fullName=s,this.attrs=i,this.directives=a,this.children=u,this.isSelfClosing=p,this.startSourceSpan=m,this.endSourceSpan=f}visit(e,r){return e.visitComponent(this,r)}kind="component"},QO=class{constructor(e,r,s,i,a=null){this.name=e,this.attrs=r,this.sourceSpan=s,this.startSourceSpan=i,this.endSourceSpan=a}visit(e,r){return e.visitDirective(this,r)}kind="directive"},Dy=class{constructor(t,e){this.expression=t,this.sourceSpan=e}visit(t,e){return t.visitBlockParameter(this,e)}kind="blockParameter";startSourceSpan=null;endSourceSpan=null},xy=class{constructor(t,e,r,s,i){this.name=t,this.value=e,this.sourceSpan=r,this.nameSpan=s,this.valueSpan=i}visit(t,e){return t.visitLetDeclaration(this,e)}kind="letDeclaration";startSourceSpan=null;endSourceSpan=null};function Xx(t,e,r=null){let s=[],i=t.visit?a=>t.visit(a,r)||a.visit(t,r):a=>a.visit(t,r);return e.forEach(a=>{let u=i(a);u&&s.push(u)}),s}var ZO=class{constructor(){}visitElement(e,r){this.visitChildren(r,s=>{s(e.attrs),s(e.directives),s(e.children)})}visitAttribute(e,r){}visitText(e,r){}visitCdata(e,r){}visitComment(e,r){}visitDocType(e,r){}visitExpansion(e,r){return this.visitChildren(r,s=>{s(e.cases)})}visitExpansionCase(e,r){}visitBlock(e,r){this.visitChildren(r,s=>{s(e.parameters),s(e.children)})}visitBlockParameter(e,r){}visitLetDeclaration(e,r){}visitComponent(e,r){this.visitChildren(r,s=>{s(e.attrs),s(e.children)})}visitDirective(e,r){this.visitChildren(r,s=>{s(e.attrs)})}visitChildren(e,r){let s=[],i=this;function a(u){u&&s.push(Xx(i,u,e))}return r(a),Array.prototype.concat.apply([],s)}},$a={AElig:"Æ",AMP:"&",amp:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",af:"",Aring:"Å",angst:"Å",Ascr:"𝒜",Assign:"≔",colone:"≔",coloneq:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",setminus:"∖",setmn:"∖",smallsetminus:"∖",ssetmn:"∖",Barv:"⫧",Barwed:"⌆",doublebarwedge:"⌆",Bcy:"Б",Because:"∵",becaus:"∵",because:"∵",Bernoullis:"ℬ",Bscr:"ℬ",bernou:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",breve:"˘",Bumpeq:"≎",HumpDownHump:"≎",bump:"≎",CHcy:"Ч",COPY:"©",copy:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",DD:"ⅅ",Cayleys:"ℭ",Cfr:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",cedil:"¸",CenterDot:"·",centerdot:"·",middot:"·",Chi:"Χ",CircleDot:"⊙",odot:"⊙",CircleMinus:"⊖",ominus:"⊖",CirclePlus:"⊕",oplus:"⊕",CircleTimes:"⊗",otimes:"⊗",ClockwiseContourIntegral:"∲",cwconint:"∲",CloseCurlyDoubleQuote:"”",rdquo:"”",rdquor:"”",CloseCurlyQuote:"’",rsquo:"’",rsquor:"’",Colon:"∷",Proportion:"∷",Colone:"⩴",Congruent:"≡",equiv:"≡",Conint:"∯",DoubleContourIntegral:"∯",ContourIntegral:"∮",conint:"∮",oint:"∮",Copf:"ℂ",complexes:"ℂ",Coproduct:"∐",coprod:"∐",CounterClockwiseContourIntegral:"∳",awconint:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",asympeq:"≍",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",ddagger:"‡",Darr:"↡",Dashv:"⫤",DoubleLeftTee:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",nabla:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",acute:"´",DiacriticalDot:"˙",dot:"˙",DiacriticalDoubleAcute:"˝",dblac:"˝",DiacriticalGrave:"`",grave:"`",DiacriticalTilde:"˜",tilde:"˜",Diamond:"⋄",diam:"⋄",diamond:"⋄",DifferentialD:"ⅆ",dd:"ⅆ",Dopf:"𝔻",Dot:"¨",DoubleDot:"¨",die:"¨",uml:"¨",DotDot:"⃜",DotEqual:"≐",doteq:"≐",esdot:"≐",DoubleDownArrow:"⇓",Downarrow:"⇓",dArr:"⇓",DoubleLeftArrow:"⇐",Leftarrow:"⇐",lArr:"⇐",DoubleLeftRightArrow:"⇔",Leftrightarrow:"⇔",hArr:"⇔",iff:"⇔",DoubleLongLeftArrow:"⟸",Longleftarrow:"⟸",xlArr:"⟸",DoubleLongLeftRightArrow:"⟺",Longleftrightarrow:"⟺",xhArr:"⟺",DoubleLongRightArrow:"⟹",Longrightarrow:"⟹",xrArr:"⟹",DoubleRightArrow:"⇒",Implies:"⇒",Rightarrow:"⇒",rArr:"⇒",DoubleRightTee:"⊨",vDash:"⊨",DoubleUpArrow:"⇑",Uparrow:"⇑",uArr:"⇑",DoubleUpDownArrow:"⇕",Updownarrow:"⇕",vArr:"⇕",DoubleVerticalBar:"∥",par:"∥",parallel:"∥",shortparallel:"∥",spar:"∥",DownArrow:"↓",ShortDownArrow:"↓",darr:"↓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",duarr:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",leftharpoondown:"↽",lhard:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",rhard:"⇁",rightharpoondown:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",top:"⊤",DownTeeArrow:"↧",mapstodown:"↧",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",in:"∈",isin:"∈",isinv:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",eqsim:"≂",esim:"≂",Equilibrium:"⇌",rightleftharpoons:"⇌",rlhar:"⇌",Escr:"ℰ",expectation:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",exist:"∃",ExponentialE:"ⅇ",ee:"ⅇ",exponentiale:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",blacksquare:"▪",squarf:"▪",squf:"▪",Fopf:"𝔽",ForAll:"∀",forall:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",gt:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",ggg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",ge:"≥",geq:"≥",GreaterEqualLess:"⋛",gel:"⋛",gtreqless:"⋛",GreaterFullEqual:"≧",gE:"≧",geqq:"≧",GreaterGreater:"⪢",GreaterLess:"≷",gl:"≷",gtrless:"≷",GreaterSlantEqual:"⩾",geqslant:"⩾",ges:"⩾",GreaterTilde:"≳",gsim:"≳",gtrsim:"≳",Gscr:"𝒢",Gt:"≫",NestedGreaterGreater:"≫",gg:"≫",HARDcy:"Ъ",Hacek:"ˇ",caron:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",Poincareplane:"ℌ",HilbertSpace:"ℋ",Hscr:"ℋ",hamilt:"ℋ",Hopf:"ℍ",quaternions:"ℍ",HorizontalLine:"─",boxh:"─",Hstrok:"Ħ",HumpEqual:"≏",bumpe:"≏",bumpeq:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Im:"ℑ",image:"ℑ",imagpart:"ℑ",Igrave:"Ì",Imacr:"Ī",ImaginaryI:"ⅈ",ii:"ⅈ",Int:"∬",Integral:"∫",int:"∫",Intersection:"⋂",bigcap:"⋂",xcap:"⋂",InvisibleComma:"",ic:"",InvisibleTimes:"",it:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",imagline:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",lt:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Lscr:"ℒ",lagran:"ℒ",Larr:"↞",twoheadleftarrow:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",lang:"⟨",langle:"⟨",LeftArrow:"←",ShortLeftArrow:"←",larr:"←",leftarrow:"←",slarr:"←",LeftArrowBar:"⇤",larrb:"⇤",LeftArrowRightArrow:"⇆",leftrightarrows:"⇆",lrarr:"⇆",LeftCeiling:"⌈",lceil:"⌈",LeftDoubleBracket:"⟦",lobrk:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",dharl:"⇃",downharpoonleft:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",lfloor:"⌊",LeftRightArrow:"↔",harr:"↔",leftrightarrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",dashv:"⊣",LeftTeeArrow:"↤",mapstoleft:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",vartriangleleft:"⊲",vltri:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",ltrie:"⊴",trianglelefteq:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",uharl:"↿",upharpoonleft:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",leftharpoonup:"↼",lharu:"↼",LeftVectorBar:"⥒",LessEqualGreater:"⋚",leg:"⋚",lesseqgtr:"⋚",LessFullEqual:"≦",lE:"≦",leqq:"≦",LessGreater:"≶",lessgtr:"≶",lg:"≶",LessLess:"⪡",LessSlantEqual:"⩽",leqslant:"⩽",les:"⩽",LessTilde:"≲",lesssim:"≲",lsim:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",lAarr:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",longleftarrow:"⟵",xlarr:"⟵",LongLeftRightArrow:"⟷",longleftrightarrow:"⟷",xharr:"⟷",LongRightArrow:"⟶",longrightarrow:"⟶",xrarr:"⟶",Lopf:"𝕃",LowerLeftArrow:"↙",swarr:"↙",swarrow:"↙",LowerRightArrow:"↘",searr:"↘",searrow:"↘",Lsh:"↰",lsh:"↰",Lstrok:"Ł",Lt:"≪",NestedLessLess:"≪",ll:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mscr:"ℳ",phmmat:"ℳ",Mfr:"𝔐",MinusPlus:"∓",mnplus:"∓",mp:"∓",Mopf:"𝕄",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",ZeroWidthSpace:"",NewLine:`
|
|
106
|
-
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",nbsp:" ",Nopf:"ℕ",naturals:"ℕ",Not:"⫬",NotCongruent:"≢",nequiv:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",npar:"∦",nparallel:"∦",nshortparallel:"∦",nspar:"∦",NotElement:"∉",notin:"∉",notinva:"∉",NotEqual:"≠",ne:"≠",NotEqualTilde:"≂̸",nesim:"≂̸",NotExists:"∄",nexist:"∄",nexists:"∄",NotGreater:"≯",ngt:"≯",ngtr:"≯",NotGreaterEqual:"≱",nge:"≱",ngeq:"≱",NotGreaterFullEqual:"≧̸",ngE:"≧̸",ngeqq:"≧̸",NotGreaterGreater:"≫̸",nGtv:"≫̸",NotGreaterLess:"≹",ntgl:"≹",NotGreaterSlantEqual:"⩾̸",ngeqslant:"⩾̸",nges:"⩾̸",NotGreaterTilde:"≵",ngsim:"≵",NotHumpDownHump:"≎̸",nbump:"≎̸",NotHumpEqual:"≏̸",nbumpe:"≏̸",NotLeftTriangle:"⋪",nltri:"⋪",ntriangleleft:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",nltrie:"⋬",ntrianglelefteq:"⋬",NotLess:"≮",nless:"≮",nlt:"≮",NotLessEqual:"≰",nle:"≰",nleq:"≰",NotLessGreater:"≸",ntlg:"≸",NotLessLess:"≪̸",nLtv:"≪̸",NotLessSlantEqual:"⩽̸",nleqslant:"⩽̸",nles:"⩽̸",NotLessTilde:"≴",nlsim:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",npr:"⊀",nprec:"⊀",NotPrecedesEqual:"⪯̸",npre:"⪯̸",npreceq:"⪯̸",NotPrecedesSlantEqual:"⋠",nprcue:"⋠",NotReverseElement:"∌",notni:"∌",notniva:"∌",NotRightTriangle:"⋫",nrtri:"⋫",ntriangleright:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",nrtrie:"⋭",ntrianglerighteq:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",nsqsube:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",nsqsupe:"⋣",NotSubset:"⊂⃒",nsubset:"⊂⃒",vnsub:"⊂⃒",NotSubsetEqual:"⊈",nsube:"⊈",nsubseteq:"⊈",NotSucceeds:"⊁",nsc:"⊁",nsucc:"⊁",NotSucceedsEqual:"⪰̸",nsce:"⪰̸",nsucceq:"⪰̸",NotSucceedsSlantEqual:"⋡",nsccue:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",nsupset:"⊃⃒",vnsup:"⊃⃒",NotSupersetEqual:"⊉",nsupe:"⊉",nsupseteq:"⊉",NotTilde:"≁",nsim:"≁",NotTildeEqual:"≄",nsime:"≄",nsimeq:"≄",NotTildeFullEqual:"≇",ncong:"≇",NotTildeTilde:"≉",nap:"≉",napprox:"≉",NotVerticalBar:"∤",nmid:"∤",nshortmid:"∤",nsmid:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",ohm:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",ldquo:"“",OpenCurlyQuote:"‘",lsquo:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",oline:"‾",OverBrace:"⏞",OverBracket:"⎴",tbrk:"⎴",OverParenthesis:"⏜",PartialD:"∂",part:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",plusmn:"±",pm:"±",Popf:"ℙ",primes:"ℙ",Pr:"⪻",Precedes:"≺",pr:"≺",prec:"≺",PrecedesEqual:"⪯",pre:"⪯",preceq:"⪯",PrecedesSlantEqual:"≼",prcue:"≼",preccurlyeq:"≼",PrecedesTilde:"≾",precsim:"≾",prsim:"≾",Prime:"″",Product:"∏",prod:"∏",Proportional:"∝",prop:"∝",propto:"∝",varpropto:"∝",vprop:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',quot:'"',Qfr:"𝔔",Qopf:"ℚ",rationals:"ℚ",Qscr:"𝒬",RBarr:"⤐",drbkarow:"⤐",REG:"®",circledR:"®",reg:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",twoheadrightarrow:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",Rfr:"ℜ",real:"ℜ",realpart:"ℜ",ReverseElement:"∋",SuchThat:"∋",ni:"∋",niv:"∋",ReverseEquilibrium:"⇋",leftrightharpoons:"⇋",lrhar:"⇋",ReverseUpEquilibrium:"⥯",duhar:"⥯",Rho:"Ρ",RightAngleBracket:"⟩",rang:"⟩",rangle:"⟩",RightArrow:"→",ShortRightArrow:"→",rarr:"→",rightarrow:"→",srarr:"→",RightArrowBar:"⇥",rarrb:"⇥",RightArrowLeftArrow:"⇄",rightleftarrows:"⇄",rlarr:"⇄",RightCeiling:"⌉",rceil:"⌉",RightDoubleBracket:"⟧",robrk:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",dharr:"⇂",downharpoonright:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rfloor:"⌋",RightTee:"⊢",vdash:"⊢",RightTeeArrow:"↦",map:"↦",mapsto:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",vartriangleright:"⊳",vrtri:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",rtrie:"⊵",trianglerighteq:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",uharr:"↾",upharpoonright:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",rharu:"⇀",rightharpoonup:"⇀",RightVectorBar:"⥓",Ropf:"ℝ",reals:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",rAarr:"⇛",Rscr:"ℛ",realine:"ℛ",Rsh:"↱",rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortUpArrow:"↑",UpArrow:"↑",uarr:"↑",uparrow:"↑",Sigma:"Σ",SmallCircle:"∘",compfn:"∘",Sopf:"𝕊",Sqrt:"√",radic:"√",Square:"□",squ:"□",square:"□",SquareIntersection:"⊓",sqcap:"⊓",SquareSubset:"⊏",sqsub:"⊏",sqsubset:"⊏",SquareSubsetEqual:"⊑",sqsube:"⊑",sqsubseteq:"⊑",SquareSuperset:"⊐",sqsup:"⊐",sqsupset:"⊐",SquareSupersetEqual:"⊒",sqsupe:"⊒",sqsupseteq:"⊒",SquareUnion:"⊔",sqcup:"⊔",Sscr:"𝒮",Star:"⋆",sstarf:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",sube:"⊆",subseteq:"⊆",Succeeds:"≻",sc:"≻",succ:"≻",SucceedsEqual:"⪰",sce:"⪰",succeq:"⪰",SucceedsSlantEqual:"≽",sccue:"≽",succcurlyeq:"≽",SucceedsTilde:"≿",scsim:"≿",succsim:"≿",Sum:"∑",sum:"∑",Sup:"⋑",Supset:"⋑",Superset:"⊃",sup:"⊃",supset:"⊃",SupersetEqual:"⊇",supe:"⊇",supseteq:"⊇",THORN:"Þ",TRADE:"™",trade:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",there4:"∴",therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",thinsp:" ",Tilde:"∼",sim:"∼",thicksim:"∼",thksim:"∼",TildeEqual:"≃",sime:"≃",simeq:"≃",TildeFullEqual:"≅",cong:"≅",TildeTilde:"≈",ap:"≈",approx:"≈",asymp:"≈",thickapprox:"≈",thkap:"≈",Topf:"𝕋",TripleDot:"⃛",tdot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",lowbar:"_",UnderBrace:"⏟",UnderBracket:"⎵",bbrk:"⎵",UnderParenthesis:"⏝",Union:"⋃",bigcup:"⋃",xcup:"⋃",UnionPlus:"⊎",uplus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",udarr:"⇅",UpDownArrow:"↕",updownarrow:"↕",varr:"↕",UpEquilibrium:"⥮",udhar:"⥮",UpTee:"⊥",bot:"⊥",bottom:"⊥",perp:"⊥",UpTeeArrow:"↥",mapstoup:"↥",UpperLeftArrow:"↖",nwarr:"↖",nwarrow:"↖",UpperRightArrow:"↗",nearr:"↗",nearrow:"↗",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",bigvee:"⋁",xvee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",mid:"∣",shortmid:"∣",smid:"∣",VerticalLine:"|",verbar:"|",vert:"|",VerticalSeparator:"❘",VerticalTilde:"≀",wr:"≀",wreath:"≀",VeryThinSpace:" ",hairsp:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",bigwedge:"⋀",xwedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",Zeta:"Ζ",Zfr:"ℨ",zeetrf:"ℨ",Zopf:"ℤ",integers:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",mstpos:"∾",acE:"∾̳",acd:"∿",acirc:"â",acy:"а",aelig:"æ",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",and:"∧",wedge:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",angle:"∠",ange:"⦤",angmsd:"∡",measuredangle:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angzarr:"⍼",aogon:"ą",aopf:"𝕒",apE:"⩰",apacir:"⩯",ape:"≊",approxeq:"≊",apid:"≋",apos:"'",aring:"å",ascr:"𝒶",ast:"*",midast:"*",atilde:"ã",auml:"ä",awint:"⨑",bNot:"⫭",backcong:"≌",bcong:"≌",backepsilon:"϶",bepsi:"϶",backprime:"‵",bprime:"‵",backsim:"∽",bsim:"∽",backsimeq:"⋍",bsime:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrktbrk:"⎶",bcy:"б",bdquo:"„",ldquor:"„",bemptyv:"⦰",beta:"β",beth:"ℶ",between:"≬",twixt:"≬",bfr:"𝔟",bigcirc:"◯",xcirc:"◯",bigodot:"⨀",xodot:"⨀",bigoplus:"⨁",xoplus:"⨁",bigotimes:"⨂",xotime:"⨂",bigsqcup:"⨆",xsqcup:"⨆",bigstar:"★",starf:"★",bigtriangledown:"▽",xdtri:"▽",bigtriangleup:"△",xutri:"△",biguplus:"⨄",xuplus:"⨄",bkarow:"⤍",rbarr:"⤍",blacklozenge:"⧫",lozf:"⧫",blacktriangle:"▴",utrif:"▴",blacktriangledown:"▾",dtrif:"▾",blacktriangleleft:"◂",ltrif:"◂",blacktriangleright:"▸",rtrif:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",minusb:"⊟",boxplus:"⊞",plusb:"⊞",boxtimes:"⊠",timesb:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bumpE:"⪮",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cemptyv:"⦲",cent:"¢",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",cire:"≗",circlearrowleft:"↺",olarr:"↺",circlearrowright:"↻",orarr:"↻",circledS:"Ⓢ",oS:"Ⓢ",circledast:"⊛",oast:"⊛",circledcirc:"⊚",ocir:"⊚",circleddash:"⊝",odash:"⊝",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",comma:",",commat:"@",comp:"∁",complement:"∁",congdot:"⩭",copf:"𝕔",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",curlyeqprec:"⋞",cuesc:"⋟",curlyeqsucc:"⋟",cularr:"↶",curvearrowleft:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curvearrowright:"↷",curarrm:"⤼",curlyvee:"⋎",cuvee:"⋎",curlywedge:"⋏",cuwed:"⋏",curren:"¤",cwint:"∱",cylcty:"⌭",dHar:"⥥",dagger:"†",daleth:"ℸ",dash:"‐",hyphen:"‐",dbkarow:"⤏",rBarr:"⤏",dcaron:"ď",dcy:"д",ddarr:"⇊",downdownarrows:"⇊",ddotseq:"⩷",eDDot:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",diamondsuit:"♦",diams:"♦",digamma:"ϝ",gammad:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",llcorner:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",doteqdot:"≑",eDot:"≑",dotminus:"∸",minusd:"∸",dotplus:"∔",plusdo:"∔",dotsquare:"⊡",sdotb:"⊡",drcorn:"⌟",lrcorner:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",triangledown:"▿",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",eqcirc:"≖",ecirc:"ê",ecolon:"≕",eqcolon:"≕",ecy:"э",edot:"ė",efDot:"≒",fallingdotseq:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",eqslantgtr:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",eqslantless:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",varnothing:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",straightepsilon:"ϵ",varepsilon:"ϵ",equals:"=",equest:"≟",questeq:"≟",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",risingdotseq:"≓",erarr:"⥱",escr:"ℯ",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",fork:"⋔",pitchfork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",half:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",sfrown:"⌢",fscr:"𝒻",gEl:"⪌",gtreqqless:"⪌",gacute:"ǵ",gamma:"γ",gap:"⪆",gtrapprox:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gimel:"ℷ",gjcy:"ѓ",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gneqq:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gnsim:"⋧",gopf:"𝕘",gscr:"ℊ",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtrdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrarr:"⥸",gvertneqq:"≩︀",gvnE:"≩︀",hardcy:"ъ",harrcir:"⥈",harrw:"↭",leftrightsquigarrow:"↭",hbar:"ℏ",hslash:"ℏ",planck:"ℏ",plankv:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",mldr:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",searhk:"⤥",hkswarow:"⤦",swarhk:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",larrhk:"↩",hookrightarrow:"↪",rarrhk:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hstrok:"ħ",hybull:"⁃",iacute:"í",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",ifr:"𝔦",igrave:"ì",iiiint:"⨌",qint:"⨌",iiint:"∭",tint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",imath:"ı",inodot:"ı",imof:"⊷",imped:"Ƶ",incare:"℅",infin:"∞",infintie:"⧝",intcal:"⊺",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iquest:"¿",iscr:"𝒾",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",varkappa:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAtail:"⤛",lBarr:"⤎",lEg:"⪋",lesseqqgtr:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lambda:"λ",langd:"⦑",lap:"⪅",lessapprox:"⪅",laquo:"«",larrbfs:"⤟",larrfs:"⤝",larrlp:"↫",looparrowleft:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",leftarrowtail:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lcub:"{",lbrack:"[",lsqb:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lcy:"л",ldca:"⤶",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leq:"≤",leftleftarrows:"⇇",llarr:"⇇",leftthreetimes:"⋋",lthree:"⋋",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessdot:"⋖",ltdot:"⋖",lfisht:"⥼",lfr:"𝔩",lgE:"⪑",lharul:"⥪",lhblk:"▄",ljcy:"љ",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lneqq:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lnsim:"⋦",loang:"⟬",loarr:"⇽",longmapsto:"⟼",xmap:"⟼",looparrowright:"↬",rarrlp:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",loz:"◊",lozenge:"◊",lpar:"(",lparlt:"⦓",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsime:"⪍",lsimg:"⪏",lsquor:"‚",sbquo:"‚",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",triangleleft:"◃",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",strns:"¯",male:"♂",malt:"✠",maltese:"✠",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",mfr:"𝔪",mho:"℧",micro:"µ",midcir:"⫰",minus:"−",minusdu:"⨪",mlcp:"⫛",models:"⊧",mopf:"𝕞",mscr:"𝓂",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nLeftarrow:"⇍",nlArr:"⇍",nLeftrightarrow:"⇎",nhArr:"⇎",nLl:"⋘̸",nLt:"≪⃒",nRightarrow:"⇏",nrArr:"⇏",nVDash:"⊯",nVdash:"⊮",nacute:"ń",nang:"∠⃒",napE:"⩰̸",napid:"≋̸",napos:"ʼn",natur:"♮",natural:"♮",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",neArr:"⇗",nearhk:"⤤",nedot:"≐̸",nesear:"⤨",toea:"⤨",nfr:"𝔫",nharr:"↮",nleftrightarrow:"↮",nhpar:"⫲",nis:"⋼",nisd:"⋺",njcy:"њ",nlE:"≦̸",nleqq:"≦̸",nlarr:"↚",nleftarrow:"↚",nldr:"‥",nopf:"𝕟",not:"¬",notinE:"⋹̸",notindot:"⋵̸",notinvb:"⋷",notinvc:"⋶",notnivb:"⋾",notnivc:"⋽",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",nrarr:"↛",nrightarrow:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nscr:"𝓃",nsub:"⊄",nsubE:"⫅̸",nsubseteqq:"⫅̸",nsup:"⊅",nsupE:"⫆̸",nsupseteqq:"⫆̸",ntilde:"ñ",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwnear:"⤧",oacute:"ó",ocirc:"ô",ocy:"о",odblac:"ő",odiv:"⨸",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",olcir:"⦾",olcross:"⦻",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",oopf:"𝕠",opar:"⦷",operp:"⦹",or:"∨",vee:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",oscr:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oslash:"ø",osol:"⊘",otilde:"õ",otimesas:"⨶",ouml:"ö",ovbar:"⌽",para:"¶",parsim:"⫳",parsl:"⫽",pcy:"п",percnt:"%",period:".",permil:"‰",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",straightphi:"ϕ",varphi:"ϕ",phone:"☎",pi:"π",piv:"ϖ",varpi:"ϖ",planckh:"ℎ",plus:"+",plusacir:"⨣",pluscir:"⨢",plusdu:"⨥",pluse:"⩲",plussim:"⨦",plustwo:"⨧",pointint:"⨕",popf:"𝕡",pound:"£",prE:"⪳",prap:"⪷",precapprox:"⪷",precnapprox:"⪹",prnap:"⪹",precneqq:"⪵",prnE:"⪵",precnsim:"⋨",prnsim:"⋨",prime:"′",profalar:"⌮",profline:"⌒",profsurf:"⌓",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quatint:"⨖",quest:"?",rAtail:"⤜",rHar:"⥤",race:"∽̱",racute:"ŕ",raemptyv:"⦳",rangd:"⦒",range:"⦥",raquo:"»",rarrap:"⥵",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rightarrowtail:"↣",rarrw:"↝",rightsquigarrow:"↝",ratail:"⤚",ratio:"∶",rbbrk:"❳",rbrace:"}",rcub:"}",rbrack:"]",rsqb:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdsh:"↳",rect:"▭",rfisht:"⥽",rfr:"𝔯",rharul:"⥬",rho:"ρ",rhov:"ϱ",varrho:"ϱ",rightrightarrows:"⇉",rrarr:"⇉",rightthreetimes:"⋌",rthree:"⋌",ring:"˚",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rsaquo:"›",rscr:"𝓇",rtimes:"⋊",rtri:"▹",triangleright:"▹",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",scE:"⪴",scap:"⪸",succapprox:"⪸",scaron:"š",scedil:"ş",scirc:"ŝ",scnE:"⪶",succneqq:"⪶",scnap:"⪺",succnapprox:"⪺",scnsim:"⋩",succnsim:"⋩",scpolint:"⨓",scy:"с",sdot:"⋅",sdote:"⩦",seArr:"⇘",sect:"§",semi:";",seswar:"⤩",tosa:"⤩",sext:"✶",sfr:"𝔰",sharp:"♯",shchcy:"щ",shcy:"ш",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",varsigma:"ς",simdot:"⩪",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",smashp:"⨳",smeparsl:"⧤",smile:"⌣",ssmile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",sqcaps:"⊓︀",sqcups:"⊔︀",sscr:"𝓈",star:"☆",sub:"⊂",subset:"⊂",subE:"⫅",subseteqq:"⫅",subdot:"⪽",subedot:"⫃",submult:"⫁",subnE:"⫋",subsetneqq:"⫋",subne:"⊊",subsetneq:"⊊",subplus:"⪿",subrarr:"⥹",subsim:"⫇",subsub:"⫕",subsup:"⫓",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supseteqq:"⫆",supdot:"⪾",supdsub:"⫘",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supsetneqq:"⫌",supne:"⊋",supsetneq:"⊋",supplus:"⫀",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tcaron:"ť",tcedil:"ţ",tcy:"т",telrec:"⌕",tfr:"𝔱",theta:"θ",thetasym:"ϑ",thetav:"ϑ",vartheta:"ϑ",thorn:"þ",times:"×",timesbar:"⨱",timesd:"⨰",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tprime:"‴",triangle:"▵",utri:"▵",triangleq:"≜",trie:"≜",tridot:"◬",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",uHar:"⥣",uacute:"ú",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udblac:"ű",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uogon:"ų",uopf:"𝕦",upsi:"υ",upsilon:"υ",upuparrows:"⇈",uuarr:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",uuml:"ü",uwangle:"⦧",vBar:"⫨",vBarv:"⫩",vangrt:"⦜",varsubsetneq:"⊊︀",vsubne:"⊊︀",varsubsetneqq:"⫋︀",vsubnE:"⫋︀",varsupsetneq:"⊋︀",vsupne:"⊋︀",varsupsetneqq:"⫌︀",vsupnE:"⫌︀",vcy:"в",veebar:"⊻",veeeq:"≚",vellip:"⋮",vfr:"𝔳",vopf:"𝕧",vscr:"𝓋",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedgeq:"≙",weierp:"℘",wp:"℘",wfr:"𝔴",wopf:"𝕨",wscr:"𝓌",xfr:"𝔵",xi:"ξ",xnis:"⋻",xopf:"𝕩",xscr:"𝓍",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""};$a.ngsp="";var J=(function(t){return t[t.TAG_OPEN_START=0]="TAG_OPEN_START",t[t.TAG_OPEN_END=1]="TAG_OPEN_END",t[t.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",t[t.TAG_CLOSE=3]="TAG_CLOSE",t[t.INCOMPLETE_TAG_OPEN=4]="INCOMPLETE_TAG_OPEN",t[t.TEXT=5]="TEXT",t[t.ESCAPABLE_RAW_TEXT=6]="ESCAPABLE_RAW_TEXT",t[t.RAW_TEXT=7]="RAW_TEXT",t[t.INTERPOLATION=8]="INTERPOLATION",t[t.ENCODED_ENTITY=9]="ENCODED_ENTITY",t[t.COMMENT_START=10]="COMMENT_START",t[t.COMMENT_END=11]="COMMENT_END",t[t.CDATA_START=12]="CDATA_START",t[t.CDATA_END=13]="CDATA_END",t[t.ATTR_NAME=14]="ATTR_NAME",t[t.ATTR_QUOTE=15]="ATTR_QUOTE",t[t.ATTR_VALUE_TEXT=16]="ATTR_VALUE_TEXT",t[t.ATTR_VALUE_INTERPOLATION=17]="ATTR_VALUE_INTERPOLATION",t[t.DOC_TYPE_START=18]="DOC_TYPE_START",t[t.DOC_TYPE_END=19]="DOC_TYPE_END",t[t.EXPANSION_FORM_START=20]="EXPANSION_FORM_START",t[t.EXPANSION_CASE_VALUE=21]="EXPANSION_CASE_VALUE",t[t.EXPANSION_CASE_EXP_START=22]="EXPANSION_CASE_EXP_START",t[t.EXPANSION_CASE_EXP_END=23]="EXPANSION_CASE_EXP_END",t[t.EXPANSION_FORM_END=24]="EXPANSION_FORM_END",t[t.BLOCK_OPEN_START=25]="BLOCK_OPEN_START",t[t.BLOCK_OPEN_END=26]="BLOCK_OPEN_END",t[t.BLOCK_CLOSE=27]="BLOCK_CLOSE",t[t.BLOCK_PARAMETER=28]="BLOCK_PARAMETER",t[t.INCOMPLETE_BLOCK_OPEN=29]="INCOMPLETE_BLOCK_OPEN",t[t.LET_START=30]="LET_START",t[t.LET_VALUE=31]="LET_VALUE",t[t.LET_END=32]="LET_END",t[t.INCOMPLETE_LET=33]="INCOMPLETE_LET",t[t.COMPONENT_OPEN_START=34]="COMPONENT_OPEN_START",t[t.COMPONENT_OPEN_END=35]="COMPONENT_OPEN_END",t[t.COMPONENT_OPEN_END_VOID=36]="COMPONENT_OPEN_END_VOID",t[t.COMPONENT_CLOSE=37]="COMPONENT_CLOSE",t[t.INCOMPLETE_COMPONENT_OPEN=38]="INCOMPLETE_COMPONENT_OPEN",t[t.DIRECTIVE_NAME=39]="DIRECTIVE_NAME",t[t.DIRECTIVE_OPEN=40]="DIRECTIVE_OPEN",t[t.DIRECTIVE_CLOSE=41]="DIRECTIVE_CLOSE",t[t.EOF=42]="EOF",t})({});function du(t){return t>=9&&t<=32||t==160}function no(t){return 48<=t&&t<=57}function Ra(t){return t>=97&&t<=122||t>=65&&t<=90}function e9(t){return t>=97&&t<=102||t>=65&&t<=70||no(t)}function va(t){return t===10||t===13}function Ey(t){return 48<=t&&t<=55}function op(t){return t===39||t===34||t===96}var t9=class{constructor(t,e,r){this.tokens=t,this.errors=e,this.nonNormalizedIcuExpressions=r}};function r9(t,e,r,s={}){let i=new a9(new Kx(t,e),r,s);return i.tokenize(),new t9(d9(i.tokens),i.errors,i.nonNormalizedIcuExpressions)}var s9=/\r\n?/g;function oi(t){return`Unexpected character "${t===0?"EOF":String.fromCharCode(t)}"`}function Ay(t){return`Unknown entity "${t}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function i9(t,e){return`Unable to parse entity "${e}" - ${t} character reference entities must end with ";"`}var Zp=(function(t){return t.HEX="hexadecimal",t.DEC="decimal",t})(Zp||{}),n9=["@if","@else","@for","@switch","@case","@default","@empty","@defer","@placeholder","@loading","@error"],ea={start:"{{",end:"}}"},a9=class{_cursor;_tokenizeIcu;_leadingTriviaCodePoints;_canSelfClose;_allowHtmComponentClosingTags;_currentTokenStart=null;_currentTokenType=null;_expansionCaseStack=[];_openDirectiveCount=0;_inInterpolation=!1;_preserveLineEndings;_i18nNormalizeLineEndingsInICUs;_fullNameStack=[];_tokenizeBlocks;_tokenizeLet;_selectorlessEnabled;tokens=[];errors=[];nonNormalizedIcuExpressions=[];constructor(t,e,r){this._getTagContentType=e,this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map(i=>i.codePointAt(0)||0),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;let s=r.range||{endPos:t.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new f9(t,s):new Gx(t,s),this._preserveLineEndings=r.preserveLineEndings||!1,this._i18nNormalizeLineEndingsInICUs=r.i18nNormalizeLineEndingsInICUs||!1,this._tokenizeBlocks=r.tokenizeBlocks??!0,this._tokenizeLet=r.tokenizeLet??!0,this._selectorlessEnabled=r.selectorlessEnabled??!1;try{this._cursor.init()}catch(i){this.handleError(i)}}_processCarriageReturns(t){return this._preserveLineEndings?t:t.replace(s9,`
|
|
107
|
-
`)}tokenize(){for(;this._cursor.peek()!==0;){let t=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(t):this._attemptStr("--")?this._consumeComment(t):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(t):this._consumeBogusComment(t);else if(this._attemptCharCode(47))this._consumeTagClose(t);else{let e=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=e,this._consumeBogusComment(t)):this._consumeTagOpen(t)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(t):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(t):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(t):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(J.TEXT,J.INTERPOLATION,()=>this._isTextEnd(),()=>this._isTagStart())}catch(e){this.handleError(e)}}this._beginToken(J.EOF),this._endToken([])}_getBlockName(){let t=!1,e=this._cursor.clone();return this._attemptCharCodeUntilFn(r=>du(r)?!t:h9(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeBlockStart(t){this._requireCharCode(64),this._beginToken(J.BLOCK_OPEN_START,t);let e=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(Ze),this._attemptCharCode(41))this._attemptCharCodeUntilFn(Ze);else{e.type=J.INCOMPLETE_BLOCK_OPEN;return}if(e.parts[0]==="default never"&&this._attemptCharCode(59)){this._beginToken(J.BLOCK_OPEN_END),this._endToken([]),this._beginToken(J.BLOCK_CLOSE),this._endToken([]);return}this._attemptCharCode(123)?(this._beginToken(J.BLOCK_OPEN_END),this._endToken([])):this._isBlockStart()&&(e.parts[0]==="case"||e.parts[0]==="default")?(this._beginToken(J.BLOCK_OPEN_END),this._endToken([]),this._beginToken(J.BLOCK_CLOSE),this._endToken([])):e.type=J.INCOMPLETE_BLOCK_OPEN}_consumeBlockEnd(t){this._beginToken(J.BLOCK_CLOSE,t),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(by);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(J.BLOCK_PARAMETER);let t=this._cursor.clone(),e=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||e!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===e)e=null;else if(e===null&&op(s))e=s;else if(s===40&&e===null)r++;else if(s===41&&e===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(t)]),this._attemptCharCodeUntilFn(by)}}_consumeLetDeclaration(t){if(this._requireStr("@let"),this._beginToken(J.LET_START,t),du(this._cursor.peek()))this._attemptCharCodeUntilFn(Ze);else{let r=this._endToken([this._cursor.getChars(t)]);r.type=J.INCOMPLETE_LET;return}let e=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(Ze),!this._attemptCharCode(61)){e.type=J.INCOMPLETE_LET;return}this._attemptCharCodeUntilFn(r=>Ze(r)&&!va(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(J.LET_END),this._endToken([]),this._cursor.advance()):(e.type=J.INCOMPLETE_LET,e.sourceSpan=this._cursor.getSpan(t))}_getLetDeclarationName(){let t=this._cursor.clone(),e=!1;return this._attemptCharCodeUntilFn(r=>Ra(r)||r===36||r===95||e&&no(r)?(e=!0,!1):!0),this._cursor.getChars(t).trim()}_consumeLetDeclarationValue(){let t=this._cursor.clone();for(this._beginToken(J.LET_VALUE,t);this._cursor.peek()!==0;){let e=this._cursor.peek();if(e===59)break;op(e)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(r=>r===92?(this._cursor.advance(),!1):r===e)),this._cursor.advance()}this._endToken([this._cursor.getChars(t)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(p9(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(t,e=this._cursor.clone()){this._currentTokenStart=e,this._currentTokenType=t}_endToken(t,e){if(this._currentTokenStart===null)throw new Qi(this._cursor.getSpan(e),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new Qi(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:t,sourceSpan:(e??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(t,e){this._isInExpansionForm()&&(t+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new Qi(e,t);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(t){if(t instanceof Jh&&(t=this._createError(t.msg,this._cursor.getSpan(t.cursor))),t instanceof Qi)this.errors.push(t);else throw t}_attemptCharCode(t){return this._cursor.peek()===t?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(t){return c9(this._cursor.peek(),t)?(this._cursor.advance(),!0):!1}_requireCharCode(t){let e=this._cursor.clone();if(!this._attemptCharCode(t))throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(e))}_attemptStr(t){let e=t.length;if(this._cursor.charsLeft()<e)return!1;let r=this._cursor.clone();for(let s=0;s<e;s++)if(!this._attemptCharCode(t.charCodeAt(s)))return this._cursor=r,!1;return!0}_attemptStrCaseInsensitive(t){for(let e=0;e<t.length;e++)if(!this._attemptCharCodeCaseInsensitive(t.charCodeAt(e)))return!1;return!0}_requireStr(t){let e=this._cursor.clone();if(!this._attemptStr(t))throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(e))}_requireStrCaseInsensitive(t){let e=this._cursor.clone();if(!this._attemptStrCaseInsensitive(t))throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(e))}_attemptCharCodeUntilFn(t){for(;!t(this._cursor.peek());)this._cursor.advance()}_requireCharCodeUntilFn(t,e){let r=this._cursor.clone();if(this._attemptCharCodeUntilFn(t),this._cursor.diff(r)<e)throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(r))}_attemptUntilChar(t){for(;this._cursor.peek()!==t;)this._cursor.advance()}_readChar(){let t=String.fromCodePoint(this._cursor.peek());return this._cursor.advance(),t}_peekStr(t){let e=t.length;if(this._cursor.charsLeft()<e)return!1;let r=this._cursor.clone();for(let s=0;s<e;s++){if(r.peek()!==t.charCodeAt(s))return!1;r.advance()}return!0}_isBlockStart(){return this._cursor.peek()===64&&n9.some(t=>this._peekStr(t))}_isLetStart(){return this._cursor.peek()===64&&this._peekStr("@let")}_consumeEntity(t){this._beginToken(J.ENCODED_ENTITY);let e=this._cursor.clone();if(this._cursor.advance(),this._attemptCharCode(35)){let r=this._attemptCharCode(120)||this._attemptCharCode(88),s=this._cursor.clone();if(this._attemptCharCodeUntilFn(u9),this._cursor.peek()!=59){this._cursor.advance();let a=r?Zp.HEX:Zp.DEC;throw this._createError(i9(a,this._cursor.getChars(e)),this._cursor.getSpan())}let i=this._cursor.getChars(s);this._cursor.advance();try{let a=parseInt(i,r?16:10);this._endToken([String.fromCodePoint(a),this._cursor.getChars(e)])}catch{throw this._createError(Ay(this._cursor.getChars(e)),this._cursor.getSpan())}}else{let r=this._cursor.clone();if(this._attemptCharCodeUntilFn(l9),this._cursor.peek()!=59)this._beginToken(t,e),this._cursor=r,this._endToken(["&"]);else{let s=this._cursor.getChars(r);this._cursor.advance();let i=$a.hasOwnProperty(s)&&$a[s];if(!i)throw this._createError(Ay(s),this._cursor.getSpan(e));this._endToken([i,`&${s};`])}}}_consumeRawText(t,e){this._beginToken(t?J.ESCAPABLE_RAW_TEXT:J.RAW_TEXT);let r=[];for(;;){let s=this._cursor.clone(),i=e();if(this._cursor=s,i)break;t&&this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(r.join(""))]),r.length=0,this._consumeEntity(J.ESCAPABLE_RAW_TEXT),this._beginToken(J.ESCAPABLE_RAW_TEXT)):r.push(this._readChar())}this._endToken([this._processCarriageReturns(r.join(""))])}_consumeComment(t){this._beginToken(J.COMMENT_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("-->")),this._beginToken(J.COMMENT_END),this._requireStr("-->"),this._endToken([])}_consumeBogusComment(t){this._beginToken(J.COMMENT_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(J.COMMENT_END),this._cursor.advance(),this._endToken([])}_consumeCdata(t){this._beginToken(J.CDATA_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._attemptStr("]]>")),this._beginToken(J.CDATA_END),this._requireStr("]]>"),this._endToken([])}_consumeDocType(t){this._beginToken(J.DOC_TYPE_START,t),this._endToken([]),this._consumeRawText(!1,()=>this._cursor.peek()===62),this._beginToken(J.DOC_TYPE_END),this._cursor.advance(),this._endToken([])}_consumePrefixAndName(t){let e=this._cursor.clone(),r="";for(;this._cursor.peek()!==58&&!o9(this._cursor.peek());)this._cursor.advance();let s;this._cursor.peek()===58?(r=this._cursor.getChars(e),this._cursor.advance(),s=this._cursor.clone()):s=e,this._requireCharCodeUntilFn(t,r===""?0:1);let i=this._cursor.getChars(s);return[r,i]}_consumeSingleLineComment(){this._attemptCharCodeUntilFn(t=>va(t)||t===0),this._attemptCharCodeUntilFn(Ze)}_consumeMultiLineComment(){this._attemptCharCodeUntilFn(t=>{if(t===0)return!0;if(t===42){let e=this._cursor.clone();return e.advance(),e.peek()===47}return!1}),this._attemptStr("*/")&&this._attemptCharCodeUntilFn(Ze)}_consumeTagOpen(t){let e,r,s,i,a=[];try{if(this._selectorlessEnabled&&Oo(this._cursor.peek()))i=this._consumeComponentOpenStart(t),[s,r,e]=i.parts,r&&(s+=`:${r}`),e&&(s+=`:${e}`),this._attemptCharCodeUntilFn(Ze);else{if(!Ra(this._cursor.peek()))throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(t));i=this._consumeTagOpenStart(t),r=i.parts[0],e=s=i.parts[1],this._attemptCharCodeUntilFn(Ze)}for(;;){if(this._attemptStr("//")){this._consumeSingleLineComment();continue}if(this._attemptStr("/*")){this._consumeMultiLineComment();continue}if(vy(this._cursor.peek()))break;if(this._selectorlessEnabled&&this._cursor.peek()===64){let p=this._cursor.clone(),c=p.clone();c.advance(),Oo(c.peek())&&this._consumeDirective(p,c)}else{let p=this._consumeAttribute();a.push(p)}}i.type===J.COMPONENT_OPEN_START?this._consumeComponentOpenEnd():this._consumeTagOpenEnd()}catch(p){if(p instanceof Qi){i?i.type=i.type===J.COMPONENT_OPEN_START?J.INCOMPLETE_COMPONENT_OPEN:J.INCOMPLETE_TAG_OPEN:(this._beginToken(J.TEXT,t),this._endToken(["<"]));return}throw p}if(this._canSelfClose&&this.tokens[this.tokens.length-1].type===J.TAG_OPEN_END_VOID)return;let u=this._getTagContentType(e,r,this._fullNameStack.length>0,a);this._handleFullNameStackForTagOpen(r,e),u===os.RAW_TEXT?this._consumeRawTextWithTagClose(r,i,s,!1):u===os.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(r,i,s,!0)}_consumeRawTextWithTagClose(t,e,r,s){this._consumeRawText(s,()=>!this._attemptCharCode(60)||!this._attemptCharCode(47)||(this._attemptCharCodeUntilFn(Ze),!this._attemptStrCaseInsensitive(t&&e.type!==J.COMPONENT_OPEN_START?`${t}:${r}`:r))?!1:(this._attemptCharCodeUntilFn(Ze),this._attemptCharCode(62))),this._beginToken(e.type===J.COMPONENT_OPEN_START?J.COMPONENT_CLOSE:J.TAG_CLOSE),this._requireCharCodeUntilFn(i=>i===62,3),this._cursor.advance(),this._endToken(e.parts),this._handleFullNameStackForTagClose(t,r)}_consumeTagOpenStart(t){this._beginToken(J.TAG_OPEN_START,t);let e=this._consumePrefixAndName(ui);return this._endToken(e)}_consumeComponentOpenStart(t){this._beginToken(J.COMPONENT_OPEN_START,t);let e=this._consumeComponentName();return this._endToken(e)}_consumeComponentName(){let t=this._cursor.clone();for(;Ty(this._cursor.peek());)this._cursor.advance();let e=this._cursor.getChars(t),r="",s="";return this._cursor.peek()===58&&(this._cursor.advance(),[r,s]=this._consumePrefixAndName(ui)),[e,r,s]}_consumeAttribute(){let[t,e]=this._consumeAttributeName(),r;return this._attemptCharCodeUntilFn(Ze),this._attemptCharCode(61)&&(this._attemptCharCodeUntilFn(Ze),r=this._consumeAttributeValue()),this._attemptCharCodeUntilFn(Ze),{prefix:t,name:e,value:r}}_consumeAttributeName(){let t=this._cursor.peek();if(t===39||t===34)throw this._createError(oi(t),this._cursor.getSpan());this._beginToken(J.ATTR_NAME);let e;if(this._openDirectiveCount>0){let s=0;e=i=>{if(this._openDirectiveCount>0){if(i===40)s++;else if(i===41){if(s===0)return!0;s--}}return ui(i)}}else if(t===91){let s=0;e=i=>(i===91?s++:i===93&&s--,s<=0?ui(i):va(i))}else e=ui;let r=this._consumePrefixAndName(e);return this._endToken(r),r}_consumeAttributeValue(){let t;if(this._cursor.peek()===39||this._cursor.peek()===34){let e=this._cursor.peek();this._consumeQuote(e);let r=()=>this._cursor.peek()===e;t=this._consumeWithInterpolation(J.ATTR_VALUE_TEXT,J.ATTR_VALUE_INTERPOLATION,r,r),this._consumeQuote(e)}else{let e=()=>ui(this._cursor.peek());t=this._consumeWithInterpolation(J.ATTR_VALUE_TEXT,J.ATTR_VALUE_INTERPOLATION,e,e)}return t}_consumeQuote(t){this._beginToken(J.ATTR_QUOTE),this._requireCharCode(t),this._endToken([String.fromCodePoint(t)])}_consumeTagOpenEnd(){let t=this._attemptCharCode(47)?J.TAG_OPEN_END_VOID:J.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeComponentOpenEnd(){let t=this._attemptCharCode(47)?J.COMPONENT_OPEN_END_VOID:J.COMPONENT_OPEN_END;this._beginToken(t),this._requireCharCode(62),this._endToken([])}_consumeTagClose(t){if(this._selectorlessEnabled){let e=t.clone();for(;e.peek()!==62&&!Oo(e.peek());)e.advance();if(Oo(e.peek())){this._beginToken(J.COMPONENT_CLOSE,t);let r=this._consumeComponentName();this._attemptCharCodeUntilFn(Ze),this._requireCharCode(62),this._endToken(r);return}}if(this._beginToken(J.TAG_CLOSE,t),this._attemptCharCodeUntilFn(Ze),this._allowHtmComponentClosingTags&&this._attemptCharCode(47))this._attemptCharCodeUntilFn(Ze),this._requireCharCode(62),this._endToken([]);else{let[e,r]=this._consumePrefixAndName(ui);this._attemptCharCodeUntilFn(Ze),this._requireCharCode(62),this._endToken([e,r]),this._handleFullNameStackForTagClose(e,r)}}_consumeExpansionFormStart(){this._beginToken(J.EXPANSION_FORM_START),this._requireCharCode(123),this._endToken([]),this._expansionCaseStack.push(J.EXPANSION_FORM_START),this._beginToken(J.RAW_TEXT);let t=this._readUntil(44),e=this._processCarriageReturns(t);if(this._i18nNormalizeLineEndingsInICUs)this._endToken([e]);else{let s=this._endToken([t]);e!==t&&this.nonNormalizedIcuExpressions.push(s)}this._requireCharCode(44),this._attemptCharCodeUntilFn(Ze),this._beginToken(J.RAW_TEXT);let r=this._readUntil(44);this._endToken([r]),this._requireCharCode(44),this._attemptCharCodeUntilFn(Ze)}_consumeExpansionCaseStart(){this._beginToken(J.EXPANSION_CASE_VALUE);let t=this._readUntil(123).trim();this._endToken([t]),this._attemptCharCodeUntilFn(Ze),this._beginToken(J.EXPANSION_CASE_EXP_START),this._requireCharCode(123),this._endToken([]),this._attemptCharCodeUntilFn(Ze),this._expansionCaseStack.push(J.EXPANSION_CASE_EXP_START)}_consumeExpansionCaseEnd(){this._beginToken(J.EXPANSION_CASE_EXP_END),this._requireCharCode(125),this._endToken([]),this._attemptCharCodeUntilFn(Ze),this._expansionCaseStack.pop()}_consumeExpansionFormEnd(){this._beginToken(J.EXPANSION_FORM_END),this._requireCharCode(125),this._endToken([]),this._expansionCaseStack.pop()}_consumeWithInterpolation(t,e,r,s){this._beginToken(t);let i=[];for(;!r();){let u=this._cursor.clone();this._attemptStr(ea.start)?(this._endToken([this._processCarriageReturns(i.join(""))],u),i.length=0,this._consumeInterpolation(e,u,s),this._beginToken(t)):this._cursor.peek()===38?(this._endToken([this._processCarriageReturns(i.join(""))]),i.length=0,this._consumeEntity(t),this._beginToken(t)):i.push(this._readChar())}this._inInterpolation=!1;let a=this._processCarriageReturns(i.join(""));return this._endToken([a]),a}_consumeInterpolation(t,e,r){let s=[];this._beginToken(t,e),s.push(ea.start);let i=this._cursor.clone(),a=null,u=!1;for(;this._cursor.peek()!==0&&(r===null||!r());){let p=this._cursor.clone();if(this._isTagStart()){this._cursor=p,s.push(this._getProcessedChars(i,p)),this._endToken(s);return}if(a===null)if(this._attemptStr(ea.end)){s.push(this._getProcessedChars(i,p)),s.push(ea.end),this._endToken(s);return}else this._attemptStr("//")&&(u=!0);let c=this._cursor.peek();this._cursor.advance(),c===92?this._cursor.advance():c===a?a=null:!u&&a===null&&op(c)&&(a=c)}s.push(this._getProcessedChars(i,this._cursor)),this._endToken(s)}_consumeDirective(t,e){for(this._requireCharCode(64),this._cursor.advance();Ty(this._cursor.peek());)this._cursor.advance();this._beginToken(J.DIRECTIVE_NAME,t);let r=this._cursor.getChars(e);if(this._endToken([r]),this._attemptCharCodeUntilFn(Ze),this._cursor.peek()===40){for(this._openDirectiveCount++,this._beginToken(J.DIRECTIVE_OPEN),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ze);!vy(this._cursor.peek())&&this._cursor.peek()!==41;)this._consumeAttribute();if(this._attemptCharCodeUntilFn(Ze),this._openDirectiveCount--,this._cursor.peek()!==41){if(this._cursor.peek()===62||this._cursor.peek()===47)return;throw this._createError(oi(this._cursor.peek()),this._cursor.getSpan(t))}this._beginToken(J.DIRECTIVE_CLOSE),this._cursor.advance(),this._endToken([]),this._attemptCharCodeUntilFn(Ze)}}_getProcessedChars(t,e){return this._processCarriageReturns(e.getChars(t))}_isTextEnd(){return!!(this._isTagStart()||this._cursor.peek()===0||this._tokenizeIcu&&!this._inInterpolation&&(this.isExpansionFormStart()||this._cursor.peek()===125&&this._isInExpansionCase())||this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansion()&&(this._isBlockStart()||this._isLetStart()||this._cursor.peek()===125))}_isTagStart(){if(this._cursor.peek()===60){let t=this._cursor.clone();t.advance();let e=t.peek();if(97<=e&&e<=122||65<=e&&e<=90||e===47||e===33)return!0}return!1}_readUntil(t){let e=this._cursor.clone();return this._attemptUntilChar(t),this._cursor.getChars(e)}_isInExpansion(){return this._isInExpansionCase()||this._isInExpansionForm()}_isInExpansionCase(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===J.EXPANSION_CASE_EXP_START}_isInExpansionForm(){return this._expansionCaseStack.length>0&&this._expansionCaseStack[this._expansionCaseStack.length-1]===J.EXPANSION_FORM_START}isExpansionFormStart(){if(this._cursor.peek()!==123)return!1;let t=this._cursor.clone(),e=this._attemptStr(ea.start);return this._cursor=t,!e}_handleFullNameStackForTagOpen(t,e){let r=Ta(t,e);(this._fullNameStack.length===0||this._fullNameStack[this._fullNameStack.length-1]===r)&&this._fullNameStack.push(r)}_handleFullNameStackForTagClose(t,e){let r=Ta(t,e);this._fullNameStack.length!==0&&this._fullNameStack[this._fullNameStack.length-1]===r&&this._fullNameStack.pop()}};function Ze(t){return!du(t)||t===0}function ui(t){return du(t)||t===62||t===60||t===47||t===39||t===34||t===61||t===0}function o9(t){return(t<97||122<t)&&(t<65||90<t)&&(t<48||t>57)}function u9(t){return t===59||t===0||!e9(t)}function l9(t){return t===59||t===0||!(Ra(t)||no(t))}function p9(t){return t!==125}function c9(t,e){return Cy(t)===Cy(e)}function Cy(t){return t>=97&&t<=122?t-97+65:t}function h9(t){return Ra(t)||no(t)||t===95}function by(t){return t!==59&&Ze(t)}function Oo(t){return t===95||t>=65&&t<=90}function Ty(t){return Ra(t)||no(t)||t===95}function vy(t){return t===47||t===62||t===60||t===0}function d9(t){let e=[],r;for(let s=0;s<t.length;s++){let i=t[s];r&&r.type===J.TEXT&&i.type===J.TEXT||r&&r.type===J.ATTR_VALUE_TEXT&&i.type===J.ATTR_VALUE_TEXT?(r.parts[0]+=i.parts[0],r.sourceSpan.end=i.sourceSpan.end):(r=i,e.push(r))}return e}var Gx=class ec{state;file;input;end;constructor(e,r){if(e instanceof ec){this.file=e.file,this.input=e.input,this.end=e.end;let s=e.state;this.state={peek:s.peek,offset:s.offset,line:s.line,column:s.column}}else{if(!r)throw new Error("Programming error: the range argument must be provided with a file argument.");this.file=e,this.input=e.content,this.end=r.endPos,this.state={peek:-1,offset:r.startPos,line:r.startLine,column:r.startCol}}}clone(){return new ec(this)}peek(){return this.state.peek}charsLeft(){return this.end-this.state.offset}diff(e){return this.state.offset-e.state.offset}advance(){this.advanceState(this.state)}init(){this.updatePeek(this.state)}getSpan(e,r){e=e||this;let s=e;if(r)for(;this.diff(e)>0&&r.indexOf(e.peek())!==-1;)s===e&&(e=e.clone()),e.advance();let i=this.locationFromCursor(e);return new _e(i,this.locationFromCursor(this),s!==e?this.locationFromCursor(s):i)}getChars(e){return this.input.substring(e.state.offset,this.state.offset)}charAt(e){return this.input.charCodeAt(e)}advanceState(e){if(e.offset>=this.end)throw this.state=e,new Jh('Unexpected character "EOF"',this);let r=this.charAt(e.offset);r===10?(e.line++,e.column=0):va(r)||e.column++,e.offset++,this.updatePeek(e)}updatePeek(e){e.peek=e.offset>=this.end?0:this.charAt(e.offset)}locationFromCursor(e){return new Qp(e.file,e.state.offset,e.state.line,e.state.column)}},f9=class tc extends Gx{internalState;constructor(e,r){e instanceof tc?(super(e),this.internalState={...e.internalState}):(super(e,r),this.internalState=this.state)}advance(){this.state=this.internalState,super.advance(),this.processEscapeSequence()}init(){super.init(),this.processEscapeSequence()}clone(){return new tc(this)}getChars(e){let r=e.clone(),s="";for(;r.internalState.offset<this.internalState.offset;)s+=String.fromCodePoint(r.peek()),r.advance();return s}processEscapeSequence(){let e=()=>this.internalState.peek;if(e()===92)if(this.internalState={...this.state},this.advanceState(this.internalState),e()===110)this.state.peek=10;else if(e()===114)this.state.peek=13;else if(e()===118)this.state.peek=11;else if(e()===116)this.state.peek=9;else if(e()===98)this.state.peek=8;else if(e()===102)this.state.peek=12;else if(e()===117)if(this.advanceState(this.internalState),e()===123){this.advanceState(this.internalState);let r=this.clone(),s=0;for(;e()!==125;)this.advanceState(this.internalState),s++;this.state.peek=this.decodeHexDigits(r,s)}else{let r=this.clone();this.advanceState(this.internalState),this.advanceState(this.internalState),this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,4)}else if(e()===120){this.advanceState(this.internalState);let r=this.clone();this.advanceState(this.internalState),this.state.peek=this.decodeHexDigits(r,2)}else if(Ey(e())){let r="",s=0,i=this.clone();for(;Ey(e())&&s<3;)i=this.clone(),r+=String.fromCodePoint(e()),this.advanceState(this.internalState),s++;this.state.peek=parseInt(r,8),this.internalState=i.internalState}else va(this.internalState.peek)?(this.advanceState(this.internalState),this.state=this.internalState):this.state.peek=this.internalState.peek}decodeHexDigits(e,r){let s=this.input.slice(e.internalState.offset,e.internalState.offset+r),i=parseInt(s,16);if(isNaN(i))throw e.state=e.internalState,new Jh("Invalid hexadecimal escape sequence",e);return i}},Jh=class extends Error{constructor(t,e){super(t),this.msg=t,this.cursor=e,Object.setPrototypeOf(this,new.target.prototype)}},Dt=class Yx extends Qi{static create(e,r,s){return new Yx(e,r,s)}constructor(e,r,s){super(r,s),this.elementName=e}},m9=class{constructor(e,r){this.rootNodes=e,this.errors=r}},y9=class{constructor(t){this.getTagDefinition=t}parse(t,e,r,s=!1,i){let a=y=>(x,...E)=>y(x.toLowerCase(),...E),u=s?this.getTagDefinition:a(this.getTagDefinition),p=y=>u(y).getContentType(),c=s?i:a(i),m=r9(t,e,i?(y,x,E,C)=>{let b=c(y,x,E,C);return b!==void 0?b:p(y)}:p,r),f=r&&r.canSelfClose||!1,d=r&&r.allowHtmComponentClosingTags||!1,D=new g9(m.tokens,u,f,d,s);return D.build(),new m9(D.rootNodes,[...m.errors,...D.errors])}},g9=class Qx{_index=-1;_peek;_containerStack=[];rootNodes=[];errors=[];constructor(e,r,s,i,a){this.tokens=e,this.tagDefinitionResolver=r,this.canSelfClose=s,this.allowHtmComponentClosingTags=i,this.isTagNameCaseSensitive=a,this._advance()}build(){for(;this._peek.type!==J.EOF;)this._peek.type===J.TAG_OPEN_START||this._peek.type===J.INCOMPLETE_TAG_OPEN?this._consumeElementStartTag(this._advance()):this._peek.type===J.TAG_CLOSE?(this._closeVoidElement(),this._consumeElementEndTag(this._advance())):this._peek.type===J.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===J.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===J.TEXT||this._peek.type===J.RAW_TEXT||this._peek.type===J.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===J.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===J.BLOCK_OPEN_START?(this._closeVoidElement(),this._consumeBlockOpen(this._advance())):this._peek.type===J.BLOCK_CLOSE?(this._closeVoidElement(),this._consumeBlockClose(this._advance())):this._peek.type===J.INCOMPLETE_BLOCK_OPEN?(this._closeVoidElement(),this._consumeIncompleteBlock(this._advance())):this._peek.type===J.LET_START?(this._closeVoidElement(),this._consumeLet(this._advance())):this._peek.type===J.DOC_TYPE_START?this._consumeDocType(this._advance()):this._peek.type===J.INCOMPLETE_LET?(this._closeVoidElement(),this._consumeIncompleteLet(this._advance())):this._peek.type===J.COMPONENT_OPEN_START||this._peek.type===J.INCOMPLETE_COMPONENT_OPEN?this._consumeComponentStartTag(this._advance()):this._peek.type===J.COMPONENT_CLOSE?this._consumeComponentEndTag(this._advance()):this._advance();for(let e of this._containerStack)e instanceof Ji&&this.errors.push(Dt.create(e.name,e.sourceSpan,`Unclosed block "${e.name}"`))}_advance(){let e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){let r=this._advance(),s=this._getText(r),i=this._advanceIf(J.CDATA_END);this._addToParent(new WO(s,new _e(e.sourceSpan.start,(i||r).sourceSpan.end),[r]))}_consumeComment(e){let r=this._advanceIf(J.RAW_TEXT),s=this._advanceIf(J.COMMENT_END),i=r!=null?r.parts[0].trim():null,a=s==null?e.sourceSpan:new _e(e.sourceSpan.start,s.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new GO(i,a))}_consumeDocType(e){let r=this._advanceIf(J.RAW_TEXT),s=this._advanceIf(J.DOC_TYPE_END),i=r!=null?r.parts[0].trim():null,a=new _e(e.sourceSpan.start,(s||r||e).sourceSpan.end);this._addToParent(new YO(i,a))}_consumeExpansion(e){let r=this._advance(),s=this._advance(),i=[];for(;this._peek.type===J.EXPANSION_CASE_VALUE;){let u=this._parseExpansionCase();if(!u)return;i.push(u)}if(this._peek.type!==J.EXPANSION_FORM_END){this.errors.push(Dt.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));return}let a=new _e(e.sourceSpan.start,this._peek.sourceSpan.end,e.sourceSpan.fullStart);this._addToParent(new JO(r.parts[0],s.parts[0],i,a,r.sourceSpan)),this._advance()}_parseExpansionCase(){let e=this._advance();if(this._peek.type!==J.EXPANSION_CASE_EXP_START)return this.errors.push(Dt.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;let r=this._advance(),s=this._collectExpansionExpTokens(r);if(!s)return null;let i=this._advance();s.push({type:J.EOF,parts:[],sourceSpan:i.sourceSpan});let a=new Qx(s,this.tagDefinitionResolver,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive);if(a.build(),a.errors.length>0)return this.errors=this.errors.concat(a.errors),null;let u=new _e(e.sourceSpan.start,i.sourceSpan.end,e.sourceSpan.fullStart),p=new _e(r.sourceSpan.start,i.sourceSpan.end,r.sourceSpan.fullStart);return new KO(e.parts[0],a.rootNodes,u,e.sourceSpan,p)}_collectExpansionExpTokens(e){let r=[],s=[J.EXPANSION_CASE_EXP_START];for(;;){if((this._peek.type===J.EXPANSION_FORM_START||this._peek.type===J.EXPANSION_CASE_EXP_START)&&s.push(this._peek.type),this._peek.type===J.EXPANSION_CASE_EXP_END)if(Sy(s,J.EXPANSION_CASE_EXP_START)){if(s.pop(),s.length===0)return r}else return this.errors.push(Dt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===J.EXPANSION_FORM_END)if(Sy(s,J.EXPANSION_FORM_START))s.pop();else return this.errors.push(Dt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;if(this._peek.type===J.EOF)return this.errors.push(Dt.create(null,e.sourceSpan,"Invalid ICU message. Missing '}'.")),null;r.push(this._advance())}}_getText(e){let r=e.parts[0];if(r.length>0&&r[0]==`
|
|
108
|
-
`){var s;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&!((s=this._getTagDefinition(i))===null||s===void 0)&&s.ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],s=e.sourceSpan,i=e.parts[0];if(i.length>0&&i[0]===`
|
|
109
|
-
`){var a;let u=this._getContainer();u!=null&&u.children.length===0&&!((a=this._getTagDefinition(u))===null||a===void 0)&&a.ignoreFirstLf&&(i=i.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[i]})}for(;this._peek.type===J.INTERPOLATION||this._peek.type===J.TEXT||this._peek.type===J.ENCODED_ENTITY;)e=this._advance(),r.push(e),e.type===J.INTERPOLATION?i+=e.parts.join("").replace(/&([^;]+);/g,wy):e.type===J.ENCODED_ENTITY?i+=e.parts[0]:i+=e.parts.join("");if(i.length>0){let u=e.sourceSpan;this._addToParent(new zO(i,new _e(s.start,u.end,s.fullStart,s.details),r))}}_closeVoidElement(){var e;let r=this._getContainer();r!==null&&!((e=this._getTagDefinition(r))===null||e===void 0)&&e.isVoid&&this._containerStack.pop()}_consumeElementStartTag(e){var r;let s=[],i=[];this._consumeAttributesAndDirectives(s,i);let a=this._getElementFullName(e,this._getClosestElementLikeParent()),u=this._getTagDefinition(a),p=!1;if(this._peek.type===J.TAG_OPEN_END_VOID){this._advance(),p=!0;let E=this._getTagDefinition(a);this.canSelfClose||E?.canSelfClose||eu(a)!==null||E?.isVoid||this.errors.push(Dt.create(a,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===J.TAG_OPEN_END&&(this._advance(),p=!1);let c=this._peek.sourceSpan.fullStart,m=new _e(e.sourceSpan.start,c,e.sourceSpan.fullStart),f=new _e(e.sourceSpan.start,c,e.sourceSpan.fullStart),d=new _e(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),D=new ai(a,s,i,[],p,m,f,void 0,d,u?.isVoid??!1),y=this._getContainer(),x=y!==null&&!!(!((r=this._getTagDefinition(y))===null||r===void 0)&&r.isClosedByChild(D.name));this._pushContainer(D,x),p?this._popContainer(a,ai,m):e.type===J.INCOMPLETE_TAG_OPEN&&(this._popContainer(a,ai,null),this.errors.push(Dt.create(a,m,`Opening tag "${a}" not terminated.`)))}_consumeComponentStartTag(e){var r;let s=e.parts[0],i=[],a=[];this._consumeAttributesAndDirectives(i,a);let u=this._getClosestElementLikeParent(),p=this._getComponentTagName(e,u),c=this._getComponentFullName(e,u),m=this._peek.type===J.COMPONENT_OPEN_END_VOID;this._advance();let f=this._peek.sourceSpan.fullStart,d=new _e(e.sourceSpan.start,f,e.sourceSpan.fullStart),D=new is(s,p,c,i,a,[],m,d,new _e(e.sourceSpan.start,f,e.sourceSpan.fullStart),void 0),y=this._getContainer(),x=y!==null&&D.tagName!==null&&!!(!((r=this._getTagDefinition(y))===null||r===void 0)&&r.isClosedByChild(D.tagName));this._pushContainer(D,x),m?this._popContainer(c,is,d):e.type===J.INCOMPLETE_COMPONENT_OPEN&&(this._popContainer(c,is,null),this.errors.push(Dt.create(c,d,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(e,r){for(;this._peek.type===J.ATTR_NAME||this._peek.type===J.DIRECTIVE_NAME;)this._peek.type===J.DIRECTIVE_NAME?r.push(this._consumeDirective(this._peek)):e.push(this._consumeAttr(this._advance()))}_consumeComponentEndTag(e){let r=this._getComponentFullName(e,this._getClosestElementLikeParent());if(!this._popContainer(r,is,e.sourceSpan)){let s=this._containerStack[this._containerStack.length-1],i;s instanceof is&&s.componentName===e.parts[0]?i=`, did you mean "${s.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let a=`Unexpected closing tag "${r}"${i}`;this.errors.push(Dt.create(r,e.sourceSpan,a))}}_getTagDefinition(e){return typeof e=="string"?this.tagDefinitionResolver(e):e instanceof ai?this.tagDefinitionResolver(e.name):e instanceof is&&e.tagName!==null?this.tagDefinitionResolver(e.tagName):null}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeElementEndTag(e){var r;let s=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e,this._getClosestElementLikeParent());if(s&&!((r=this._getTagDefinition(s))===null||r===void 0)&&r.isVoid)this.errors.push(Dt.create(s,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(s,ai,e.sourceSpan)){let i=`Unexpected closing tag "${s}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(Dt.create(s,e.sourceSpan,i))}}_popContainer(e,r,s){let i=!1;for(let u=this._containerStack.length-1;u>=0;u--){var a;let p=this._containerStack[u],c=p instanceof is?p.fullName:p.name;if(eu(c)?c===e:(c===e||e===null)&&p instanceof r)return p.endSourceSpan=s,p.sourceSpan.end=s!==null?s.end:p.sourceSpan.end,this._containerStack.splice(u,this._containerStack.length-u),!i;(p instanceof Ji||!(!((a=this._getTagDefinition(p))===null||a===void 0)&&a.closedByParent))&&(i=!0)}return!1}_consumeAttr(e){let r=Ta(e.parts[0],e.parts[1]),s=e.sourceSpan.end,i;this._peek.type===J.ATTR_QUOTE&&(i=this._advance());let a="",u=[],p,c;if(this._peek.type===J.ATTR_VALUE_TEXT)for(p=this._peek.sourceSpan,c=this._peek.sourceSpan.end;this._peek.type===J.ATTR_VALUE_TEXT||this._peek.type===J.ATTR_VALUE_INTERPOLATION||this._peek.type===J.ENCODED_ENTITY;){let f=this._advance();u.push(f),f.type===J.ATTR_VALUE_INTERPOLATION?a+=f.parts.join("").replace(/&([^;]+);/g,wy):f.type===J.ENCODED_ENTITY?a+=f.parts[0]:a+=f.parts.join(""),c=s=f.sourceSpan.end}this._peek.type===J.ATTR_QUOTE&&(c=s=this._advance().sourceSpan.end);let m=p&&c&&new _e(i?.sourceSpan.start??p.start,c,i?.sourceSpan.fullStart??p.fullStart);return new XO(r,a,new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),e.sourceSpan,m,u.length>0?u:void 0,void 0)}_consumeDirective(e){let r=[],s=e.sourceSpan.end,i=null;if(this._advance(),this._peek.type===J.DIRECTIVE_OPEN){for(s=this._peek.sourceSpan.end,this._advance();this._peek.type===J.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));this._peek.type===J.DIRECTIVE_CLOSE?(i=this._peek.sourceSpan,this._advance()):this.errors.push(Dt.create(null,e.sourceSpan,"Unterminated directive definition"))}let a=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),u=new _e(a.start,i===null?e.sourceSpan.end:i.end,a.fullStart);return new QO(e.parts[0],r,u,a,i)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===J.BLOCK_PARAMETER;){let p=this._advance();r.push(new Dy(p.parts[0],p.sourceSpan))}this._peek.type===J.BLOCK_OPEN_END&&this._advance();let s=this._peek.sourceSpan.fullStart,i=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),a=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),u=new Ji(e.parts[0],r,[],i,e.sourceSpan,a);this._pushContainer(u,!1)}_consumeBlockClose(e){let r=this._containerStack.length,s=this._containerStack[r-1];if(!this._popContainer(null,Ji,e.sourceSpan)){if(this._containerStack.length<r){let i=s instanceof is?s.fullName:s.name;this.errors.push(Dt.create(null,e.sourceSpan,`Unexpected closing block. The block may have been closed earlier. Did you forget to close the <${i}> element? If you meant to write the \`}\` character, you should use the "}" HTML entity instead.`));return}this.errors.push(Dt.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the `}` character, you should use the "}" HTML entity instead.'))}}_consumeIncompleteBlock(e){let r=[];for(;this._peek.type===J.BLOCK_PARAMETER;){let p=this._advance();r.push(new Dy(p.parts[0],p.sourceSpan))}let s=this._peek.sourceSpan.fullStart,i=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),a=new _e(e.sourceSpan.start,s,e.sourceSpan.fullStart),u=new Ji(e.parts[0],r,[],i,e.sourceSpan,a);this._pushContainer(u,!1),this._popContainer(null,Ji,null),this.errors.push(Dt.create(e.parts[0],i,`Incomplete block "${e.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`))}_consumeLet(e){let r=e.parts[0],s,i;if(this._peek.type!==J.LET_VALUE){this.errors.push(Dt.create(e.parts[0],e.sourceSpan,`Invalid @let declaration "${r}". Declaration must have a value.`));return}else s=this._advance();if(this._peek.type!==J.LET_END){this.errors.push(Dt.create(e.parts[0],e.sourceSpan,`Unterminated @let declaration "${r}". Declaration must be terminated with a semicolon.`));return}else i=this._advance();let a=i.sourceSpan.fullStart,u=new _e(e.sourceSpan.start,a,e.sourceSpan.fullStart),p=e.sourceSpan.toString().lastIndexOf(r),c=new _e(e.sourceSpan.start.moveBy(p),e.sourceSpan.end),m=new xy(r,s.parts[0],u,c,s.sourceSpan);this._addToParent(m)}_consumeIncompleteLet(e){let r=e.parts[0]??"",s=r?` "${r}"`:"";if(r.length>0){let i=e.sourceSpan.toString().lastIndexOf(r),a=new _e(e.sourceSpan.start.moveBy(i),e.sourceSpan.end),u=new _e(e.sourceSpan.start,e.sourceSpan.start.moveBy(0)),p=new xy(r,"",e.sourceSpan,a,u);this._addToParent(p)}this.errors.push(Dt.create(e.parts[0],e.sourceSpan,`Incomplete @let declaration${s}. @let declarations must be written as \`@let <name> = <value>;\``))}_getContainer(){return this._containerStack.length>0?this._containerStack[this._containerStack.length-1]:null}_getClosestElementLikeParent(){for(let e=this._containerStack.length-1;e>-1;e--){let r=this._containerStack[e];if(r instanceof ai||r instanceof is)return r}return null}_addToParent(e){let r=this._getContainer();r===null?this.rootNodes.push(e):r.children.push(e)}_getElementFullName(e,r){return Ta(this._getPrefix(e,r),e.parts[1])}_getComponentFullName(e,r){let s=e.parts[0],i=this._getComponentTagName(e,r);return i===null?s:i.startsWith(":")?s+i:`${s}:${i}`}_getComponentTagName(e,r){let s=this._getPrefix(e,r),i=e.parts[2];return!s&&!i?null:!s&&i?i:Ta(s,i||"ng-component")}_getPrefix(e,r){var s;let i,a;if(e.type===J.COMPONENT_OPEN_START||e.type===J.INCOMPLETE_COMPONENT_OPEN||e.type===J.COMPONENT_CLOSE?(i=e.parts[1],a=e.parts[2]):(i=e.parts[0],a=e.parts[1]),i=i||((s=this._getTagDefinition(a))===null||s===void 0?void 0:s.implicitNamespacePrefix)||"",!i&&r){let u=r instanceof ai?r.name:r.tagName;if(u!==null){let p=qu(u)[1],c=this._getTagDefinition(p);c!==null&&!c.preventNamespaceInheritance&&(i=eu(u))}}return i}};function Sy(t,e){return t.length>0&&t[t.length-1]===e}function wy(t,e){return $a[e]!==void 0?$a[e]||t:/^#x[a-f0-9]+$/i.test(e)?String.fromCodePoint(parseInt(e.slice(2),16)):/^#\d+$/.test(e)?String.fromCodePoint(parseInt(e.slice(1),10)):t}var D9=class extends y9{constructor(){super(Yp)}parse(t,e,r,s=!1,i){return super.parse(t,e,r,s,i)}},up;function rc(t,e={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:s=!1,isTagNameCaseSensitive:i=!1,getTagContentType:a,tokenizeAngularBlocks:u=!1,tokenizeAngularLetDeclaration:p=!1,enableAngularSelectorlessSyntax:c=!1}=e;return up??(up=new D9),up.parse(t,"angular-html-parser",{tokenizeExpansionForms:u,canSelfClose:r,allowHtmComponentClosingTags:s,tokenizeBlocks:u,tokenizeLet:p,selectorlessEnabled:c},i,a)}var x9=[A9,C9,T9,S9,w9,k9,P9,F9,I9,v9];function E9(t,e){for(let r of x9)r(t,e);return t}function A9(t){t.walk(e=>{if(e.kind==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].kind==="text"&&e.children[0].value[0]===`
|
|
110
|
-
`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function C9(t){let e=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;t.walk(r=>{if(r.children)for(let s=0;s<r.children.length;s++){let i=r.children[s];if(!e(i))continue;let a=i.prev,u=i.firstChild;r.removeChild(a),s--;let p=new _e(a.sourceSpan.start,u.sourceSpan.end),c=new _e(p.start,i.sourceSpan.end);i.condition=a.condition,i.sourceSpan=c,i.startSourceSpan=p,i.removeChild(u)}})}function b9(t,e,r){t.walk(s=>{if(s.children)for(let i=0;i<s.children.length;i++){let a=s.children[i];if(a.kind!=="text"&&!e(a))continue;a.kind!=="text"&&(a.kind="text",a.value=r(a));let u=a.prev;!u||u.kind!=="text"||(u.value+=a.value,u.sourceSpan=new _e(u.sourceSpan.start,a.sourceSpan.end),s.removeChild(a),i--)}})}function T9(t){return b9(t,e=>e.kind==="cdata",e=>`<![CDATA[${e.value}]]>`)}function v9(t){let e=r=>r.kind==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.kind==="text"&&!Er.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";t.walk(r=>{if(r.children)for(let s=0;s<r.children.length;s++){let i=r.children[s];if(!e(i))continue;let a=i.prev,u=i.next;a.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+u.value,a.sourceSpan=new _e(a.sourceSpan.start,u.sourceSpan.end),a.isTrailingSpaceSensitive=u.isTrailingSpaceSensitive,a.hasTrailingSpaces=u.hasTrailingSpaces,r.removeChild(i),s--,r.removeChild(u)}})}function S9(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(s=>{if(KL(s,e))for(let i of s.children){if(i.kind!=="text")continue;let a=i.sourceSpan.start,u=null,p=i.value.split(r);for(let c=0;c<p.length;c++,a=u){let m=p[c];if(c%2===0){u=a.moveBy(m.length),m.length>0&&s.insertChildBefore(i,{kind:"text",value:m,sourceSpan:new _e(a,u)});continue}u=a.moveBy(m.length+4),s.insertChildBefore(i,{kind:"interpolation",sourceSpan:new _e(a,u),children:m.length===0?[]:[{kind:"text",value:m,sourceSpan:new _e(a.moveBy(2),u.moveBy(-2))}]})}s.removeChild(i)}})}function w9(t,e){t.walk(r=>{let s=r.$children;if(!s)return;if(s.length===0||s.length===1&&s[0].kind==="text"&&Er.trim(s[0].value).length===0){r.hasDanglingSpaces=s.length>0,r.$children=[];return}let i=XL(r,e),a=wx(r);if(!i)for(let u=0;u<s.length;u++){let p=s[u];if(p.kind!=="text")continue;let{leadingWhitespace:c,text:m,trailingWhitespace:f}=WL(p.value),d=p.prev,D=p.next;m?(p.value=m,p.sourceSpan=new _e(p.sourceSpan.start.moveBy(c.length),p.sourceSpan.end.moveBy(-f.length)),c&&(d&&(d.hasTrailingSpaces=!0),p.hasLeadingSpaces=!0),f&&(p.hasTrailingSpaces=!0,D&&(D.hasLeadingSpaces=!0))):(r.removeChild(p),u--,(c||f)&&(d&&(d.hasTrailingSpaces=!0),D&&(D.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=a})}function P9(t){t.walk(e=>{e.isSelfClosing=!e.children||e.kind==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function F9(t,e){t.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function k9(t,e){t.walk(r=>{r.cssDisplay=c6(r,e)})}function I9(t,e){t.walk(r=>{let{children:s}=r;if(s){if(s.length===0){r.isDanglingSpaceSensitive=QL(r,e);return}for(let i of s)i.isLeadingSpaceSensitive=GL(i,e),i.isTrailingSpaceSensitive=YL(i,e);for(let i=0;i<s.length;i++){let a=s[i];a.isLeadingSpaceSensitive=(i===0||a.prev.isTrailingSpaceSensitive)&&a.isLeadingSpaceSensitive,a.isTrailingSpaceSensitive=(i===s.length-1||a.next.isLeadingSpaceSensitive)&&a.isTrailingSpaceSensitive}}})}var N9=E9;function B9(t,e,r){let{node:s}=t;switch(s.kind){case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(s),[At(Wh(t,e,r)),at];case"element":case"ieConditionalComment":return BO(t,e,r);case"angularControlFlowBlock":return vO(t,e,r);case"angularControlFlowBlockParameters":return kO(t,e,r);case"angularControlFlowBlockParameter":return Er.trim(s.expression);case"angularLetDeclaration":return At(["@let ",At([s.id," =",At(Qr([ht,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return s.value;case"angularIcuExpression":return IO(t,e,r);case"angularIcuCase":return NO(t,e,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[Ca(s),Aa(s)];case"interpolation":return[Ca(s,e),...t.map(r,"children"),Aa(s,e)];case"text":{if(s.parent.kind==="interpolation"){let p=/\n[^\S\n]*$/u,c=p.test(s.value),m=c?s.value.replace(p,""):s.value;return[qr(m),c?at:""]}let i=bi(s,e),a=Ox(s),u=Ai(s,e);return a[0]=[i,a[0]],a.push([a.pop(),u]),xx(a)}case"docType":return[At([Ca(s,e)," ",Ut(0,s.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),Aa(s,e)];case"comment":return[bi(s,e),qr(e.originalText.slice(ro(s),ju(s))),Ai(s,e)];case"attribute":{if(s.value===null)return s.rawName;let i=Lx(s.value),a=$x(s,e)?"":cL(i,'"');return[s.rawName,"=",a,qr(a==='"'?Ut(0,i,'"',"""):Ut(0,i,"'","'")),a]}default:throw new DL(s,"HTML")}}var _9={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},preprocess:N9,print:B9,insertPragma:bO,massageAstNode:AL,embed:pO,getVisitorKeys:gO},L9=_9,Zx=[{name:"Angular",type:"markup",aceMode:"html",extensions:[".component.html"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",aceMode:"html",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",aceMode:"html",extensions:[],tmScope:"text.html.basic",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",aceMode:"html",extensions:[".mjml"],tmScope:"text.mjml.basic",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",aceMode:"vue",extensions:[".vue"],tmScope:"source.vue",codemirrorMode:"vue",codemirrorMimeType:"text/x-vue",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}],Py={bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Fy="HTML",O9={bracketSameLine:Py.bracketSameLine,htmlWhitespaceSensitivity:{category:Fy,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Py.singleAttributePerLine,vueIndentScriptAndStyle:{category:Fy,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},e2=O9,Kh={};ox(Kh,{angular:()=>pM,html:()=>oM,lwc:()=>hM,mjml:()=>lM,vue:()=>cM});function M9(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var $9=M9,R9={canSelfClose:!0,normalizeTagName:!1,normalizeAttributeName:!1,allowHtmComponentClosingTags:!1,isTagNameCaseSensitive:!1,shouldParseFrontMatter:!0};function t2(t){return{...R9,...t}}function r2(t){let{canSelfClose:e,allowHtmComponentClosingTags:r,isTagNameCaseSensitive:s,shouldParseAsRawText:i,tokenizeAngularBlocks:a,tokenizeAngularLetDeclaration:u}=t;return{canSelfClose:e,allowHtmComponentClosingTags:r,isTagNameCaseSensitive:s,getTagContentType:i?(...p)=>i(...p)?os.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:a,tokenizeAngularLetDeclaration:u}}var lp=new Map([["*",new Set(["accesskey","autocapitalize","autocorrect","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","part","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["command","commandfor","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertargetaction","type","value"])],["canvas",new Set(["height","width"])],["caption",new Set(["align"])],["col",new Set(["align","char","charoff","span","valign","width"])],["colgroup",new Set(["align","char","charoff","span","valign","width"])],["data",new Set(["value"])],["del",new Set(["cite","datetime"])],["details",new Set(["name","open"])],["dialog",new Set(["closedby","open"])],["dir",new Set(["compact"])],["div",new Set(["align"])],["dl",new Set(["compact"])],["embed",new Set(["height","src","type","width"])],["fieldset",new Set(["disabled","form","name"])],["font",new Set(["color","face","size"])],["form",new Set(["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"])],["frame",new Set(["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"])],["frameset",new Set(["cols","rows"])],["h1",new Set(["align"])],["h2",new Set(["align"])],["h3",new Set(["align"])],["h4",new Set(["align"])],["h5",new Set(["align"])],["h6",new Set(["align"])],["head",new Set(["profile"])],["hr",new Set(["align","noshade","size","width"])],["html",new Set(["manifest","version"])],["iframe",new Set(["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","loading","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"])],["img",new Set(["align","alt","border","crossorigin","decoding","fetchpriority","height","hspace","ismap","loading","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"])],["input",new Set(["accept","align","alpha","alt","autocomplete","checked","colorspace","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","popovertarget","popovertargetaction","readonly","required","size","src","step","type","usemap","value","width"])],["ins",new Set(["cite","datetime"])],["isindex",new Set(["prompt"])],["label",new Set(["for","form"])],["legend",new Set(["align"])],["li",new Set(["type","value"])],["link",new Set(["as","blocking","charset","color","crossorigin","disabled","fetchpriority","href","hreflang","imagesizes","imagesrcset","integrity","media","referrerpolicy","rel","rev","sizes","target","type"])],["map",new Set(["name"])],["menu",new Set(["compact"])],["meta",new Set(["charset","content","http-equiv","media","name","scheme"])],["meter",new Set(["high","low","max","min","optimum","value"])],["object",new Set(["align","archive","border","classid","codebase","codetype","data","declare","form","height","hspace","name","standby","type","typemustmatch","usemap","vspace","width"])],["ol",new Set(["compact","reversed","start","type"])],["optgroup",new Set(["disabled","label"])],["option",new Set(["disabled","label","selected","value"])],["output",new Set(["for","form","name"])],["p",new Set(["align"])],["param",new Set(["name","type","value","valuetype"])],["pre",new Set(["width"])],["progress",new Set(["max","value"])],["q",new Set(["cite"])],["script",new Set(["async","blocking","charset","crossorigin","defer","fetchpriority","integrity","language","nomodule","referrerpolicy","src","type"])],["select",new Set(["autocomplete","disabled","form","multiple","name","required","size"])],["slot",new Set(["name"])],["source",new Set(["height","media","sizes","src","srcset","type","width"])],["style",new Set(["blocking","media","type"])],["table",new Set(["align","bgcolor","border","cellpadding","cellspacing","frame","rules","summary","width"])],["tbody",new Set(["align","char","charoff","valign"])],["td",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["template",new Set(["shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootmode","shadowrootserializable"])],["textarea",new Set(["autocomplete","cols","dirname","disabled","form","maxlength","minlength","name","placeholder","readonly","required","rows","wrap"])],["tfoot",new Set(["align","char","charoff","valign"])],["th",new Set(["abbr","align","axis","bgcolor","char","charoff","colspan","headers","height","nowrap","rowspan","scope","valign","width"])],["thead",new Set(["align","char","charoff","valign"])],["time",new Set(["datetime"])],["tr",new Set(["align","bgcolor","char","charoff","valign"])],["track",new Set(["default","kind","label","src","srclang"])],["ul",new Set(["compact","type"])],["video",new Set(["autoplay","controls","crossorigin","height","loop","muted","playsinline","poster","preload","src","width"])]]),j9=new Set(["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","em","embed","fencedframe","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","selectedcontent","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]),Mo={attrs:!0,children:!0,cases:!0,expression:!0},ky=new Set(["parent"]),Zi,sc,ic,U9=class ca{constructor(e={}){q4(this,Zi),ry(this,"kind"),ry(this,"parent");for(let r of new Set([...ky,...Object.keys(e)]))this.setProperty(r,e[r]);if(Mu(e))for(let r of Object.getOwnPropertySymbols(e))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in Mo&&(r=r.map(s=>this.createChild(s))),!ky.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let s in Mo){let i=this[s];if(i){let a=q9(i,u=>u.map(e));r!==i&&(r||(r=new ca({parent:this.parent})),r.setProperty(s,a))}}if(r)for(let s in this)s in Mo||(r[s]=this[s]);return e(r||this)}walk(e){for(let r in Mo){let s=this[r];if(s)for(let i=0;i<s.length;i++)s[i].walk(e)}e(this)}createChild(e){let r=e instanceof ca?e.clone():new ca(e);return r.setProperty("parent",this),r}insertChildBefore(e,r){let s=this.$children;s.splice(s.indexOf(e),0,this.createChild(r))}removeChild(e){let r=this.$children;r.splice(r.indexOf(e),1)}replaceChild(e,r){let s=this.$children;s[s.indexOf(e)]=this.createChild(r)}clone(){return new ca(this)}get $children(){return this[Bo(this,Zi,sc)]}set $children(e){this[Bo(this,Zi,sc)]=e}get firstChild(){return this.$children?.[0]}get lastChild(){return Pn(1,this.$children,-1)}get prev(){let e=Bo(this,Zi,ic);return e[e.indexOf(this)-1]}get next(){let e=Bo(this,Zi,ic);return e[e.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};Zi=new WeakSet,sc=function(){return this.kind==="angularIcuCase"?"expression":this.kind==="angularIcuExpression"?"cases":"children"},ic=function(){return this.parent?.$children??[]};var V9=U9;function q9(t,e){let r=t.map(e);return r.some((s,i)=>s!==t[i])?r:t}var H9=[{regex:/^(?<openingTagSuffix>\[if(?<condition>[^\]]*)\]>)(?<data>.*?)<!\s*\[endif\]$/su,parse:W9},{regex:/^\[if(?<condition>[^\]]*)\]><!$/u,parse:J9},{regex:/^<!\s*\[endif\]$/u,parse:K9}];function z9(t,e){if(t.value)for(let{regex:r,parse:s}of H9){let i=t.value.match(r);if(i)return s(t,i,e)}return null}function W9(t,e,r){let{openingTagSuffix:s,condition:i,data:a}=e.groups,u=4+s.length,p=t.sourceSpan.start.moveBy(u),c=p.moveBy(a.length),[m,f]=(()=>{try{return[!0,r(a,p).children]}catch{return[!1,[{kind:"text",value:a,sourceSpan:new _e(p,c)}]]}})();return{kind:"ieConditionalComment",complete:m,children:f,condition:Ut(0,i.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new _e(t.sourceSpan.start,p),endSourceSpan:new _e(c,t.sourceSpan.end)}}function J9(t,e){let{condition:r}=e.groups;return{kind:"ieConditionalStartComment",condition:Ut(0,r.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function K9(t){return{kind:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var X9=class extends ZO{visitExpansionCase(t,e){e.parseOptions.name==="angular"&&this.visitChildren(e,r=>{r(t.expression)})}visit(t,{parseOptions:e}){eM(t),tM(t,e),sM(t,e),rM(t)}};function G9(t,e,r,s){Xx(new X9,t.children,{parseOptions:r}),e&&t.children.unshift(e);let i=new V9(t);return i.walk(a=>{if(a.kind==="comment"){let u=z9(a,s);u&&a.parent.replaceChild(a,u)}Y9(a),Q9(a),Z9(a)}),i}function Y9(t){if(t.kind==="block"){if(t.name=Ut(0,t.name.toLowerCase(),/\s+/gu," ").trim(),t.kind="angularControlFlowBlock",!Rh(t.parameters)){delete t.parameters;return}for(let e of t.parameters)e.kind="angularControlFlowBlockParameter";t.parameters={kind:"angularControlFlowBlockParameters",children:t.parameters,sourceSpan:new _e(t.parameters[0].sourceSpan.start,Pn(0,t.parameters,-1).sourceSpan.end)}}}function Q9(t){t.kind==="letDeclaration"&&(t.kind="angularLetDeclaration",t.id=t.name,t.init={kind:"angularLetDeclarationInitializer",sourceSpan:new _e(t.valueSpan.start,t.valueSpan.end),value:t.value},delete t.name,delete t.value)}function Z9(t){t.kind==="expansion"&&(t.kind="angularIcuExpression"),t.kind==="expansionCase"&&(t.kind="angularIcuCase")}function Iy(t,e){let r=t.toLowerCase();return e(r)?r:t}function Ny(t){let e=t.name.startsWith(":")?t.name.slice(1).split(":")[0]:null,r=t.nameSpan.toString(),s=e!==null&&r.startsWith(`${e}:`),i=s?r.slice(e.length+1):r;t.name=i,t.namespace=e,t.hasExplicitNamespace=s}function eM(t){switch(t.kind){case"element":Ny(t);for(let e of t.attrs)Ny(e),e.valueSpan?(e.value=e.valueSpan.toString(),/["']/u.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null;break;case"comment":t.value=t.sourceSpan.toString().slice(4,-3);break;case"text":t.value=t.sourceSpan.toString();break}}function tM(t,e){if(t.kind==="element"){let r=Yp(e.isTagNameCaseSensitive?t.name:t.name.toLowerCase());!t.namespace||t.namespace===r.implicitNamespacePrefix||eo(t)?t.tagDefinition=r:t.tagDefinition=Yp("")}}function rM(t){t.sourceSpan&&t.endSourceSpan&&(t.sourceSpan=new _e(t.sourceSpan.start,t.endSourceSpan.end))}function sM(t,e){if(t.kind==="element"&&(e.normalizeTagName&&(!t.namespace||t.namespace===t.tagDefinition.implicitNamespacePrefix||eo(t))&&(t.name=Iy(t.name,r=>j9.has(r))),e.normalizeAttributeName))for(let r of t.attrs)r.namespace||(r.name=Iy(r.name,s=>lp.has(t.name)&&(lp.get("*").has(s)||lp.get(t.name).has(s))))}function s2(t,e){let{rootNodes:r,errors:s}=rc(t,r2(e));return s.length>0&&nc(s[0]),{parseOptions:e,rootNodes:r}}function iM(t,e){let r=r2(e),{rootNodes:s,errors:i}=rc(t,r);if(s.some(c=>c.kind==="docType"&&c.value==="html"||c.kind==="element"&&c.name.toLowerCase()==="html"))return s2(t,Xh);let a,u=()=>a??(a=rc(t,{...r,getTagContentType:void 0})),p=c=>{let{offset:m}=c.startSourceSpan.start;return u().rootNodes.find(f=>f.kind==="element"&&f.startSourceSpan.start.offset===m)??c};for(let[c,m]of s.entries())if(m.kind==="element"){if(m.isVoid)i=u().errors,s[c]=p(m);else if(nM(m)){let{endSourceSpan:f,startSourceSpan:d}=m,D=u().errors.find(y=>y.span.start.offset>d.start.offset&&y.span.start.offset<f.end.offset);D&&nc(D),s[c]=p(m)}}return i.length>0&&nc(i[0]),{parseOptions:e,rootNodes:s}}function nM(t){if(t.kind!=="element"||t.name!=="template")return!1;let e=t.attrs.find(r=>r.name==="lang")?.value;return!e||e==="html"}function nc(t){let{msg:e,span:{start:r,end:s}}=t;throw $9(e,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:s.line+1,column:s.col+1}},cause:t})}function aM(t,e,r,s,i,a){let{offset:u}=s,p=Ut(0,e.slice(0,u),/[^\n]/gu," ")+r,c=i2(p,t,{...i,shouldParseFrontMatter:!1},a);c.sourceSpan=new _e(s,Pn(0,c.children,-1).sourceSpan.end);let m=c.children[0];return m.length===u?c.children.shift():(m.sourceSpan=new _e(m.sourceSpan.start.moveBy(u),m.sourceSpan.end),m.value=m.value.slice(u)),c}function i2(t,e,r,s={}){let{frontMatter:i,content:a}=r.shouldParseFrontMatter?UL(t):{content:t},u=new Kx(t,s.filepath),p=new Qp(u,0,0,0),c=p.moveBy(t.length),{parseOptions:m,rootNodes:f}=e(a,r),d={kind:"root",sourceSpan:new _e(p,c),children:f},D;if(i){let[y,x]=[i.start,i.end].map(E=>new Qp(u,E.index,E.line-1,E.column));D={...i,kind:"frontMatter",sourceSpan:new _e(y,x)}}return G9(d,D,m,(y,x)=>aM(e,t,y,x,m,s))}var Xh=t2({name:"html",normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0});function ao(t){let e=t2(t),r=e.name==="vue"?iM:s2;return{parse:(s,i)=>i2(s,r,e,i),hasPragma:AO,hasIgnorePragma:CO,astFormat:"html",locStart:ro,locEnd:ju}}var oM=ao(Xh),uM=new Set(["mj-style","mj-raw"]),lM=ao({...Xh,name:"mjml",shouldParseAsRawText:t=>uM.has(t)}),pM=ao({name:"angular",tokenizeAngularBlocks:!0,tokenizeAngularLetDeclaration:!0}),cM=ao({name:"vue",isTagNameCaseSensitive:!0,shouldParseAsRawText(t,e,r,s){return t.toLowerCase()!=="html"&&!r&&(t!=="template"||s.some(({name:i,value:a})=>i==="lang"&&a!=="html"&&a!==""&&a!==void 0))}}),hM=ao({name:"lwc",canSelfClose:!1}),n2={html:L9};const dM=Object.freeze(Object.defineProperty({__proto__:null,default:ux,languages:Zx,options:e2,parsers:Kh,printers:n2},Symbol.toStringTag,{value:"Module"}));var fM=Object.create,Gh=Object.defineProperty,mM=Object.getOwnPropertyDescriptor,yM=Object.getOwnPropertyNames,gM=Object.getPrototypeOf,DM=Object.prototype.hasOwnProperty,ae=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),a2=(t,e)=>{for(var r in e)Gh(t,r,{get:e[r],enumerable:!0})},xM=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yM(e))!DM.call(t,i)&&i!==r&&Gh(t,i,{get:()=>e[i],enumerable:!(s=mM(e,i))||s.enumerable});return t},_n=(t,e,r)=>(r=t!=null?fM(gM(t)):{},xM(Gh(r,"default",{value:t,enumerable:!0}),t)),EM=ae((t,e)=>{var r=String,s=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=s(),e.exports.createColors=s}),o2=ae(()=>{}),Yh=ae((t,e)=>{var r=EM(),s=o2(),i=class u2 extends Error{constructor(u,p,c,m,f,d){super(u),this.name="CssSyntaxError",this.reason=u,f&&(this.file=f),m&&(this.source=m),d&&(this.plugin=d),typeof p<"u"&&typeof c<"u"&&(typeof p=="number"?(this.line=p,this.column=c):(this.line=p.line,this.column=p.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,u2)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(u){if(!this.source)return"";let p=this.source;u==null&&(u=r.isColorSupported);let c=E=>E,m=E=>E,f=E=>E;if(u){let{bold:E,gray:C,red:b}=r.createColors(!0);m=A=>E(b(A)),c=A=>C(A),s&&(f=A=>s(A))}let d=p.split(/\r?\n/),D=Math.max(this.line-3,0),y=Math.min(this.line+2,d.length),x=String(y).length;return d.slice(D,y).map((E,C)=>{let b=D+1+C,A=" "+(" "+b).slice(-x)+" | ";if(b===this.line){if(E.length>160){let P=20,S=Math.max(0,this.column-P),F=Math.max(this.column+P,this.endColumn+P),B=E.slice(S,F),I=c(A.replace(/\d/g," "))+E.slice(0,Math.min(this.column-1,P-1)).replace(/[^\t]/g," ");return m(">")+c(A)+f(B)+`
|
|
111
|
-
`+I+m("^")}let v=c(A.replace(/\d/g," "))+E.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+c(A)+f(E)+`
|
|
112
|
-
`+v+m("^")}return" "+c(A)+f(E)}).join(`
|
|
113
|
-
`)}toString(){let u=this.showSourceCode();return u&&(u=`
|
|
114
|
-
|
|
115
|
-
`+u+`
|
|
116
|
-
`),this.name+": "+this.message+u}};e.exports=i,i.default=i}),Qh=ae((t,e)=>{var r={after:`
|
|
117
|
-
`,beforeClose:`
|
|
118
|
-
`,beforeComment:`
|
|
119
|
-
`,beforeDecl:`
|
|
120
|
-
`,beforeOpen:" ",beforeRule:`
|
|
121
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(a){return a[0].toUpperCase()+a.slice(1)}var i=class{constructor(a){this.builder=a}atrule(a,u){let p="@"+a.name,c=a.params?this.rawValue(a,"params"):"";if(typeof a.raws.afterName<"u"?p+=a.raws.afterName:c&&(p+=" "),a.nodes)this.block(a,p+c);else{let m=(a.raws.between||"")+(u?";":"");this.builder(p+c+m,a)}}beforeAfter(a,u){let p;a.type==="decl"?p=this.raw(a,null,"beforeDecl"):a.type==="comment"?p=this.raw(a,null,"beforeComment"):u==="before"?p=this.raw(a,null,"beforeRule"):p=this.raw(a,null,"beforeClose");let c=a.parent,m=0;for(;c&&c.type!=="root";)m+=1,c=c.parent;if(p.includes(`
|
|
122
|
-
`)){let f=this.raw(a,null,"indent");if(f.length)for(let d=0;d<m;d++)p+=f}return p}block(a,u){let p=this.raw(a,"between","beforeOpen");this.builder(u+p+"{",a,"start");let c;a.nodes&&a.nodes.length?(this.body(a),c=this.raw(a,"after")):c=this.raw(a,"after","emptyBody"),c&&this.builder(c),this.builder("}",a,"end")}body(a){let u=a.nodes.length-1;for(;u>0&&a.nodes[u].type==="comment";)u-=1;let p=this.raw(a,"semicolon");for(let c=0;c<a.nodes.length;c++){let m=a.nodes[c],f=this.raw(m,"before");f&&this.builder(f),this.stringify(m,u!==c||p)}}comment(a){let u=this.raw(a,"left","commentLeft"),p=this.raw(a,"right","commentRight");this.builder("/*"+u+a.text+p+"*/",a)}decl(a,u){let p=this.raw(a,"between","colon"),c=a.prop+p+this.rawValue(a,"value");a.important&&(c+=a.raws.important||" !important"),u&&(c+=";"),this.builder(c,a)}document(a){this.body(a)}raw(a,u,p){let c;if(p||(p=u),u&&(c=a.raws[u],typeof c<"u"))return c;let m=a.parent;if(p==="before"&&(!m||m.type==="root"&&m.first===a||m&&m.type==="document"))return"";if(!m)return r[p];let f=a.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[p]<"u")return f.rawCache[p];if(p==="before"||p==="after")return this.beforeAfter(a,p);{let d="raw"+s(p);this[d]?c=this[d](f,a):f.walk(D=>{if(c=D.raws[u],typeof c<"u")return!1})}return typeof c>"u"&&(c=r[p]),f.rawCache[p]=c,c}rawBeforeClose(a){let u;return a.walk(p=>{if(p.nodes&&p.nodes.length>0&&typeof p.raws.after<"u")return u=p.raws.after,u.includes(`
|
|
123
|
-
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawBeforeComment(a,u){let p;return a.walkComments(c=>{if(typeof c.raws.before<"u")return p=c.raws.before,p.includes(`
|
|
124
|
-
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p>"u"?p=this.raw(u,null,"beforeDecl"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeDecl(a,u){let p;return a.walkDecls(c=>{if(typeof c.raws.before<"u")return p=c.raws.before,p.includes(`
|
|
125
|
-
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p>"u"?p=this.raw(u,null,"beforeRule"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeOpen(a){let u;return a.walk(p=>{if(p.type!=="decl"&&(u=p.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(a){let u;return a.walk(p=>{if(p.nodes&&(p.parent!==a||a.first!==p)&&typeof p.raws.before<"u")return u=p.raws.before,u.includes(`
|
|
126
|
-
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(a){let u;return a.walkDecls(p=>{if(typeof p.raws.between<"u")return u=p.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(a){let u;return a.walk(p=>{if(p.nodes&&p.nodes.length===0&&(u=p.raws.after,typeof u<"u"))return!1}),u}rawIndent(a){if(a.raws.indent)return a.raws.indent;let u;return a.walk(p=>{let c=p.parent;if(c&&c!==a&&c.parent&&c.parent===a&&typeof p.raws.before<"u"){let m=p.raws.before.split(`
|
|
127
|
-
`);return u=m[m.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(a){let u;return a.walk(p=>{if(p.nodes&&p.nodes.length&&p.last.type==="decl"&&(u=p.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(a,u){let p=a[u],c=a.raws[u];return c&&c.value===p?c.raw:p}root(a){this.body(a),a.raws.after&&this.builder(a.raws.after)}rule(a){this.block(a,this.rawValue(a,"selector")),a.raws.ownSemicolon&&this.builder(a.raws.ownSemicolon,a,"end")}stringify(a,u){if(!this[a.type])throw new Error("Unknown AST node type "+a.type+". Maybe you need to change PostCSS stringifier.");this[a.type](a,u)}};e.exports=i,i.default=i}),Hu=ae((t,e)=>{var r=Qh();function s(i,a){new r(a).stringify(i)}e.exports=s,s.default=s}),Zh=ae((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),zu=ae((t,e)=>{var r=Yh(),s=Qh(),i=Hu(),{isClean:a,my:u}=Zh();function p(f,d){let D=new f.constructor;for(let y in f){if(!Object.prototype.hasOwnProperty.call(f,y)||y==="proxyCache")continue;let x=f[y],E=typeof x;y==="parent"&&E==="object"?d&&(D[y]=d):y==="source"?D[y]=x:Array.isArray(x)?D[y]=x.map(C=>p(C,D)):(E==="object"&&x!==null&&(x=p(x)),D[y]=x)}return D}function c(f,d){if(d&&typeof d.offset<"u")return d.offset;let D=1,y=1,x=0;for(let E=0;E<f.length;E++){if(y===d.line&&D===d.column){x=E;break}f[E]===`
|
|
128
|
-
`?(D=1,y+=1):D+=1}return x}var m=class{get proxyOf(){return this}constructor(f={}){this.raws={},this[a]=!1,this[u]=!0;for(let d in f)if(d==="nodes"){this.nodes=[];for(let D of f[d])typeof D.clone=="function"?this.append(D.clone()):this.append(D)}else this[d]=f[d]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let d=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let d in f)this[d]=f[d];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let d=p(this);for(let D in f)d[D]=f[D];return d}cloneAfter(f={}){let d=this.clone(f);return this.parent.insertAfter(this,d),d}cloneBefore(f={}){let d=this.clone(f);return this.parent.insertBefore(this,d),d}error(f,d={}){if(this.source){let{end:D,start:y}=this.rangeBy(d);return this.source.input.error(f,{column:y.column,line:y.line},{column:D.column,line:D.line},d)}return new r(f)}getProxyProcessor(){return{get(f,d){return d==="proxyOf"?f:d==="root"?()=>f.root().toProxy():f[d]},set(f,d,D){return f[d]===D||(f[d]=D,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&f.markDirty()),!0}}}markClean(){this[a]=!0}markDirty(){if(this[a]){this[a]=!1;let f=this;for(;f=f.parent;)f[a]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f={}){let d=this.source.start;if(f.index)d=this.positionInside(f.index);else if(f.word){let D="document"in this.source.input?this.source.input.document:this.source.input.css,y=D.slice(c(D,this.source.start),c(D,this.source.end)).indexOf(f.word);y!==-1&&(d=this.positionInside(y))}return d}positionInside(f){let d=this.source.start.column,D=this.source.start.line,y="document"in this.source.input?this.source.input.document:this.source.input.css,x=c(y,this.source.start),E=x+f;for(let C=x;C<E;C++)y[C]===`
|
|
129
|
-
`?(d=1,D+=1):d+=1;return{column:d,line:D,offset:E}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f={}){let d="document"in this.source.input?this.source.input.document:this.source.input.css,D={column:this.source.start.column,line:this.source.start.line,offset:c(d,this.source.start)},y=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:c(d,this.source.end)+1}:{column:D.column+1,line:D.line,offset:D.offset+1};if(f.word){let x=d.slice(c(d,this.source.start),c(d,this.source.end)).indexOf(f.word);x!==-1&&(D=this.positionInside(x),y=this.positionInside(x+f.word.length))}else f.start?D={column:f.start.column,line:f.start.line,offset:c(d,f.start)}:f.index&&(D=this.positionInside(f.index)),f.end?y={column:f.end.column,line:f.end.line,offset:c(d,f.end)}:typeof f.endIndex=="number"?y=this.positionInside(f.endIndex):f.index&&(y=this.positionInside(f.index+1));return(y.line<D.line||y.line===D.line&&y.column<=D.column)&&(y={column:D.column+1,line:D.line,offset:D.offset+1}),{end:y,start:D}}raw(f,d){return new s().raw(this,f,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let d=this,D=!1;for(let y of f)y===this?D=!0:D?(this.parent.insertAfter(d,y),d=y):this.parent.insertBefore(d,y);D||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,d){let D={},y=d==null;d=d||new Map;let x=0;for(let E in this){if(!Object.prototype.hasOwnProperty.call(this,E)||E==="parent"||E==="proxyCache")continue;let C=this[E];if(Array.isArray(C))D[E]=C.map(b=>typeof b=="object"&&b.toJSON?b.toJSON(null,d):b);else if(typeof C=="object"&&C.toJSON)D[E]=C.toJSON(null,d);else if(E==="source"){if(C==null)continue;let b=d.get(C.input);b==null&&(b=x,d.set(C.input,x),x++),D[E]={end:C.end,inputId:b,start:C.start}}else D[E]=C}return y&&(D.inputs=[...d.keys()].map(E=>E.toJSON())),D}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let d="";return f(this,D=>{d+=D}),d}warn(f,d,D={}){let y={node:this};for(let x in D)y[x]=D[x];return f.warn(d,y)}};e.exports=m,m.default=m}),oo=ae((t,e)=>{var r=zu(),s=class extends r{constructor(i){super(i),this.type="comment"}};e.exports=s,s.default=s}),Wu=ae((t,e)=>{var r=zu(),s=class extends r{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl"}};e.exports=s,s.default=s}),Oi=ae((t,e)=>{var r=oo(),s=Wu(),i=zu(),{isClean:a,my:u}=Zh(),p,c,m,f;function d(x){return x.map(E=>(E.nodes&&(E.nodes=d(E.nodes)),delete E.source,E))}function D(x){if(x[a]=!1,x.proxyOf.nodes)for(let E of x.proxyOf.nodes)D(E)}var y=class l2 extends i{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...E){for(let C of E){let b=this.normalize(C,this.last);for(let A of b)this.proxyOf.nodes.push(A)}return this.markDirty(),this}cleanRaws(E){if(super.cleanRaws(E),this.nodes)for(let C of this.nodes)C.cleanRaws(E)}each(E){if(!this.proxyOf.nodes)return;let C=this.getIterator(),b,A;for(;this.indexes[C]<this.proxyOf.nodes.length&&(b=this.indexes[C],A=E(this.proxyOf.nodes[b],b),A!==!1);)this.indexes[C]+=1;return delete this.indexes[C],A}every(E){return this.nodes.every(E)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let E=this.lastEach;return this.indexes[E]=0,E}getProxyProcessor(){return{get(E,C){return C==="proxyOf"?E:E[C]?C==="each"||typeof C=="string"&&C.startsWith("walk")?(...b)=>E[C](...b.map(A=>typeof A=="function"?(v,P)=>A(v.toProxy(),P):A)):C==="every"||C==="some"?b=>E[C]((A,...v)=>b(A.toProxy(),...v)):C==="root"?()=>E.root().toProxy():C==="nodes"?E.nodes.map(b=>b.toProxy()):C==="first"||C==="last"?E[C].toProxy():E[C]:E[C]},set(E,C,b){return E[C]===b||(E[C]=b,(C==="name"||C==="params"||C==="selector")&&E.markDirty()),!0}}}index(E){return typeof E=="number"?E:(E.proxyOf&&(E=E.proxyOf),this.proxyOf.nodes.indexOf(E))}insertAfter(E,C){let b=this.index(E),A=this.normalize(C,this.proxyOf.nodes[b]).reverse();b=this.index(E);for(let P of A)this.proxyOf.nodes.splice(b+1,0,P);let v;for(let P in this.indexes)v=this.indexes[P],b<v&&(this.indexes[P]=v+A.length);return this.markDirty(),this}insertBefore(E,C){let b=this.index(E),A=b===0?"prepend":!1,v=this.normalize(C,this.proxyOf.nodes[b],A).reverse();b=this.index(E);for(let S of v)this.proxyOf.nodes.splice(b,0,S);let P;for(let S in this.indexes)P=this.indexes[S],b<=P&&(this.indexes[S]=P+v.length);return this.markDirty(),this}normalize(E,C){if(typeof E=="string")E=d(c(E).nodes);else if(typeof E>"u")E=[];else if(Array.isArray(E)){E=E.slice(0);for(let b of E)b.parent&&b.parent.removeChild(b,"ignore")}else if(E.type==="root"&&this.type!=="document"){E=E.nodes.slice(0);for(let b of E)b.parent&&b.parent.removeChild(b,"ignore")}else if(E.type)E=[E];else if(E.prop){if(typeof E.value>"u")throw new Error("Value field is missed in node creation");typeof E.value!="string"&&(E.value=String(E.value)),E=[new s(E)]}else if(E.selector||E.selectors)E=[new f(E)];else if(E.name)E=[new p(E)];else if(E.text)E=[new r(E)];else throw new Error("Unknown node type in node creation");return E.map(b=>(b[u]||l2.rebuild(b),b=b.proxyOf,b.parent&&b.parent.removeChild(b),b[a]&&D(b),b.raws||(b.raws={}),typeof b.raws.before>"u"&&C&&typeof C.raws.before<"u"&&(b.raws.before=C.raws.before.replace(/\S/g,"")),b.parent=this.proxyOf,b))}prepend(...E){E=E.reverse();for(let C of E){let b=this.normalize(C,this.first,"prepend").reverse();for(let A of b)this.proxyOf.nodes.unshift(A);for(let A in this.indexes)this.indexes[A]=this.indexes[A]+b.length}return this.markDirty(),this}push(E){return E.parent=this,this.proxyOf.nodes.push(E),this}removeAll(){for(let E of this.proxyOf.nodes)E.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(E){E=this.index(E),this.proxyOf.nodes[E].parent=void 0,this.proxyOf.nodes.splice(E,1);let C;for(let b in this.indexes)C=this.indexes[b],C>=E&&(this.indexes[b]=C-1);return this.markDirty(),this}replaceValues(E,C,b){return b||(b=C,C={}),this.walkDecls(A=>{C.props&&!C.props.includes(A.prop)||C.fast&&!A.value.includes(C.fast)||(A.value=A.value.replace(E,b))}),this.markDirty(),this}some(E){return this.nodes.some(E)}walk(E){return this.each((C,b)=>{let A;try{A=E(C,b)}catch(v){throw C.addToError(v)}return A!==!1&&C.walk&&(A=C.walk(E)),A})}walkAtRules(E,C){return C?E instanceof RegExp?this.walk((b,A)=>{if(b.type==="atrule"&&E.test(b.name))return C(b,A)}):this.walk((b,A)=>{if(b.type==="atrule"&&b.name===E)return C(b,A)}):(C=E,this.walk((b,A)=>{if(b.type==="atrule")return C(b,A)}))}walkComments(E){return this.walk((C,b)=>{if(C.type==="comment")return E(C,b)})}walkDecls(E,C){return C?E instanceof RegExp?this.walk((b,A)=>{if(b.type==="decl"&&E.test(b.prop))return C(b,A)}):this.walk((b,A)=>{if(b.type==="decl"&&b.prop===E)return C(b,A)}):(C=E,this.walk((b,A)=>{if(b.type==="decl")return C(b,A)}))}walkRules(E,C){return C?E instanceof RegExp?this.walk((b,A)=>{if(b.type==="rule"&&E.test(b.selector))return C(b,A)}):this.walk((b,A)=>{if(b.type==="rule"&&b.selector===E)return C(b,A)}):(C=E,this.walk((b,A)=>{if(b.type==="rule")return C(b,A)}))}};y.registerParse=x=>{c=x},y.registerRule=x=>{f=x},y.registerAtRule=x=>{p=x},y.registerRoot=x=>{m=x},e.exports=y,y.default=y,y.rebuild=x=>{x.type==="atrule"?Object.setPrototypeOf(x,p.prototype):x.type==="rule"?Object.setPrototypeOf(x,f.prototype):x.type==="decl"?Object.setPrototypeOf(x,s.prototype):x.type==="comment"?Object.setPrototypeOf(x,r.prototype):x.type==="root"&&Object.setPrototypeOf(x,m.prototype),x[u]=!0,x.nodes&&x.nodes.forEach(E=>{y.rebuild(E)})}}),AM=ae((t,e)=>{var r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",s=(a,u=21)=>(p=u)=>{let c="",m=p|0;for(;m--;)c+=a[Math.random()*a.length|0];return c},i=(a=21)=>{let u="",p=a|0;for(;p--;)u+=r[Math.random()*64|0];return u};e.exports={nanoid:i,customAlphabet:s}}),CM=ae(()=>{}),p2=ae((t,e)=>{e.exports=class{}}),uo=ae((t,e)=>{var{nanoid:r}=AM(),{isAbsolute:s,resolve:i}={},{SourceMapConsumer:a,SourceMapGenerator:u}=CM(),{fileURLToPath:p,pathToFileURL:c}={},m=Yh(),f=p2(),d=o2(),D=Symbol("lineToIndexCache"),y=!!(a&&u),x=!!(i&&s);function E(b){if(b[D])return b[D];let A=b.css.split(`
|
|
130
|
-
`),v=new Array(A.length),P=0;for(let S=0,F=A.length;S<F;S++)v[S]=P,P+=A[S].length+1;return b[D]=v,v}var C=class{get from(){return this.file||this.id}constructor(b,A={}){if(b===null||typeof b>"u"||typeof b=="object"&&!b.toString)throw new Error(`PostCSS received ${b} instead of CSS string`);if(this.css=b.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,A.document&&(this.document=A.document.toString()),A.from&&(!x||/^\w+:\/\//.test(A.from)||s(A.from)?this.file=A.from:this.file=i(A.from)),x&&y){let v=new f(this.css,A);if(v.text){this.map=v;let P=v.consumer().file;!this.file&&P&&(this.file=this.mapResolve(P))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(b,A,v,P={}){let S,F,B,I,R;if(A&&typeof A=="object"){let V=A,N=v;if(typeof V.offset=="number"){I=V.offset;let q=this.fromOffset(I);A=q.line,v=q.col}else A=V.line,v=V.column,I=this.fromLineAndColumn(A,v);if(typeof N.offset=="number"){B=N.offset;let q=this.fromOffset(B);F=q.line,S=q.col}else F=N.line,S=N.column,B=this.fromLineAndColumn(N.line,N.column)}else if(v)I=this.fromLineAndColumn(A,v);else{I=A;let V=this.fromOffset(I);A=V.line,v=V.col}let j=this.origin(A,v,F,S);return j?R=new m(b,j.endLine===void 0?j.line:{column:j.column,line:j.line},j.endLine===void 0?j.column:{column:j.endColumn,line:j.endLine},j.source,j.file,P.plugin):R=new m(b,F===void 0?A:{column:v,line:A},F===void 0?v:{column:S,line:F},this.css,this.file,P.plugin),R.input={column:v,endColumn:S,endLine:F,endOffset:B,line:A,offset:I,source:this.css},this.file&&(c&&(R.input.url=c(this.file).toString()),R.input.file=this.file),R}fromLineAndColumn(b,A){return E(this)[b-1]+A-1}fromOffset(b){let A=E(this),v=A[A.length-1],P=0;if(b>=v)P=A.length-1;else{let S=A.length-2,F;for(;P<S;)if(F=P+(S-P>>1),b<A[F])S=F-1;else if(b>=A[F+1])P=F+1;else{P=F;break}}return{col:b-A[P]+1,line:P+1}}mapResolve(b){return/^\w+:\/\//.test(b)?b:i(this.map.consumer().sourceRoot||this.map.root||".",b)}origin(b,A,v,P){if(!this.map)return!1;let S=this.map.consumer(),F=S.originalPositionFor({column:A,line:b});if(!F.source)return!1;let B;typeof v=="number"&&(B=S.originalPositionFor({column:P,line:v}));let I;s(F.source)?I=c(F.source):I=new URL(F.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let R={column:F.column,endColumn:B&&B.column,endLine:B&&B.line,line:F.line,url:I.toString()};if(I.protocol==="file:")if(p)R.file=p(I);else throw new Error("file: protocol is not available in this PostCSS build");let j=S.sourceContentFor(F.source);return j&&(R.source=j),R}toJSON(){let b={};for(let A of["hasBOM","css","file","id"])this[A]!=null&&(b[A]=this[A]);return this.map&&(b.map={...this.map},b.map.consumerCache&&(b.map.consumerCache=void 0)),b}};e.exports=C,C.default=C,d&&d.registerInput&&d.registerInput(C)}),ed=ae((t,e)=>{var r=Oi(),s=class extends r{constructor(i){super(i),this.type="atrule"}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}};e.exports=s,s.default=s,r.registerAtRule(s)}),lo=ae((t,e)=>{var r=Oi(),s,i,a=class extends r{constructor(u){super(u),this.type="root",this.nodes||(this.nodes=[])}normalize(u,p,c){let m=super.normalize(u);if(p){if(c==="prepend")this.nodes.length>1?p.raws.before=this.nodes[1].raws.before:delete p.raws.before;else if(this.first!==p)for(let f of m)f.raws.before=p.raws.before}return m}removeChild(u,p){let c=this.index(u);return!p&&c===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[c].raws.before),super.removeChild(u)}toResult(u={}){return new s(new i,this,u).stringify()}};a.registerLazyResult=u=>{s=u},a.registerProcessor=u=>{i=u},e.exports=a,a.default=a,r.registerRoot(a)}),c2=ae((t,e)=>{var r={comma(s){return r.split(s,[","],!0)},space(s){let i=[" ",`
|
|
131
|
-
`," "];return r.split(s,i)},split(s,i,a){let u=[],p="",c=!1,m=0,f=!1,d="",D=!1;for(let y of s)D?D=!1:y==="\\"?D=!0:f?y===d&&(f=!1):y==='"'||y==="'"?(f=!0,d=y):y==="("?m+=1:y===")"?m>0&&(m-=1):m===0&&i.includes(y)&&(c=!0),c?(p!==""&&u.push(p.trim()),p="",c=!1):p+=y;return(a||p!=="")&&u.push(p.trim()),u}};e.exports=r,r.default=r}),td=ae((t,e)=>{var r=Oi(),s=c2(),i=class extends r{get selectors(){return s.comma(this.selector)}set selectors(a){let u=this.selector?this.selector.match(/,\s*/):null,p=u?u[0]:","+this.raw("between","beforeOpen");this.selector=a.join(p)}constructor(a){super(a),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=i,i.default=i,r.registerRule(i)}),rd=ae((t,e)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/g,s=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,i=/.[\r\n"'(/\\]/,a=/[\da-f]/i;e.exports=function(u,p={}){let c=u.css.valueOf(),m=p.ignoreErrors,f,d,D,y,x,E,C,b,A,v,P=c.length,S=0,F=[],B=[];function I(){return S}function R(q){throw u.error("Unclosed "+q,S)}function j(){return B.length===0&&S>=P}function V(q){if(B.length)return B.pop();if(S>=P)return;let te=q?q.ignoreUnclosed:!1;switch(f=c.charCodeAt(S),f){case 10:case 32:case 9:case 13:case 12:{y=S;do y+=1,f=c.charCodeAt(y);while(f===32||f===10||f===9||f===13||f===12);E=["space",c.slice(S,y)],S=y-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let W=String.fromCharCode(f);E=[W,W,S];break}case 40:{if(v=F.length?F.pop()[1]:"",A=c.charCodeAt(S+1),v==="url"&&A!==39&&A!==34&&A!==32&&A!==10&&A!==9&&A!==12&&A!==13){y=S;do{if(C=!1,y=c.indexOf(")",y+1),y===-1)if(m||te){y=S;break}else R("bracket");for(b=y;c.charCodeAt(b-1)===92;)b-=1,C=!C}while(C);E=["brackets",c.slice(S,y+1),S,y],S=y}else y=c.indexOf(")",S+1),d=c.slice(S,y+1),y===-1||i.test(d)?E=["(","(",S]:(E=["brackets",d,S,y],S=y);break}case 39:case 34:{x=f===39?"'":'"',y=S;do{if(C=!1,y=c.indexOf(x,y+1),y===-1)if(m||te){y=S+1;break}else R("string");for(b=y;c.charCodeAt(b-1)===92;)b-=1,C=!C}while(C);E=["string",c.slice(S,y+1),S,y],S=y;break}case 64:{r.lastIndex=S+1,r.test(c),r.lastIndex===0?y=c.length-1:y=r.lastIndex-2,E=["at-word",c.slice(S,y+1),S,y],S=y;break}case 92:{for(y=S,D=!0;c.charCodeAt(y+1)===92;)y+=1,D=!D;if(f=c.charCodeAt(y+1),D&&f!==47&&f!==32&&f!==10&&f!==9&&f!==13&&f!==12&&(y+=1,a.test(c.charAt(y)))){for(;a.test(c.charAt(y+1));)y+=1;c.charCodeAt(y+1)===32&&(y+=1)}E=["word",c.slice(S,y+1),S,y],S=y;break}default:{f===47&&c.charCodeAt(S+1)===42?(y=c.indexOf("*/",S+2)+1,y===0&&(m||te?y=c.length:R("comment")),E=["comment",c.slice(S,y+1),S,y],S=y):(s.lastIndex=S+1,s.test(c),s.lastIndex===0?y=c.length-1:y=s.lastIndex-2,E=["word",c.slice(S,y+1),S,y],F.push(E),S=y);break}}return S++,E}function N(q){B.push(q)}return{back:N,endOfFile:j,nextToken:V,position:I}}}),sd=ae((t,e)=>{var r=ed(),s=oo(),i=Wu(),a=lo(),u=td(),p=rd(),c={empty:!0,space:!0};function m(d){for(let D=d.length-1;D>=0;D--){let y=d[D],x=y[3]||y[2];if(x)return x}}var f=class{constructor(d){this.input=d,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:d,start:{column:1,line:1,offset:0}}}atrule(d){let D=new r;D.name=d[1].slice(1),D.name===""&&this.unnamedAtrule(D,d),this.init(D,d[2]);let y,x,E,C=!1,b=!1,A=[],v=[];for(;!this.tokenizer.endOfFile();){if(d=this.tokenizer.nextToken(),y=d[0],y==="("||y==="["?v.push(y==="("?")":"]"):y==="{"&&v.length>0?v.push("}"):y===v[v.length-1]&&v.pop(),v.length===0)if(y===";"){D.source.end=this.getPosition(d[2]),D.source.end.offset++,this.semicolon=!0;break}else if(y==="{"){b=!0;break}else if(y==="}"){if(A.length>0){for(E=A.length-1,x=A[E];x&&x[0]==="space";)x=A[--E];x&&(D.source.end=this.getPosition(x[3]||x[2]),D.source.end.offset++)}this.end(d);break}else A.push(d);else A.push(d);if(this.tokenizer.endOfFile()){C=!0;break}}D.raws.between=this.spacesAndCommentsFromEnd(A),A.length?(D.raws.afterName=this.spacesAndCommentsFromStart(A),this.raw(D,"params",A),C&&(d=A[A.length-1],D.source.end=this.getPosition(d[3]||d[2]),D.source.end.offset++,this.spaces=D.raws.between,D.raws.between="")):(D.raws.afterName="",D.params=""),b&&(D.nodes=[],this.current=D)}checkMissedSemicolon(d){let D=this.colon(d);if(D===!1)return;let y=0,x;for(let E=D-1;E>=0&&(x=d[E],!(x[0]!=="space"&&(y+=1,y===2)));E--);throw this.input.error("Missed semicolon",x[0]==="word"?x[3]+1:x[2])}colon(d){let D=0,y,x,E;for(let[C,b]of d.entries()){if(x=b,E=x[0],E==="("&&(D+=1),E===")"&&(D-=1),D===0&&E===":")if(!y)this.doubleColon(x);else{if(y[0]==="word"&&y[1]==="progid")continue;return C}y=x}return!1}comment(d){let D=new s;this.init(D,d[2]),D.source.end=this.getPosition(d[3]||d[2]),D.source.end.offset++;let y=d[1].slice(2,-2);if(/^\s*$/.test(y))D.text="",D.raws.left=y,D.raws.right="";else{let x=y.match(/^(\s*)([^]*\S)(\s*)$/);D.text=x[2],D.raws.left=x[1],D.raws.right=x[3]}}createTokenizer(){this.tokenizer=p(this.input)}decl(d,D){let y=new i;this.init(y,d[0][2]);let x=d[d.length-1];for(x[0]===";"&&(this.semicolon=!0,d.pop()),y.source.end=this.getPosition(x[3]||x[2]||m(d)),y.source.end.offset++;d[0][0]!=="word";)d.length===1&&this.unknownWord(d),y.raws.before+=d.shift()[1];for(y.source.start=this.getPosition(d[0][2]),y.prop="";d.length;){let A=d[0][0];if(A===":"||A==="space"||A==="comment")break;y.prop+=d.shift()[1]}y.raws.between="";let E;for(;d.length;)if(E=d.shift(),E[0]===":"){y.raws.between+=E[1];break}else E[0]==="word"&&/\w/.test(E[1])&&this.unknownWord([E]),y.raws.between+=E[1];(y.prop[0]==="_"||y.prop[0]==="*")&&(y.raws.before+=y.prop[0],y.prop=y.prop.slice(1));let C=[],b;for(;d.length&&(b=d[0][0],!(b!=="space"&&b!=="comment"));)C.push(d.shift());this.precheckMissedSemicolon(d);for(let A=d.length-1;A>=0;A--){if(E=d[A],E[1].toLowerCase()==="!important"){y.important=!0;let v=this.stringFrom(d,A);v=this.spacesFromEnd(d)+v,v!==" !important"&&(y.raws.important=v);break}else if(E[1].toLowerCase()==="important"){let v=d.slice(0),P="";for(let S=A;S>0;S--){let F=v[S][0];if(P.trim().startsWith("!")&&F!=="space")break;P=v.pop()[1]+P}P.trim().startsWith("!")&&(y.important=!0,y.raws.important=P,d=v)}if(E[0]!=="space"&&E[0]!=="comment")break}d.some(A=>A[0]!=="space"&&A[0]!=="comment")&&(y.raws.between+=C.map(A=>A[1]).join(""),C=[]),this.raw(y,"value",C.concat(d),D),y.value.includes(":")&&!D&&this.checkMissedSemicolon(d)}doubleColon(d){throw this.input.error("Double colon",{offset:d[2]},{offset:d[2]+d[1].length})}emptyRule(d){let D=new u;this.init(D,d[2]),D.selector="",D.raws.between="",this.current=D}end(d){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(d[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(d)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(d){if(this.spaces+=d[1],this.current.nodes){let D=this.current.nodes[this.current.nodes.length-1];D&&D.type==="rule"&&!D.raws.ownSemicolon&&(D.raws.ownSemicolon=this.spaces,this.spaces="",D.source.end=this.getPosition(d[2]),D.source.end.offset+=D.raws.ownSemicolon.length)}}getPosition(d){let D=this.input.fromOffset(d);return{column:D.col,line:D.line,offset:d}}init(d,D){this.current.push(d),d.source={input:this.input,start:this.getPosition(D)},d.raws.before=this.spaces,this.spaces="",d.type!=="comment"&&(this.semicolon=!1)}other(d){let D=!1,y=null,x=!1,E=null,C=[],b=d[1].startsWith("--"),A=[],v=d;for(;v;){if(y=v[0],A.push(v),y==="("||y==="[")E||(E=v),C.push(y==="("?")":"]");else if(b&&x&&y==="{")E||(E=v),C.push("}");else if(C.length===0)if(y===";")if(x){this.decl(A,b);return}else break;else if(y==="{"){this.rule(A);return}else if(y==="}"){this.tokenizer.back(A.pop()),D=!0;break}else y===":"&&(x=!0);else y===C[C.length-1]&&(C.pop(),C.length===0&&(E=null));v=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(D=!0),C.length>0&&this.unclosedBracket(E),D&&x){if(!b)for(;A.length&&(v=A[A.length-1][0],!(v!=="space"&&v!=="comment"));)this.tokenizer.back(A.pop());this.decl(A,b)}else this.unknownWord(A)}parse(){let d;for(;!this.tokenizer.endOfFile();)switch(d=this.tokenizer.nextToken(),d[0]){case"space":this.spaces+=d[1];break;case";":this.freeSemicolon(d);break;case"}":this.end(d);break;case"comment":this.comment(d);break;case"at-word":this.atrule(d);break;case"{":this.emptyRule(d);break;default:this.other(d);break}this.endFile()}precheckMissedSemicolon(){}raw(d,D,y,x){let E,C,b=y.length,A="",v=!0,P,S;for(let F=0;F<b;F+=1)E=y[F],C=E[0],C==="space"&&F===b-1&&!x?v=!1:C==="comment"?(S=y[F-1]?y[F-1][0]:"empty",P=y[F+1]?y[F+1][0]:"empty",!c[S]&&!c[P]?A.slice(-1)===","?v=!1:A+=E[1]:v=!1):A+=E[1];if(!v){let F=y.reduce((B,I)=>B+I[1],"");d.raws[D]={raw:F,value:A}}d[D]=A}rule(d){d.pop();let D=new u;this.init(D,d[0][2]),D.raws.between=this.spacesAndCommentsFromEnd(d),this.raw(D,"selector",d),this.current=D}spacesAndCommentsFromEnd(d){let D,y="";for(;d.length&&(D=d[d.length-1][0],!(D!=="space"&&D!=="comment"));)y=d.pop()[1]+y;return y}spacesAndCommentsFromStart(d){let D,y="";for(;d.length&&(D=d[0][0],!(D!=="space"&&D!=="comment"));)y+=d.shift()[1];return y}spacesFromEnd(d){let D,y="";for(;d.length&&(D=d[d.length-1][0],D==="space");)y=d.pop()[1]+y;return y}stringFrom(d,D){let y="";for(let x=D;x<d.length;x++)y+=d[x][1];return d.splice(D,d.length-D),y}unclosedBlock(){let d=this.current.source.start;throw this.input.error("Unclosed block",d.line,d.column)}unclosedBracket(d){throw this.input.error("Unclosed bracket",{offset:d[2]},{offset:d[2]+1})}unexpectedClose(d){throw this.input.error("Unexpected }",{offset:d[2]},{offset:d[2]+1})}unknownWord(d){throw this.input.error("Unknown word "+d[0][1],{offset:d[0][2]},{offset:d[0][2]+d[0][1].length})}unnamedAtrule(d,D){throw this.input.error("At-rule without name",{offset:D[2]},{offset:D[2]+D[1].length})}};e.exports=f}),Ju=ae((t,e)=>{var r=Oi(),s=uo(),i=sd();function a(u,p){let c=new s(u,p),m=new i(c);try{m.parse()}catch(f){throw f}return m.root}e.exports=a,a.default=a,r.registerParse(a)}),bM=ae((t,e)=>{var r=rd(),s=uo();e.exports={isInlineComment(i){if(i[0]==="word"&&i[1].slice(0,2)==="//"){let a=i,u=[],p,c;for(;i;){if(/\r?\n/.test(i[1])){if(/['"].*\r?\n/.test(i[1])){u.push(i[1].substring(0,i[1].indexOf(`
|
|
132
|
-
`))),c=i[1].substring(i[1].indexOf(`
|
|
133
|
-
`));let f=this.input.css.valueOf().substring(this.tokenizer.position());c+=f,p=i[3]+f.length-c.length}else this.tokenizer.back(i);break}u.push(i[1]),p=i[2],i=this.tokenizer.nextToken({ignoreUnclosed:!0})}let m=["comment",u.join(""),a[2],p];return this.inlineComment(m),c&&(this.input=new s(c),this.tokenizer=r(this.input)),!0}else if(i[1]==="/"){let a=this.tokenizer.nextToken({ignoreUnclosed:!0});if(a[0]==="comment"&&/^\/\*/.test(a[1]))return a[0]="word",a[1]=a[1].slice(1),i[1]="//",this.tokenizer.back(a),e.exports.isInlineComment.bind(this)(i)}return!1}}}),TM=ae((t,e)=>{e.exports={interpolation(r){let s=[r,this.tokenizer.nextToken()],i=["word","}"];if(s[0][1].length>1||s[1][0]!=="{")return this.tokenizer.back(s[1]),!1;for(r=this.tokenizer.nextToken();r&&i.includes(r[0]);)s.push(r),r=this.tokenizer.nextToken();let a=s.map(m=>m[1]),[u]=s,p=s.pop(),c=["word",a.join(""),u[2],p[2]];return this.tokenizer.back(r),this.tokenizer.back(c),!0}}}),vM=ae((t,e)=>{var r=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,s=/\.[0-9]/,i=a=>{let[,u]=a,[p]=u;return(p==="."||p==="#")&&r.test(u)===!1&&s.test(u)===!1};e.exports={isMixinToken:i}}),SM=ae((t,e)=>{var r=rd(),s=/^url\((.+)\)/;e.exports=i=>{let{name:a,params:u=""}=i;if(a==="import"&&u.length){i.import=!0;let p=r({css:u});for(i.filename=u.replace(s,"$1");!p.endOfFile();){let[c,m]=p.nextToken();if(c==="word"&&m==="url")return;if(c==="brackets"){i.options=m,i.filename=u.replace(m,"").trim();break}}}}}),wM=ae((t,e)=>{var r=/:$/,s=/^:(\s+)?/;e.exports=i=>{let{name:a,params:u=""}=i;if(i.name.slice(-1)===":"){if(r.test(a)){let[p]=a.match(r);i.name=a.replace(p,""),i.raws.afterName=p+(i.raws.afterName||""),i.variable=!0,i.value=i.params}if(s.test(u)){let[p]=u.match(s);i.value=u.replace(p,""),i.raws.afterName=(i.raws.afterName||"")+p,i.variable=!0}}}}),PM=ae((t,e)=>{var r=oo(),s=sd(),{isInlineComment:i}=bM(),{interpolation:a}=TM(),{isMixinToken:u}=vM(),p=SM(),c=wM(),m=/(!\s*important)$/i;e.exports=class extends s{constructor(...f){super(...f),this.lastNode=null}atrule(f){a.bind(this)(f)||(super.atrule(f),p(this.lastNode),c(this.lastNode))}decl(...f){super.decl(...f),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(f){f[0][1]=` ${f[0][1]}`;let d=f.findIndex(E=>E[0]==="("),D=f.reverse().find(E=>E[0]===")"),y=f.reverse().indexOf(D),x=f.splice(d,y).map(E=>E[1]).join("");for(let E of f.reverse())this.tokenizer.back(E);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=x}init(f,d,D){super.init(f,d,D),this.lastNode=f}inlineComment(f){let d=new r,D=f[1].slice(2);if(this.init(d,f[2]),d.source.end=this.getPosition(f[3]||f[2]),d.inline=!0,d.raws.begin="//",/^\s*$/.test(D))d.text="",d.raws.left=D,d.raws.right="";else{let y=D.match(/^(\s*)([^]*[^\s])(\s*)$/);[,d.raws.left,d.text,d.raws.right]=y}}mixin(f){let[d]=f,D=d[1].slice(0,1),y=f.findIndex(A=>A[0]==="brackets"),x=f.findIndex(A=>A[0]==="("),E="";if((y<0||y>3)&&x>0){let A=f.reduce((V,N,q)=>N[0]===")"?q:V),v=f.slice(x,A+x).map(V=>V[1]).join(""),[P]=f.slice(x),S=[P[2],P[3]],[F]=f.slice(A,A+1),B=[F[2],F[3]],I=["brackets",v].concat(S,B),R=f.slice(0,x),j=f.slice(A+1);f=R,f.push(I),f=f.concat(j)}let C=[];for(let A of f)if((A[1]==="!"||C.length)&&C.push(A),A[1]==="important")break;if(C.length){let[A]=C,v=f.indexOf(A),P=C[C.length-1],S=[A[2],A[3]],F=[P[4],P[5]],B=["word",C.map(I=>I[1]).join("")].concat(S,F);f.splice(v,C.length,B)}let b=f.findIndex(A=>m.test(A[1]));b>0&&([,E]=f[b],f.splice(b,1));for(let A of f.reverse())this.tokenizer.back(A);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=D,E&&(this.lastNode.important=!0,this.lastNode.raws.important=E)}other(f){i.bind(this)(f)||super.other(f)}rule(f){let d=f[f.length-1],D=f[f.length-2];if(D[0]==="at-word"&&d[0]==="{"&&(this.tokenizer.back(d),a.bind(this)(D))){let y=this.tokenizer.nextToken();f=f.slice(0,f.length-2).concat([y]);for(let x of f.reverse())this.tokenizer.back(x);return}super.rule(f),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(f){let[d]=f;if(f[0][1]==="each"&&f[1][0]==="("){this.each(f);return}if(u(d)){this.mixin(f);return}super.unknownWord(f)}}}),FM=ae((t,e)=>{var r=Qh();e.exports=class extends r{atrule(s,i){if(!s.mixin&&!s.variable&&!s.function){super.atrule(s,i);return}let a=`${s.function?"":s.raws.identifier||"@"}${s.name}`,u=s.params?this.rawValue(s,"params"):"",p=s.raws.important||"";if(s.variable&&(u=s.value),typeof s.raws.afterName<"u"?a+=s.raws.afterName:u&&(a+=" "),s.nodes)this.block(s,a+u+p);else{let c=(s.raws.between||"")+p+(i?";":"");this.builder(a+u+c,s)}}comment(s){if(s.inline){let i=this.raw(s,"left","commentLeft"),a=this.raw(s,"right","commentRight");this.builder(`//${i}${s.text}${a}`,s)}else super.comment(s)}}}),kM=ae((t,e)=>{var r=uo(),s=PM(),i=FM();e.exports={parse(a,u){let p=new r(a,u),c=new s(p);return c.parse(),c.root.walk(m=>{let f=p.css.lastIndexOf(m.source.input.css);if(f===0)return;if(f+m.source.input.css.length!==p.css.length)throw new Error("Invalid state detected in postcss-less");let d=f+m.source.start.offset,D=p.fromOffset(f+m.source.start.offset);if(m.source.start={offset:d,line:D.line,column:D.col},m.source.end){let y=f+m.source.end.offset,x=p.fromOffset(f+m.source.end.offset);m.source.end={offset:y,line:x.line,column:x.col}}}),c.root},stringify(a,u){new i(u).stringify(a)},nodeToString(a){let u="";return e.exports.stringify(a,p=>{u+=p}),u}}}),id=ae((t,e)=>{var r=Oi(),s,i,a=class extends r{constructor(u){super({type:"document",...u}),this.nodes||(this.nodes=[])}toResult(u={}){return new s(new i,this,u).stringify()}};a.registerLazyResult=u=>{s=u},a.registerProcessor=u=>{i=u},e.exports=a,a.default=a}),IM=ae((t,e)=>{var r=ed(),s=oo(),i=Wu(),a=uo(),u=p2(),p=lo(),c=td();function m(f,d){if(Array.isArray(f))return f.map(x=>m(x));let{inputs:D,...y}=f;if(D){d=[];for(let x of D){let E={...x,__proto__:a.prototype};E.map&&(E.map={...E.map,__proto__:u.prototype}),d.push(E)}}if(y.nodes&&(y.nodes=f.nodes.map(x=>m(x,d))),y.source){let{inputId:x,...E}=y.source;y.source=E,x!=null&&(y.source.input=d[x])}if(y.type==="root")return new p(y);if(y.type==="decl")return new i(y);if(y.type==="rule")return new c(y);if(y.type==="comment")return new s(y);if(y.type==="atrule")return new r(y);throw new Error("Unknown node type: "+f.type)}e.exports=m,m.default=m}),h2=ae((t,e)=>{e.exports=class{generate(){}}}),d2=ae((t,e)=>{var r=class{constructor(s,i={}){if(this.type="warning",this.text=s,i.node&&i.node.source){let a=i.node.rangeBy(i);this.line=a.start.line,this.column=a.start.column,this.endLine=a.end.line,this.endColumn=a.end.column}for(let a in i)this[a]=i[a]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};e.exports=r,r.default=r}),nd=ae((t,e)=>{var r=d2(),s=class{get content(){return this.css}constructor(i,a,u){this.processor=i,this.messages=[],this.root=a,this.opts=u,this.css="",this.map=void 0}toString(){return this.css}warn(i,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new r(i,a);return this.messages.push(u),u}warnings(){return this.messages.filter(i=>i.type==="warning")}};e.exports=s,s.default=s}),f2=ae((t,e)=>{var r={};e.exports=function(s){r[s]||(r[s]=!0,typeof console<"u"&&console.warn&&console.warn(s))}}),m2=ae((t,e)=>{var r=Oi(),s=id(),i=h2(),a=Ju(),u=nd(),p=lo(),c=Hu(),{isClean:m,my:f}=Zh();f2();var d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},D={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},y={Once:!0,postcssPlugin:!0,prepare:!0},x=0;function E(S){return typeof S=="object"&&typeof S.then=="function"}function C(S){let F=!1,B=d[S.type];return S.type==="decl"?F=S.prop.toLowerCase():S.type==="atrule"&&(F=S.name.toLowerCase()),F&&S.append?[B,B+"-"+F,x,B+"Exit",B+"Exit-"+F]:F?[B,B+"-"+F,B+"Exit",B+"Exit-"+F]:S.append?[B,x,B+"Exit"]:[B,B+"Exit"]}function b(S){let F;return S.type==="document"?F=["Document",x,"DocumentExit"]:S.type==="root"?F=["Root",x,"RootExit"]:F=C(S),{eventIndex:0,events:F,iterator:0,node:S,visitorIndex:0,visitors:[]}}function A(S){return S[m]=!1,S.nodes&&S.nodes.forEach(F=>A(F)),S}var v={},P=class y2{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(F,B,I){this.stringified=!1,this.processed=!1;let R;if(typeof B=="object"&&B!==null&&(B.type==="root"||B.type==="document"))R=A(B);else if(B instanceof y2||B instanceof u)R=A(B.root),B.map&&(typeof I.map>"u"&&(I.map={}),I.map.inline||(I.map.inline=!1),I.map.prev=B.map);else{let j=a;I.syntax&&(j=I.syntax.parse),I.parser&&(j=I.parser),j.parse&&(j=j.parse);try{R=j(B,I)}catch(V){this.processed=!0,this.error=V}R&&!R[f]&&r.rebuild(R)}this.result=new u(F,R,I),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(j=>typeof j=="object"&&j.prepare?{...j,...j.prepare(this.result)}:j)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(F){return this.async().catch(F)}finally(F){return this.async().then(F,F)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(F,B){let I=this.result.lastPlugin;try{B&&B.addToError(F),this.error=F,F.name==="CssSyntaxError"&&!F.plugin?(F.plugin=I.postcssPlugin,F.setMessage()):I.postcssVersion}catch(R){console&&console.error&&console.error(R)}return F}prepareVisitors(){this.listeners={};let F=(B,I,R)=>{this.listeners[I]||(this.listeners[I]=[]),this.listeners[I].push([B,R])};for(let B of this.plugins)if(typeof B=="object")for(let I in B){if(!D[I]&&/^[A-Z]/.test(I))throw new Error(`Unknown event ${I} in ${B.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!y[I])if(typeof B[I]=="object")for(let R in B[I])R==="*"?F(B,I,B[I][R]):F(B,I+"-"+R.toLowerCase(),B[I][R]);else typeof B[I]=="function"&&F(B,I,B[I])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let F=0;F<this.plugins.length;F++){let B=this.plugins[F],I=this.runOnRoot(B);if(E(I))try{await I}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let F=this.result.root;for(;!F[m];){F[m]=!0;let B=[b(F)];for(;B.length>0;){let I=this.visitTick(B);if(E(I))try{await I}catch(R){let j=B[B.length-1].node;throw this.handleError(R,j)}}}if(this.listeners.OnceExit)for(let[B,I]of this.listeners.OnceExit){this.result.lastPlugin=B;try{if(F.type==="document"){let R=F.nodes.map(j=>I(j,this.helpers));await Promise.all(R)}else await I(F,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(F){this.result.lastPlugin=F;try{if(typeof F=="object"&&F.Once){if(this.result.root.type==="document"){let B=this.result.root.nodes.map(I=>F.Once(I,this.helpers));return E(B[0])?Promise.all(B):B}return F.Once(this.result.root,this.helpers)}else if(typeof F=="function")return F(this.result.root,this.result)}catch(B){throw this.handleError(B)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let F=this.result.opts,B=c;F.syntax&&(B=F.syntax.stringify),F.stringifier&&(B=F.stringifier),B.stringify&&(B=B.stringify);let I=new i(B,this.result.root,this.result.opts).generate();return this.result.css=I[0],this.result.map=I[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let F of this.plugins){let B=this.runOnRoot(F);if(E(B))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let F=this.result.root;for(;!F[m];)F[m]=!0,this.walkSync(F);if(this.listeners.OnceExit)if(F.type==="document")for(let B of F.nodes)this.visitSync(this.listeners.OnceExit,B);else this.visitSync(this.listeners.OnceExit,F)}return this.result}then(F,B){return this.async().then(F,B)}toString(){return this.css}visitSync(F,B){for(let[I,R]of F){this.result.lastPlugin=I;let j;try{j=R(B,this.helpers)}catch(V){throw this.handleError(V,B.proxyOf)}if(B.type!=="root"&&B.type!=="document"&&!B.parent)return!0;if(E(j))throw this.getAsyncError()}}visitTick(F){let B=F[F.length-1],{node:I,visitors:R}=B;if(I.type!=="root"&&I.type!=="document"&&!I.parent){F.pop();return}if(R.length>0&&B.visitorIndex<R.length){let[V,N]=R[B.visitorIndex];B.visitorIndex+=1,B.visitorIndex===R.length&&(B.visitors=[],B.visitorIndex=0),this.result.lastPlugin=V;try{return N(I.toProxy(),this.helpers)}catch(q){throw this.handleError(q,I)}}if(B.iterator!==0){let V=B.iterator,N;for(;N=I.nodes[I.indexes[V]];)if(I.indexes[V]+=1,!N[m]){N[m]=!0,F.push(b(N));return}B.iterator=0,delete I.indexes[V]}let j=B.events;for(;B.eventIndex<j.length;){let V=j[B.eventIndex];if(B.eventIndex+=1,V===x){I.nodes&&I.nodes.length&&(I[m]=!0,B.iterator=I.getIterator());return}else if(this.listeners[V]){B.visitors=this.listeners[V];return}}F.pop()}walkSync(F){F[m]=!0;let B=C(F);for(let I of B)if(I===x)F.nodes&&F.each(R=>{R[m]||this.walkSync(R)});else{let R=this.listeners[I];if(R&&this.visitSync(R,F.toProxy()))return}}warnings(){return this.sync().warnings()}};P.registerPostcss=S=>{v=S},e.exports=P,P.default=P,p.registerLazyResult(P),s.registerLazyResult(P)}),NM=ae((t,e)=>{var r=h2(),s=Ju(),i=nd(),a=Hu();f2();var u=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,c=s;try{p=c(this._css,this._opts)}catch(m){this.error=m}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(p,c,m){c=c.toString(),this.stringified=!1,this._processor=p,this._css=c,this._opts=m,this._map=void 0;let f,d=a;this.result=new i(this._processor,f,this._opts),this.result.css=c;let D=this;Object.defineProperty(this.result,"root",{get(){return D.root}});let y=new r(d,f,this._opts,c);if(y.isMap()){let[x,E]=y.generate();x&&(this.result.css=x),E&&(this.result.map=E)}else y.clearAnnotation(),this.result.css=y.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,c){return this.async().then(p,c)}toString(){return this._css}warnings(){return[]}};e.exports=u,u.default=u}),BM=ae((t,e)=>{var r=id(),s=m2(),i=NM(),a=lo(),u=class{constructor(p=[]){this.version="8.5.6",this.plugins=this.normalize(p)}normalize(p){let c=[];for(let m of p)if(m.postcss===!0?m=m():m.postcss&&(m=m.postcss),typeof m=="object"&&Array.isArray(m.plugins))c=c.concat(m.plugins);else if(typeof m=="object"&&m.postcssPlugin)c.push(m);else if(typeof m=="function")c.push(m);else if(!(typeof m=="object"&&(m.parse||m.stringify)))throw new Error(m+" is not a PostCSS plugin");return c}process(p,c={}){return!this.plugins.length&&!c.parser&&!c.stringifier&&!c.syntax?new i(this,p,c):new s(this,p,c)}use(p){return this.plugins=this.plugins.concat(this.normalize([p])),this}};e.exports=u,u.default=u,a.registerProcessor(u),r.registerProcessor(u)}),ad=ae((t,e)=>{var r=ed(),s=oo(),i=Oi(),a=Yh(),u=Wu(),p=id(),c=IM(),m=uo(),f=m2(),d=c2(),D=zu(),y=Ju(),x=BM(),E=nd(),C=lo(),b=td(),A=Hu(),v=d2();function P(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new x(S)}P.plugin=function(S,F){let B=!1;function I(...j){console&&console.warn&&!B&&(B=!0,console.warn(S+`: postcss.plugin was deprecated. Migration guide:
|
|
134
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let V=F(...j);return V.postcssPlugin=S,V.postcssVersion=new x().version,V}let R;return Object.defineProperty(I,"postcss",{get(){return R||(R=I()),R}}),I.process=function(j,V,N){return P([I(N)]).process(j,V)},I},P.stringify=A,P.parse=y,P.fromJSON=c,P.list=d,P.comment=S=>new s(S),P.atRule=S=>new r(S),P.decl=S=>new u(S),P.rule=S=>new b(S),P.root=S=>new C(S),P.document=S=>new p(S),P.CssSyntaxError=a,P.Declaration=u,P.Container=i,P.Processor=x,P.Document=p,P.Comment=s,P.Warning=v,P.AtRule=r,P.Result=E,P.Input=m,P.Rule=b,P.Root=C,P.Node=D,f.registerPostcss(P),e.exports=P,P.default=P}),_M=ae((t,e)=>{var{Container:r}=ad(),s=class extends r{constructor(i){super(i),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};e.exports=s}),LM=ae((t,e)=>{var r=/[\t\n\f\r "#'()/;[\\\]{}]/g,s=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,i=/.[\r\n"'(/\\]/,a=/[\da-f]/i,u=/[\n\f\r]/g;e.exports=function(p,c={}){let m=p.css.valueOf(),f=c.ignoreErrors,d,D,y,x,E,C,b,A,v,P=m.length,S=0,F=[],B=[],I;function R(){return S}function j(W){throw p.error("Unclosed "+W,S)}function V(){return B.length===0&&S>=P}function N(){let W=1,Y=!1,ge=!1;for(;W>0;)D+=1,m.length<=D&&j("interpolation"),d=m.charCodeAt(D),A=m.charCodeAt(D+1),Y?!ge&&d===Y?(Y=!1,ge=!1):d===92?ge=!ge:ge&&(ge=!1):d===39||d===34?Y=d:d===125?W-=1:d===35&&A===123&&(W+=1)}function q(W){if(B.length)return B.pop();if(S>=P)return;let Y=W?W.ignoreUnclosed:!1;switch(d=m.charCodeAt(S),d){case 10:case 32:case 9:case 13:case 12:{D=S;do D+=1,d=m.charCodeAt(D);while(d===32||d===10||d===9||d===13||d===12);v=["space",m.slice(S,D)],S=D-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let ge=String.fromCharCode(d);v=[ge,ge,S];break}case 44:{v=["word",",",S,S+1];break}case 40:{if(b=F.length?F.pop()[1]:"",A=m.charCodeAt(S+1),b==="url"&&A!==39&&A!==34){for(I=1,C=!1,D=S+1;D<=m.length-1;){if(A=m.charCodeAt(D),A===92)C=!C;else if(A===40)I+=1;else if(A===41&&(I-=1,I===0))break;D+=1}x=m.slice(S,D+1),v=["brackets",x,S,D],S=D}else D=m.indexOf(")",S+1),x=m.slice(S,D+1),D===-1||i.test(x)?v=["(","(",S]:(v=["brackets",x,S,D],S=D);break}case 39:case 34:{for(y=d,D=S,C=!1;D<P&&(D++,D===P&&j("string"),d=m.charCodeAt(D),A=m.charCodeAt(D+1),!(!C&&d===y));)d===92?C=!C:C?C=!1:d===35&&A===123&&N();v=["string",m.slice(S,D+1),S,D],S=D;break}case 64:{r.lastIndex=S+1,r.test(m),r.lastIndex===0?D=m.length-1:D=r.lastIndex-2,v=["at-word",m.slice(S,D+1),S,D],S=D;break}case 92:{for(D=S,E=!0;m.charCodeAt(D+1)===92;)D+=1,E=!E;if(d=m.charCodeAt(D+1),E&&d!==47&&d!==32&&d!==10&&d!==9&&d!==13&&d!==12&&(D+=1,a.test(m.charAt(D)))){for(;a.test(m.charAt(D+1));)D+=1;m.charCodeAt(D+1)===32&&(D+=1)}v=["word",m.slice(S,D+1),S,D],S=D;break}default:A=m.charCodeAt(S+1),d===35&&A===123?(D=S,N(),x=m.slice(S,D+1),v=["word",x,S,D],S=D):d===47&&A===42?(D=m.indexOf("*/",S+2)+1,D===0&&(f||Y?D=m.length:j("comment")),v=["comment",m.slice(S,D+1),S,D],S=D):d===47&&A===47?(u.lastIndex=S+1,u.test(m),u.lastIndex===0?D=m.length-1:D=u.lastIndex-2,x=m.slice(S,D+1),v=["comment",x,S,D,"inline"],S=D):(s.lastIndex=S+1,s.test(m),s.lastIndex===0?D=m.length-1:D=s.lastIndex-2,v=["word",m.slice(S,D+1),S,D],F.push(v),S=D);break}return S++,v}function te(W){B.push(W)}return{back:te,endOfFile:V,nextToken:q,position:R}}}),OM=ae((t,e)=>{var{Comment:r}=ad(),s=sd(),i=_M(),a=LM(),u=class extends s{atrule(p){let c=p[1],m=p;for(;!this.tokenizer.endOfFile();){let f=this.tokenizer.nextToken();if(f[0]==="word"&&f[2]===m[3]+1)c+=f[1],m=f;else{this.tokenizer.back(f);break}}super.atrule(["at-word",c,p[2],m[3]])}comment(p){if(p[4]==="inline"){let c=new r;this.init(c,p[2]),c.raws.inline=!0;let m=this.input.fromOffset(p[3]);c.source.end={column:m.col,line:m.line,offset:p[3]+1};let f=p[1].slice(2);if(/^\s*$/.test(f))c.text="",c.raws.left=f,c.raws.right="";else{let d=f.match(/^(\s*)([^]*\S)(\s*)$/),D=d[2].replace(/(\*\/|\/\*)/g,"*//*");c.text=D,c.raws.left=d[1],c.raws.right=d[3],c.raws.text=d[2]}}else super.comment(p)}createTokenizer(){this.tokenizer=a(this.input)}raw(p,c,m,f){if(super.raw(p,c,m,f),p.raws[c]){let d=p.raws[c].raw;p.raws[c].raw=m.reduce((D,y)=>{if(y[0]==="comment"&&y[4]==="inline"){let x=y[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return D+"/*"+x+"*/"}else return D+y[1]},""),d!==p.raws[c].raw&&(p.raws[c].scss=d)}}rule(p){let c=!1,m=0,f="";for(let d of p)if(c)d[0]!=="comment"&&d[0]!=="{"&&(f+=d[1]);else{if(d[0]==="space"&&d[1].includes(`
|
|
135
|
-
`))break;d[0]==="("?m+=1:d[0]===")"?m-=1:m===0&&d[0]===":"&&(c=!0)}if(!c||f.trim()===""||/^[#:A-Za-z-]/.test(f))super.rule(p);else{p.pop();let d=new i;this.init(d,p[0][2]);let D;for(let x=p.length-1;x>=0;x--)if(p[x][0]!=="space"){D=p[x];break}if(D[3]){let x=this.input.fromOffset(D[3]);d.source.end={column:x.col,line:x.line,offset:D[3]+1}}else{let x=this.input.fromOffset(D[2]);d.source.end={column:x.col,line:x.line,offset:D[2]+1}}for(;p[0][0]!=="word";)d.raws.before+=p.shift()[1];if(p[0][2]){let x=this.input.fromOffset(p[0][2]);d.source.start={column:x.col,line:x.line,offset:p[0][2]}}for(d.prop="";p.length;){let x=p[0][0];if(x===":"||x==="space"||x==="comment")break;d.prop+=p.shift()[1]}d.raws.between="";let y;for(;p.length;)if(y=p.shift(),y[0]===":"){d.raws.between+=y[1];break}else d.raws.between+=y[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1)),d.raws.between+=this.spacesAndCommentsFromStart(p),this.precheckMissedSemicolon(p);for(let x=p.length-1;x>0;x--){if(y=p[x],y[1]==="!important"){d.important=!0;let E=this.stringFrom(p,x);E=this.spacesFromEnd(p)+E,E!==" !important"&&(d.raws.important=E);break}else if(y[1]==="important"){let E=p.slice(0),C="";for(let b=x;b>0;b--){let A=E[b][0];if(C.trim().indexOf("!")===0&&A!=="space")break;C=E.pop()[1]+C}C.trim().indexOf("!")===0&&(d.important=!0,d.raws.important=C,p=E)}if(y[0]!=="space"&&y[0]!=="comment")break}this.raw(d,"value",p),d.value.includes(":")&&this.checkMissedSemicolon(p),this.current=d}}};e.exports=u}),MM=ae((t,e)=>{var{Input:r}=ad(),s=OM();e.exports=function(i,a){let u=new r(i,a),p=new s(u);return p.parse(),p.root}}),g2=ae(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){this.after=r.after,this.before=r.before,this.type=r.type,this.value=r.value,this.sourceIndex=r.sourceIndex}t.default=e}),D2=ae(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=g2(),r=s(e);function s(a){return a&&a.__esModule?a:{default:a}}function i(a){var u=this;this.constructor(a),this.nodes=a.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(p){p.parent=u})}i.prototype=Object.create(r.default.prototype),i.constructor=r.default,i.prototype.walk=function(a,u){for(var p=typeof a=="string"||a instanceof RegExp,c=p?u:a,m=typeof a=="string"?new RegExp(a):a,f=0;f<this.nodes.length;f++){var d=this.nodes[f],D=p?m.test(d.type):!0;if(D&&c&&c(d,f,this.nodes)===!1||d.nodes&&d.walk(a,u)===!1)return!1}return!0},i.prototype.each=function(){for(var a=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],u=0;u<this.nodes.length;u++){var p=this.nodes[u];if(a(p,u,this.nodes)===!1)return!1}return!0},t.default=i}),$M=ae(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseMediaFeature=u,t.parseMediaQuery=p,t.parseMediaList=c;var e=g2(),r=a(e),s=D2(),i=a(s);function a(m){return m&&m.__esModule?m:{default:m}}function u(m){var f=arguments.length<=1||arguments[1]===void 0?0:arguments[1],d=[{mode:"normal",character:null}],D=[],y=0,x="",E=null,C=null,b=f,A=m;m[0]==="("&&m[m.length-1]===")"&&(A=m.substring(1,m.length-1),b++);for(var v=0;v<A.length;v++){var P=A[v];if((P==="'"||P==='"')&&(d[y].isCalculationEnabled===!0?(d.push({mode:"string",isCalculationEnabled:!1,character:P}),y++):d[y].mode==="string"&&d[y].character===P&&A[v-1]!=="\\"&&(d.pop(),y--)),P==="{"?(d.push({mode:"interpolation",isCalculationEnabled:!0}),y++):P==="}"&&(d.pop(),y--),d[y].mode==="normal"&&P===":"){var S=A.substring(v+1);C={type:"value",before:/^(\s*)/.exec(S)[1],after:/(\s*)$/.exec(S)[1],value:S.trim()},C.sourceIndex=C.before.length+v+1+b,E={type:"colon",sourceIndex:v+b,after:C.before,value:":"};break}x+=P}return x={type:"media-feature",before:/^(\s*)/.exec(x)[1],after:/(\s*)$/.exec(x)[1],value:x.trim()},x.sourceIndex=x.before.length+b,D.push(x),E!==null&&(E.before=x.after,D.push(E)),C!==null&&D.push(C),D}function p(m){var f=arguments.length<=1||arguments[1]===void 0?0:arguments[1],d=[],D=0,y=!1,x=void 0;function E(){return{before:"",after:"",value:""}}x=E();for(var C=0;C<m.length;C++){var b=m[C];y?(x.value+=b,(b==="{"||b==="(")&&D++,(b===")"||b==="}")&&D--):b.search(/\s/)!==-1?x.before+=b:(b==="("&&(x.type="media-feature-expression",D++),x.value=b,x.sourceIndex=f+C,y=!0),y&&D===0&&(b===")"||C===m.length-1||m[C+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(x.value)!==-1&&(x.type="keyword"),x.type==="media-feature-expression"&&(x.nodes=u(x.value,x.sourceIndex)),d.push(Array.isArray(x.nodes)?new i.default(x):new r.default(x)),x=E(),y=!1)}for(var A=0;A<d.length;A++)if(x=d[A],A>0&&(d[A-1].after=x.before),x.type===void 0){if(A>0){if(d[A-1].type==="media-feature-expression"){x.type="keyword";continue}if(d[A-1].value==="not"||d[A-1].value==="only"){x.type="media-type";continue}if(d[A-1].value==="and"){x.type="media-feature-expression";continue}d[A-1].type==="media-type"&&(d[A+1]?x.type=d[A+1].type==="media-feature-expression"?"keyword":"media-feature-expression":x.type="media-feature-expression")}if(A===0){if(!d[A+1]){x.type="media-type";continue}if(d[A+1]&&(d[A+1].type==="media-feature-expression"||d[A+1].type==="keyword")){x.type="media-type";continue}if(d[A+2]){if(d[A+2].type==="media-feature-expression"){x.type="media-type",d[A+1].type="keyword";continue}if(d[A+2].type==="keyword"){x.type="keyword",d[A+1].type="media-type";continue}}if(d[A+3]&&d[A+3].type==="media-feature-expression"){x.type="keyword",d[A+1].type="media-type",d[A+2].type="keyword";continue}}}return d}function c(m){var f=[],d=0,D=0,y=/^(\s*)url\s*\(/.exec(m);if(y!==null){for(var x=y[0].length,E=1;E>0;){var C=m[x];C==="("&&E++,C===")"&&E--,x++}f.unshift(new r.default({type:"url",value:m.substring(0,x).trim(),sourceIndex:y[1].length,before:y[1],after:/^(\s*)/.exec(m.substring(x))[1]})),d=x}for(var b=d;b<m.length;b++){var A=m[b];if(A==="("&&D++,A===")"&&D--,D===0&&A===","){var v=m.substring(d,b),P=/^(\s*)/.exec(v)[1];f.push(new i.default({type:"media-query",value:v.trim(),sourceIndex:d+P.length,nodes:p(v,d),before:P,after:/(\s*)$/.exec(v)[1]})),d=b+1}}var S=m.substring(d),F=/^(\s*)/.exec(S)[1];return f.push(new i.default({type:"media-query",value:S.trim(),sourceIndex:d+F.length,nodes:p(S,d),before:F,after:/(\s*)$/.exec(S)[1]})),f}}),RM=ae(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var e=D2(),r=i(e),s=$M();function i(u){return u&&u.__esModule?u:{default:u}}function a(u){return new r.default({nodes:(0,s.parseMediaList)(u),type:"media-query-list",value:u.trim()})}}),x2=ae((t,e)=>{e.exports=function(r,s){if(s=typeof s=="number"?s:1/0,!s)return Array.isArray(r)?r.map(function(a){return a}):r;return i(r,1);function i(a,u){return a.reduce(function(p,c){return Array.isArray(c)&&u<s?p.concat(i(c,u+1)):p.concat(c)},[])}}}),E2=ae((t,e)=>{e.exports=function(r,s){for(var i=-1,a=[];(i=r.indexOf(s,i+1))!==-1;)a.push(i);return a}}),A2=ae((t,e)=>{function r(a,u){for(var p=1,c=a.length,m=a[0],f=a[0],d=1;d<c;++d)if(f=m,m=a[d],u(m,f)){if(d===p){p++;continue}a[p++]=m}return a.length=p,a}function s(a){for(var u=1,p=a.length,c=a[0],m=a[0],f=1;f<p;++f,m=c)if(m=c,c=a[f],c!==m){if(f===u){u++;continue}a[u++]=c}return a.length=u,a}function i(a,u,p){return a.length===0?a:u?(p||a.sort(u),r(a,u)):(p||a.sort(),s(a))}e.exports=i}),Ln=ae((t,e)=>{t.__esModule=!0;var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u};function s(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}var i=function u(p,c){if((typeof p>"u"?"undefined":r(p))!=="object")return p;var m=new p.constructor;for(var f in p)if(p.hasOwnProperty(f)){var d=p[f],D=typeof d>"u"?"undefined":r(d);f==="parent"&&D==="object"?c&&(m[f]=c):d instanceof Array?m[f]=d.map(function(y){return u(y,m)}):m[f]=u(d,m)}return m},a=(function(){function u(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s(this,u);for(var c in p)this[c]=p[c];var m=p.spaces;m=m===void 0?{}:m;var f=m.before,d=f===void 0?"":f,D=m.after,y=D===void 0?"":D;this.spaces={before:d,after:y}}return u.prototype.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},u.prototype.replaceWith=function(){if(this.parent){for(var p in arguments)this.parent.insertBefore(this,arguments[p]);this.remove()}return this},u.prototype.next=function(){return this.parent.at(this.parent.index(this)+1)},u.prototype.prev=function(){return this.parent.at(this.parent.index(this)-1)},u.prototype.clone=function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i(this);for(var m in p)c[m]=p[m];return c},u.prototype.toString=function(){return[this.spaces.before,String(this.value),this.spaces.after].join("")},u})();t.default=a,e.exports=t.default}),Qt=ae(t=>{t.__esModule=!0,t.TAG="tag",t.STRING="string",t.SELECTOR="selector",t.ROOT="root",t.PSEUDO="pseudo",t.NESTING="nesting",t.ID="id",t.COMMENT="comment",t.COMBINATOR="combinator",t.CLASS="class",t.ATTRIBUTE="attribute",t.UNIVERSAL="universal"}),od=ae((t,e)=>{t.__esModule=!0;var r=(function(){function y(x,E){for(var C=0;C<E.length;C++){var b=E[C];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,E,C){return E&&y(x.prototype,E),C&&y(x,C),x}})(),s=Ln(),i=c(s),a=Qt(),u=p(a);function p(y){if(y&&y.__esModule)return y;var x={};if(y!=null)for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(x[E]=y[E]);return x.default=y,x}function c(y){return y&&y.__esModule?y:{default:y}}function m(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function f(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function d(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var D=(function(y){d(x,y);function x(E){m(this,x);var C=f(this,y.call(this,E));return C.nodes||(C.nodes=[]),C}return x.prototype.append=function(E){return E.parent=this,this.nodes.push(E),this},x.prototype.prepend=function(E){return E.parent=this,this.nodes.unshift(E),this},x.prototype.at=function(E){return this.nodes[E]},x.prototype.index=function(E){return typeof E=="number"?E:this.nodes.indexOf(E)},x.prototype.removeChild=function(E){E=this.index(E),this.at(E).parent=void 0,this.nodes.splice(E,1);var C=void 0;for(var b in this.indexes)C=this.indexes[b],C>=E&&(this.indexes[b]=C-1);return this},x.prototype.removeAll=function(){for(var b=this.nodes,E=Array.isArray(b),C=0,b=E?b:b[Symbol.iterator]();;){var A;if(E){if(C>=b.length)break;A=b[C++]}else{if(C=b.next(),C.done)break;A=C.value}var v=A;v.parent=void 0}return this.nodes=[],this},x.prototype.empty=function(){return this.removeAll()},x.prototype.insertAfter=function(E,C){var b=this.index(E);this.nodes.splice(b+1,0,C);var A=void 0;for(var v in this.indexes)A=this.indexes[v],b<=A&&(this.indexes[v]=A+this.nodes.length);return this},x.prototype.insertBefore=function(E,C){var b=this.index(E);this.nodes.splice(b,0,C);var A=void 0;for(var v in this.indexes)A=this.indexes[v],b<=A&&(this.indexes[v]=A+this.nodes.length);return this},x.prototype.each=function(E){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var C=this.lastEach;if(this.indexes[C]=0,!!this.length){for(var b=void 0,A=void 0;this.indexes[C]<this.length&&(b=this.indexes[C],A=E(this.at(b),b),A!==!1);)this.indexes[C]+=1;if(delete this.indexes[C],A===!1)return!1}},x.prototype.walk=function(E){return this.each(function(C,b){var A=E(C,b);if(A!==!1&&C.length&&(A=C.walk(E)),A===!1)return!1})},x.prototype.walkAttributes=function(E){var C=this;return this.walk(function(b){if(b.type===u.ATTRIBUTE)return E.call(C,b)})},x.prototype.walkClasses=function(E){var C=this;return this.walk(function(b){if(b.type===u.CLASS)return E.call(C,b)})},x.prototype.walkCombinators=function(E){var C=this;return this.walk(function(b){if(b.type===u.COMBINATOR)return E.call(C,b)})},x.prototype.walkComments=function(E){var C=this;return this.walk(function(b){if(b.type===u.COMMENT)return E.call(C,b)})},x.prototype.walkIds=function(E){var C=this;return this.walk(function(b){if(b.type===u.ID)return E.call(C,b)})},x.prototype.walkNesting=function(E){var C=this;return this.walk(function(b){if(b.type===u.NESTING)return E.call(C,b)})},x.prototype.walkPseudos=function(E){var C=this;return this.walk(function(b){if(b.type===u.PSEUDO)return E.call(C,b)})},x.prototype.walkTags=function(E){var C=this;return this.walk(function(b){if(b.type===u.TAG)return E.call(C,b)})},x.prototype.walkUniversals=function(E){var C=this;return this.walk(function(b){if(b.type===u.UNIVERSAL)return E.call(C,b)})},x.prototype.split=function(E){var C=this,b=[];return this.reduce(function(A,v,P){var S=E.call(C,v);return b.push(v),S?(A.push(b),b=[]):P===C.length-1&&A.push(b),A},[])},x.prototype.map=function(E){return this.nodes.map(E)},x.prototype.reduce=function(E,C){return this.nodes.reduce(E,C)},x.prototype.every=function(E){return this.nodes.every(E)},x.prototype.some=function(E){return this.nodes.some(E)},x.prototype.filter=function(E){return this.nodes.filter(E)},x.prototype.sort=function(E){return this.nodes.sort(E)},x.prototype.toString=function(){return this.map(String).join("")},r(x,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),x})(i.default);t.default=D,e.exports=t.default}),jM=ae((t,e)=>{t.__esModule=!0;var r=od(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.ROOT,y}return d.prototype.toString=function(){var D=this.reduce(function(y,x){var E=String(x);return E?y+E+",":""},"").slice(0,-1);return this.trailingComma?D+",":D},d})(s.default);t.default=m,e.exports=t.default}),UM=ae((t,e)=>{t.__esModule=!0;var r=od(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.SELECTOR,y}return d})(s.default);t.default=m,e.exports=t.default}),po=ae((t,e)=>{t.__esModule=!0;var r=(function(){function f(d,D){for(var y=0;y<D.length;y++){var x=D[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(d,x.key,x)}}return function(d,D,y){return D&&f(d.prototype,D),y&&f(d,y),d}})(),s=Ln(),i=a(s);function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(){return u(this,d),p(this,f.apply(this,arguments))}return d.prototype.toString=function(){return[this.spaces.before,this.ns,String(this.value),this.spaces.after].join("")},r(d,[{key:"ns",get:function(){var D=this.namespace;return D?(typeof D=="string"?D:"")+"|":""}}]),d})(i.default);t.default=m,e.exports=t.default}),VM=ae((t,e)=>{t.__esModule=!0;var r=po(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.CLASS,y}return d.prototype.toString=function(){return[this.spaces.before,this.ns,"."+this.value,this.spaces.after].join("")},d})(s.default);t.default=m,e.exports=t.default}),qM=ae((t,e)=>{t.__esModule=!0;var r=Ln(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.COMMENT,y}return d})(s.default);t.default=m,e.exports=t.default}),HM=ae((t,e)=>{t.__esModule=!0;var r=po(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.ID,y}return d.prototype.toString=function(){return[this.spaces.before,this.ns,"#"+this.value,this.spaces.after].join("")},d})(s.default);t.default=m,e.exports=t.default}),zM=ae((t,e)=>{t.__esModule=!0;var r=po(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.TAG,y}return d})(s.default);t.default=m,e.exports=t.default}),WM=ae((t,e)=>{t.__esModule=!0;var r=Ln(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.STRING,y}return d})(s.default);t.default=m,e.exports=t.default}),JM=ae((t,e)=>{t.__esModule=!0;var r=od(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.PSEUDO,y}return d.prototype.toString=function(){var D=this.length?"("+this.map(String).join(",")+")":"";return[this.spaces.before,String(this.value),D,this.spaces.after].join("")},d})(s.default);t.default=m,e.exports=t.default}),KM=ae((t,e)=>{t.__esModule=!0;var r=po(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.ATTRIBUTE,y.raws={},y}return d.prototype.toString=function(){var D=[this.spaces.before,"[",this.ns,this.attribute];return this.operator&&D.push(this.operator),this.value&&D.push(this.value),this.raws.insensitive?D.push(this.raws.insensitive):this.insensitive&&D.push(" i"),D.push("]"),D.concat(this.spaces.after).join("")},d})(s.default);t.default=m,e.exports=t.default}),XM=ae((t,e)=>{t.__esModule=!0;var r=po(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.UNIVERSAL,y.value="*",y}return d})(s.default);t.default=m,e.exports=t.default}),GM=ae((t,e)=>{t.__esModule=!0;var r=Ln(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.COMBINATOR,y}return d})(s.default);t.default=m,e.exports=t.default}),YM=ae((t,e)=>{t.__esModule=!0;var r=Ln(),s=a(r),i=Qt();function a(f){return f&&f.__esModule?f:{default:f}}function u(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}function p(f,d){if(!f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:f}function c(f,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);f.prototype=Object.create(d&&d.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(f,d):f.__proto__=d)}var m=(function(f){c(d,f);function d(D){u(this,d);var y=p(this,f.call(this,D));return y.type=i.NESTING,y.value="&",y}return d})(s.default);t.default=m,e.exports=t.default}),QM=ae((t,e)=>{t.__esModule=!0,t.default=r;function r(s){return s.sort(function(i,a){return i-a})}e.exports=t.default}),ZM=ae((t,e)=>{t.__esModule=!0,t.default=V;var r=39,s=34,i=92,a=47,u=10,p=32,c=12,m=9,f=13,d=43,D=62,y=126,x=124,E=44,C=40,b=41,A=91,v=93,P=59,S=42,F=58,B=38,I=64,R=/[ \n\t\r\{\(\)'"\\;/]/g,j=/[ \n\t\r\(\)\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g;function V(N){for(var q=[],te=N.css.valueOf(),W=void 0,Y=void 0,ge=void 0,Ae=void 0,Ie=void 0,he=void 0,G=void 0,X=void 0,le=void 0,we=void 0,Qe=void 0,gt=te.length,se=-1,K=1,H=0,De=function(Pe,je){if(N.safe)te+=je,Y=te.length-1;else throw N.error("Unclosed "+Pe,K,H-se,H)};H<gt;){switch(W=te.charCodeAt(H),W===u&&(se=H,K+=1),W){case u:case p:case m:case f:case c:Y=H;do Y+=1,W=te.charCodeAt(Y),W===u&&(se=Y,K+=1);while(W===p||W===u||W===m||W===f||W===c);q.push(["space",te.slice(H,Y),K,H-se,H]),H=Y-1;break;case d:case D:case y:case x:Y=H;do Y+=1,W=te.charCodeAt(Y);while(W===d||W===D||W===y||W===x);q.push(["combinator",te.slice(H,Y),K,H-se,H]),H=Y-1;break;case S:q.push(["*","*",K,H-se,H]);break;case B:q.push(["&","&",K,H-se,H]);break;case E:q.push([",",",",K,H-se,H]);break;case A:q.push(["[","[",K,H-se,H]);break;case v:q.push(["]","]",K,H-se,H]);break;case F:q.push([":",":",K,H-se,H]);break;case P:q.push([";",";",K,H-se,H]);break;case C:q.push(["(","(",K,H-se,H]);break;case b:q.push([")",")",K,H-se,H]);break;case r:case s:ge=W===r?"'":'"',Y=H;do for(we=!1,Y=te.indexOf(ge,Y+1),Y===-1&&De("quote",ge),Qe=Y;te.charCodeAt(Qe-1)===i;)Qe-=1,we=!we;while(we);q.push(["string",te.slice(H,Y+1),K,H-se,K,Y-se,H]),H=Y;break;case I:R.lastIndex=H+1,R.test(te),R.lastIndex===0?Y=te.length-1:Y=R.lastIndex-2,q.push(["at-word",te.slice(H,Y+1),K,H-se,K,Y-se,H]),H=Y;break;case i:for(Y=H,G=!0;te.charCodeAt(Y+1)===i;)Y+=1,G=!G;W=te.charCodeAt(Y+1),G&&W!==a&&W!==p&&W!==u&&W!==m&&W!==f&&W!==c&&(Y+=1),q.push(["word",te.slice(H,Y+1),K,H-se,K,Y-se,H]),H=Y;break;default:W===a&&te.charCodeAt(H+1)===S?(Y=te.indexOf("*/",H+2)+1,Y===0&&De("comment","*/"),he=te.slice(H,Y+1),Ae=he.split(`
|
|
136
|
-
`),Ie=Ae.length-1,Ie>0?(X=K+Ie,le=Y-Ae[Ie].length):(X=K,le=se),q.push(["comment",he,K,H-se,X,Y-le,H]),se=le,K=X,H=Y):(j.lastIndex=H+1,j.test(te),j.lastIndex===0?Y=te.length-1:Y=j.lastIndex-2,q.push(["word",te.slice(H,Y+1),K,H-se,K,Y-se,H]),H=Y);break}H++}return q}e.exports=t.default}),e5=ae((t,e)=>{t.__esModule=!0;var r=(function(){function se(K,H){for(var De=0;De<H.length;De++){var Pe=H[De];Pe.enumerable=Pe.enumerable||!1,Pe.configurable=!0,"value"in Pe&&(Pe.writable=!0),Object.defineProperty(K,Pe.key,Pe)}}return function(K,H,De){return H&&se(K.prototype,H),De&&se(K,De),K}})(),s=x2(),i=we(s),a=E2(),u=we(a),p=A2(),c=we(p),m=jM(),f=we(m),d=UM(),D=we(d),y=VM(),x=we(y),E=qM(),C=we(E),b=HM(),A=we(b),v=zM(),P=we(v),S=WM(),F=we(S),B=JM(),I=we(B),R=KM(),j=we(R),V=XM(),N=we(V),q=GM(),te=we(q),W=YM(),Y=we(W),ge=QM(),Ae=we(ge),Ie=ZM(),he=we(Ie),G=Qt(),X=le(G);function le(se){if(se&&se.__esModule)return se;var K={};if(se!=null)for(var H in se)Object.prototype.hasOwnProperty.call(se,H)&&(K[H]=se[H]);return K.default=se,K}function we(se){return se&&se.__esModule?se:{default:se}}function Qe(se,K){if(!(se instanceof K))throw new TypeError("Cannot call a class as a function")}var gt=(function(){function se(K){Qe(this,se),this.input=K,this.lossy=K.options.lossless===!1,this.position=0,this.root=new f.default;var H=new D.default;return this.root.append(H),this.current=H,this.lossy?this.tokens=(0,he.default)({safe:K.safe,css:K.css.trim()}):this.tokens=(0,he.default)(K),this.loop()}return se.prototype.attribute=function(){var K="",H=void 0,De=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)K+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~K.indexOf("]")&&this.error("Expected a closing square bracket.");var Pe=K.split(/((?:[*~^$|]?=))([^]*)/),je=Pe[0].split(/(\|)/g),Ct={operator:Pe[1],value:Pe[2],source:{start:{line:De[2],column:De[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:De[4]};if(je.length>1?(je[0]===""&&(je[0]=!0),Ct.attribute=this.parseValue(je[2]),Ct.namespace=this.parseNamespace(je[0])):Ct.attribute=this.parseValue(Pe[0]),H=new j.default(Ct),Pe[2]){var pr=Pe[2].split(/(\s+i\s*?)$/),cr=pr[0].trim();H.value=this.lossy?cr:pr[0],pr[1]&&(H.insensitive=!0,this.lossy||(H.raws.insensitive=pr[1])),H.quoted=cr[0]==="'"||cr[0]==='"',H.raws.unquoted=H.quoted?cr.slice(1,-1):cr}this.newNode(H),this.position++},se.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var K=new te.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(K.spaces.before=this.parseSpace(this.currToken[1]),K.source.start.line=this.nextToken[2],K.source.start.column=this.nextToken[3],K.source.end.column=this.nextToken[3],K.source.end.line=this.nextToken[2],K.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?K.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?K.value=this.currToken[1]:this.currToken[0]==="space"&&(K.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(K)},se.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var K=new D.default;this.current.parent.append(K),this.current=K,this.position++},se.prototype.comment=function(){var K=new C.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(K),this.position++},se.prototype.error=function(K){throw new this.input.error(K)},se.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},se.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},se.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},se.prototype.namespace=function(){var K=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(K);if(this.nextToken[0]==="*")return this.position++,this.universal(K)},se.prototype.nesting=function(){this.newNode(new Y.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},se.prototype.parentheses=function(){var K=this.current.last;if(K&&K.type===X.PSEUDO){var H=new D.default,De=this.current;K.append(H),this.current=H;var Pe=1;for(this.position++;this.position<this.tokens.length&&Pe;)this.currToken[0]==="("&&Pe++,this.currToken[0]===")"&&Pe--,Pe?this.parse():(H.parent.source.end.line=this.currToken[2],H.parent.source.end.column=this.currToken[3],this.position++);Pe&&this.error("Expected closing parenthesis."),this.current=De}else{var je=1;for(this.position++,K.value+="(";this.position<this.tokens.length&&je;)this.currToken[0]==="("&&je++,this.currToken[0]===")"&&je--,K.value+=this.parseParenthesisToken(this.currToken),this.position++;je&&this.error("Expected closing parenthesis.")}},se.prototype.pseudo=function(){for(var K=this,H="",De=this.currToken;this.currToken&&this.currToken[0]===":";)H+=this.currToken[1],this.position++;if(!this.currToken)return this.error("Expected pseudo-class or pseudo-element");if(this.currToken[0]==="word"){var Pe=void 0;this.splitWord(!1,function(je,Ct){H+=je,Pe=new I.default({value:H,source:{start:{line:De[2],column:De[3]},end:{line:K.currToken[4],column:K.currToken[5]}},sourceIndex:De[4]}),K.newNode(Pe),Ct>1&&K.nextToken&&K.nextToken[0]==="("&&K.error("Misplaced parenthesis.")})}else this.error('Unexpected "'+this.currToken[0]+'" found.')},se.prototype.space=function(){var K=this.currToken;this.position===0||this.prevToken[0]===","||this.prevToken[0]==="("?(this.spaces=this.parseSpace(K[1]),this.position++):this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.spaces.after=this.parseSpace(K[1]),this.position++):this.combinator()},se.prototype.string=function(){var K=this.currToken;this.newNode(new F.default({value:this.currToken[1],source:{start:{line:K[2],column:K[3]},end:{line:K[4],column:K[5]}},sourceIndex:K[6]})),this.position++},se.prototype.universal=function(K){var H=this.nextToken;if(H&&H[1]==="|")return this.position++,this.namespace();this.newNode(new N.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),K),this.position++},se.prototype.splitWord=function(K,H){for(var De=this,Pe=this.nextToken,je=this.currToken[1];Pe&&Pe[0]==="word";){this.position++;var Ct=this.currToken[1];if(je+=Ct,Ct.lastIndexOf("\\")===Ct.length-1){var pr=this.nextToken;pr&&pr[0]==="space"&&(je+=this.parseSpace(pr[1]," "),this.position++)}Pe=this.nextToken}var cr=(0,u.default)(je,"."),vs=(0,u.default)(je,"#"),Mi=(0,u.default)(je,"#{");Mi.length&&(vs=vs.filter(function(ke){return!~Mi.indexOf(ke)}));var xe=(0,Ae.default)((0,c.default)((0,i.default)([[0],cr,vs])));xe.forEach(function(ke,ri){var ze=xe[ri+1]||je.length,$i=je.slice(ke,ze);if(ri===0&&H)return H.call(De,$i,xe.length);var It=void 0;~cr.indexOf(ke)?It=new x.default({value:$i.slice(1),source:{start:{line:De.currToken[2],column:De.currToken[3]+ke},end:{line:De.currToken[4],column:De.currToken[3]+(ze-1)}},sourceIndex:De.currToken[6]+xe[ri]}):~vs.indexOf(ke)?It=new A.default({value:$i.slice(1),source:{start:{line:De.currToken[2],column:De.currToken[3]+ke},end:{line:De.currToken[4],column:De.currToken[3]+(ze-1)}},sourceIndex:De.currToken[6]+xe[ri]}):It=new P.default({value:$i,source:{start:{line:De.currToken[2],column:De.currToken[3]+ke},end:{line:De.currToken[4],column:De.currToken[3]+(ze-1)}},sourceIndex:De.currToken[6]+xe[ri]}),De.newNode(It,K)}),this.position++},se.prototype.word=function(K){var H=this.nextToken;return H&&H[1]==="|"?(this.position++,this.namespace()):this.splitWord(K)},se.prototype.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.root},se.prototype.parse=function(K){switch(this.currToken[0]){case"space":this.space();break;case"comment":this.comment();break;case"(":this.parentheses();break;case")":K&&this.missingParenthesis();break;case"[":this.attribute();break;case"]":this.missingSquareBracket();break;case"at-word":case"word":this.word();break;case":":this.pseudo();break;case";":this.missingBackslash();break;case",":this.comma();break;case"*":this.universal();break;case"&":this.nesting();break;case"combinator":this.combinator();break;case"string":this.string();break}},se.prototype.parseNamespace=function(K){if(this.lossy&&typeof K=="string"){var H=K.trim();return H.length?H:!0}return K},se.prototype.parseSpace=function(K,H){return this.lossy?H||"":K},se.prototype.parseValue=function(K){return this.lossy&&K&&typeof K=="string"?K.trim():K},se.prototype.parseParenthesisToken=function(K){return this.lossy?K[0]==="space"?this.parseSpace(K[1]," "):this.parseValue(K[1]):K[1]},se.prototype.newNode=function(K,H){return H&&(K.namespace=this.parseNamespace(H)),this.spaces&&(K.spaces.before=this.spaces,this.spaces=""),this.current.append(K)},r(se,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),se})();t.default=gt,e.exports=t.default}),t5=ae((t,e)=>{t.__esModule=!0;var r=(function(){function c(m,f){for(var d=0;d<f.length;d++){var D=f[d];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(m,D.key,D)}}return function(m,f,d){return f&&c(m.prototype,f),d&&c(m,d),m}})(),s=e5(),i=a(s);function a(c){return c&&c.__esModule?c:{default:c}}function u(c,m){if(!(c instanceof m))throw new TypeError("Cannot call a class as a function")}var p=(function(){function c(m){return u(this,c),this.func=m||function(){},this}return c.prototype.process=function(m){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=new i.default({css:m,error:function(D){throw new Error(D)},options:f});return this.res=d,this.func(d),this},r(c,[{key:"result",get:function(){return String(this.res)}}]),c})();t.default=p,e.exports=t.default}),Zr=ae((t,e)=>{var r=function(s,i){let a=new s.constructor;for(let u in s){if(!s.hasOwnProperty(u))continue;let p=s[u],c=typeof p;u==="parent"&&c==="object"?i&&(a[u]=i):u==="source"?a[u]=p:p instanceof Array?a[u]=p.map(m=>r(m,a)):u!=="before"&&u!=="after"&&u!=="between"&&u!=="semicolon"&&(c==="object"&&p!==null&&(p=r(p)),a[u]=p)}return a};e.exports=class{constructor(s){s=s||{},this.raws={before:"",after:""};for(let i in s)this[i]=s[i]}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(){return[this.raws.before,String(this.value),this.raws.after].join("")}clone(s){s=s||{};let i=r(this);for(let a in s)i[a]=s[a];return i}cloneBefore(s){s=s||{};let i=this.clone(s);return this.parent.insertBefore(this,i),i}cloneAfter(s){s=s||{};let i=this.clone(s);return this.parent.insertAfter(this,i),i}replaceWith(){let s=Array.prototype.slice.call(arguments);if(this.parent){for(let i of s)this.parent.insertBefore(this,i);this.remove()}return this}moveTo(s){return this.cleanRaws(this.root()===s.root()),this.remove(),s.append(this),this}moveBefore(s){return this.cleanRaws(this.root()===s.root()),this.remove(),s.parent.insertBefore(s,this),this}moveAfter(s){return this.cleanRaws(this.root()===s.root()),this.remove(),s.parent.insertAfter(s,this),this}next(){let s=this.parent.index(this);return this.parent.nodes[s+1]}prev(){let s=this.parent.index(this);return this.parent.nodes[s-1]}toJSON(){let s={};for(let i in this){if(!this.hasOwnProperty(i)||i==="parent")continue;let a=this[i];a instanceof Array?s[i]=a.map(u=>typeof u=="object"&&u.toJSON?u.toJSON():u):typeof a=="object"&&a.toJSON?s[i]=a.toJSON():s[i]=a}return s}root(){let s=this;for(;s.parent;)s=s.parent;return s}cleanRaws(s){delete this.raws.before,delete this.raws.after,s||delete this.raws.between}positionInside(s){let i=this.toString(),a=this.source.start.column,u=this.source.start.line;for(let p=0;p<s;p++)i[p]===`
|
|
137
|
-
`?(a=1,u+=1):a+=1;return{line:u,column:a}}positionBy(s){let i=this.source.start;if(Object(s).index)i=this.positionInside(s.index);else if(Object(s).word){let a=this.toString().indexOf(s.word);a!==-1&&(i=this.positionInside(a))}return i}}}),lr=ae((t,e)=>{var r=Zr(),s=class extends r{constructor(i){super(i),this.nodes||(this.nodes=[])}push(i){return i.parent=this,this.nodes.push(i),this}each(i){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let a=this.lastEach,u,p;if(this.indexes[a]=0,!!this.nodes){for(;this.indexes[a]<this.nodes.length&&(u=this.indexes[a],p=i(this.nodes[u],u),p!==!1);)this.indexes[a]+=1;return delete this.indexes[a],p}}walk(i){return this.each((a,u)=>{let p=i(a,u);return p!==!1&&a.walk&&(p=a.walk(i)),p})}walkType(i,a){if(!i||!a)throw new Error("Parameters {type} and {callback} are required.");let u=typeof i=="function";return this.walk((p,c)=>{if(u&&p instanceof i||!u&&p.type===i)return a.call(this,p,c)})}append(i){return i.parent=this,this.nodes.push(i),this}prepend(i){return i.parent=this,this.nodes.unshift(i),this}cleanRaws(i){if(super.cleanRaws(i),this.nodes)for(let a of this.nodes)a.cleanRaws(i)}insertAfter(i,a){let u=this.index(i),p;this.nodes.splice(u+1,0,a);for(let c in this.indexes)p=this.indexes[c],u<=p&&(this.indexes[c]=p+this.nodes.length);return this}insertBefore(i,a){let u=this.index(i),p;this.nodes.splice(u,0,a);for(let c in this.indexes)p=this.indexes[c],u<=p&&(this.indexes[c]=p+this.nodes.length);return this}removeChild(i){i=this.index(i),this.nodes[i].parent=void 0,this.nodes.splice(i,1);let a;for(let u in this.indexes)a=this.indexes[u],a>=i&&(this.indexes[u]=a-1);return this}removeAll(){for(let i of this.nodes)i.parent=void 0;return this.nodes=[],this}every(i){return this.nodes.every(i)}some(i){return this.nodes.some(i)}index(i){return typeof i=="number"?i:this.nodes.indexOf(i)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let i=this.nodes.map(String).join("");return this.value&&(i=this.value+i),this.raws.before&&(i=this.raws.before+i),this.raws.after&&(i+=this.raws.after),i}};s.registerWalker=i=>{let a="walk"+i.name;a.lastIndexOf("s")!==a.length-1&&(a+="s"),!s.prototype[a]&&(s.prototype[a]=function(u){return this.walkType(i,u)})},e.exports=s}),r5=ae((t,e)=>{var r=lr();e.exports=class extends r{constructor(s){super(s),this.type="root"}}}),s5=ae((t,e)=>{var r=lr();e.exports=class extends r{constructor(s){super(s),this.type="value",this.unbalanced=0}}}),i5=ae((t,e)=>{var r=lr(),s=class extends r{constructor(i){super(i),this.type="atword"}toString(){return this.quoted&&this.raws.quote,[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};r.registerWalker(s),e.exports=s}),n5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="colon"}};r.registerWalker(i),e.exports=i}),a5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="comma"}};r.registerWalker(i),e.exports=i}),o5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="comment",this.inline=Object(a).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};r.registerWalker(i),e.exports=i}),u5=ae((t,e)=>{var r=lr(),s=class extends r{constructor(i){super(i),this.type="func",this.unbalanced=-1}};r.registerWalker(s),e.exports=s}),l5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="number",this.unit=Object(a).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};r.registerWalker(i),e.exports=i}),p5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="operator"}};r.registerWalker(i),e.exports=i}),c5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="paren",this.parenType=""}};r.registerWalker(i),e.exports=i}),h5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="string"}toString(){let a=this.quoted?this.raws.quote:"";return[this.raws.before,a,this.value+"",a,this.raws.after].join("")}};r.registerWalker(i),e.exports=i}),d5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="word"}};r.registerWalker(i),e.exports=i}),f5=ae((t,e)=>{var r=lr(),s=Zr(),i=class extends s{constructor(a){super(a),this.type="unicode-range"}};r.registerWalker(i),e.exports=i}),m5=ae((t,e)=>{var r=class extends Error{constructor(s){super(s),this.name=this.constructor.name,this.message=s||"An error ocurred while tokzenizing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack}};e.exports=r}),y5=ae((t,e)=>{var r=/[ \n\t\r\{\(\)'"\\;,/]/g,s=/[ \n\t\r\(\)\{\}\*:;@!&'"\+\|~>,\[\]\\]|\/(?=\*)/g,i=/[ \n\t\r\(\)\{\}\*:;@!&'"\-\+\|~>,\[\]\\]|\//g,a=/^[a-z0-9]/i,u=/^[a-f0-9?\-]/i,p=m5();e.exports=function(c,m){m=m||{};let f=[],d=c.valueOf(),D=d.length,y=-1,x=1,E=0,C=0,b=null,A,v,P,S,F,B,I,R,j,V,N;function q(te){let W=`Unclosed ${te} at line: ${x}, column: ${E-y}, token: ${E}`;throw new p(W)}for(;E<D;){switch(A=d.charCodeAt(E),A===10&&(y=E,x+=1),A){case 10:case 32:case 9:case 13:case 12:v=E;do v+=1,A=d.charCodeAt(v),A===10&&(y=v,x+=1);while(A===32||A===10||A===9||A===13||A===12);f.push(["space",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;break;case 58:v=E+1,f.push(["colon",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;break;case 44:v=E+1,f.push(["comma",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;break;case 123:f.push(["{","{",x,E-y,x,v-y,E]);break;case 125:f.push(["}","}",x,E-y,x,v-y,E]);break;case 40:C++,b=!b&&C===1&&f.length>0&&f[f.length-1][0]==="word"&&f[f.length-1][1]==="url",f.push(["(","(",x,E-y,x,v-y,E]);break;case 41:C--,b=b&&C>0,f.push([")",")",x,E-y,x,v-y,E]);break;case 39:case 34:P=A===39?"'":'"',v=E;do for(j=!1,v=d.indexOf(P,v+1),v===-1&&q("quote"),V=v;d.charCodeAt(V-1)===92;)V-=1,j=!j;while(j);f.push(["string",d.slice(E,v+1),x,E-y,x,v-y,E]),E=v;break;case 64:r.lastIndex=E+1,r.test(d),r.lastIndex===0?v=d.length-1:v=r.lastIndex-2,f.push(["atword",d.slice(E,v+1),x,E-y,x,v-y,E]),E=v;break;case 92:v=E,A=d.charCodeAt(v+1),f.push(["word",d.slice(E,v+1),x,E-y,x,v-y,E]),E=v;break;case 43:case 45:case 42:if(v=E+1,N=d.slice(E+1,v+1),d.slice(E-1,E),A===45&&N.charCodeAt(0)===45){v++,f.push(["word",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;break}f.push(["operator",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;break;default:if(A===47&&(d.charCodeAt(E+1)===42||m.loose&&!b&&d.charCodeAt(E+1)===47)){if(d.charCodeAt(E+1)===42)v=d.indexOf("*/",E+2)+1,v===0&&q("comment");else{let te=d.indexOf(`
|
|
138
|
-
`,E+2);v=te!==-1?te-1:D}B=d.slice(E,v+1),S=B.split(`
|
|
139
|
-
`),F=S.length-1,F>0?(I=x+F,R=v-S[F].length):(I=x,R=y),f.push(["comment",B,x,E-y,I,v-R,E]),y=R,x=I,E=v}else if(A===35&&!a.test(d.slice(E+1,E+2)))v=E+1,f.push(["#",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;else if((A===117||A===85)&&d.charCodeAt(E+1)===43){v=E+2;do v+=1,A=d.charCodeAt(v);while(v<D&&u.test(d.slice(v,v+1)));f.push(["unicoderange",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1}else if(A===47)v=E+1,f.push(["operator",d.slice(E,v),x,E-y,x,v-y,E]),E=v-1;else{let te=s;if(A>=48&&A<=57&&(te=i),te.lastIndex=E+1,te.test(d),te.lastIndex===0?v=d.length-1:v=te.lastIndex-2,te===i||A===46){let W=d.charCodeAt(v),Y=d.charCodeAt(v+1),ge=d.charCodeAt(v+2);(W===101||W===69)&&(Y===45||Y===43)&&ge>=48&&ge<=57&&(i.lastIndex=v+2,i.test(d),i.lastIndex===0?v=d.length-1:v=i.lastIndex-2)}f.push(["word",d.slice(E,v+1),x,E-y,x,v-y,E]),E=v}break}E++}return f}}),g5=ae((t,e)=>{var r=class extends Error{constructor(s){super(s),this.name=this.constructor.name,this.message=s||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack}};e.exports=r}),D5=ae((t,e)=>{var r=r5(),s=s5(),i=i5(),a=n5(),u=a5(),p=o5(),c=u5(),m=l5(),f=p5(),d=c5(),D=h5(),y=d5(),x=f5(),E=y5(),C=x2(),b=E2(),A=A2(),v=g5();function P(S){return S.sort((F,B)=>F-B)}e.exports=class{constructor(S,F){let B={loose:!1};this.cache=[],this.input=S,this.options=Object.assign({},B,F),this.position=0,this.unbalanced=0,this.root=new r;let I=new s;this.root.append(I),this.current=I,this.tokens=E(S,this.options)}parse(){return this.loop()}colon(){let S=this.currToken;this.newNode(new a({value:S[1],source:{start:{line:S[2],column:S[3]},end:{line:S[4],column:S[5]}},sourceIndex:S[6]})),this.position++}comma(){let S=this.currToken;this.newNode(new u({value:S[1],source:{start:{line:S[2],column:S[3]},end:{line:S[4],column:S[5]}},sourceIndex:S[6]})),this.position++}comment(){let S=!1,F=this.currToken[1].replace(/\/\*|\*\//g,""),B;this.options.loose&&F.startsWith("//")&&(F=F.substring(2),S=!0),B=new p({value:F,inline:S,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(B),this.position++}error(S,F){throw new v(S+` at line: ${F[2]}, column ${F[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let S=this.currToken[1],F;if(S==="+"||S==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return F=new f({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(F)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let S=1,F=this.position+1,B=this.currToken,I;for(;F<this.tokens.length&&S;){let R=this.tokens[F];R[0]==="("&&S++,R[0]===")"&&S--,F++}if(S&&this.error("Expected closing parenthesis",B),I=this.current.last,I&&I.type==="func"&&I.unbalanced<0&&(I.unbalanced=0,this.current=I),this.current.unbalanced++,this.newNode(new d({value:B[1],source:{start:{line:B[2],column:B[3]},end:{line:B[4],column:B[5]}},sourceIndex:B[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let R=this.nextToken,j=this.currToken[1],V={line:this.currToken[2],column:this.currToken[3]};for(;R&&R[0]!==")"&&this.current.unbalanced;)this.position++,j+=this.currToken[1],R=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new y({value:j,source:{start:V,end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]})))}}parenClose(){let S=this.currToken;this.newNode(new d({value:S[1],source:{start:{line:S[2],column:S[3]},end:{line:S[4],column:S[5]}},sourceIndex:S[6]})),this.position++,!(this.position>=this.tokens.length-1&&!this.current.unbalanced)&&(this.current.unbalanced--,this.current.unbalanced<0&&this.error("Expected opening parenthesis",S),!this.current.unbalanced&&this.cache.length&&(this.current=this.cache.pop()))}space(){let S=this.currToken;this.position===this.tokens.length-1||this.nextToken[0]===","||this.nextToken[0]===")"?(this.current.last.raws.after+=S[1],this.position++):(this.spaces=S[1],this.position++)}unicodeRange(){let S=this.currToken;this.newNode(new x({value:S[1],source:{start:{line:S[2],column:S[3]},end:{line:S[4],column:S[5]}},sourceIndex:S[6]})),this.position++}splitWord(){let S=this.nextToken,F=this.currToken[1],B=/^[\+\-]?((\d+(\.\d*)?)|(\.\d+))([eE][\+\-]?\d+)?/,I=/^(?!\#([a-z0-9]+))[\#\{\}]/gi,R,j;if(!I.test(F))for(;S&&S[0]==="word";){this.position++;let V=this.currToken[1];F+=V,S=this.nextToken}R=b(F,"@"),j=P(A(C([[0],R]))),j.forEach((V,N)=>{let q=j[N+1]||F.length,te=F.slice(V,q),W;if(~R.indexOf(V))W=new i({value:te.slice(1),source:{start:{line:this.currToken[2],column:this.currToken[3]+V},end:{line:this.currToken[4],column:this.currToken[3]+(q-1)}},sourceIndex:this.currToken[6]+j[N]});else if(B.test(this.currToken[1])){let Y=te.replace(B,"");W=new m({value:te.replace(Y,""),source:{start:{line:this.currToken[2],column:this.currToken[3]+V},end:{line:this.currToken[4],column:this.currToken[3]+(q-1)}},sourceIndex:this.currToken[6]+j[N],unit:Y})}else W=new(S&&S[0]==="("?c:y)({value:te,source:{start:{line:this.currToken[2],column:this.currToken[3]+V},end:{line:this.currToken[4],column:this.currToken[3]+(q-1)}},sourceIndex:this.currToken[6]+j[N]}),W.type==="word"?(W.isHex=/^#(.+)/.test(te),W.isColor=/^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(te)):this.cache.push(this.current);this.newNode(W)}),this.position++}string(){let S=this.currToken,F=this.currToken[1],B=/^(\"|\')/,I=B.test(F),R="",j;I&&(R=F.match(B)[0],F=F.slice(1,F.length-1)),j=new D({value:F,source:{start:{line:S[2],column:S[3]},end:{line:S[4],column:S[5]}},sourceIndex:S[6],quoted:I}),j.raws.quote=R,this.newNode(j),this.position++}word(){return this.splitWord()}newNode(S){return this.spaces&&(S.raws.before+=this.spaces,this.spaces=""),this.current.append(S)}get currToken(){return this.tokens[this.position]}get nextToken(){return this.tokens[this.position+1]}get prevToken(){return this.tokens[this.position-1]}}}),C2={};a2(C2,{languages:()=>rE,options:()=>sE,parsers:()=>yd,printers:()=>cE});var b2=(t,e)=>(r,s,...i)=>r|1&&s==null?void 0:(e.call(s)??s[t]).apply(s,i),x5=String.prototype.replaceAll??function(t,e){return t.global?this.replace(t,e):this.split(t).join(e)},E5=b2("replaceAll",function(){if(typeof this=="string")return x5}),pt=E5;function A5(t){return this[t<0?this.length+t:t]}var C5=b2("at",function(){if(Array.isArray(this)||typeof this=="string")return A5}),Ti=C5,b5=()=>{},T5=b5,T2="string",v2="array",S2="cursor",Ku="indent",ud="align",w2="trim",Xu="group",Gu="fill",Yu="if-break",P2="indent-if-break",ld="line-suffix",F2="line-suffix-boundary",On="line",k2="label",pd="break-parent",I2=new Set([S2,Ku,ud,w2,Xu,Gu,Yu,P2,ld,F2,On,k2,pd]);function v5(t){if(typeof t=="string")return T2;if(Array.isArray(t))return v2;if(!t)return;let{type:e}=t;if(I2.has(e))return e}var Sa=v5,S5=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function w5(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
|
140
|
-
Expected it to be 'string' or 'object'.`;if(Sa(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let s=S5([...I2].map(i=>`'${i}'`));return`Unexpected doc.type '${t.type}'.
|
|
141
|
-
Expected it to be ${s}.`}var P5=class extends Error{name="InvalidDocError";constructor(t){super(w5(t)),this.doc=t}},F5=P5;function k5(t,e){if(typeof t=="string")return e(t);let r=new Map;return s(t);function s(a){if(r.has(a))return r.get(a);let u=i(a);return r.set(a,u),u}function i(a){switch(Sa(a)){case v2:return e(a.map(s));case Gu:return e({...a,parts:a.parts.map(s)});case Yu:return e({...a,breakContents:s(a.breakContents),flatContents:s(a.flatContents)});case Xu:{let{expandedStates:u,contents:p}=a;return u?(u=u.map(s),p=u[0]):p=s(p),e({...a,contents:p,expandedStates:u})}case ud:case Ku:case P2:case k2:case ld:return e({...a,contents:s(a.contents)});case T2:case S2:case w2:case F2:case On:case pd:return e(a);default:throw new F5(a)}}}function I5(t){return t.type===On&&!t.hard?t.soft?"":" ":t.type===Yu?t.flatContents:t}function N5(t){return k5(t,I5)}var B5=T5;function tr(t){return{type:Ku,contents:t}}function _5(t,e){return{type:ud,contents:e,n:t}}function ja(t){return _5(-1,t)}var cd={type:pd};function ru(t){return{type:Gu,parts:t}}function dr(t,e={}){return B5(e.expandedStates),{type:Xu,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function N2(t,e="",r={}){return{type:Yu,breakContents:t,flatContents:e,groupId:r.groupId}}function js(t,e){let r=[];for(let s=0;s<e.length;s++)s!==0&&r.push(t),r.push(e[s]);return r}var Nt={type:On},hr={type:On,soft:!0},L5={type:On,hard:!0},xt=[L5,cd];function O5(t){return{type:ld,contents:t}}function M5(t){return Array.isArray(t)&&t.length>0}var Qu=M5,B2=Object.freeze({character:"'",codePoint:39}),_2=Object.freeze({character:'"',codePoint:34}),$5=Object.freeze({preferred:B2,alternate:_2}),R5=Object.freeze({preferred:_2,alternate:B2});function j5(t,e){let{preferred:r,alternate:s}=e===!0||e==="'"?$5:R5,{length:i}=t,a=0,u=0;for(let p=0;p<i;p++){let c=t.charCodeAt(p);c===r.codePoint?a++:c===s.codePoint&&u++}return(a>u?s:r).character}var U5=j5,V5=/\\(["'\\])|(["'])/gu;function q5(t,e){let r=e==='"'?"'":'"',s=pt(0,t,V5,(i,a,u)=>a?a===r?r:i:u===e?"\\"+u:u);return e+s+e}var H5=q5;function z5(t,e){let r=t.slice(1,-1),s=e.parser==="json"||e.parser==="jsonc"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?'"':e.__isInHtmlAttribute?"'":U5(r,e.singleQuote);return t.charAt(0)===s?t:H5(r,s)}var L2=z5,W5=class extends Error{name="UnexpectedNodeError";constructor(t,e,r="type"){super(`Unexpected ${e} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},J5=W5,O2=Symbol.for("PRETTIER_IS_FRONT_MATTER");function K5(t){return!!t?.[O2]}var ac=K5,ta=3;function X5(t){let e=t.slice(0,ta);if(e!=="---"&&e!=="+++")return;let r=t.indexOf(`
|
|
142
|
-
`,ta);if(r===-1)return;let s=t.slice(ta,r).trim(),i=t.indexOf(`
|
|
143
|
-
${e}`,r),a=s;if(a||(a=e==="+++"?"toml":"yaml"),i===-1&&e==="---"&&a==="yaml"&&(i=t.indexOf(`
|
|
144
|
-
...`,r)),i===-1)return;let u=i+1+ta,p=t.charAt(u+1);if(!/\s?/u.test(p))return;let c=t.slice(0,u),m;return{language:a,explicitLanguage:s||null,value:t.slice(r+1,i),startDelimiter:e,endDelimiter:c.slice(-ta),raw:c,start:{line:1,column:0,index:0},end:{index:c.length,get line(){return m??(m=c.split(`
|
|
145
|
-
`)),m.length},get column(){return m??(m=c.split(`
|
|
146
|
-
`)),Ti(0,m,-1).length}},[O2]:!0}}function G5(t){let e=X5(t);return e?{frontMatter:e,get content(){let{raw:r}=e;return pt(0,r,/[^\n]/gu," ")+t.slice(r.length)}}:{content:t}}var Zu=G5,Y5=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function M2(t,e,r){if(t.type==="css-comment"&&r.type==="css-root"&&r.nodes.length>0&&((r.nodes[0]===t||ac(r.nodes[0])&&r.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/u.test(t.text))||r.type==="css-root"&&Ti(0,r.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&delete e.params,(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=Q5(t.value)),t.type==="selector-combinator"&&(e.value=pt(0,e.value,/\s+/gu," ")),t.type==="media-feature"&&(e.value=pt(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=pt(0,e.value,/;$/gu,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:s}=e;/\s[a-zA-Z]$/u.test(s)&&(e.__prettier_attribute_selector_flag=Ti(0,s,-1),s=s.slice(0,-1)),s=s.trim(),s=s.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/u,"$<value>"),e.value=s,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=pt(0,e.value,/([\d+.e-]+)([a-z]*)/giu,(s,i,a)=>{let u=Number(i);return Number.isNaN(u)?s:u+a.toLowerCase()})),t.type==="selector-tag"){let s=e.value.toLowerCase();["from","to"].includes(s)&&(e.value=s)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let s=t.groups.findIndex(i=>i.type==="value-number"&&i.unit==="...");s!==-1&&(e.groups[s].unit="",e.groups.splice(s+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(s=>s.type==="value-atword"&&(s.value.endsWith("[")||s.value.endsWith("]"))||s.type==="value-word"&&(s.value.startsWith("]")||s.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(s=>s.value).join(""),group:{open:null,close:null,groups:[],type:"value-paren_group"}}}M2.ignoredProperties=Y5;function Q5(t){return pt(0,pt(0,t,"'",'"'),/\\([^\da-f])/giu,"$1")}var Z5=M2;function $2(){}$2.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var e7=$2,ra=null;function wa(t){if(ra!==null&&typeof ra.property){let e=ra;return ra=wa.prototype=null,e}return ra=wa.prototype=t??Object.create(null),new wa}var t7=10;for(let t=0;t<=t7;t++)wa();function r7(t){return wa(t)}function s7(t,e="type"){r7(t);function r(s){let i=s[e],a=t[i];if(!Array.isArray(a))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return a}return r}var i7=s7,Ve=[[],["nodes"],["group"]],n7={"css-root":["frontMatter","nodes"],"css-comment":Ve[0],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":Ve[1],"media-query":Ve[1],"media-type":Ve[0],"media-feature-expression":Ve[1],"media-feature":Ve[0],"media-colon":Ve[0],"media-value":Ve[0],"media-keyword":Ve[0],"media-url":Ve[0],"media-unknown":Ve[0],"selector-root":Ve[1],"selector-selector":Ve[1],"selector-comment":Ve[0],"selector-string":Ve[0],"selector-tag":Ve[0],"selector-id":Ve[0],"selector-class":Ve[0],"selector-attribute":Ve[0],"selector-combinator":Ve[1],"selector-universal":Ve[0],"selector-pseudo":Ve[1],"selector-nesting":Ve[0],"selector-unknown":Ve[0],"value-value":Ve[2],"value-root":Ve[2],"value-comment":Ve[0],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":Ve[2],"value-paren":Ve[0],"value-number":Ve[0],"value-operator":Ve[0],"value-word":Ve[0],"value-colon":Ve[0],"value-comma":Ve[0],"value-string":Ve[0],"value-atword":Ve[0],"value-unicode-range":Ve[0],"value-unknown":Ve[0]},a7=i7(n7),o7=a7;function u7(t,e){let r=0;for(let s=0;s<t.line-1;++s)r=e.indexOf(`
|
|
147
|
-
`,r)+1;return r+t.column}var R2=u7;function hd(t){return(e,r,s)=>{let i=!!s?.backwards;if(r===!1)return!1;let{length:a}=e,u=r;for(;u>=0&&u<a;){let p=e.charAt(u);if(t instanceof RegExp){if(!t.test(p))return u}else if(!t.includes(p))return u;i?u--:u++}return u===-1||u===a?u:!1}}var j2=hd(" "),l7=hd(",; "),U2=hd(/[^\n\r]/u);function V2(t,e){let{value:r}=t;return r==="-"||r==="--"||r.charAt(0)!=="-"?e:e-(r.charAt(1)==="-"?2:1)}function q2(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?V2(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return R2(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function dd(t,e){if(t.type==="css-comment"&&t.inline)return U2(e,t.source.startOffset);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let r=R2(t.source.end,e);return t.type==="value-word"?V2(t,r):r}if(Qu(t.nodes))return dd(Ti(0,t.nodes,-1),e)}return null}function H2(t,e){t.source&&(t.source.startOffset=q2(t,e),t.source.endOffset=dd(t,e));for(let r in t){let s=t[r];r==="source"||!s||typeof s!="object"||(s.type==="value-root"||s.type==="value-unknown"?z2(s,p7(t),s.text||s.value):H2(s,e))}}function z2(t,e,r){t.source&&(t.source.startOffset=q2(t,r)+e,t.source.endOffset=dd(t,r)+e);for(let s in t){let i=t[s];s==="source"||!i||typeof i!="object"||z2(i,e,r)}}function p7(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/u)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function c7(t){let e="initial",r="initial",s,i=!1,a=[];for(let u=0;u<t.length;u++){let p=t[u];switch(e){case"initial":if(p==="'"){e="single-quotes";continue}if(p==='"'){e="double-quotes";continue}if((p==="u"||p==="U")&&t.slice(u,u+4).toLowerCase()==="url("){e="url",u+=3;continue}if(p==="*"&&t[u-1]==="/"){e="comment-block";continue}if(p==="/"&&t[u-1]==="/"){e="comment-inline",s=u-1;continue}continue;case"single-quotes":if(p==="'"&&t[u-1]!=="\\"&&(e=r,r="initial"),p===`
|
|
148
|
-
`||p==="\r")return t;continue;case"double-quotes":if(p==='"'&&t[u-1]!=="\\"&&(e=r,r="initial"),p===`
|
|
149
|
-
`||p==="\r")return t;continue;case"url":if(p===")"&&(e="initial"),p===`
|
|
150
|
-
`||p==="\r")return t;if(p==="'"){e="single-quotes",r="url";continue}if(p==='"'){e="double-quotes",r="url";continue}continue;case"comment-block":p==="/"&&t[u-1]==="*"&&(e="initial");continue;case"comment-inline":(p==='"'||p==="'"||p==="*")&&(i=!0),(p===`
|
|
151
|
-
`||p==="\r")&&(i&&a.push([s,u]),e="initial",i=!1);continue}}for(let[u,p]of a)t=t.slice(0,u)+pt(0,t.slice(u,p),/["'*]/gu," ")+t.slice(p);return t}var Ht=t=>t.source?.startOffset,zt=t=>t.source?.endOffset,h7=/\*\/$/,d7=/^\/\*\*?/,W2=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,f7=/(^|\s+)\/\/([^\n\r]*)/g,By=/^(\r?\n)+/,m7=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,_y=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,y7=/(\r?\n|^) *\* ?/g,J2=[];function g7(t){let e=t.match(W2);return e?e[0].trimStart():""}function D7(t){let e=t.match(W2)?.[0];return e==null?t:t.slice(e.length)}function x7(t){t=pt(0,t.replace(d7,"").replace(h7,""),y7,"$1");let e="";for(;e!==t;)e=t,t=pt(0,t,m7,`
|
|
152
|
-
$1 $2
|
|
153
|
-
`);t=t.replace(By,"").trimEnd();let r=Object.create(null),s=pt(0,t,_y,"").replace(By,"").trimEnd(),i;for(;i=_y.exec(t);){let a=pt(0,i[2],f7,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...J2,...Array.isArray(u)?u:[u],a]}else r[i[1]]=a}return{comments:s,pragmas:r}}function E7({comments:t="",pragmas:e={}}){let r=Object.keys(e),s=r.flatMap(a=>Ly(a,e[a])).map(a=>` * ${a}
|
|
154
|
-
`).join("");if(!t){if(r.length===0)return"";if(r.length===1&&!Array.isArray(e[r[0]])){let a=e[r[0]];return`/** ${Ly(r[0],a)[0]} */`}}let i=t.split(`
|
|
155
|
-
`).map(a=>` * ${a}`).join(`
|
|
156
|
-
`)+`
|
|
157
|
-
`;return`/**
|
|
158
|
-
`+(t?i:"")+(t&&r.length>0?` *
|
|
159
|
-
`:"")+s+" */"}function Ly(t,e){return[...J2,...Array.isArray(e)?e:[e]].map(r=>`@${t} ${r}`.trim())}var A7=["noformat","noprettier"],C7=["format","prettier"],b7="format";function T7(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
|
|
160
|
-
`);return e===-1?t:t.slice(0,e)}var v7=T7;function fd(t){let e=v7(t);e&&(t=t.slice(e.length+1));let r=g7(t),{pragmas:s,comments:i}=x7(r);return{shebang:e,text:t,pragmas:s,comments:i}}function S7(t){let{pragmas:e}=fd(t);return C7.some(r=>Object.prototype.hasOwnProperty.call(e,r))}function w7(t){let{pragmas:e}=fd(t);return A7.some(r=>Object.prototype.hasOwnProperty.call(e,r))}function P7(t){let{shebang:e,text:r,pragmas:s,comments:i}=fd(t),a=D7(r),u=E7({pragmas:{[b7]:"",...s},comments:i.trimStart()});return(e?`${e}
|
|
161
|
-
`:"")+u+(a.startsWith(`
|
|
162
|
-
`)?`
|
|
163
|
-
`:`
|
|
164
|
-
|
|
165
|
-
`)+a}var F7=t=>S7(Zu(t).content),k7=t=>w7(Zu(t).content),I7=t=>{let{frontMatter:e,content:r}=Zu(t);return(e?e.raw+`
|
|
166
|
-
|
|
167
|
-
`:"")+P7(r)},N7=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function B7(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var _7=new Set(["initial","inherit","unset","revert"]);function L7(t){return _7.has(t.toLowerCase())}function O7(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function sa(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function su(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function M7(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let r=e.raws?.selector;return r&&(r.startsWith(":import")||r.startsWith(":export"))})}function Pa(t,e){let r=Array.isArray(e)?e:[e],s=t.findAncestor(i=>i.type==="css-atrule");return s&&r.includes(s.name.toLowerCase())}function $7(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(r=>r.type==="css-atrule")?.name==="import"}function R7(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function j7(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function U7(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/u.test(e)||e.value&&/^@.+:.*$/u.test(e.value):!1}function V7(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function q7(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function H7(t){return t.type==="value-word"&&t.value==="in"}function oc(t){return t.type==="value-operator"&&t.value==="*"}function en(t){return t?.type==="value-operator"&&t.value==="/"}function Os(t){return t.type==="value-operator"&&t.value==="+"}function tn(t){return t.type==="value-operator"&&t.value==="-"}function z7(t){return t.type==="value-operator"&&t.value==="%"}function pp(t){return oc(t)||en(t)||Os(t)||tn(t)||z7(t)}function W7(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function J7(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function uc(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function Oy(t){return t.raws?.params&&/^\(\s*\)$/u.test(t.raws.params)}function cp(t){return t.name.startsWith("prettier-placeholder")}function K7(t){return t.prop.startsWith("@prettier-placeholder")}function X7(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function G7(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function Y7(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function Bs(t){return t?.raws?.before===""}function md(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function hp(t){return t.type==="value-paren_group"&&t.groups?.[0]&&md(t.groups[0])}function K2(t,e){if(e.parser!=="scss")return!1;let{node:r}=t;if(r.groups.length===0)return!1;let s=t.parent;if(s&&s.type==="value-func"&&s.value==="if")return!1;let i=t.grandparent;return!hp(r)&&!(i&&hp(i))?!1:!!(t.findAncestor(a=>a.type==="css-decl")?.prop?.startsWith("$")||hp(i)||i.type==="value-func")}function $o(t){return t.type==="value-comment"&&t.inline}function dp(t){return t.type==="value-word"&&t.value==="#"}function My(t){return t.type==="value-word"&&t.value==="{"}function fp(t){return t.type==="value-word"&&t.value==="}"}function Ro(t){return["value-word","value-atword"].includes(t.type)}function lc(t){return t?.type==="value-colon"}function Q7(t,e){if(!md(e))return!1;let{groups:r}=e,s=r.indexOf(t);return s===-1?!1:lc(r[s+1])}function Z7(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function e$(t){return t.type!=="value-func"?!1:N7.has(t.value.toLowerCase())}function ia(t){return/\/\//u.test(t.split(/[\n\r]/u).pop())}function jo(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function t$(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(r=>r.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let r=e.groups.indexOf(t)-1,s=e.groups[r];if(s?.type==="value-word"&&s.value==="with")return!0}return!1}function Uo(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function r$(t,e,r){let{node:s}=t,i=t.parent,a=t.grandparent,u=B7(t),p=u&&i.type==="value-value"&&(u==="grid"||u.startsWith("grid-template")),c=t.findAncestor(C=>C.type==="css-atrule"),m=c&&uc(c,e),f=s.groups.some(C=>$o(C)),d=t.map(r,"groups"),D=[""],y=su(t,"url"),x=!1,E=!1;for(let C=0;C<s.groups.length;++C){let b=s.groups[C-1],A=s.groups[C],v=s.groups[C+1],P=s.groups[C+2];if($o(A)&&!v){D.push([D.pop(),O5([" ",d[C]])]);continue}if(D.push([D.pop(),d[C]]),y){(v&&Os(v)||Os(A))&&D.push([D.pop()," "]);continue}if(Pa(t,"forward")&&A.type==="value-word"&&A.value&&b!==void 0&&b.type==="value-word"&&b.value==="as"&&v.type==="value-operator"&&v.value==="*"||Pa(t,"utility")&&A.type==="value-word"&&v&&v.type==="value-operator"&&v.value==="*"||!v||A.type==="value-word"&&jo(v)&&zt(A)===Ht(v))continue;if(A.type==="value-string"&&A.quoted){let j=A.value.lastIndexOf("#{"),V=A.value.lastIndexOf("}");j!==-1&&V!==-1?x=j>V:j!==-1?x=!0:V!==-1&&(x=!1)}if(x||lc(A)||lc(v)||A.type==="value-atword"&&(A.value===""||A.value.endsWith("["))||v.type==="value-word"&&v.value.startsWith("]")||A.value==="~"||e.parser==="less"&&(v?.type==="value-word"&&v.value==="["||A.type==="value-word"&&A.value==="["&&(v?.type==="value-atword"||v?.type==="value-word")||A.type==="value-word"&&A.value==="]["&&v?.type==="value-word")||A.type!=="value-string"&&A.value&&A.value.includes("\\")&&v&&v.type!=="value-comment"||b?.value&&b.value.indexOf("\\")===b.value.length-1&&A.type==="value-operator"&&A.value==="/"||A.value==="\\"||X7(A,v)||dp(A)||My(A)||fp(v)||My(v)&&Bs(v)||fp(A)&&Bs(v)||A.value==="--"&&dp(v))continue;let S=pp(A),F=pp(v);if((S&&dp(v)||F&&fp(A))&&Bs(v)||!b&&en(A)||su(t,"calc")&&(Os(A)||Os(v)||tn(A)||tn(v))&&Bs(v))continue;let B=(Os(A)||tn(A))&&C===0&&(v.type==="value-number"||v.isHex)&&a&&e$(a)&&!Bs(v);if(e.parser==="scss"&&S&&A.value==="-"&&v.type==="value-func"&&zt(A)!==Ht(v)){D.push([D.pop()," "]);continue}let I=P?.type==="value-func"||P&&Ro(P)||A.type==="value-func"||Ro(A),R=v.type==="value-func"||Ro(v)||b?.type==="value-func"||b&&Ro(b);if(!(!(oc(v)||oc(A))&&!su(t,"calc")&&!B&&(en(v)&&!I||en(A)&&!R||Os(v)&&!I||Os(A)&&!R||tn(v)||tn(A))&&(Bs(v)||S&&(!b||b&&pp(b))))&&!((e.parser==="scss"||e.parser==="less")&&S&&A.value==="-"&&Uo(v)&&zt(A)===Ht(v.open)&&v.open.value==="(")){if($o(A)){if(i.type==="value-paren_group"){D.push(ja(xt),"");continue}D.push(xt,"");continue}if(m&&(W7(v)||J7(v)||q7(v)||H7(A)||V7(A))){D.push([D.pop()," "]);continue}if(c&&c.name.toLowerCase()==="namespace"){D.push([D.pop()," "]);continue}if(p){A.source&&v.source&&A.source.start.line!==v.source.start.line?(D.push(xt,""),E=!0):D.push([D.pop()," "]);continue}if(!(u&&(u==="font"||u.startsWith("--"))&&(en(v)&&Bs(v)&&$y(A)||en(A)&&Bs(A)&&$y(b)))){if(F){D.push([D.pop()," "]);continue}if(v?.value!=="..."&&!(jo(A)&&jo(v)&&zt(A)===Ht(v))){if(jo(A)&&Uo(v)&&zt(A)===Ht(v.open)){D.push(hr,"");continue}if(A.value==="with"&&Uo(v)){D=[[ru(D)," "]];continue}if(!(A.value?.endsWith("#")&&v.value==="{"&&Uo(v.group))&&!($o(v)&&!P)){if(!c&&A.type==="value-comment"&&!A.inline&&s.groups.slice(0,C).every(j=>j.type==="value-comment")){D.push(ja(Nt),"");continue}D.push(Nt,"")}}}}}return f&&D.push([D.pop(),cd]),E&&D.unshift("",xt),m?dr(tr(D)):$7(t)?dr(ru(D)):dr(tr(ru(D)))}function $y(t){if(t?.type==="value-number")return!0;if(t?.type!=="value-func")return!1;let e=t.value.toLowerCase();return e==="var"||e==="calc"||e==="min"||e==="max"||e==="clamp"||e.startsWith("--")}var s$=r$;function i$(t){return t.length===1?t:t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/u,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/u,"$1").replace(/^([+-])?\./u,"$10.").replace(/(\.\d+?)0+(?=e|$)/u,"$1").replace(/\.(?=e|$)/u,"")}var n$=i$,pc=new Map([["em","em"],["rem","rem"],["ex","ex"],["rex","rex"],["cap","cap"],["rcap","rcap"],["ch","ch"],["rch","rch"],["ic","ic"],["ric","ric"],["lh","lh"],["rlh","rlh"],["vw","vw"],["svw","svw"],["lvw","lvw"],["dvw","dvw"],["vh","vh"],["svh","svh"],["lvh","lvh"],["dvh","dvh"],["vi","vi"],["svi","svi"],["lvi","lvi"],["dvi","dvi"],["vb","vb"],["svb","svb"],["lvb","lvb"],["dvb","dvb"],["vmin","vmin"],["svmin","svmin"],["lvmin","lvmin"],["dvmin","dvmin"],["vmax","vmax"],["svmax","svmax"],["lvmax","lvmax"],["dvmax","dvmax"],["cm","cm"],["mm","mm"],["q","Q"],["in","in"],["pt","pt"],["pc","pc"],["px","px"],["deg","deg"],["grad","grad"],["rad","rad"],["turn","turn"],["s","s"],["ms","ms"],["hz","Hz"],["khz","kHz"],["dpi","dpi"],["dpcm","dpcm"],["dppx","dppx"],["x","x"],["cqw","cqw"],["cqh","cqh"],["cqi","cqi"],["cqb","cqb"],["cqmin","cqmin"],["cqmax","cqmax"],["fr","fr"]]);function X2(t){let e=t.toLowerCase();return pc.has(e)?pc.get(e):t}var G2=/(["'])(?:(?!\1)[^\\]|\\.)*\1/gsu,a$=/(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/giu,o$=/[a-z]+/giu,u$=/[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/giu,l$=new RegExp(G2.source+`|(${u$.source})?(${a$.source})(${o$.source})?`,"giu");function Nr(t,e){return pt(0,t,G2,r=>L2(r,e))}function p$(t,e){let r=e.singleQuote?"'":'"',s="",i=t.match(/^(?<value>.+?)\s+(?<flag>[a-zA-Z])$/u);return i&&({value:t,flag:s}=i.groups),(t.includes('"')||t.includes("'")?t:r+t+r)+(s?` ${s}`:"")}function Ki(t){return pt(0,t,l$,(e,r,s,i,a)=>!s&&i&&(a??(a=""),a=a.toLowerCase(),!a||a==="n"||pc.has(a))?Y2(i)+(a?X2(a):""):e)}function Y2(t){return n$(t).replace(/\.0(?=$|e)/u,"")}function c$(t){return t.trailingComma==="es5"||t.trailingComma==="all"}var Ry=t=>t===`
|
|
168
|
-
`||t==="\r"||t==="\u2028"||t==="\u2029";function h$(t,e,r){let s=!!r?.backwards;if(e===!1)return!1;let i=t.charAt(e);if(s){if(t.charAt(e-1)==="\r"&&i===`
|
|
169
|
-
`)return e-2;if(Ry(i))return e-1}else{if(i==="\r"&&t.charAt(e+1)===`
|
|
170
|
-
`)return e+2;if(Ry(i))return e+1}return e}var Q2=h$;function d$(t,e,r={}){let s=j2(t,r.backwards?e-1:e,r),i=Q2(t,s,r);return s!==i}var Z2=d$;function f$(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let r=e+2;r<t.length;++r)if(t.charAt(r)==="*"&&t.charAt(r+1)==="/")return r+2}return e}var m$=f$;function y$(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?U2(t,e):e}var g$=y$;function D$(t,e){let r=null,s=e;for(;s!==r;)r=s,s=l7(t,s),s=m$(t,s),s=j2(t,s);return s=g$(t,s),s=Q2(t,s),s!==!1&&Z2(t,s)}var eE=D$;function x$({node:t,parent:e},r){return!!(t.source&&r.originalText.slice(Ht(t),Ht(e.close)).trimEnd().endsWith(","))}function E$(t,e){return j7(t.grandparent)&&x$(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(r=>r.type==="value-comment"))&&c$(e)&&t.callParent(()=>K2(t,e))?N2(","):""}function A$(t,e,r){let{node:s,parent:i}=t,a=t.map(({node:y})=>typeof y=="string"?y:r(),"groups");if(i&&R7(i)&&(s.groups.length===1||s.groups.length>0&&s.groups[0].type==="value-comma_group"&&s.groups[0].groups.length>0&&s.groups[0].groups[0].type==="value-word"&&s.groups[0].groups[0].value.startsWith("data:")))return[s.open?r("open"):"",js(",",a),s.close?r("close"):""];if(!s.open){let y=tE(t),x=b$(js(",",a),2),E=js(y?xt:Nt,x);return tr(y?[xt,E]:dr([C$(t)?hr:"",ru(E)]))}let u=t.map(({node:y,isLast:x,index:E})=>{let C=a[E];md(y)&&y.type==="value-comma_group"&&y.groups&&y.groups[0].type!=="value-paren_group"&&y.groups[2]?.type==="value-paren_group"&&Sa(C)===Xu&&Sa(C.contents)===Ku&&Sa(C.contents.contents)===Gu&&(C=dr(ja(C)));let b=[C,x?E$(t,e):","];if(!x&&y.type==="value-comma_group"&&Qu(y.groups)){let A=Ti(0,y.groups,-1);!A.source&&A.close&&(A=A.close),A.source&&eE(e.originalText,zt(A))&&b.push(xt)}return b},"groups"),p=Q7(s,i),c=t$(s,i),m=K2(t,e),f=c||m&&!p,d=c||p,D=dr([s.open?r("open"):"",tr([hr,js(Nt,u)]),hr,s.close?r("close"):""],{shouldBreak:f});return d?ja(D):D}function tE(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(r=>r.type==="value-comma_group"),(e,r)=>r==="group"&&e.type==="value-value",(e,r)=>r==="group"&&e.type==="value-root",(e,r)=>r==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function C$(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,r)=>r==="group"&&e.type==="value-value",(e,r)=>r==="group"&&e.type==="value-root",(e,r)=>r==="value"&&e.type==="css-decl")}function b$(t,e){let r=[];for(let s=0;s<t.length;s+=e)r.push(t.slice(s,s+e));return r}function T$(t,e,r){let s=[];return t.each(()=>{let{node:i,previous:a}=t;if(a?.type==="css-comment"&&a.text.trim()==="prettier-ignore"?s.push(e.originalText.slice(Ht(i),zt(i))):s.push(r()),t.isLast)return;let{next:u}=t;u.type==="css-comment"&&!Z2(e.originalText,Ht(u),{backwards:!0})&&!ac(i)||u.type==="css-atrule"&&u.name==="else"&&i.type!=="css-comment"?s.push(" "):(s.push(e.__isHTMLStyleAttribute?Nt:xt),eE(e.originalText,zt(i))&&!ac(i)&&s.push(xt))},"nodes"),s}var na=T$;function v$(t,e,r){let{node:s}=t;switch(s.type){case"css-root":{let i=na(t,e,r),a=s.raws.after.trim();return a.startsWith(";")&&(a=a.slice(1).trim()),[s.frontMatter?[r("frontMatter"),xt,s.nodes.length>0?xt:""]:"",i,a?` ${a}`:"",s.nodes.length>0?xt:""]}case"css-comment":{let i=s.inline||s.raws.inline,a=e.originalText.slice(Ht(s),zt(s));return i?a.trimEnd():a}case"css-rule":return[r("selector"),s.important?" !important":"",s.nodes?[s.selector?.type==="selector-unknown"&&ia(s.selector.value)?Nt:s.selector?" ":"","{",s.nodes.length>0?tr([xt,na(t,e,r)]):"",xt,"}",U7(s)?";":""]:";"];case"css-decl":{let i=t.parent,{between:a}=s.raws,u=a.trim(),p=u===":",c=typeof s.value=="string"&&/^ *$/u.test(s.value),m=typeof s.value=="string"?s.value:r("value");return m=G7(s)?N5(m):m,!p&&ia(u)&&!t.call(()=>tE(t),"value","group","group")&&(m=tr([xt,ja(m)])),[pt(0,s.raws.before,/[\s;]/gu,""),i.type==="css-atrule"&&i.variable||M7(t)?s.prop:sa(s.prop),u.startsWith("//")?" ":"",u,s.extend||c?"":" ",e.parser==="less"&&s.extend&&s.selector?["extend(",r("selector"),")"]:"",m,s.raws.important?s.raws.important.replace(/\s*!\s*important/iu," !important"):s.important?" !important":"",s.raws.scssDefault?s.raws.scssDefault.replace(/\s*!default/iu," !default"):s.scssDefault?" !default":"",s.raws.scssGlobal?s.raws.scssGlobal.replace(/\s*!global/iu," !global"):s.scssGlobal?" !global":"",s.nodes?[" {",tr([hr,na(t,e,r)]),hr,"}"]:K7(s)&&!i.raws.semicolon&&e.originalText[zt(s)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?N2(";"):";"]}case"css-atrule":{let i=t.parent,a=cp(s)&&!i.raws.semicolon&&e.originalText[zt(s)-1]!==";";if(e.parser==="less"){if(s.mixin)return[r("selector"),s.important?" !important":"",a?"":";"];if(s.function)return[s.name,typeof s.params=="string"?s.params:r("params"),a?"":";"];if(s.variable)return["@",s.name,": ",s.value?r("value"):"",s.raws.between.trim()?s.raws.between.trim()+" ":"",s.nodes?["{",tr([s.nodes.length>0?hr:"",na(t,e,r)]),hr,"}"]:"",a?"":";"]}let u=s.name==="import"&&s.params?.type==="value-unknown"&&s.params.value.endsWith(";");return["@",Oy(s)||s.name.endsWith(":")||cp(s)?s.name:sa(s.name),s.params?[Oy(s)?"":cp(s)?s.raws.afterName===""?"":s.name.endsWith(":")?" ":/^\s*\n\s*\n/u.test(s.raws.afterName)?[xt,xt]:/^\s*\n/u.test(s.raws.afterName)?xt:" ":" ",typeof s.params=="string"?s.params:r("params")]:"",s.selector?tr([" ",r("selector")]):"",s.value?dr([" ",r("value"),uc(s,e)?Y7(s)?" ":Nt:""]):s.name==="else"?" ":"",s.nodes?[uc(s,e)?"":s.selector&&!s.selector.nodes&&typeof s.selector.value=="string"&&ia(s.selector.value)||!s.selector&&typeof s.params=="string"&&ia(s.params)?Nt:" ","{",tr([s.nodes.length>0?hr:"",na(t,e,r)]),hr,"}"]:a||u?"":";"]}case"media-query-list":{let i=[];return t.each(({node:a})=>{a.type==="media-query"&&a.value===""||i.push(r())},"nodes"),dr(tr(js(Nt,i)))}case"media-query":return[js(" ",t.map(r,"nodes")),t.isLast?"":","];case"media-type":return Ki(Nr(s.value,e));case"media-feature-expression":return s.nodes?["(",...t.map(r,"nodes"),")"]:s.value;case"media-feature":return sa(Nr(pt(0,s.value,/ +/gu," "),e));case"media-colon":return[s.value," "];case"media-value":return Ki(Nr(s.value,e));case"media-keyword":return Nr(s.value,e);case"media-url":return Nr(pt(0,pt(0,s.value,/^url\(\s+/giu,"url("),/\s+\)$/gu,")"),e);case"media-unknown":return s.value;case"selector-root":return dr([Pa(t,"custom-selector")?[t.findAncestor(i=>i.type==="css-atrule").customSelector,Nt]:"",js([",",Pa(t,["extend","custom-selector","nest"])?Nt:xt],t.map(r,"nodes"))]);case"selector-selector":{let i=s.nodes.length>2;return dr((i?tr:a=>a)(t.map(r,"nodes")))}case"selector-comment":return s.value;case"selector-string":return Nr(s.value,e);case"selector-tag":return[s.namespace?[s.namespace===!0?"":s.namespace.trim(),"|"]:"",t.previous?.type==="selector-nesting"?s.value:Ki(O7(t,s.value)?s.value.toLowerCase():s.value)];case"selector-id":return["#",s.value];case"selector-class":return[".",Ki(Nr(s.value,e))];case"selector-attribute":return["[",s.namespace?[s.namespace===!0?"":s.namespace.trim(),"|"]:"",s.attribute.trim(),s.operator??"",s.value?p$(Nr(s.value.trim(),e),e):"",s.insensitive?" i":"","]"];case"selector-combinator":{if(s.value==="+"||s.value===">"||s.value==="~"||s.value===">>>"){let u=t.parent;return[u.type==="selector-selector"&&u.nodes[0]===s?"":Nt,s.value,t.isLast?"":" "]}let i=s.value.trim().startsWith("(")?Nt:"",a=Ki(Nr(s.value.trim(),e))||Nt;return[i,a]}case"selector-universal":return[s.namespace?[s.namespace===!0?"":s.namespace.trim(),"|"]:"",s.value];case"selector-pseudo":return[sa(s.value),Qu(s.nodes)?dr(["(",tr([hr,js([",",Nt],t.map(r,"nodes"))]),hr,")"]):""];case"selector-nesting":return s.value;case"selector-unknown":{if(t.findAncestor(u=>u.type==="css-rule")?.isSCSSNesterProperty)return Ki(Nr(sa(s.value),e));let i=t.parent;if(i.raws?.selector){let u=Ht(i),p=u+i.raws.selector.length;return e.originalText.slice(u,p).trim()}let a=t.grandparent;if(i.type==="value-paren_group"&&a?.type==="value-func"&&a.value==="selector"){let u=zt(i.open)+1,p=Ht(i.close),c=e.originalText.slice(u,p).trim();return ia(c)?[cd,c]:c}return s.value}case"value-value":case"value-root":return r("group");case"value-comment":return e.originalText.slice(Ht(s),zt(s));case"value-comma_group":return s$(t,e,r);case"value-paren_group":return A$(t,e,r);case"value-func":return[s.value,Pa(t,"supports")&&Z7(s)?" ":"",r("group")];case"value-paren":return s.value;case"value-number":return[Y2(s.value),X2(s.unit)];case"value-operator":return s.value;case"value-word":return s.isColor&&s.isHex||L7(s.value)?s.value.toLowerCase():s.value;case"value-colon":{let{previous:i}=t;return dr([s.value,typeof i?.value=="string"&&i.value.endsWith("\\")||su(t,"url")?"":Nt])}case"value-string":return L2(s.raws.quote+s.value+s.raws.quote,e);case"value-atword":return["@",s.value];case"value-unicode-range":return s.value;case"value-unknown":return s.value;default:throw new J5(s,"PostCSS")}}var S$={features:{experimental_frontMatterSupport:{massageAstNode:!0,embed:!0,print:!0}},print:v$,embed:e7,insertPragma:I7,massageAstNode:Z5,getVisitorKeys:o7},w$=S$,rE=[{name:"CSS",type:"markup",aceMode:"css",extensions:[".css",".wxss"],tmScope:"source.css",codemirrorMode:"css",codemirrorMimeType:"text/css",parsers:["css"],vscodeLanguageIds:["css"],linguistLanguageId:50},{name:"PostCSS",type:"markup",aceMode:"text",extensions:[".pcss",".postcss"],tmScope:"source.postcss",group:"CSS",parsers:["css"],vscodeLanguageIds:["postcss"],linguistLanguageId:262764437},{name:"Less",type:"markup",aceMode:"less",extensions:[".less"],tmScope:"source.css.less",aliases:["less-css"],codemirrorMode:"css",codemirrorMimeType:"text/x-less",parsers:["less"],vscodeLanguageIds:["less"],linguistLanguageId:198},{name:"SCSS",type:"markup",aceMode:"scss",extensions:[".scss"],tmScope:"source.css.scss",codemirrorMode:"css",codemirrorMimeType:"text/x-scss",parsers:["scss"],vscodeLanguageIds:["scss"],linguistLanguageId:329}],P$={singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."}},F$={singleQuote:P$.singleQuote},sE=F$,yd={};a2(yd,{css:()=>oR,less:()=>uR,scss:()=>lR});var k$=_n(Ju()),I$=_n(kM()),N$=_n(MM());function B$(t,e){let r=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(r,e)}var _$=B$;function L$(t){return t!==null&&typeof t=="object"}var el=L$,O$=_n(RM());function co(t,e,r){if(el(t)){delete t.parent;for(let s in t)co(t[s],e,r),s==="type"&&typeof t[s]=="string"&&!t[s].startsWith(e)&&(!r||!r.test(t[s]))&&(t[s]=e+t[s])}return t}function iE(t){if(el(t)){delete t.parent;for(let e in t)iE(t[e]);!Array.isArray(t)&&t.value&&!t.type&&(t.type="unknown")}return t}var M$=O$.default.default;function $$(t){let e;try{e=M$(t)}catch{return{type:"selector-unknown",value:t}}return co(iE(e),"media-")}var R$=$$,j$=_n(t5());function U$(t){if(/\/[/*]/u.test(pt(0,t,/"[^"]+"|'[^']+'/gu,"")))return{type:"selector-unknown",value:t.trim()};let e;try{new j$.default(r=>{e=r}).process(t)}catch{return{type:"selector-unknown",value:t}}return co(e,"selector-")}var ci=U$,V$=_n(D5()),q$=t=>{for(;t.parent;)t=t.parent;return t},nE=q$;function H$(t){return nE(t).text.slice(t.group.open.sourceIndex+1,t.group.close.sourceIndex).trim()}var z$=H$;function W$(t){if(Qu(t)){for(let e=t.length-1;e>0;e--)if(t[e].type==="word"&&t[e].value==="{"&&t[e-1].type==="word"&&t[e-1].value.endsWith("#"))return!0}return!1}var J$=W$;function K$(t){return t.some(e=>e.type==="string"||e.type==="func"&&!e.value.endsWith("\\"))}var X$=K$;function G$(t,e){return!!(e.parser==="scss"&&t?.type==="word"&&t.value.startsWith("$"))}var Y$=G$,jy=t=>t.type==="paren"&&t.value===")";function Q$(t,e){let{nodes:r}=t,s={open:null,close:null,groups:[],type:"paren_group"},i=[s],a=s,u={groups:[],type:"comma_group"},p=[u];for(let c=0;c<r.length;++c){let m=r[c];if(e.parser==="scss"&&m.type==="number"&&m.unit===".."&&m.value.endsWith(".")&&(m.value=m.value.slice(0,-1),m.unit="..."),m.type==="func"&&m.value==="selector"&&(m.group.groups=[ci(nE(t).text.slice(m.group.open.sourceIndex+1,m.group.close.sourceIndex))]),m.type==="func"&&m.value==="url"){let f=m.group?.groups??[],d=[];for(let D=0;D<f.length;D++){let y=f[D];y.type==="comma_group"?d=[...d,...y.groups]:d.push(y)}(J$(d)||!X$(d)&&!Y$(d[0],e))&&(m.group.groups=[z$(m)])}if(m.type==="paren"&&m.value==="(")s={open:m,close:null,groups:[],type:"paren_group"},i.push(s),u={groups:[],type:"comma_group"},p.push(u);else if(jy(m)){if(u.groups.length>0&&s.groups.push(u),s.close=m,p.length===1)throw new Error("Unbalanced parenthesis");p.pop(),u=Ti(0,p,-1),u.groups.push(s),i.pop(),s=Ti(0,i,-1)}else if(m.type==="comma"){if(c===r.length-3&&r[c+1].type==="comment"&&jy(r[c+2]))continue;s.groups.push(u),u={groups:[],type:"comma_group"},p[p.length-1]=u}else u.groups.push(m)}return u.groups.length>0&&s.groups.push(u),a}function cc(t){return t.type==="paren_group"&&!t.open&&!t.close&&t.groups.length===1||t.type==="comma_group"&&t.groups.length===1?cc(t.groups[0]):t.type==="paren_group"||t.type==="comma_group"?{...t,groups:t.groups.map(cc)}:t}function aE(t,e){if(el(t))for(let r in t)r!=="parent"&&(aE(t[r],e),r==="nodes"&&(t.group=cc(Q$(t,e)),delete t[r]));return t}function Z$(t,e){if(e.parser==="less"&&t.startsWith("~`"))return{type:"value-unknown",value:t};let r=null;try{r=new V$.default(t,{loose:!0}).parse()}catch{return{type:"value-unknown",value:t}}r.text=t;let s=aE(r,e);return co(s,"value-",/^selector-/u)}var li=Z$,eR=new Set(["import","use","forward"]);function tR(t){return eR.has(t)}var rR=tR;function sR(t,e){return e.parser!=="scss"||!t.selector?!1:t.selector.replace(/\/\*.*?\*\//u,"").replace(/\/\/.*\n/u,"").trim().endsWith(":")}var iR=sR,nR=/(\s*)(!default).*$/u,aR=/(\s*)(!global).*$/u;function oE(t,e){if(el(t)){delete t.parent;for(let a in t)oE(t[a],e);if(!t.type)return t;if(t.raws??(t.raws={}),t.type==="css-decl"&&typeof t.prop=="string"&&t.prop.startsWith("--")&&typeof t.value=="string"&&t.value.startsWith("{")){let a;if(t.value.trimEnd().endsWith("}")){let u=e.originalText.slice(0,t.source.start.offset),p="a".repeat(t.prop.length)+e.originalText.slice(t.source.start.offset+t.prop.length,t.source.end.offset),c=pt(0,u,/[^\n]/gu," ")+p,m;e.parser==="scss"?m=pE:e.parser==="less"?m=lE:m=uE;let f;try{f=m(c,{...e})}catch{}f?.nodes?.length===1&&f.nodes[0].type==="css-rule"&&(a=f.nodes[0].nodes)}return a?t.value={type:"css-rule",nodes:a}:t.value={type:"value-unknown",value:t.raws.value.raw},t}let r="";typeof t.selector=="string"&&(r=t.raws.selector?t.raws.selector.scss??t.raws.selector.raw:t.selector,t.raws.between&&t.raws.between.trim().length>0&&(r+=t.raws.between),t.raws.selector=r);let s="";typeof t.value=="string"&&(s=t.raws.value?t.raws.value.scss??t.raws.value.raw:t.value,t.raws.value=s.trim());let i="";if(typeof t.params=="string"&&(i=t.raws.params?t.raws.params.scss??t.raws.params.raw:t.params,t.raws.afterName&&t.raws.afterName.trim().length>0&&(i=t.raws.afterName+i),t.raws.between&&t.raws.between.trim().length>0&&(i=i+t.raws.between),i=i.trim(),t.raws.params=i),r.trim().length>0)return r.startsWith("@")&&r.endsWith(":")?t:t.mixin?(t.selector=li(r,e),t):(iR(t,e)&&(t.isSCSSNesterProperty=!0),t.selector=ci(r),t);if(s.trim().length>0){let a=s.match(nR);a&&(s=s.slice(0,a.index),t.scssDefault=!0,a[0].trim()!=="!default"&&(t.raws.scssDefault=a[0]));let u=s.match(aR);if(u&&(s=s.slice(0,u.index),t.scssGlobal=!0,u[0].trim()!=="!global"&&(t.raws.scssGlobal=u[0])),s.startsWith("progid:"))return{type:"value-unknown",value:s};t.value=li(s,e)}if(e.parser==="less"&&t.type==="css-decl"&&s.startsWith("extend(")&&(t.extend||(t.extend=t.raws.between===":"),t.extend&&!t.selector&&(delete t.value,t.selector=ci(s.slice(7,-1)))),t.type==="css-atrule"){if(e.parser==="less"){if(t.mixin){let a=t.raws.identifier+t.name+t.raws.afterName+t.raws.params;return t.selector=ci(a),delete t.params,t}if(t.function)return t}if(e.parser==="css"&&t.name==="custom-selector"){let a=t.params.match(/:--\S+\s+/u)[0].trim();return t.customSelector=a,t.selector=ci(t.params.slice(a.length).trim()),delete t.params,t}if(e.parser==="less"){if(t.name.includes(":")){t.variable=!0;let a=t.name.split(":");t.name=a[0];let u=a.slice(1).join(":");t.params&&(u+=t.params),t.value=li(u,e)}if(!["page","nest","keyframes"].includes(t.name)&&t.params?.[0]===":"){t.variable=!0;let a=t.params.slice(1);a&&(t.value=li(a,e)),t.raws.afterName+=":"}if(t.variable)return delete t.params,t.value||delete t.value,t}}if(t.type==="css-atrule"&&i.length>0){let{name:a}=t,u=t.name.toLowerCase();return a==="warn"||a==="error"?(t.params={type:"media-unknown",value:i},t):a==="extend"||a==="nest"?(t.selector=ci(i),delete t.params,t):a==="at-root"?(/^\(\s*(?:without|with)\s*:.+\)$/su.test(i)?t.params=li(i,e):(t.selector=ci(i),delete t.params),t):rR(u)?(t.import=!0,delete t.filename,t.params=li(i,e),t):["namespace","supports","if","else","for","each","while","debug","mixin","include","function","return","define-mixin","add-mixin"].includes(a)?(i=i.replace(/(\$\S+?)(\s+)?\.{3}/u,"$1...$2"),i=i.replace(/^(?!if)([^"'\s(]+)(\s+)\(/u,"$1($2"),t.value=li(i,e),delete t.params,t):["media","custom-media"].includes(u)?i.includes("#{")?{type:"media-unknown",value:i}:(t.params=R$(i),t):(t.params=i,t)}}return t}function gd(t,e,r){let{frontMatter:s,content:i}=Zu(e),a;try{a=t(i,{map:!1})}catch(u){let{name:p,reason:c,line:m,column:f}=u;throw typeof m!="number"?u:_$(`${p}: ${c}`,{loc:{start:{line:m,column:f}},cause:u})}return r.originalText=e,a=oE(co(a,"css-"),r),H2(a,e),s&&(a.frontMatter={...s,type:"front-matter",source:{startOffset:s.start.index,endOffset:s.end.index}}),a}function uE(t,e={}){return gd(k$.default.default,t,e)}function lE(t,e={}){return gd(r=>I$.default.parse(c7(r)),t,e)}function pE(t,e={}){return gd(N$.default,t,e)}var Dd={astFormat:"postcss",hasPragma:F7,hasIgnorePragma:k7,locStart:Ht,locEnd:zt},oR={...Dd,parse:uE},uR={...Dd,parse:lE},lR={...Dd,parse:pE},cE={postcss:w$};const Vo=Object.freeze(Object.defineProperty({__proto__:null,default:C2,languages:rE,options:sE,parsers:yd,printers:cE},Symbol.toStringTag,{value:"Module"}));var mp={exports:{}},Uy;function pR(){return Uy||(Uy=1,(function(t,e){(function(r){function s(){var i=r();return i.default||i}t.exports=s()})(function(){var r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,u=(o,n)=>{for(var l in n)r(o,l,{get:n[l],enumerable:!0})},p=(o,n,l,h)=>{if(n&&typeof n=="object"||typeof n=="function")for(let g of i(n))!a.call(o,g)&&g!==l&&r(o,g,{get:()=>n[g],enumerable:!(h=s(n,g))||h.enumerable});return o},c=o=>p(r({},"__esModule",{value:!0}),o),m={};u(m,{parsers:()=>rb});var f={};u(f,{__babel_estree:()=>XC,__js_expression:()=>Ef,__ts_expression:()=>Af,__vue_event_binding:()=>Df,__vue_expression:()=>Ef,__vue_ts_event_binding:()=>xf,__vue_ts_expression:()=>Af,babel:()=>Df,"babel-flow":()=>Cf,"babel-ts":()=>xf});function d(o,n){if(o==null)return{};var l={};for(var h in o)if({}.hasOwnProperty.call(o,h)){if(n.indexOf(h)!==-1)continue;l[h]=o[h]}return l}var D=class{line;column;index;constructor(o,n,l){this.line=o,this.column=n,this.index=l}},y=class{start;end;filename;identifierName;constructor(o,n){this.start=o,this.end=n}};function x(o,n){let{line:l,column:h,index:g}=o;return new D(l,h+n,g+n)}var E="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",C={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:E},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:E}},b={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},A=o=>o.type==="UpdateExpression"?b.UpdateExpression[`${o.prefix}`]:b[o.type],v={AccessorIsGenerator:({kind:o})=>`A ${o}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:o})=>`Missing initializer in ${o} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:o})=>`\`${o}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:o,exportName:n})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
171
|
-
- Did you mean \`export { '${o}' as '${n}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:o})=>`'${o==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:o})=>`Unsyntactic ${o==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:o})=>`A string literal cannot be used as an imported binding.
|
|
172
|
-
- Did you mean \`import { "${o}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:o})=>`Expected number in radix ${o}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:o})=>`Escape sequence in keyword ${o}.`,InvalidIdentifier:({identifierName:o})=>`Invalid identifier ${o}.`,InvalidLhs:({ancestor:o})=>`Invalid left-hand side in ${A(o)}.`,InvalidLhsBinding:({ancestor:o})=>`Binding invalid left-hand side in ${A(o)}.`,InvalidLhsOptionalChaining:({ancestor:o})=>`Invalid optional chaining in the left-hand side of ${A(o)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:o})=>`Unexpected character '${o}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:o})=>`Private name #${o} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:o})=>`Label '${o}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:o})=>`This experimental syntax requires enabling the parser plugin: ${o.map(n=>JSON.stringify(n)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:o})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${o.map(n=>JSON.stringify(n)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:o})=>`Duplicate key "${o}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:o})=>`An export name cannot include a lone surrogate, found '\\u${o.toString(16)}'.`,ModuleExportUndefined:({localName:o})=>`Export '${o}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:o})=>`Private names are only allowed in property accesses (\`obj.#${o}\`) or in \`in\` expressions (\`#${o} in obj\`).`,PrivateNameRedeclaration:({identifierName:o})=>`Duplicate private name #${o}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:o})=>`Unexpected keyword '${o}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:o})=>`Unexpected reserved word '${o}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:o,unexpected:n})=>`Unexpected token${n?` '${n}'.`:""}${o?`, expected "${o}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:o,onlyValidPropertyName:n})=>`The only valid meta property for ${o} is ${o}.${n}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:o})=>`Identifier '${o}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},P={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:o})=>`Assigning to '${o}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:o})=>`Binding '${o}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},S={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:o})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(o)}\`.`},F=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),B=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic references are only supported when using the `"proposal": "hack"` version of the pipeline proposal.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:o})=>`Invalid topic token ${o}. In order to use ${o} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${o}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:o})=>`Hack-style pipe body cannot be an unparenthesized ${A({type:o})}; please wrap it in parentheses.`},{}),I=["message"];function R(o,n,l){Object.defineProperty(o,n,{enumerable:!1,configurable:!0,value:l})}function j({toMessage:o,code:n,reasonCode:l,syntaxPlugin:h}){let g=l==="MissingPlugin"||l==="MissingOneOfPlugins";return function T(w,k){let O=new SyntaxError;return O.code=n,O.reasonCode=l,O.loc=w,O.pos=w.index,O.syntaxPlugin=h,g&&(O.missingPlugin=k.missingPlugin),R(O,"clone",function(_={}){let{line:Q,column:ie,index:ve}=_.loc??w;return T(new D(Q,ie,ve),Object.assign({},k,_.details))}),R(O,"details",k),Object.defineProperty(O,"message",{configurable:!0,get(){let _=`${o(k)} (${w.line}:${w.column})`;return this.message=_,_},set(_){Object.defineProperty(this,"message",{value:_,writable:!0})}}),O}}function V(o,n){if(Array.isArray(o))return h=>V(h,o[0]);let l={};for(let h of Object.keys(o)){let g=o[h],T=typeof g=="string"?{message:()=>g}:typeof g=="function"?{message:g}:g,{message:w}=T,k=d(T,I),O=typeof w=="string"?()=>w:w;l[h]=j(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:h,toMessage:O},n?{syntaxPlugin:n}:{},k))}return l}var N=Object.assign({},V(C),V(v),V(P),V(S),V`pipelineOperator`(B));function q(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!0,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function te(o){let n=q();if(o==null)return n;if(o.annexB!=null&&o.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let l of Object.keys(n))o[l]!=null&&(n[l]=o[l]);if(n.startLine===1)o.startIndex==null&&n.startColumn>0?n.startIndex=n.startColumn:o.startColumn==null&&n.startIndex>0&&(n.startColumn=n.startIndex);else if(o.startColumn==null||o.startIndex==null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(n.sourceType==="commonjs"){if(o.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(o.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(o.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return n}var{defineProperty:W}=Object,Y=(o,n)=>{o&&W(o,n,{enumerable:!1,value:o[n]})};function ge(o){return Y(o.loc.start,"index"),Y(o.loc.end,"index"),o}var Ae=o=>class extends o{parse(){let n=ge(super.parse());return this.optionFlags&256&&(n.tokens=n.tokens.map(ge)),n}parseRegExpLiteral({pattern:n,flags:l}){let h=null;try{h=new RegExp(n,l)}catch{}let g=this.estreeParseLiteral(h);return g.regex={pattern:n,flags:l},g}parseBigIntLiteral(n){let l;try{l=BigInt(n)}catch{l=null}let h=this.estreeParseLiteral(l);return h.bigint=String(h.value||n),h}parseDecimalLiteral(n){let l=this.estreeParseLiteral(null);return l.decimal=String(l.value||n),l}estreeParseLiteral(n){return this.parseLiteral(n,"Literal")}parseStringLiteral(n){return this.estreeParseLiteral(n)}parseNumericLiteral(n){return this.estreeParseLiteral(n)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(n){return this.estreeParseLiteral(n)}estreeParseChainExpression(n,l){let h=this.startNodeAtNode(n);return h.expression=n,this.finishNodeAt(h,"ChainExpression",l)}directiveToStmt(n){let l=n.value;delete n.value,this.castNodeTo(l,"Literal"),l.raw=l.extra.raw,l.value=l.extra.expressionValue;let h=this.castNodeTo(n,"ExpressionStatement");return h.expression=l,h.directive=l.extra.rawValue,delete l.extra,h}fillOptionalPropertiesForTSESLint(n){}cloneEstreeStringLiteral(n){let{start:l,end:h,loc:g,range:T,raw:w,value:k}=n,O=Object.create(n.constructor.prototype);return O.type="Literal",O.start=l,O.end=h,O.loc=g,O.range=T,O.raw=w,O.value=k,O}initFunction(n,l){super.initFunction(n,l),n.expression=!1}checkDeclaration(n){n!=null&&this.isObjectProperty(n)?this.checkDeclaration(n.value):super.checkDeclaration(n)}getObjectOrClassMethodParams(n){return n.value.params}isValidDirective(n){return n.type==="ExpressionStatement"&&n.expression.type==="Literal"&&typeof n.expression.value=="string"&&!n.expression.extra?.parenthesized}parseBlockBody(n,l,h,g,T){super.parseBlockBody(n,l,h,g,T);let w=n.directives.map(k=>this.directiveToStmt(k));n.body=w.concat(n.body),delete n.directives}parsePrivateName(){let n=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(n)}convertPrivateNameToPrivateIdentifier(n){let l=super.getPrivateNameSV(n);return delete n.id,n.name=l,this.castNodeTo(n,"PrivateIdentifier")}isPrivateName(n){return n.type==="PrivateIdentifier"}getPrivateNameSV(n){return n.name}parseLiteral(n,l){let h=super.parseLiteral(n,l);return h.raw=h.extra.raw,delete h.extra,h}parseFunctionBody(n,l,h=!1){super.parseFunctionBody(n,l,h),n.expression=n.body.type!=="BlockStatement"}parseMethod(n,l,h,g,T,w,k=!1){let O=this.startNode();O.kind=n.kind,O=super.parseMethod(O,l,h,g,T,w,k),delete O.kind;let{typeParameters:_}=n;_&&(delete n.typeParameters,O.typeParameters=_,this.resetStartLocationFromNode(O,_));let Q=this.castNodeTo(O,this.hasPlugin("typescript")&&!O.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return n.value=Q,w==="ClassPrivateMethod"&&(n.computed=!1),this.hasPlugin("typescript")&&n.abstract?(delete n.abstract,this.finishNode(n,"TSAbstractMethodDefinition")):w==="ObjectMethod"?(n.kind==="method"&&(n.kind="init"),n.shorthand=!1,this.finishNode(n,"Property")):this.finishNode(n,"MethodDefinition")}nameIsConstructor(n){return n.type==="Literal"?n.value==="constructor":super.nameIsConstructor(n)}parseClassProperty(...n){let l=super.parseClassProperty(...n);return l.abstract&&this.hasPlugin("typescript")?(delete l.abstract,this.castNodeTo(l,"TSAbstractPropertyDefinition")):this.castNodeTo(l,"PropertyDefinition"),l}parseClassPrivateProperty(...n){let l=super.parseClassPrivateProperty(...n);return l.abstract&&this.hasPlugin("typescript")?this.castNodeTo(l,"TSAbstractPropertyDefinition"):this.castNodeTo(l,"PropertyDefinition"),l.computed=!1,l}parseClassAccessorProperty(n){let l=super.parseClassAccessorProperty(n);return l.abstract&&this.hasPlugin("typescript")?(delete l.abstract,this.castNodeTo(l,"TSAbstractAccessorProperty")):this.castNodeTo(l,"AccessorProperty"),l}parseObjectProperty(n,l,h,g){let T=super.parseObjectProperty(n,l,h,g);return T&&(T.kind="init",this.castNodeTo(T,"Property")),T}finishObjectProperty(n){return n.kind="init",this.finishNode(n,"Property")}isValidLVal(n,l,h,g){return n==="Property"?"value":super.isValidLVal(n,l,h,g)}isAssignable(n,l){return n!=null&&this.isObjectProperty(n)?this.isAssignable(n.value,l):super.isAssignable(n,l)}toAssignable(n,l=!1){if(n!=null&&this.isObjectProperty(n)){let{key:h,value:g}=n;this.isPrivateName(h)&&this.classScope.usePrivateName(this.getPrivateNameSV(h),h.loc.start),this.toAssignable(g,l)}else super.toAssignable(n,l)}toAssignableObjectExpressionProp(n,l,h){n.type==="Property"&&(n.kind==="get"||n.kind==="set")?this.raise(N.PatternHasAccessor,n.key):n.type==="Property"&&n.method?this.raise(N.PatternHasMethod,n.key):super.toAssignableObjectExpressionProp(n,l,h)}finishCallExpression(n,l){let h=super.finishCallExpression(n,l);return h.callee.type==="Import"?(this.castNodeTo(h,"ImportExpression"),h.source=h.arguments[0],h.options=h.arguments[1]??null,delete h.arguments,delete h.callee):h.type==="OptionalCallExpression"?this.castNodeTo(h,"CallExpression"):h.optional=!1,h}toReferencedArguments(n){n.type!=="ImportExpression"&&super.toReferencedArguments(n)}parseExport(n,l){let h=this.state.lastTokStartLoc,g=super.parseExport(n,l);switch(g.type){case"ExportAllDeclaration":g.exported=null;break;case"ExportNamedDeclaration":g.specifiers.length===1&&g.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(g,"ExportAllDeclaration"),g.exported=g.specifiers[0].exported,delete g.specifiers);case"ExportDefaultDeclaration":{let{declaration:T}=g;T?.type==="ClassDeclaration"&&T.decorators?.length>0&&T.start===g.start&&this.resetStartLocation(g,h)}break}return g}stopParseSubscript(n,l){let h=super.stopParseSubscript(n,l);return l.optionalChainMember?this.estreeParseChainExpression(h,n.loc.end):h}parseMember(n,l,h,g,T){let w=super.parseMember(n,l,h,g,T);return w.type==="OptionalMemberExpression"?this.castNodeTo(w,"MemberExpression"):w.optional=!1,w}isOptionalMemberExpression(n){return n.type==="ChainExpression"?n.expression.type==="MemberExpression":super.isOptionalMemberExpression(n)}hasPropertyAsPrivateName(n){return n.type==="ChainExpression"&&(n=n.expression),super.hasPropertyAsPrivateName(n)}isObjectProperty(n){return n.type==="Property"&&n.kind==="init"&&!n.method}isObjectMethod(n){return n.type==="Property"&&(n.method||n.kind==="get"||n.kind==="set")}castNodeTo(n,l){let h=super.castNodeTo(n,l);return this.fillOptionalPropertiesForTSESLint(h),h}cloneIdentifier(n){let l=super.cloneIdentifier(n);return this.fillOptionalPropertiesForTSESLint(l),l}cloneStringLiteral(n){return n.type==="Literal"?this.cloneEstreeStringLiteral(n):super.cloneStringLiteral(n)}finishNodeAt(n,l,h){return ge(super.finishNodeAt(n,l,h))}finishNode(n,l){let h=super.finishNode(n,l);return this.fillOptionalPropertiesForTSESLint(h),h}resetStartLocation(n,l){super.resetStartLocation(n,l),ge(n)}resetEndLocation(n,l=this.state.lastTokEndLoc){super.resetEndLocation(n,l),ge(n)}},Ie=class{constructor(o,n){this.token=o,this.preserveSpace=!!n}token;preserveSpace},he={brace:new Ie("{"),j_oTag:new Ie("<tag"),j_cTag:new Ie("</tag"),j_expr:new Ie("<tag>...</tag>",!0)},G=!0,X=!0,le=!0,we=!0,Qe=!0,gt=!0,se=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(o,n={}){this.label=o,this.keyword=n.keyword,this.beforeExpr=!!n.beforeExpr,this.startsExpr=!!n.startsExpr,this.rightAssociative=!!n.rightAssociative,this.isLoop=!!n.isLoop,this.isAssign=!!n.isAssign,this.prefix=!!n.prefix,this.postfix=!!n.postfix,this.binop=n.binop!=null?n.binop:null}},K=new Map;function H(o,n={}){n.keyword=o;let l=xe(o,n);return K.set(o,l),l}function De(o,n){return xe(o,{beforeExpr:G,binop:n})}var Pe=-1,je=[],Ct=[],pr=[],cr=[],vs=[],Mi=[];function xe(o,n={}){return++Pe,Ct.push(o),pr.push(n.binop??-1),cr.push(n.beforeExpr??!1),vs.push(n.startsExpr??!1),Mi.push(n.prefix??!1),je.push(new se(o,n)),Pe}function ke(o,n={}){return++Pe,K.set(o,Pe),Ct.push(o),pr.push(n.binop??-1),cr.push(n.beforeExpr??!1),vs.push(n.startsExpr??!1),Mi.push(n.prefix??!1),je.push(new se("name",n)),Pe}var ri={bracketL:xe("[",{beforeExpr:G,startsExpr:X}),bracketHashL:xe("#[",{beforeExpr:G,startsExpr:X}),bracketBarL:xe("[|",{beforeExpr:G,startsExpr:X}),bracketR:xe("]"),bracketBarR:xe("|]"),braceL:xe("{",{beforeExpr:G,startsExpr:X}),braceBarL:xe("{|",{beforeExpr:G,startsExpr:X}),braceHashL:xe("#{",{beforeExpr:G,startsExpr:X}),braceR:xe("}"),braceBarR:xe("|}"),parenL:xe("(",{beforeExpr:G,startsExpr:X}),parenR:xe(")"),comma:xe(",",{beforeExpr:G}),semi:xe(";",{beforeExpr:G}),colon:xe(":",{beforeExpr:G}),doubleColon:xe("::",{beforeExpr:G}),dot:xe("."),question:xe("?",{beforeExpr:G}),questionDot:xe("?."),arrow:xe("=>",{beforeExpr:G}),template:xe("template"),ellipsis:xe("...",{beforeExpr:G}),backQuote:xe("`",{startsExpr:X}),dollarBraceL:xe("${",{beforeExpr:G,startsExpr:X}),templateTail:xe("...`",{startsExpr:X}),templateNonTail:xe("...${",{beforeExpr:G,startsExpr:X}),at:xe("@"),hash:xe("#",{startsExpr:X}),interpreterDirective:xe("#!..."),eq:xe("=",{beforeExpr:G,isAssign:we}),assign:xe("_=",{beforeExpr:G,isAssign:we}),slashAssign:xe("_=",{beforeExpr:G,isAssign:we}),xorAssign:xe("_=",{beforeExpr:G,isAssign:we}),moduloAssign:xe("_=",{beforeExpr:G,isAssign:we}),incDec:xe("++/--",{prefix:Qe,postfix:gt,startsExpr:X}),bang:xe("!",{beforeExpr:G,prefix:Qe,startsExpr:X}),tilde:xe("~",{beforeExpr:G,prefix:Qe,startsExpr:X}),doubleCaret:xe("^^",{startsExpr:X}),doubleAt:xe("@@",{startsExpr:X}),pipeline:De("|>",0),nullishCoalescing:De("??",1),logicalOR:De("||",1),logicalAND:De("&&",2),bitwiseOR:De("|",3),bitwiseXOR:De("^",4),bitwiseAND:De("&",5),equality:De("==/!=/===/!==",6),lt:De("</>/<=/>=",7),gt:De("</>/<=/>=",7),relational:De("</>/<=/>=",7),bitShift:De("<</>>/>>>",8),bitShiftL:De("<</>>/>>>",8),bitShiftR:De("<</>>/>>>",8),plusMin:xe("+/-",{beforeExpr:G,binop:9,prefix:Qe,startsExpr:X}),modulo:xe("%",{binop:10,startsExpr:X}),star:xe("*",{binop:10}),slash:De("/",10),exponent:xe("**",{beforeExpr:G,binop:11,rightAssociative:!0}),_in:H("in",{beforeExpr:G,binop:7}),_instanceof:H("instanceof",{beforeExpr:G,binop:7}),_break:H("break"),_case:H("case",{beforeExpr:G}),_catch:H("catch"),_continue:H("continue"),_debugger:H("debugger"),_default:H("default",{beforeExpr:G}),_else:H("else",{beforeExpr:G}),_finally:H("finally"),_function:H("function",{startsExpr:X}),_if:H("if"),_return:H("return",{beforeExpr:G}),_switch:H("switch"),_throw:H("throw",{beforeExpr:G,prefix:Qe,startsExpr:X}),_try:H("try"),_var:H("var"),_const:H("const"),_with:H("with"),_new:H("new",{beforeExpr:G,startsExpr:X}),_this:H("this",{startsExpr:X}),_super:H("super",{startsExpr:X}),_class:H("class",{startsExpr:X}),_extends:H("extends",{beforeExpr:G}),_export:H("export"),_import:H("import",{startsExpr:X}),_null:H("null",{startsExpr:X}),_true:H("true",{startsExpr:X}),_false:H("false",{startsExpr:X}),_typeof:H("typeof",{beforeExpr:G,prefix:Qe,startsExpr:X}),_void:H("void",{beforeExpr:G,prefix:Qe,startsExpr:X}),_delete:H("delete",{beforeExpr:G,prefix:Qe,startsExpr:X}),_do:H("do",{isLoop:le,beforeExpr:G}),_for:H("for",{isLoop:le}),_while:H("while",{isLoop:le}),_as:ke("as",{startsExpr:X}),_assert:ke("assert",{startsExpr:X}),_async:ke("async",{startsExpr:X}),_await:ke("await",{startsExpr:X}),_defer:ke("defer",{startsExpr:X}),_from:ke("from",{startsExpr:X}),_get:ke("get",{startsExpr:X}),_let:ke("let",{startsExpr:X}),_meta:ke("meta",{startsExpr:X}),_of:ke("of",{startsExpr:X}),_sent:ke("sent",{startsExpr:X}),_set:ke("set",{startsExpr:X}),_source:ke("source",{startsExpr:X}),_static:ke("static",{startsExpr:X}),_using:ke("using",{startsExpr:X}),_yield:ke("yield",{startsExpr:X}),_asserts:ke("asserts",{startsExpr:X}),_checks:ke("checks",{startsExpr:X}),_exports:ke("exports",{startsExpr:X}),_global:ke("global",{startsExpr:X}),_implements:ke("implements",{startsExpr:X}),_intrinsic:ke("intrinsic",{startsExpr:X}),_infer:ke("infer",{startsExpr:X}),_is:ke("is",{startsExpr:X}),_mixins:ke("mixins",{startsExpr:X}),_proto:ke("proto",{startsExpr:X}),_require:ke("require",{startsExpr:X}),_satisfies:ke("satisfies",{startsExpr:X}),_keyof:ke("keyof",{startsExpr:X}),_readonly:ke("readonly",{startsExpr:X}),_unique:ke("unique",{startsExpr:X}),_abstract:ke("abstract",{startsExpr:X}),_declare:ke("declare",{startsExpr:X}),_enum:ke("enum",{startsExpr:X}),_module:ke("module",{startsExpr:X}),_namespace:ke("namespace",{startsExpr:X}),_interface:ke("interface",{startsExpr:X}),_type:ke("type",{startsExpr:X}),_opaque:ke("opaque",{startsExpr:X}),name:xe("name",{startsExpr:X}),placeholder:xe("%%",{startsExpr:X}),string:xe("string",{startsExpr:X}),num:xe("num",{startsExpr:X}),bigint:xe("bigint",{startsExpr:X}),decimal:xe("decimal",{startsExpr:X}),regexp:xe("regexp",{startsExpr:X}),privateName:xe("#name",{startsExpr:X}),eof:xe("eof"),jsxName:xe("jsxName"),jsxText:xe("jsxText",{beforeExpr:G}),jsxTagStart:xe("jsxTagStart",{startsExpr:X}),jsxTagEnd:xe("jsxTagEnd")};function ze(o){return o>=93&&o<=133}function $i(o){return o<=92}function It(o){return o>=58&&o<=133}function Td(o){return o>=58&&o<=137}function AE(o){return cr[o]}function Mn(o){return vs[o]}function CE(o){return o>=29&&o<=33}function vd(o){return o>=129&&o<=131}function bE(o){return o>=90&&o<=92}function sl(o){return o>=58&&o<=92}function TE(o){return o>=39&&o<=59}function vE(o){return o===34}function SE(o){return Mi[o]}function wE(o){return o>=121&&o<=123}function PE(o){return o>=124&&o<=130}function Ss(o){return Ct[o]}function ho(o){return pr[o]}function FE(o){return o===57}function il(o){return o>=24&&o<=25}function Sd(o){return je[o]}var nl="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",wd="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",kE=new RegExp("["+nl+"]"),IE=new RegExp("["+nl+wd+"]");nl=wd=null;var Pd=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],NE=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function al(o,n){let l=65536;for(let h=0,g=n.length;h<g;h+=2){if(l+=n[h],l>o)return!1;if(l+=n[h+1],l>=o)return!0}return!1}function kr(o){return o<65?o===36:o<=90?!0:o<97?o===95:o<=122?!0:o<=65535?o>=170&&kE.test(String.fromCharCode(o)):al(o,Pd)}function si(o){return o<48?o===36:o<58?!0:o<65?!1:o<=90?!0:o<97?o===95:o<=122?!0:o<=65535?o>=170&&IE.test(String.fromCharCode(o)):al(o,Pd)||al(o,NE)}var ol={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},BE=new Set(ol.keyword),_E=new Set(ol.strict),LE=new Set(ol.strictBind);function Fd(o,n){return n&&o==="await"||o==="enum"}function kd(o,n){return Fd(o,n)||_E.has(o)}function Id(o){return LE.has(o)}function Nd(o,n){return kd(o,n)||Id(o)}function OE(o){return BE.has(o)}function ME(o,n,l){return o===64&&n===64&&kr(l)}var $E=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function RE(o){return $E.has(o)}var ul=class{flags=0;names=new Map;firstLexicalName="";constructor(o){this.flags=o}},ll=class{parser;scopeStack=[];inModule;undefinedExports=new Map;constructor(o,n){this.parser=o,this.inModule=n}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let o=this.currentThisScopeFlags();return(o&64)>0&&(o&2)===0}get inStaticBlock(){for(let o=this.scopeStack.length-1;;o--){let{flags:n}=this.scopeStack[o];if(n&128)return!0;if(n&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(o){return new ul(o)}enter(o){this.scopeStack.push(this.createScope(o))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(o){return!!(o.flags&130||!this.parser.inModule&&o.flags&1)}declareName(o,n,l){let h=this.currentScope();if(n&8||n&16){this.checkRedeclarationInScope(h,o,n,l);let g=h.names.get(o)||0;n&16?g=g|4:(h.firstLexicalName||(h.firstLexicalName=o),g=g|2),h.names.set(o,g),n&8&&this.maybeExportDefined(h,o)}else if(n&4)for(let g=this.scopeStack.length-1;g>=0&&(h=this.scopeStack[g],this.checkRedeclarationInScope(h,o,n,l),h.names.set(o,(h.names.get(o)||0)|1),this.maybeExportDefined(h,o),!(h.flags&1667));--g);this.parser.inModule&&h.flags&1&&this.undefinedExports.delete(o)}maybeExportDefined(o,n){this.parser.inModule&&o.flags&1&&this.undefinedExports.delete(n)}checkRedeclarationInScope(o,n,l,h){this.isRedeclaredInScope(o,n,l)&&this.parser.raise(N.VarRedeclaration,h,{identifierName:n})}isRedeclaredInScope(o,n,l){if(!(l&1))return!1;if(l&8)return o.names.has(n);let h=o.names.get(n)||0;return l&16?(h&2)>0||!this.treatFunctionsAsVarInScope(o)&&(h&1)>0:(h&2)>0&&!(o.flags&8&&o.firstLexicalName===n)||!this.treatFunctionsAsVarInScope(o)&&(h&4)>0}checkLocalExport(o){let{name:n}=o;this.scopeStack[0].names.has(n)||this.undefinedExports.set(n,o.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let o=this.scopeStack.length-1;;o--){let{flags:n}=this.scopeStack[o];if(n&1667)return n}}currentThisScopeFlags(){for(let o=this.scopeStack.length-1;;o--){let{flags:n}=this.scopeStack[o];if(n&1731&&!(n&4))return n}}},jE=class extends ul{declareFunctions=new Set},UE=class extends ll{createScope(o){return new jE(o)}declareName(o,n,l){let h=this.currentScope();if(n&2048){this.checkRedeclarationInScope(h,o,n,l),this.maybeExportDefined(h,o),h.declareFunctions.add(o);return}super.declareName(o,n,l)}isRedeclaredInScope(o,n,l){if(super.isRedeclaredInScope(o,n,l))return!0;if(l&2048&&!o.declareFunctions.has(n)){let h=o.names.get(n);return(h&4)>0||(h&2)>0}return!1}checkLocalExport(o){this.scopeStack[0].declareFunctions.has(o.name)||super.checkLocalExport(o)}},VE=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Te=V`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:o})=>`Cannot overwrite reserved type ${o}.`,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:o,enumName:n})=>`Boolean enum members need to be initialized. Use either \`${o} = true,\` or \`${o} = false,\` in enum \`${n}\`.`,EnumDuplicateMemberName:({memberName:o,enumName:n})=>`Enum member names need to be unique, but the name \`${o}\` has already been used before in enum \`${n}\`.`,EnumInconsistentMemberValues:({enumName:o})=>`Enum \`${o}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:o,enumName:n})=>`Enum type \`${o}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${n}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:o})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${o}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:o,memberName:n,explicitType:l})=>`Enum \`${o}\` has type \`${l}\`, so the initializer of \`${n}\` needs to be a ${l} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:o,memberName:n})=>`Symbol enum members cannot be initialized. Use \`${n},\` in enum \`${o}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:o,memberName:n})=>`The enum member initializer for \`${n}\` needs to be a literal (either a boolean, number, or string) in enum \`${o}\`.`,EnumInvalidMemberName:({enumName:o,memberName:n,suggestion:l})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${n}\`, consider using \`${l}\`, in enum \`${o}\`.`,EnumNumberMemberNotInitialized:({enumName:o,memberName:n})=>`Number enum members need to be initialized, e.g. \`${n} = 1\` in enum \`${o}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:o})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${o}\`.`,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."},{}),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:o})=>`Unexpected reserved type ${o}.`,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:o,suggestion:n})=>`\`declare export ${o}\` is not supported. Use \`${n}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function qE(o){return o.type==="DeclareExportAllDeclaration"||o.type==="DeclareExportDeclaration"&&(!o.declaration||o.declaration.type!=="TypeAlias"&&o.declaration.type!=="InterfaceDeclaration")}function Bd(o){return o.importKind==="type"||o.importKind==="typeof"}var HE={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function zE(o,n){let l=[],h=[];for(let g=0;g<o.length;g++)(n(o[g],g,o)?l:h).push(o[g]);return[l,h]}var WE=/\*?\s*@((?:no)?flow)\b/,JE=o=>class extends o{flowPragma=void 0;getScopeHandler(){return UE}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(n,l){n!==134&&n!==13&&n!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(n,l)}addComment(n){if(this.flowPragma===void 0){let l=WE.exec(n.value);if(l)if(l[1]==="flow")this.flowPragma="flow";else if(l[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(n)}flowParseTypeInitialiser(n){let l=this.state.inType;this.state.inType=!0,this.expect(n||14);let h=this.flowParseType();return this.state.inType=l,h}flowParsePredicate(){let n=this.startNode(),l=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>l.index+1&&this.raise(Te.UnexpectedSpaceBetweenModuloChecks,l),this.eat(10)?(n.value=super.parseExpression(),this.expect(11),this.finishNode(n,"DeclaredPredicate")):this.finishNode(n,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let n=this.state.inType;this.state.inType=!0,this.expect(14);let l=null,h=null;return this.match(54)?(this.state.inType=n,h=this.flowParsePredicate()):(l=this.flowParseType(),this.state.inType=n,this.match(54)&&(h=this.flowParsePredicate())),[l,h]}flowParseDeclareClass(n){return this.next(),this.flowParseInterfaceish(n,!0),this.finishNode(n,"DeclareClass")}flowParseDeclareFunction(n){this.next();let l=n.id=this.parseIdentifier(),h=this.startNode(),g=this.startNode();this.match(47)?h.typeParameters=this.flowParseTypeParameterDeclaration():h.typeParameters=null,this.expect(10);let T=this.flowParseFunctionTypeParams();return h.params=T.params,h.rest=T.rest,h.this=T._this,this.expect(11),[h.returnType,n.predicate]=this.flowParseTypeAndPredicateInitialiser(),g.typeAnnotation=this.finishNode(h,"FunctionTypeAnnotation"),l.typeAnnotation=this.finishNode(g,"TypeAnnotation"),this.resetEndLocation(l),this.semicolon(),this.scope.declareName(n.id.name,2048,n.id.loc.start),this.finishNode(n,"DeclareFunction")}flowParseDeclare(n,l){if(this.match(80))return this.flowParseDeclareClass(n);if(this.match(68))return this.flowParseDeclareFunction(n);if(this.match(74))return this.flowParseDeclareVariable(n);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(n):(l&&this.raise(Te.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(n));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(n);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(n);if(this.isContextual(129))return this.flowParseDeclareInterface(n);if(this.match(82))return this.flowParseDeclareExportDeclaration(n,l);throw this.unexpected()}flowParseDeclareVariable(n){return this.next(),n.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(n.id.name,5,n.id.loc.start),this.semicolon(),this.finishNode(n,"DeclareVariable")}flowParseDeclareModule(n){this.scope.enter(0),this.match(134)?n.id=super.parseExprAtom():n.id=this.parseIdentifier();let l=n.body=this.startNode(),h=l.body=[];for(this.expect(5);!this.match(8);){let w=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Te.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),h.push(super.parseImport(w))):(this.expectContextual(125,Te.UnsupportedStatementInDeclareModule),h.push(this.flowParseDeclare(w,!0)))}this.scope.exit(),this.expect(8),this.finishNode(l,"BlockStatement");let g=null,T=!1;return h.forEach(w=>{qE(w)?(g==="CommonJS"&&this.raise(Te.AmbiguousDeclareModuleKind,w),g="ES"):w.type==="DeclareModuleExports"&&(T&&this.raise(Te.DuplicateDeclareModuleExports,w),g==="ES"&&this.raise(Te.AmbiguousDeclareModuleKind,w),g="CommonJS",T=!0)}),n.kind=g||"CommonJS",this.finishNode(n,"DeclareModule")}flowParseDeclareExportDeclaration(n,l){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?n.declaration=this.flowParseDeclare(this.startNode()):(n.declaration=this.flowParseType(),this.semicolon()),n.default=!0,this.finishNode(n,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!l){let h=this.state.value;throw this.raise(Te.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:h,suggestion:HE[h]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return n.declaration=this.flowParseDeclare(this.startNode()),n.default=!1,this.finishNode(n,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return n=this.parseExport(n,null),n.type==="ExportNamedDeclaration"?(n.default=!1,delete n.exportKind,this.castNodeTo(n,"DeclareExportDeclaration")):this.castNodeTo(n,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(n){return this.next(),this.expectContextual(111),n.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(n,"DeclareModuleExports")}flowParseDeclareTypeAlias(n){this.next();let l=this.flowParseTypeAlias(n);return this.castNodeTo(l,"DeclareTypeAlias"),l}flowParseDeclareOpaqueType(n){this.next();let l=this.flowParseOpaqueType(n,!0);return this.castNodeTo(l,"DeclareOpaqueType"),l}flowParseDeclareInterface(n){return this.next(),this.flowParseInterfaceish(n,!1),this.finishNode(n,"DeclareInterface")}flowParseInterfaceish(n,l){if(n.id=this.flowParseRestrictedIdentifier(!l,!0),this.scope.declareName(n.id.name,l?17:8201,n.id.loc.start),this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,n.extends=[],this.eat(81))do n.extends.push(this.flowParseInterfaceExtends());while(!l&&this.eat(12));if(l){if(n.implements=[],n.mixins=[],this.eatContextual(117))do n.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do n.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}n.body=this.flowParseObjectType({allowStatic:l,allowExact:!1,allowSpread:!1,allowProto:l,allowInexact:!1})}flowParseInterfaceExtends(){let n=this.startNode();return n.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?n.typeParameters=this.flowParseTypeParameterInstantiation():n.typeParameters=null,this.finishNode(n,"InterfaceExtends")}flowParseInterface(n){return this.flowParseInterfaceish(n,!1),this.finishNode(n,"InterfaceDeclaration")}checkNotUnderscore(n){n==="_"&&this.raise(Te.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(n,l,h){VE.has(n)&&this.raise(h?Te.AssignReservedType:Te.UnexpectedReservedType,l,{reservedType:n})}flowParseRestrictedIdentifier(n,l){return this.checkReservedType(this.state.value,this.state.startLoc,l),this.parseIdentifier(n)}flowParseTypeAlias(n){return n.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(n.id.name,8201,n.id.loc.start),this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,n.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(n,"TypeAlias")}flowParseOpaqueType(n,l){return this.expectContextual(130),n.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(n.id.name,8201,n.id.loc.start),this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,n.supertype=null,this.match(14)&&(n.supertype=this.flowParseTypeInitialiser(14)),n.impltype=null,l||(n.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(n,"OpaqueType")}flowParseTypeParameter(n=!1){let l=this.state.startLoc,h=this.startNode(),g=this.flowParseVariance(),T=this.flowParseTypeAnnotatableIdentifier();return h.name=T.name,h.variance=g,h.bound=T.typeAnnotation,this.match(29)?(this.eat(29),h.default=this.flowParseType()):n&&this.raise(Te.MissingTypeParamDefault,l),this.finishNode(h,"TypeParameter")}flowParseTypeParameterDeclaration(){let n=this.state.inType,l=this.startNode();l.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let h=!1;do{let g=this.flowParseTypeParameter(h);l.params.push(g),g.default&&(h=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=n,this.finishNode(l,"TypeParameterDeclaration")}flowInTopLevelContext(n){if(this.curContext()!==he.brace){let l=this.state.context;this.state.context=[l[0]];try{return n()}finally{this.state.context=l}}else return n()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let n=this.startNode(),l=this.state.inType;return this.state.inType=!0,n.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let h=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)n.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=h}),this.state.inType=l,!this.state.inType&&this.curContext()===he.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(n,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let n=this.startNode(),l=this.state.inType;for(n.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)n.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=l,this.finishNode(n,"TypeParameterInstantiation")}flowParseInterfaceType(){let n=this.startNode();if(this.expectContextual(129),n.extends=[],this.eat(81))do n.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return n.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(n,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(n,l,h){return n.static=l,this.lookahead().type===14?(n.id=this.flowParseObjectPropertyKey(),n.key=this.flowParseTypeInitialiser()):(n.id=null,n.key=this.flowParseType()),this.expect(3),n.value=this.flowParseTypeInitialiser(),n.variance=h,this.finishNode(n,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(n,l){return n.static=l,n.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(n.method=!0,n.optional=!1,n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(n.loc.start))):(n.method=!1,this.eat(17)&&(n.optional=!0),n.value=this.flowParseTypeInitialiser()),this.finishNode(n,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(n){for(n.params=[],n.rest=null,n.typeParameters=null,n.this=null,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(n.this=this.flowParseFunctionTypeParam(!0),n.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)n.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),n.returnType=this.flowParseTypeInitialiser(),this.finishNode(n,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(n,l){let h=this.startNode();return n.static=l,n.value=this.flowParseObjectTypeMethodish(h),this.finishNode(n,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:n,allowExact:l,allowSpread:h,allowProto:g,allowInexact:T}){let w=this.state.inType;this.state.inType=!0;let k=this.startNode();k.callProperties=[],k.properties=[],k.indexers=[],k.internalSlots=[];let O,_,Q=!1;for(l&&this.match(6)?(this.expect(6),O=9,_=!0):(this.expect(5),O=8,_=!1),k.exact=_;!this.match(O);){let ve=!1,Be=null,ft=null,wt=this.startNode();if(g&&this.isContextual(118)){let ut=this.lookahead();ut.type!==14&&ut.type!==17&&(this.next(),Be=this.state.startLoc,n=!1)}if(n&&this.isContextual(106)){let ut=this.lookahead();ut.type!==14&&ut.type!==17&&(this.next(),ve=!0)}let ot=this.flowParseVariance();if(this.eat(0))Be!=null&&this.unexpected(Be),this.eat(0)?(ot&&this.unexpected(ot.loc.start),k.internalSlots.push(this.flowParseObjectTypeInternalSlot(wt,ve))):k.indexers.push(this.flowParseObjectTypeIndexer(wt,ve,ot));else if(this.match(10)||this.match(47))Be!=null&&this.unexpected(Be),ot&&this.unexpected(ot.loc.start),k.callProperties.push(this.flowParseObjectTypeCallProperty(wt,ve));else{let ut="init";if(this.isContextual(99)||this.isContextual(104)){let Sl=this.lookahead();Td(Sl.type)&&(ut=this.state.value,this.next())}let Zt=this.flowParseObjectTypeProperty(wt,ve,Be,ot,ut,h,T??!_);Zt===null?(Q=!0,ft=this.state.lastTokStartLoc):k.properties.push(Zt)}this.flowObjectTypeSemicolon(),ft&&!this.match(8)&&!this.match(9)&&this.raise(Te.UnexpectedExplicitInexactInObject,ft)}this.expect(O),h&&(k.inexact=Q);let ie=this.finishNode(k,"ObjectTypeAnnotation");return this.state.inType=w,ie}flowParseObjectTypeProperty(n,l,h,g,T,w,k){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(w?k||this.raise(Te.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Te.InexactInsideNonObject,this.state.lastTokStartLoc),g&&this.raise(Te.InexactVariance,g),null):(w||this.raise(Te.UnexpectedSpreadType,this.state.lastTokStartLoc),h!=null&&this.unexpected(h),g&&this.raise(Te.SpreadVariance,g),n.argument=this.flowParseType(),this.finishNode(n,"ObjectTypeSpreadProperty"));{n.key=this.flowParseObjectPropertyKey(),n.static=l,n.proto=h!=null,n.kind=T;let O=!1;return this.match(47)||this.match(10)?(n.method=!0,h!=null&&this.unexpected(h),g&&this.unexpected(g.loc.start),n.value=this.flowParseObjectTypeMethodish(this.startNodeAt(n.loc.start)),(T==="get"||T==="set")&&this.flowCheckGetterSetterParams(n),!w&&n.key.name==="constructor"&&n.value.this&&this.raise(Te.ThisParamBannedInConstructor,n.value.this)):(T!=="init"&&this.unexpected(),n.method=!1,this.eat(17)&&(O=!0),n.value=this.flowParseTypeInitialiser(),n.variance=g),n.optional=O,this.finishNode(n,"ObjectTypeProperty")}}flowCheckGetterSetterParams(n){let l=n.kind==="get"?0:1,h=n.value.params.length+(n.value.rest?1:0);n.value.this&&this.raise(n.kind==="get"?Te.GetterMayNotHaveThisParam:Te.SetterMayNotHaveThisParam,n.value.this),h!==l&&this.raise(n.kind==="get"?N.BadGetterArity:N.BadSetterArity,n),n.kind==="set"&&n.value.rest&&this.raise(N.BadSetterRestParameter,n)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(n,l){n??(n=this.state.startLoc);let h=l||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let g=this.startNodeAt(n);g.qualification=h,g.id=this.flowParseRestrictedIdentifier(!0),h=this.finishNode(g,"QualifiedTypeIdentifier")}return h}flowParseGenericType(n,l){let h=this.startNodeAt(n);return h.typeParameters=null,h.id=this.flowParseQualifiedTypeIdentifier(n,l),this.match(47)&&(h.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(h,"GenericTypeAnnotation")}flowParseTypeofType(){let n=this.startNode();return this.expect(87),n.argument=this.flowParsePrimaryType(),this.finishNode(n,"TypeofTypeAnnotation")}flowParseTupleType(){let n=this.startNode();for(n.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(n.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(n,"TupleTypeAnnotation")}flowParseFunctionTypeParam(n){let l=null,h=!1,g=null,T=this.startNode(),w=this.lookahead(),k=this.state.type===78;return w.type===14||w.type===17?(k&&!n&&this.raise(Te.ThisParamMustBeFirst,T),l=this.parseIdentifier(k),this.eat(17)&&(h=!0,k&&this.raise(Te.ThisParamMayNotBeOptional,T)),g=this.flowParseTypeInitialiser()):g=this.flowParseType(),T.name=l,T.optional=h,T.typeAnnotation=g,this.finishNode(T,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(n){let l=this.startNodeAt(n.loc.start);return l.name=null,l.optional=!1,l.typeAnnotation=n,this.finishNode(l,"FunctionTypeParam")}flowParseFunctionTypeParams(n=[]){let l=null,h=null;for(this.match(78)&&(h=this.flowParseFunctionTypeParam(!0),h.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)n.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(l=this.flowParseFunctionTypeParam(!1)),{params:n,rest:l,_this:h}}flowIdentToTypeAnnotation(n,l,h){switch(h.name){case"any":return this.finishNode(l,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(l,"BooleanTypeAnnotation");case"mixed":return this.finishNode(l,"MixedTypeAnnotation");case"empty":return this.finishNode(l,"EmptyTypeAnnotation");case"number":return this.finishNode(l,"NumberTypeAnnotation");case"string":return this.finishNode(l,"StringTypeAnnotation");case"symbol":return this.finishNode(l,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(h.name),this.flowParseGenericType(n,h)}}flowParsePrimaryType(){let n=this.state.startLoc,l=this.startNode(),h,g,T=!1,w=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,g=this.flowParseTupleType(),this.state.noAnonFunctionType=w,g;case 47:{let k=this.startNode();return k.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),h=this.flowParseFunctionTypeParams(),k.params=h.params,k.rest=h.rest,k.this=h._this,this.expect(11),this.expect(19),k.returnType=this.flowParseType(),this.finishNode(k,"FunctionTypeAnnotation")}case 10:{let k=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(ze(this.state.type)||this.match(78)){let O=this.lookahead().type;T=O!==17&&O!==14}else T=!0;if(T){if(this.state.noAnonFunctionType=!1,g=this.flowParseType(),this.state.noAnonFunctionType=w,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),g;this.eat(12)}return g?h=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(g)]):h=this.flowParseFunctionTypeParams(),k.params=h.params,k.rest=h.rest,k.this=h._this,this.expect(11),this.expect(19),k.returnType=this.flowParseType(),k.typeParameters=null,this.finishNode(k,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return l.value=this.match(85),this.next(),this.finishNode(l,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",l);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",l);throw this.raise(Te.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(l,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(l,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(l,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(l,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(sl(this.state.type)){let k=Ss(this.state.type);return this.next(),super.createIdentifier(l,k)}else if(ze(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(n,l,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let n=this.state.startLoc,l=this.flowParsePrimaryType(),h=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let g=this.startNodeAt(n),T=this.eat(18);h=h||T,this.expect(0),!T&&this.match(3)?(g.elementType=l,this.next(),l=this.finishNode(g,"ArrayTypeAnnotation")):(g.objectType=l,g.indexType=this.flowParseType(),this.expect(3),h?(g.optional=T,l=this.finishNode(g,"OptionalIndexedAccessType")):l=this.finishNode(g,"IndexedAccessType"))}return l}flowParsePrefixType(){let n=this.startNode();return this.eat(17)?(n.typeAnnotation=this.flowParsePrefixType(),this.finishNode(n,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let n=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let l=this.startNodeAt(n.loc.start);return l.params=[this.reinterpretTypeAsFunctionTypeParam(n)],l.rest=null,l.this=null,l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}return n}flowParseIntersectionType(){let n=this.startNode();this.eat(45);let l=this.flowParseAnonFunctionWithoutParens();for(n.types=[l];this.eat(45);)n.types.push(this.flowParseAnonFunctionWithoutParens());return n.types.length===1?l:this.finishNode(n,"IntersectionTypeAnnotation")}flowParseUnionType(){let n=this.startNode();this.eat(43);let l=this.flowParseIntersectionType();for(n.types=[l];this.eat(43);)n.types.push(this.flowParseIntersectionType());return n.types.length===1?l:this.finishNode(n,"UnionTypeAnnotation")}flowParseType(){let n=this.state.inType;this.state.inType=!0;let l=this.flowParseUnionType();return this.state.inType=n,l}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let n=this.state.startLoc,l=this.parseIdentifier();return this.flowParseGenericType(n,l)}else return this.flowParseType()}flowParseTypeAnnotation(){let n=this.startNode();return n.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(n,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(n){let l=n?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(l.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(l)),l}typeCastToParameter(n){return n.expression.typeAnnotation=n.typeAnnotation,this.resetEndLocation(n.expression,n.typeAnnotation.loc.end),n.expression}flowParseVariance(){let n=null;return this.match(53)?(n=this.startNode(),this.state.value==="+"?n.kind="plus":n.kind="minus",this.next(),this.finishNode(n,"Variance")):n}parseFunctionBody(n,l,h=!1){if(l){this.forwardNoArrowParamsConversionAt(n,()=>super.parseFunctionBody(n,!0,h));return}super.parseFunctionBody(n,!1,h)}parseFunctionBodyAndFinish(n,l,h=!1){if(this.match(14)){let g=this.startNode();[g.typeAnnotation,n.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.returnType=g.typeAnnotation?this.finishNode(g,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(n,l,h)}parseStatementLike(n){if(this.state.strict&&this.isContextual(129)){let h=this.lookahead();if(It(h.type)){let g=this.startNode();return this.next(),this.flowParseInterface(g)}}else if(this.isContextual(126)){let h=this.startNode();return this.next(),this.flowParseEnumDeclaration(h)}let l=super.parseStatementLike(n);return this.flowPragma===void 0&&!this.isValidDirective(l)&&(this.flowPragma=null),l}parseExpressionStatement(n,l,h){if(l.type==="Identifier"){if(l.name==="declare"){if(this.match(80)||ze(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(n)}else if(ze(this.state.type)){if(l.name==="interface")return this.flowParseInterface(n);if(l.name==="type")return this.flowParseTypeAlias(n);if(l.name==="opaque")return this.flowParseOpaqueType(n,!1)}}return super.parseExpressionStatement(n,l,h)}shouldParseExportDeclaration(){let{type:n}=this.state;return n===126||vd(n)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:n}=this.state;return n===126||vd(n)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}return super.parseExportDefaultExpression()}parseConditional(n,l,h){if(!this.match(17))return n;if(this.state.maybeInArrowParameters){let ie=this.lookaheadCharCode();if(ie===44||ie===61||ie===58||ie===41)return this.setOptionalParametersError(h),n}this.expect(17);let g=this.state.clone(),T=this.state.noArrowAt,w=this.startNodeAt(l),{consequent:k,failed:O}=this.tryParseConditionalConsequent(),[_,Q]=this.getArrowLikeExpressions(k);if(O||Q.length>0){let ie=[...T];if(Q.length>0){this.state=g,this.state.noArrowAt=ie;for(let ve=0;ve<Q.length;ve++)ie.push(Q[ve].start);({consequent:k,failed:O}=this.tryParseConditionalConsequent()),[_,Q]=this.getArrowLikeExpressions(k)}O&&_.length>1&&this.raise(Te.AmbiguousConditionalArrow,g.startLoc),O&&_.length===1&&(this.state=g,ie.push(_[0].start),this.state.noArrowAt=ie,{consequent:k,failed:O}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(k,!0),this.state.noArrowAt=T,this.expect(14),w.test=n,w.consequent=k,w.alternate=this.forwardNoArrowParamsConversionAt(w,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(w,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let n=this.parseMaybeAssignAllowIn(),l=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:n,failed:l}}getArrowLikeExpressions(n,l){let h=[n],g=[];for(;h.length!==0;){let T=h.pop();T.type==="ArrowFunctionExpression"&&T.body.type!=="BlockStatement"?(T.typeParameters||!T.returnType?this.finishArrowValidation(T):g.push(T),h.push(T.body)):T.type==="ConditionalExpression"&&(h.push(T.consequent),h.push(T.alternate))}return l?(g.forEach(T=>this.finishArrowValidation(T)),[g,[]]):zE(g,T=>T.params.every(w=>this.isAssignable(w,!0)))}finishArrowValidation(n){this.toAssignableList(n.params,n.extra?.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(n,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(n,l){let h;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(n.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),h=l(),this.state.noArrowParamsConversionAt.pop()):h=l(),h}parseParenItem(n,l){let h=super.parseParenItem(n,l);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(n)),this.match(14)){let g=this.startNodeAt(l);return g.expression=h,g.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(g,"TypeCastExpression")}return h}assertModuleNodeAllowed(n){n.type==="ImportDeclaration"&&(n.importKind==="type"||n.importKind==="typeof")||n.type==="ExportNamedDeclaration"&&n.exportKind==="type"||n.type==="ExportAllDeclaration"&&n.exportKind==="type"||super.assertModuleNodeAllowed(n)}parseExportDeclaration(n){if(this.isContextual(130)){n.exportKind="type";let l=this.startNode();return this.next(),this.match(5)?(n.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(n),null):this.flowParseTypeAlias(l)}else if(this.isContextual(131)){n.exportKind="type";let l=this.startNode();return this.next(),this.flowParseOpaqueType(l,!1)}else if(this.isContextual(129)){n.exportKind="type";let l=this.startNode();return this.next(),this.flowParseInterface(l)}else if(this.isContextual(126)){n.exportKind="value";let l=this.startNode();return this.next(),this.flowParseEnumDeclaration(l)}else return super.parseExportDeclaration(n)}eatExportStar(n){return super.eatExportStar(n)?!0:this.isContextual(130)&&this.lookahead().type===55?(n.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(n){let{startLoc:l}=this.state,h=super.maybeParseExportNamespaceSpecifier(n);return h&&n.exportKind==="type"&&this.unexpected(l),h}parseClassId(n,l,h){super.parseClassId(n,l,h),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(n,l,h){let{startLoc:g}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(n,l))return;l.declare=!0}super.parseClassMember(n,l,h),l.declare&&(l.type!=="ClassProperty"&&l.type!=="ClassPrivateProperty"&&l.type!=="PropertyDefinition"?this.raise(Te.DeclareClassElement,g):l.value&&this.raise(Te.DeclareClassFieldInitializer,l.value))}isIterator(n){return n==="iterator"||n==="asyncIterator"}readIterator(){let n=super.readWord1(),l="@@"+n;(!this.isIterator(n)||!this.state.inType)&&this.raise(N.InvalidIdentifier,this.state.curPosition(),{identifierName:l}),this.finishToken(132,l)}getTokenFromCode(n){let l=this.input.charCodeAt(this.state.pos+1);n===123&&l===124?this.finishOp(6,2):this.state.inType&&(n===62||n===60)?this.finishOp(n===62?48:47,1):this.state.inType&&n===63?l===46?this.finishOp(18,2):this.finishOp(17,1):ME(n,l,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(n)}isAssignable(n,l){return n.type==="TypeCastExpression"?this.isAssignable(n.expression,l):super.isAssignable(n,l)}toAssignable(n,l=!1){!l&&n.type==="AssignmentExpression"&&n.left.type==="TypeCastExpression"&&(n.left=this.typeCastToParameter(n.left)),super.toAssignable(n,l)}toAssignableList(n,l,h){for(let g=0;g<n.length;g++){let T=n[g];T?.type==="TypeCastExpression"&&(n[g]=this.typeCastToParameter(T))}super.toAssignableList(n,l,h)}toReferencedList(n,l){for(let h=0;h<n.length;h++){let g=n[h];g&&g.type==="TypeCastExpression"&&!g.extra?.parenthesized&&(n.length>1||!l)&&this.raise(Te.TypeCastInPattern,g.typeAnnotation)}return n}parseArrayLike(n,l,h){let g=super.parseArrayLike(n,l,h);return h!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(g.elements),g}isValidLVal(n,l,h,g){return n==="TypeCastExpression"||super.isValidLVal(n,l,h,g)}parseClassProperty(n){return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(n)}parseClassPrivateProperty(n){return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(n)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(n){return!this.match(14)&&super.isNonstaticConstructor(n)}pushClassMethod(n,l,h,g,T,w){if(l.variance&&this.unexpected(l.variance.loc.start),delete l.variance,this.match(47)&&(l.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(n,l,h,g,T,w),l.params&&T){let k=l.params;k.length>0&&this.isThisParam(k[0])&&this.raise(Te.ThisParamBannedInConstructor,l)}else if(l.type==="MethodDefinition"&&T&&l.value.params){let k=l.value.params;k.length>0&&this.isThisParam(k[0])&&this.raise(Te.ThisParamBannedInConstructor,l)}}pushClassPrivateMethod(n,l,h,g){l.variance&&this.unexpected(l.variance.loc.start),delete l.variance,this.match(47)&&(l.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(n,l,h,g)}parseClassSuper(n){if(super.parseClassSuper(n),n.superClass&&(this.match(47)||this.match(51))&&(n.superTypeArguments=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let l=n.implements=[];do{let h=this.startNode();h.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?h.typeParameters=this.flowParseTypeParameterInstantiation():h.typeParameters=null,l.push(this.finishNode(h,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(n){super.checkGetterSetterParams(n);let l=this.getObjectOrClassMethodParams(n);if(l.length>0){let h=l[0];this.isThisParam(h)&&n.kind==="get"?this.raise(Te.GetterMayNotHaveThisParam,h):this.isThisParam(h)&&this.raise(Te.SetterMayNotHaveThisParam,h)}}parsePropertyNamePrefixOperator(n){n.variance=this.flowParseVariance()}parseObjPropValue(n,l,h,g,T,w,k){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance;let O;this.match(47)&&!w&&(O=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let _=super.parseObjPropValue(n,l,h,g,T,w,k);return O&&((_.value||_).typeParameters=O),_}parseFunctionParamType(n){return this.eat(17)&&(n.type!=="Identifier"&&this.raise(Te.PatternIsOptional,n),this.isThisParam(n)&&this.raise(Te.ThisParamMayNotBeOptional,n),n.optional=!0),this.match(14)?n.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(n)&&this.raise(Te.ThisParamAnnotationRequired,n),this.match(29)&&this.isThisParam(n)&&this.raise(Te.ThisParamNoDefault,n),this.resetEndLocation(n),n}parseMaybeDefault(n,l){let h=super.parseMaybeDefault(n,l);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(Te.TypeBeforeInitializer,h.typeAnnotation),h}checkImportReflection(n){super.checkImportReflection(n),n.module&&n.importKind!=="value"&&this.raise(Te.ImportReflectionHasImportType,n.specifiers[0].loc.start)}parseImportSpecifierLocal(n,l,h){l.local=Bd(n)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),n.specifiers.push(this.finishImportSpecifier(l,h))}isPotentialImportPhase(n){if(super.isPotentialImportPhase(n))return!0;if(this.isContextual(130)){if(!n)return!0;let l=this.lookaheadCharCode();return l===123||l===42}return!n&&this.isContextual(87)}applyImportPhase(n,l,h,g){if(super.applyImportPhase(n,l,h,g),l){if(!h&&this.match(65))return;n.exportKind=h==="type"?h:"value"}else h==="type"&&this.match(55)&&this.unexpected(),n.importKind=h==="type"||h==="typeof"?h:"value"}parseImportSpecifier(n,l,h,g,T){let w=n.imported,k=null;w.type==="Identifier"&&(w.name==="type"?k="type":w.name==="typeof"&&(k="typeof"));let O=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let Q=this.parseIdentifier(!0);k!==null&&!It(this.state.type)?(n.imported=Q,n.importKind=k,n.local=this.cloneIdentifier(Q)):(n.imported=w,n.importKind=null,n.local=this.parseIdentifier())}else{if(k!==null&&It(this.state.type))n.imported=this.parseIdentifier(!0),n.importKind=k;else{if(l)throw this.raise(N.ImportBindingIsString,n,{importName:w.value});n.imported=w,n.importKind=null}this.eatContextual(93)?n.local=this.parseIdentifier():(O=!0,n.local=this.cloneIdentifier(n.imported))}let _=Bd(n);return h&&_&&this.raise(Te.ImportTypeShorthandOnlyInPureImport,n),(h||_)&&this.checkReservedType(n.local.name,n.local.loc.start,!0),O&&!h&&!_&&this.checkReservedWord(n.local.name,n.loc.start,!0,!0),this.finishImportSpecifier(n,"ImportSpecifier")}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(n,l){let h=n.kind;h!=="get"&&h!=="set"&&this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(n,l)}parseVarId(n,l){super.parseVarId(n,l),this.match(14)&&(n.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n.id))}parseAsyncArrowFromCallExpression(n,l){if(this.match(14)){let h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,n.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=h}return super.parseAsyncArrowFromCallExpression(n,l)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(n,l){let h=null,g;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(h=this.state.clone(),g=this.tryParse(()=>super.parseMaybeAssign(n,l),h),!g.error)return g.node;let{context:T}=this.state,w=T[T.length-1];(w===he.j_oTag||w===he.j_expr)&&T.pop()}if(g?.error||this.match(47)){h=h||this.state.clone();let T,w=this.tryParse(O=>{T=this.flowParseTypeParameterDeclaration();let _=this.forwardNoArrowParamsConversionAt(T,()=>{let ie=super.parseMaybeAssign(n,l);return this.resetStartLocationFromNode(ie,T),ie});_.extra?.parenthesized&&O();let Q=this.maybeUnwrapTypeCastExpression(_);return Q.type!=="ArrowFunctionExpression"&&O(),Q.typeParameters=T,this.resetStartLocationFromNode(Q,T),_},h),k=null;if(w.node&&this.maybeUnwrapTypeCastExpression(w.node).type==="ArrowFunctionExpression"){if(!w.error&&!w.aborted)return w.node.async&&this.raise(Te.UnexpectedTypeParameterBeforeAsyncArrowFunction,T),w.node;k=w.node}if(g?.node)return this.state=g.failState,g.node;if(k)return this.state=w.failState,k;throw g?.thrown?g.error:w.thrown?w.error:this.raise(Te.UnexpectedTokenAfterTypeParameter,T)}return super.parseMaybeAssign(n,l)}parseArrow(n){if(this.match(14)){let l=this.tryParse(()=>{let h=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let g=this.startNode();return[g.typeAnnotation,n.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=h,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),g});if(l.thrown)return null;l.error&&(this.state=l.failState),n.returnType=l.node.typeAnnotation?this.finishNode(l.node,"TypeAnnotation"):null}return super.parseArrow(n)}shouldParseArrow(n){return this.match(14)||super.shouldParseArrow(n)}setArrowFunctionParameters(n,l){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(n.start))?n.params=l:super.setArrowFunctionParameters(n,l)}checkParams(n,l,h,g=!0){if(!(h&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(n.start)))){for(let T=0;T<n.params.length;T++)this.isThisParam(n.params[T])&&T>0&&this.raise(Te.ThisParamMustBeFirst,n.params[T]);super.checkParams(n,l,h,g)}}parseParenAndDistinguishExpression(n){return super.parseParenAndDistinguishExpression(n&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(n,l,h){if(n.type==="Identifier"&&n.name==="async"&&this.state.noArrowAt.includes(l.index)){this.next();let g=this.startNodeAt(l);g.callee=n,g.arguments=super.parseCallExpressionArguments(),n=this.finishNode(g,"CallExpression")}else if(n.type==="Identifier"&&n.name==="async"&&this.match(47)){let g=this.state.clone(),T=this.tryParse(k=>this.parseAsyncArrowWithTypeParameters(l)||k(),g);if(!T.error&&!T.aborted)return T.node;let w=this.tryParse(()=>super.parseSubscripts(n,l,h),g);if(w.node&&!w.error)return w.node;if(T.node)return this.state=T.failState,T.node;if(w.node)return this.state=w.failState,w.node;throw T.error||w.error}return super.parseSubscripts(n,l,h)}parseSubscript(n,l,h,g){if(this.match(18)&&this.isLookaheadToken_lt()){if(g.optionalChainMember=!0,h)return g.stop=!0,n;this.next();let T=this.startNodeAt(l);return T.callee=n,T.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),T.arguments=this.parseCallExpressionArguments(),T.optional=!0,this.finishCallExpression(T,!0)}else if(!h&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let T=this.startNodeAt(l);T.callee=n;let w=this.tryParse(()=>(T.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),T.arguments=super.parseCallExpressionArguments(),g.optionalChainMember&&(T.optional=!1),this.finishCallExpression(T,g.optionalChainMember)));if(w.node)return w.error&&(this.state=w.failState),w.node}return super.parseSubscript(n,l,h,g)}parseNewCallee(n){super.parseNewCallee(n);let l=null;this.shouldParseTypes()&&this.match(47)&&(l=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),n.typeArguments=l}parseAsyncArrowWithTypeParameters(n){let l=this.startNodeAt(n);if(this.parseFunctionParams(l,!1),!!this.parseArrow(l))return super.parseArrowExpression(l,void 0,!0)}readToken_mult_modulo(n){let l=this.input.charCodeAt(this.state.pos+1);if(n===42&&l===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(n)}readToken_pipe_amp(n){let l=this.input.charCodeAt(this.state.pos+1);if(n===124&&l===125){this.finishOp(9,2);return}super.readToken_pipe_amp(n)}parseTopLevel(n,l){let h=super.parseTopLevel(n,l);return this.state.hasFlowComment&&this.raise(Te.UnterminatedFlowComment,this.state.curPosition()),h}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Te.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let n=this.skipFlowComment();n&&(this.state.pos+=n,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:n}=this.state,l=2;for(;[32,9].includes(this.input.charCodeAt(n+l));)l++;let h=this.input.charCodeAt(l+n),g=this.input.charCodeAt(l+n+1);return h===58&&g===58?l+2:this.input.slice(l+n,l+n+12)==="flow-include"?l+12:h===58&&g!==58?l:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(N.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(n,{enumName:l,memberName:h}){this.raise(Te.EnumBooleanMemberNotInitialized,n,{memberName:h,enumName:l})}flowEnumErrorInvalidMemberInitializer(n,l){return this.raise(l.explicitType?l.explicitType==="symbol"?Te.EnumInvalidMemberInitializerSymbolType:Te.EnumInvalidMemberInitializerPrimaryType:Te.EnumInvalidMemberInitializerUnknownType,n,l)}flowEnumErrorNumberMemberNotInitialized(n,l){this.raise(Te.EnumNumberMemberNotInitialized,n,l)}flowEnumErrorStringMemberInconsistentlyInitialized(n,l){this.raise(Te.EnumStringMemberInconsistentlyInitialized,n,l)}flowEnumMemberInit(){let n=this.state.startLoc,l=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let h=this.parseNumericLiteral(this.state.value);return l()?{type:"number",loc:h.loc.start,value:h}:{type:"invalid",loc:n}}case 134:{let h=this.parseStringLiteral(this.state.value);return l()?{type:"string",loc:h.loc.start,value:h}:{type:"invalid",loc:n}}case 85:case 86:{let h=this.parseBooleanLiteral(this.match(85));return l()?{type:"boolean",loc:h.loc.start,value:h}:{type:"invalid",loc:n}}default:return{type:"invalid",loc:n}}}flowEnumMemberRaw(){let n=this.state.startLoc,l=this.parseIdentifier(!0),h=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:n};return{id:l,init:h}}flowEnumCheckExplicitTypeMismatch(n,l,h){let{explicitType:g}=l;g!==null&&g!==h&&this.flowEnumErrorInvalidMemberInitializer(n,l)}flowEnumMembers({enumName:n,explicitType:l}){let h=new Set,g={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},T=!1;for(;!this.match(8);){if(this.eat(21)){T=!0;break}let w=this.startNode(),{id:k,init:O}=this.flowEnumMemberRaw(),_=k.name;if(_==="")continue;/^[a-z]/.test(_)&&this.raise(Te.EnumInvalidMemberName,k,{memberName:_,suggestion:_[0].toUpperCase()+_.slice(1),enumName:n}),h.has(_)&&this.raise(Te.EnumDuplicateMemberName,k,{memberName:_,enumName:n}),h.add(_);let Q={enumName:n,explicitType:l,memberName:_};switch(w.id=k,O.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(O.loc,Q,"boolean"),w.init=O.value,g.booleanMembers.push(this.finishNode(w,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(O.loc,Q,"number"),w.init=O.value,g.numberMembers.push(this.finishNode(w,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(O.loc,Q,"string"),w.init=O.value,g.stringMembers.push(this.finishNode(w,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(O.loc,Q);case"none":switch(l){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(O.loc,Q);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(O.loc,Q);break;default:g.defaultedMembers.push(this.finishNode(w,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:g,hasUnknownMembers:T}}flowEnumStringMembers(n,l,{enumName:h}){if(n.length===0)return l;if(l.length===0)return n;if(l.length>n.length){for(let g of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(g,{enumName:h});return l}else{for(let g of l)this.flowEnumErrorStringMemberInconsistentlyInitialized(g,{enumName:h});return n}}flowEnumParseExplicitType({enumName:n}){if(!this.eatContextual(102))return null;if(!ze(this.state.type))throw this.raise(Te.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:n});let{value:l}=this.state;return this.next(),l!=="boolean"&&l!=="number"&&l!=="string"&&l!=="symbol"&&this.raise(Te.EnumInvalidExplicitType,this.state.startLoc,{enumName:n,invalidEnumType:l}),l}flowEnumBody(n,l){let h=l.name,g=l.loc.start,T=this.flowEnumParseExplicitType({enumName:h});this.expect(5);let{members:w,hasUnknownMembers:k}=this.flowEnumMembers({enumName:h,explicitType:T});switch(n.hasUnknownMembers=k,T){case"boolean":return n.explicitType=!0,n.members=w.booleanMembers,this.expect(8),this.finishNode(n,"EnumBooleanBody");case"number":return n.explicitType=!0,n.members=w.numberMembers,this.expect(8),this.finishNode(n,"EnumNumberBody");case"string":return n.explicitType=!0,n.members=this.flowEnumStringMembers(w.stringMembers,w.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(n,"EnumStringBody");case"symbol":return n.members=w.defaultedMembers,this.expect(8),this.finishNode(n,"EnumSymbolBody");default:{let O=()=>(n.members=[],this.expect(8),this.finishNode(n,"EnumStringBody"));n.explicitType=!1;let _=w.booleanMembers.length,Q=w.numberMembers.length,ie=w.stringMembers.length,ve=w.defaultedMembers.length;if(!_&&!Q&&!ie&&!ve)return O();if(!_&&!Q)return n.members=this.flowEnumStringMembers(w.stringMembers,w.defaultedMembers,{enumName:h}),this.expect(8),this.finishNode(n,"EnumStringBody");if(!Q&&!ie&&_>=ve){for(let Be of w.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(Be.loc.start,{enumName:h,memberName:Be.id.name});return n.members=w.booleanMembers,this.expect(8),this.finishNode(n,"EnumBooleanBody")}else if(!_&&!ie&&Q>=ve){for(let Be of w.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(Be.loc.start,{enumName:h,memberName:Be.id.name});return n.members=w.numberMembers,this.expect(8),this.finishNode(n,"EnumNumberBody")}else return this.raise(Te.EnumInconsistentMemberValues,g,{enumName:h}),O()}}}flowParseEnumDeclaration(n){let l=this.parseIdentifier();return n.id=l,n.body=this.flowEnumBody(this.startNode(),l),this.finishNode(n,"EnumDeclaration")}jsxParseOpeningElementAfterName(n){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(n.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(n)}isLookaheadToken_lt(){let n=this.nextTokenStart();if(this.input.charCodeAt(n)===60){let l=this.input.charCodeAt(n+1);return l!==60&&l!==61}return!1}reScan_lt_gt(){let{type:n}=this.state;n===47?(this.state.pos-=1,this.readToken_lt()):n===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:n}=this.state;return n===51?(this.state.pos-=2,this.finishOp(47,1),47):n}maybeUnwrapTypeCastExpression(n){return n.type==="TypeCastExpression"?n.expression:n}},KE=/\r\n|[\r\n\u2028\u2029]/,fo=new RegExp(KE.source,"g");function Ri(o){switch(o){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function _d(o,n,l){for(let h=n;h<l;h++)if(Ri(o.charCodeAt(h)))return!0;return!1}var pl=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,cl=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function XE(o){switch(o){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var es=V`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:o})=>`Expected corresponding JSX closing tag for <${o}>.`,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:o,HTMLEntity:n})=>`Unexpected token \`${o}\`. Did you mean \`${n}\` or \`{'${o}'}\`?`,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 ws(o){return o?o.type==="JSXOpeningFragment"||o.type==="JSXClosingFragment":!1}function ji(o){if(o.type==="JSXIdentifier")return o.name;if(o.type==="JSXNamespacedName")return o.namespace.name+":"+o.name.name;if(o.type==="JSXMemberExpression")return ji(o.object)+"."+ji(o.property);throw new Error("Node had unexpected type: "+o.type)}var GE=o=>class extends o{jsxReadToken(){let n="",l=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(es.UnterminatedJsxContent,this.state.startLoc);let h=this.input.charCodeAt(this.state.pos);switch(h){case 60:case 123:if(this.state.pos===this.state.start){h===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(h);return}n+=this.input.slice(l,this.state.pos),this.finishToken(142,n);return;case 38:n+=this.input.slice(l,this.state.pos),n+=this.jsxReadEntity(),l=this.state.pos;break;case 62:case 125:this.raise(es.UnexpectedToken,this.state.curPosition(),{unexpected:this.input[this.state.pos],HTMLEntity:h===125?"}":">"});default:Ri(h)?(n+=this.input.slice(l,this.state.pos),n+=this.jsxReadNewLine(!0),l=this.state.pos):++this.state.pos}}}jsxReadNewLine(n){let l=this.input.charCodeAt(this.state.pos),h;return++this.state.pos,l===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,h=n?`
|
|
173
|
-
`:`\r
|
|
174
|
-
`):h=String.fromCharCode(l),++this.state.curLine,this.state.lineStart=this.state.pos,h}jsxReadString(n){let l="",h=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(N.UnterminatedString,this.state.startLoc);let g=this.input.charCodeAt(this.state.pos);if(g===n)break;g===38?(l+=this.input.slice(h,this.state.pos),l+=this.jsxReadEntity(),h=this.state.pos):Ri(g)?(l+=this.input.slice(h,this.state.pos),l+=this.jsxReadNewLine(!1),h=this.state.pos):++this.state.pos}l+=this.input.slice(h,this.state.pos++),this.finishToken(134,l)}jsxReadEntity(){let n=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let l=10;this.codePointAtPos(this.state.pos)===120&&(l=16,++this.state.pos);let h=this.readInt(l,void 0,!1,"bail");if(h!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(h)}else{let l=0,h=!1;for(;l++<10&&this.state.pos<this.length&&!(h=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(h){this.input.slice(n,this.state.pos);let g;++this.state.pos}}return this.state.pos=n,"&"}jsxReadWord(){let n,l=this.state.pos;do n=this.input.charCodeAt(++this.state.pos);while(si(n)||n===45);this.finishToken(141,this.input.slice(l,this.state.pos))}jsxParseIdentifier(){let n=this.startNode();return this.match(141)?n.name=this.state.value:sl(this.state.type)?n.name=Ss(this.state.type):this.unexpected(),this.next(),this.finishNode(n,"JSXIdentifier")}jsxParseNamespacedName(){let n=this.state.startLoc,l=this.jsxParseIdentifier();if(!this.eat(14))return l;let h=this.startNodeAt(n);return h.namespace=l,h.name=this.jsxParseIdentifier(),this.finishNode(h,"JSXNamespacedName")}jsxParseElementName(){let n=this.state.startLoc,l=this.jsxParseNamespacedName();if(l.type==="JSXNamespacedName")return l;for(;this.eat(16);){let h=this.startNodeAt(n);h.object=l,h.property=this.jsxParseIdentifier(),l=this.finishNode(h,"JSXMemberExpression")}return l}jsxParseAttributeValue(){let n;switch(this.state.type){case 5:return n=this.startNode(),this.setContext(he.brace),this.next(),n=this.jsxParseExpressionContainer(n,he.j_oTag),n.expression.type==="JSXEmptyExpression"&&this.raise(es.AttributeIsEmpty,n),n;case 143:case 134:return this.parseExprAtom();default:throw this.raise(es.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let n=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(n,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(n){return this.next(),n.expression=this.parseExpression(),this.setContext(he.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(n,"JSXSpreadChild")}jsxParseExpressionContainer(n,l){if(this.match(8))n.expression=this.jsxParseEmptyExpression();else{let h=this.parseExpression();h.type==="SequenceExpression"&&!h.extra?.parenthesized&&this.raise(es.UnexpectedSequenceExpression,h.expressions[1]),n.expression=h}return this.setContext(l),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(n,"JSXExpressionContainer")}jsxParseAttribute(){let n=this.startNode();return this.match(5)?(this.setContext(he.brace),this.next(),this.expect(21),n.argument=this.parseMaybeAssignAllowIn(),this.setContext(he.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(n,"JSXSpreadAttribute")):(n.name=this.jsxParseNamespacedName(),n.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(n,"JSXAttribute"))}jsxParseOpeningElementAt(n){let l=this.startNodeAt(n);return this.eat(144)?this.finishNode(l,"JSXOpeningFragment"):(l.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(l))}jsxParseOpeningElementAfterName(n){let l=[];for(;!this.match(56)&&!this.match(144);)l.push(this.jsxParseAttribute());return n.attributes=l,n.selfClosing=this.eat(56),this.expect(144),this.finishNode(n,"JSXOpeningElement")}jsxParseClosingElementAt(n){let l=this.startNodeAt(n);return this.eat(144)?this.finishNode(l,"JSXClosingFragment"):(l.name=this.jsxParseElementName(),this.expect(144),this.finishNode(l,"JSXClosingElement"))}jsxParseElementAt(n){let l=this.startNodeAt(n),h=[],g=this.jsxParseOpeningElementAt(n),T=null;if(!g.selfClosing){e:for(;;)switch(this.state.type){case 143:if(n=this.state.startLoc,this.next(),this.eat(56)){T=this.jsxParseClosingElementAt(n);break e}h.push(this.jsxParseElementAt(n));break;case 142:h.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let w=this.startNode();this.setContext(he.brace),this.next(),this.match(21)?h.push(this.jsxParseSpreadChild(w)):h.push(this.jsxParseExpressionContainer(w,he.j_expr));break}default:this.unexpected()}ws(g)&&!ws(T)&&T!==null?this.raise(es.MissingClosingTagFragment,T):!ws(g)&&ws(T)?this.raise(es.MissingClosingTagElement,T,{openingTagName:ji(g.name)}):!ws(g)&&!ws(T)&&ji(T.name)!==ji(g.name)&&this.raise(es.MissingClosingTagElement,T,{openingTagName:ji(g.name)})}if(ws(g)?(l.openingFragment=g,l.closingFragment=T):(l.openingElement=g,l.closingElement=T),l.children=h,this.match(47))throw this.raise(es.UnwrappedAdjacentJSXElements,this.state.startLoc);return ws(g)?this.finishNode(l,"JSXFragment"):this.finishNode(l,"JSXElement")}jsxParseElement(){let n=this.state.startLoc;return this.next(),this.jsxParseElementAt(n)}setContext(n){let{context:l}=this.state;l[l.length-1]=n}parseExprAtom(n){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(n)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(n){let l=this.curContext();if(l===he.j_expr){this.jsxReadToken();return}if(l===he.j_oTag||l===he.j_cTag){if(kr(n)){this.jsxReadWord();return}if(n===62){++this.state.pos,this.finishToken(144);return}if((n===34||n===39)&&l===he.j_oTag){this.jsxReadString(n);return}}if(n===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(n)}updateContext(n){let{context:l,type:h}=this.state;if(h===56&&n===143)l.splice(-2,2,he.j_cTag),this.state.canStartJSXElement=!1;else if(h===143)l.push(he.j_oTag);else if(h===144){let g=l[l.length-1];g===he.j_oTag&&n===56||g===he.j_cTag?(l.pop(),this.state.canStartJSXElement=l[l.length-1]===he.j_expr):(this.setContext(he.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=AE(h)}},YE=class extends ul{tsNames=new Map},QE=class extends ll{importsStack=[];createScope(o){return this.importsStack.push(new Set),new YE(o)}enter(o){o===1024&&this.importsStack.push(new Set),super.enter(o)}exit(){let o=super.exit();return o===1024&&this.importsStack.pop(),o}hasImport(o,n){let l=this.importsStack.length;if(this.importsStack[l-1].has(o))return!0;if(!n&&l>1){for(let h=0;h<l-1;h++)if(this.importsStack[h].has(o))return!0}return!1}declareName(o,n,l){if(n&4096){this.hasImport(o,!0)&&this.parser.raise(N.VarRedeclaration,l,{identifierName:o}),this.importsStack[this.importsStack.length-1].add(o);return}let h=this.currentScope(),g=h.tsNames.get(o)||0;if(n&1024){this.maybeExportDefined(h,o),h.tsNames.set(o,g|16);return}super.declareName(o,n,l),n&2&&(n&1||(this.checkRedeclarationInScope(h,o,n,l),this.maybeExportDefined(h,o)),g=g|1),n&256&&(g=g|2),n&512&&(g=g|4),n&128&&(g=g|8),g&&h.tsNames.set(o,g)}isRedeclaredInScope(o,n,l){let h=o.tsNames.get(n);if((h&2)>0){if(l&256){let g=!!(l&512),T=(h&4)>0;return g!==T}return!0}return l&128&&(h&8)>0?o.names.get(n)&2?!!(l&1):!1:l&2&&(h&1)>0?!0:super.isRedeclaredInScope(o,n,l)}checkLocalExport(o){let{name:n}=o;if(this.hasImport(n))return;let l=this.scopeStack.length;for(let h=l-1;h>=0;h--){let g=this.scopeStack[h].tsNames.get(n);if((g&1)>0||(g&16)>0)return}super.checkLocalExport(o)}},ZE=class{stacks=[];enter(o){this.stacks.push(o)}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 mo(o,n){return(o?2:0)|(n?1:0)}var eA=class{sawUnambiguousESM=!1;ambiguousScriptDifferentAst=!1;sourceToOffsetPos(o){return o+this.startIndex}offsetToSourcePos(o){return o-this.startIndex}hasPlugin(o){if(typeof o=="string")return this.plugins.has(o);{let[n,l]=o;if(!this.hasPlugin(n))return!1;let h=this.plugins.get(n);for(let g of Object.keys(l))if(h?.[g]!==l[g])return!1;return!0}}getPluginOption(o,n){return this.plugins.get(o)?.[n]}};function Ld(o,n){o.trailingComments===void 0?o.trailingComments=n:o.trailingComments.unshift(...n)}function tA(o,n){o.leadingComments===void 0?o.leadingComments=n:o.leadingComments.unshift(...n)}function Ui(o,n){o.innerComments===void 0?o.innerComments=n:o.innerComments.unshift(...n)}function ii(o,n,l){let h=null,g=n.length;for(;h===null&&g>0;)h=n[--g];h===null||h.start>l.start?Ui(o,l.comments):Ld(h,l.comments)}var rA=class extends eA{addComment(o){this.filename&&(o.loc.filename=this.filename);let{commentsLen:n}=this.state;this.comments.length!==n&&(this.comments.length=n),this.comments.push(o),this.state.commentsLen++}processComment(o){let{commentStack:n}=this.state,l=n.length;if(l===0)return;let h=l-1,g=n[h];g.start===o.end&&(g.leadingNode=o,h--);let{start:T}=o;for(;h>=0;h--){let w=n[h],k=w.end;if(k>T)w.containingNode=o,this.finalizeComment(w),n.splice(h,1);else{k===T&&(w.trailingNode=o);break}}}finalizeComment(o){let{comments:n}=o;if(o.leadingNode!==null||o.trailingNode!==null)o.leadingNode!==null&&Ld(o.leadingNode,n),o.trailingNode!==null&&tA(o.trailingNode,n);else{let l=o.containingNode,h=o.start;if(this.input.charCodeAt(this.offsetToSourcePos(h)-1)===44)switch(l.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":ii(l,l.properties,o);break;case"CallExpression":case"OptionalCallExpression":ii(l,l.arguments,o);break;case"ImportExpression":ii(l,[l.source,l.options??null],o);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":ii(l,l.params,o);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":ii(l,l.elements,o);break;case"ExportNamedDeclaration":case"ImportDeclaration":ii(l,l.specifiers,o);break;case"TSEnumDeclaration":Ui(l,n);break;case"TSEnumBody":ii(l,l.members,o);break;default:Ui(l,n)}else Ui(l,n)}}finalizeRemainingComments(){let{commentStack:o}=this.state;for(let n=o.length-1;n>=0;n--)this.finalizeComment(o[n]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(o){let{commentStack:n}=this.state,{length:l}=n;if(l===0)return;let h=n[l-1];h.leadingNode===o&&(h.leadingNode=null)}takeSurroundingComments(o,n,l){let{commentStack:h}=this.state,g=h.length;if(g===0)return;let T=g-1;for(;T>=0;T--){let w=h[T],k=w.end;if(w.start===l)w.leadingNode=o;else if(k===n)w.trailingNode=o;else if(k<n)break}}},sA=class hE{flags=1024;get strict(){return(this.flags&1)>0}set strict(n){n?this.flags|=1:this.flags&=-2}startIndex;curLine;lineStart;startLoc;endLoc;init({strictMode:n,sourceType:l,startIndex:h,startLine:g,startColumn:T}){this.strict=n===!1?!1:n===!0?!0:l==="module",this.startIndex=h,this.curLine=g,this.lineStart=-T,this.startLoc=this.endLoc=new D(g,T,h)}errors=[];potentialArrowAt=-1;noArrowAt=[];noArrowParamsConversionAt=[];get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(n){n?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(n){n?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(n){n?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(n){n?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(n){n?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(n){n?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(n){n?this.flags|=128:this.flags&=-129}topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};get soloAwait(){return(this.flags&256)>0}set soloAwait(n){n?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(n){n?this.flags|=512:this.flags&=-513}labels=[];commentsLen=0;commentStack=[];pos=0;type=140;value=null;start=0;end=0;lastTokEndLoc=null;lastTokStartLoc=null;context=[he.brace];get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(n){n?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(n){n?this.flags|=2048:this.flags&=-2049}firstInvalidTemplateEscapePos=null;get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(n){n?this.flags|=4096:this.flags&=-4097}strictErrors=new Map;tokensLength=0;curPosition(){return new D(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let n=new hE;return n.flags=this.flags,n.startIndex=this.startIndex,n.curLine=this.curLine,n.lineStart=this.lineStart,n.startLoc=this.startLoc,n.endLoc=this.endLoc,n.errors=this.errors.slice(),n.potentialArrowAt=this.potentialArrowAt,n.noArrowAt=this.noArrowAt.slice(),n.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),n.topicContext=this.topicContext,n.labels=this.labels.slice(),n.commentsLen=this.commentsLen,n.commentStack=this.commentStack.slice(),n.pos=this.pos,n.type=this.type,n.value=this.value,n.start=this.start,n.end=this.end,n.lastTokEndLoc=this.lastTokEndLoc,n.lastTokStartLoc=this.lastTokStartLoc,n.context=this.context.slice(),n.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,n.strictErrors=this.strictErrors,n.tokensLength=this.tokensLength,n}},iA=function(o){return o>=48&&o<=57},Od={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},yo={bin:o=>o===48||o===49,oct:o=>o>=48&&o<=55,dec:o=>o>=48&&o<=57,hex:o=>o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102};function Md(o,n,l,h,g,T){let w=l,k=h,O=g,_="",Q=null,ie=l,{length:ve}=n;for(;;){if(l>=ve){T.unterminated(w,k,O),_+=n.slice(ie,l);break}let Be=n.charCodeAt(l);if(nA(o,Be,n,l)){_+=n.slice(ie,l);break}if(Be===92){_+=n.slice(ie,l);let ft=aA(n,l,h,g,o==="template",T);ft.ch===null&&!Q?Q={pos:l,lineStart:h,curLine:g}:_+=ft.ch,{pos:l,lineStart:h,curLine:g}=ft,ie=l}else Be===8232||Be===8233?(++l,++g,h=l):Be===10||Be===13?o==="template"?(_+=n.slice(ie,l)+`
|
|
175
|
-
`,++l,Be===13&&n.charCodeAt(l)===10&&++l,++g,ie=h=l):T.unterminated(w,k,O):++l}return{pos:l,str:_,firstInvalidLoc:Q,lineStart:h,curLine:g}}function nA(o,n,l,h){return o==="template"?n===96||n===36&&l.charCodeAt(h+1)===123:n===(o==="double"?34:39)}function aA(o,n,l,h,g,T){let w=!g;n++;let k=_=>({pos:n,ch:_,lineStart:l,curLine:h}),O=o.charCodeAt(n++);switch(O){case 110:return k(`
|
|
176
|
-
`);case 114:return k("\r");case 120:{let _;return{code:_,pos:n}=hl(o,n,l,h,2,!1,w,T),k(_===null?null:String.fromCharCode(_))}case 117:{let _;return{code:_,pos:n}=Rd(o,n,l,h,w,T),k(_===null?null:String.fromCodePoint(_))}case 116:return k(" ");case 98:return k("\b");case 118:return k("\v");case 102:return k("\f");case 13:o.charCodeAt(n)===10&&++n;case 10:l=n,++h;case 8232:case 8233:return k("");case 56:case 57:if(g)return k(null);T.strictNumericEscape(n-1,l,h);default:if(O>=48&&O<=55){let _=n-1,Q=/^[0-7]+/.exec(o.slice(_,n+2))[0],ie=parseInt(Q,8);ie>255&&(Q=Q.slice(0,-1),ie=parseInt(Q,8)),n+=Q.length-1;let ve=o.charCodeAt(n);if(Q!=="0"||ve===56||ve===57){if(g)return k(null);T.strictNumericEscape(_,l,h)}return k(String.fromCharCode(ie))}return k(String.fromCharCode(O))}}function hl(o,n,l,h,g,T,w,k){let O=n,_;return{n:_,pos:n}=$d(o,n,l,h,16,g,T,!1,k,!w),_===null&&(w?k.invalidEscapeSequence(O,l,h):n=O-1),{code:_,pos:n}}function $d(o,n,l,h,g,T,w,k,O,_){let Q=n,ie=g===16?Od.hex:Od.decBinOct,ve=g===16?yo.hex:g===10?yo.dec:g===8?yo.oct:yo.bin,Be=!1,ft=0;for(let wt=0,ot=T??1/0;wt<ot;++wt){let ut=o.charCodeAt(n),Zt;if(ut===95&&k!=="bail"){let Sl=o.charCodeAt(n-1),wl=o.charCodeAt(n+1);if(k){if(Number.isNaN(wl)||!ve(wl)||ie.has(Sl)||ie.has(wl)){if(_)return{n:null,pos:n};O.unexpectedNumericSeparator(n,l,h)}}else{if(_)return{n:null,pos:n};O.numericSeparatorInEscapeSequence(n,l,h)}++n;continue}if(ut>=97?Zt=ut-97+10:ut>=65?Zt=ut-65+10:iA(ut)?Zt=ut-48:Zt=1/0,Zt>=g){if(Zt<=9&&_)return{n:null,pos:n};if(Zt<=9&&O.invalidDigit(n,l,h,g))Zt=0;else if(w)Zt=0,Be=!0;else break}++n,ft=ft*g+Zt}return n===Q||T!=null&&n-Q!==T||Be?{n:null,pos:n}:{n:ft,pos:n}}function Rd(o,n,l,h,g,T){let w=o.charCodeAt(n),k;if(w===123){if(++n,{code:k,pos:n}=hl(o,n,l,h,o.indexOf("}",n)-n,!0,g,T),++n,k!==null&&k>1114111)if(g)T.invalidCodePoint(n,l,h);else return{code:null,pos:n}}else({code:k,pos:n}=hl(o,n,l,h,4,!1,g,T));return{code:k,pos:n}}function $n(o,n,l){return new D(l,o-n,o)}var oA=new Set([103,109,115,105,121,117,100,118]),uA=class{constructor(o){let n=o.startIndex||0;this.type=o.type,this.value=o.value,this.start=n+o.start,this.end=n+o.end,this.loc=new y(o.startLoc,o.endLoc)}},lA=class extends rA{isLookahead;tokens=[];constructor(o,n){super(),this.state=new sA,this.state.init(o),this.input=n,this.length=n.length,this.comments=[],this.isLookahead=!1}pushToken(o){this.tokens.length=this.state.tokensLength,this.tokens.push(o),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new uA(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(o){return this.match(o)?(this.next(),!0):!1}match(o){return this.state.type===o}createLookaheadState(o){return{pos:o.pos,value:null,type:o.type,start:o.start,end:o.end,context:[this.curContext()],inType:o.inType,startLoc:o.startLoc,lastTokEndLoc:o.lastTokEndLoc,curLine:o.curLine,lineStart:o.lineStart,curPosition:o.curPosition}}lookahead(){let o=this.state;this.state=this.createLookaheadState(o),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let n=this.state;return this.state=o,n}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(o){return pl.lastIndex=o,pl.test(this.input)?pl.lastIndex:o}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(o){return this.input.charCodeAt(this.nextTokenStartSince(o))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(o){return cl.lastIndex=o,cl.test(this.input)?cl.lastIndex:o}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(o){let n=this.input.charCodeAt(o);if((n&64512)===55296&&++o<this.input.length){let l=this.input.charCodeAt(o);(l&64512)===56320&&(n=65536+((n&1023)<<10)+(l&1023))}return n}setStrict(o){this.state.strict=o,o&&(this.state.strictErrors.forEach(([n,l])=>this.raise(n,l)),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(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(o){let n;this.isLookahead||(n=this.state.curPosition());let l=this.state.pos,h=this.input.indexOf(o,l+2);if(h===-1)throw this.raise(N.UnterminatedComment,this.state.curPosition());for(this.state.pos=h+o.length,fo.lastIndex=l+2;fo.test(this.input)&&fo.lastIndex<=h;)++this.state.curLine,this.state.lineStart=fo.lastIndex;if(this.isLookahead)return;let g={type:"CommentBlock",value:this.input.slice(l+2,h),start:this.sourceToOffsetPos(l),end:this.sourceToOffsetPos(h+o.length),loc:new y(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(g),g}skipLineComment(o){let n=this.state.pos,l;this.isLookahead||(l=this.state.curPosition());let h=this.input.charCodeAt(this.state.pos+=o);if(this.state.pos<this.length)for(;!Ri(h)&&++this.state.pos<this.length;)h=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let g=this.state.pos,T={type:"CommentLine",value:this.input.slice(n+o,g),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(g),loc:new y(l,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(T),T}skipSpace(){let o=this.state.pos,n=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let l=this.input.charCodeAt(this.state.pos);switch(l){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 h=this.skipBlockComment("*/");h!==void 0&&(this.addComment(h),n?.push(h));break}case 47:{let h=this.skipLineComment(2);h!==void 0&&(this.addComment(h),n?.push(h));break}default:break e}break;default:if(XE(l))++this.state.pos;else if(l===45&&!this.inModule&&this.optionFlags&8192){let h=this.state.pos;if(this.input.charCodeAt(h+1)===45&&this.input.charCodeAt(h+2)===62&&(o===0||this.state.lineStart>o)){let g=this.skipLineComment(3);g!==void 0&&(this.addComment(g),n?.push(g))}else break e}else if(l===60&&!this.inModule&&this.optionFlags&8192){let h=this.state.pos;if(this.input.charCodeAt(h+1)===33&&this.input.charCodeAt(h+2)===45&&this.input.charCodeAt(h+3)===45){let g=this.skipLineComment(4);g!==void 0&&(this.addComment(g),n?.push(g))}else break e}else break e}}if(n?.length>0){let l=this.state.pos,h={start:this.sourceToOffsetPos(o),end:this.sourceToOffsetPos(l),comments:n,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(h)}}finishToken(o,n){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let l=this.state.type;this.state.type=o,this.state.value=n,this.isLookahead||this.updateContext(l)}replaceToken(o){this.state.type=o,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let o=this.state.pos+1,n=this.codePointAtPos(o);if(n>=48&&n<=57)throw this.raise(N.UnexpectedDigitAfterHash,this.state.curPosition());kr(n)?(++this.state.pos,this.finishToken(139,this.readWord1(n))):n===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let o=this.input.charCodeAt(this.state.pos+1);if(o>=48&&o<=57){this.readNumber(!0);return}o===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 o=this.input.charCodeAt(this.state.pos+1);if(o!==33)return!1;let n=this.state.pos;for(this.state.pos+=1;!Ri(o)&&++this.state.pos<this.length;)o=this.input.charCodeAt(this.state.pos);let l=this.input.slice(n+2,this.state.pos);return this.finishToken(28,l),!0}readToken_mult_modulo(o){let n=o===42?55:54,l=1,h=this.input.charCodeAt(this.state.pos+1);o===42&&h===42&&(l++,h=this.input.charCodeAt(this.state.pos+2),n=57),h===61&&!this.state.inType&&(l++,n=o===37?33:30),this.finishOp(n,l)}readToken_pipe_amp(o){let n=this.input.charCodeAt(this.state.pos+1);if(n===o){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(o===124?41:42,2);return}if(o===124&&n===62){this.finishOp(39,2);return}if(n===61){this.finishOp(30,2);return}this.finishOp(o===124?43:45,1)}readToken_caret(){let o=this.input.charCodeAt(this.state.pos+1);o===61&&!this.state.inType?this.finishOp(32,2):o===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(o){let n=this.input.charCodeAt(this.state.pos+1);if(n===o){this.finishOp(34,2);return}n===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:o}=this.state,n=this.input.charCodeAt(o+1);if(n===60){if(this.input.charCodeAt(o+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(n===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:o}=this.state,n=this.input.charCodeAt(o+1);if(n===62){let l=this.input.charCodeAt(o+2)===62?3:2;if(this.input.charCodeAt(o+l)===61){this.finishOp(30,l+1);return}this.finishOp(52,l);return}if(n===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(o){let n=this.input.charCodeAt(this.state.pos+1);if(n===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(o===61&&n===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(o===61?29:35,1)}readToken_question(){let o=this.input.charCodeAt(this.state.pos+1),n=this.input.charCodeAt(this.state.pos+2);o===63?n===61?this.finishOp(30,3):this.finishOp(40,2):o===46&&!(n>=48&&n<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(o){switch(o){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:++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:++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 n=this.input.charCodeAt(this.state.pos+1);if(n===120||n===88){this.readRadixNumber(16);return}if(n===111||n===79){this.readRadixNumber(8);return}if(n===98||n===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(o);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(o);return;case 124:case 38:this.readToken_pipe_amp(o);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(o);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(o);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(kr(o)){this.readWord(o);return}}throw this.raise(N.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(o)})}finishOp(o,n){let l=this.input.slice(this.state.pos,this.state.pos+n);this.state.pos+=n,this.finishToken(o,l)}readRegexp(){let o=this.state.startLoc,n=this.state.start+1,l,h,{pos:g}=this.state;for(;;++g){if(g>=this.length)throw this.raise(N.UnterminatedRegExp,x(o,1));let O=this.input.charCodeAt(g);if(Ri(O))throw this.raise(N.UnterminatedRegExp,x(o,1));if(l)l=!1;else{if(O===91)h=!0;else if(O===93&&h)h=!1;else if(O===47&&!h)break;l=O===92}}let T=this.input.slice(n,g);++g;let w="",k=()=>x(o,g+2-n);for(;g<this.length;){let O=this.codePointAtPos(g),_=String.fromCharCode(O);if(oA.has(O))O===118?w.includes("u")&&this.raise(N.IncompatibleRegExpUVFlags,k()):O===117&&w.includes("v")&&this.raise(N.IncompatibleRegExpUVFlags,k()),w.includes(_)&&this.raise(N.DuplicateRegExpFlags,k());else if(si(O)||O===92)this.raise(N.MalformedRegExpFlags,k());else break;++g,w+=_}this.state.pos=g,this.finishToken(138,{pattern:T,flags:w})}readInt(o,n,l=!1,h=!0){let{n:g,pos:T}=$d(this.input,this.state.pos,this.state.lineStart,this.state.curLine,o,n,l,h,this.errorHandlers_readInt,!1);return this.state.pos=T,g}readRadixNumber(o){let n=this.state.pos,l=this.state.curPosition(),h=!1;this.state.pos+=2;let g=this.readInt(o);g==null&&this.raise(N.InvalidDigit,x(l,2),{radix:o});let T=this.input.charCodeAt(this.state.pos);if(T===110)++this.state.pos,h=!0;else if(T===109)throw this.raise(N.InvalidDecimal,l);if(kr(this.codePointAtPos(this.state.pos)))throw this.raise(N.NumberIdentifier,this.state.curPosition());if(h){let w=this.input.slice(n,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,w);return}this.finishToken(135,g)}readNumber(o){let n=this.state.pos,l=this.state.curPosition(),h=!1,g=!1,T=!1;!o&&this.readInt(10)===null&&this.raise(N.InvalidNumber,this.state.curPosition());let w=this.state.pos-n>=2&&this.input.charCodeAt(n)===48;if(w){let Q=this.input.slice(n,this.state.pos);if(this.recordStrictModeErrors(N.StrictOctalLiteral,l),!this.state.strict){let ie=Q.indexOf("_");ie>0&&this.raise(N.ZeroDigitNumericSeparator,x(l,ie))}T=w&&!/[89]/.test(Q)}let k=this.input.charCodeAt(this.state.pos);if(k===46&&!T&&(++this.state.pos,this.readInt(10),h=!0,k=this.input.charCodeAt(this.state.pos)),(k===69||k===101)&&!T&&(k=this.input.charCodeAt(++this.state.pos),(k===43||k===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(N.InvalidOrMissingExponent,l),h=!0,k=this.input.charCodeAt(this.state.pos)),k===110&&((h||w)&&this.raise(N.InvalidBigIntLiteral,l),++this.state.pos,g=!0),kr(this.codePointAtPos(this.state.pos)))throw this.raise(N.NumberIdentifier,this.state.curPosition());let O=this.input.slice(n,this.state.pos).replace(/[_mn]/g,"");if(g){this.finishToken(136,O);return}let _=T?parseInt(O,8):parseFloat(O);this.finishToken(135,_)}readCodePoint(o){let{code:n,pos:l}=Rd(this.input,this.state.pos,this.state.lineStart,this.state.curLine,o,this.errorHandlers_readCodePoint);return this.state.pos=l,n}readString(o){let{str:n,pos:l,curLine:h,lineStart:g}=Md(o===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=l+1,this.state.lineStart=g,this.state.curLine=h,this.finishToken(134,n)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let o=this.input[this.state.pos],{str:n,firstInvalidLoc:l,pos:h,curLine:g,lineStart:T}=Md("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=h+1,this.state.lineStart=T,this.state.curLine=g,l&&(this.state.firstInvalidTemplateEscapePos=new D(l.curLine,l.pos-l.lineStart,this.sourceToOffsetPos(l.pos))),this.input.codePointAt(h)===96?this.finishToken(24,l?null:o+n+"`"):(this.state.pos++,this.finishToken(25,l?null:o+n+"${"))}recordStrictModeErrors(o,n){let l=n.index;this.state.strict&&!this.state.strictErrors.has(l)?this.raise(o,n):this.state.strictErrors.set(l,[o,n])}readWord1(o){this.state.containsEsc=!1;let n="",l=this.state.pos,h=this.state.pos;for(o!==void 0&&(this.state.pos+=o<=65535?1:2);this.state.pos<this.length;){let g=this.codePointAtPos(this.state.pos);if(si(g))this.state.pos+=g<=65535?1:2;else if(g===92){this.state.containsEsc=!0,n+=this.input.slice(h,this.state.pos);let T=this.state.curPosition(),w=this.state.pos===l?kr:si;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(N.MissingUnicodeEscape,this.state.curPosition()),h=this.state.pos-1;continue}++this.state.pos;let k=this.readCodePoint(!0);k!==null&&(w(k)||this.raise(N.EscapedCharNotAnIdentifier,T),n+=String.fromCodePoint(k)),h=this.state.pos}else break}return n+this.input.slice(h,this.state.pos)}readWord(o){let n=this.readWord1(o),l=K.get(n);l!==void 0?this.finishToken(l,Ss(l)):this.finishToken(132,n)}checkKeywordEscapes(){let{type:o}=this.state;sl(o)&&this.state.containsEsc&&this.raise(N.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Ss(o)})}raise(o,n,l={}){let h=n instanceof D?n:n.loc.start,g=o(h,l);if(!(this.optionFlags&2048))throw g;return this.isLookahead||this.state.errors.push(g),g}raiseOverwrite(o,n,l={}){let h=n instanceof D?n:n.loc.start,g=h.index,T=this.state.errors;for(let w=T.length-1;w>=0;w--){let k=T[w];if(k.loc.index===g)return T[w]=o(h,l);if(k.loc.index<g)break}return this.raise(o,n,l)}updateContext(o){}unexpected(o,n){throw this.raise(N.UnexpectedToken,o??this.state.startLoc,{expected:n?Ss(n):null})}expectPlugin(o,n){if(this.hasPlugin(o))return!0;throw this.raise(N.MissingPlugin,n??this.state.startLoc,{missingPlugin:[o]})}expectOnePlugin(o){if(!o.some(n=>this.hasPlugin(n)))throw this.raise(N.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:o})}errorBuilder(o){return(n,l,h)=>{this.raise(o,$n(n,l,h))}}errorHandlers_readInt={invalidDigit:(o,n,l,h)=>this.optionFlags&2048?(this.raise(N.InvalidDigit,$n(o,n,l),{radix:h}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(N.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(N.UnexpectedNumericSeparator)};errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(N.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(N.InvalidCodePoint)});errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(o,n,l)=>{this.recordStrictModeErrors(N.StrictNumericEscape,$n(o,n,l))},unterminated:(o,n,l)=>{throw this.raise(N.UnterminatedString,$n(o-1,n,l))}});errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(N.StrictNumericEscape),unterminated:(o,n,l)=>{throw this.raise(N.UnterminatedTemplate,$n(o,n,l))}})},pA=class{privateNames=new Set;loneAccessors=new Map;undefinedPrivateNames=new Map},cA=class{parser;stack=[];undefinedPrivateNames=new Map;constructor(o){this.parser=o}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new pA)}exit(){let o=this.stack.pop(),n=this.current();for(let[l,h]of Array.from(o.undefinedPrivateNames))n?n.undefinedPrivateNames.has(l)||n.undefinedPrivateNames.set(l,h):this.parser.raise(N.InvalidPrivateFieldResolution,h,{identifierName:l})}declarePrivateName(o,n,l){let{privateNames:h,loneAccessors:g,undefinedPrivateNames:T}=this.current(),w=h.has(o);if(n&3){let k=w&&g.get(o);if(k){let O=k&4,_=n&4,Q=k&3,ie=n&3;w=Q===ie||O!==_,w||g.delete(o)}else w||g.set(o,n)}w&&this.parser.raise(N.PrivateNameRedeclaration,l,{identifierName:o}),h.add(o),T.delete(o)}usePrivateName(o,n){let l;for(l of this.stack)if(l.privateNames.has(o))return;l?l.undefinedPrivateNames.set(o,n):this.parser.raise(N.InvalidPrivateFieldResolution,n,{identifierName:o})}},go=class{constructor(o=0){this.type=o}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},jd=class extends go{declarationErrors=new Map;constructor(o){super(o)}recordDeclarationError(o,n){let l=n.index;this.declarationErrors.set(l,[o,n])}clearDeclarationError(o){this.declarationErrors.delete(o)}iterateErrors(o){this.declarationErrors.forEach(o)}},hA=class{parser;stack=[new go];constructor(o){this.parser=o}enter(o){this.stack.push(o)}exit(){this.stack.pop()}recordParameterInitializerError(o,n){let l=n.loc.start,{stack:h}=this,g=h.length-1,T=h[g];for(;!T.isCertainlyParameterDeclaration();){if(T.canBeArrowParameterDeclaration())T.recordDeclarationError(o,l);else return;T=h[--g]}this.parser.raise(o,l)}recordArrowParameterBindingError(o,n){let{stack:l}=this,h=l[l.length-1],g=n.loc.start;if(h.isCertainlyParameterDeclaration())this.parser.raise(o,g);else if(h.canBeArrowParameterDeclaration())h.recordDeclarationError(o,g);else return}recordAsyncArrowParametersError(o){let{stack:n}=this,l=n.length-1,h=n[l];for(;h.canBeArrowParameterDeclaration();)h.type===2&&h.recordDeclarationError(N.AwaitBindingIdentifier,o),h=n[--l]}validateAsPattern(){let{stack:o}=this,n=o[o.length-1];n.canBeArrowParameterDeclaration()&&n.iterateErrors(([l,h])=>{this.parser.raise(l,h);let g=o.length-2,T=o[g];for(;T.canBeArrowParameterDeclaration();)T.clearDeclarationError(h.index),T=o[--g]})}};function dA(){return new go(3)}function fA(){return new jd(1)}function mA(){return new jd(2)}function Ud(){return new go}var yA=class extends lA{addExtra(o,n,l,h=!0){if(!o)return;let{extra:g}=o;g==null&&(g={},o.extra=g),h?g[n]=l:Object.defineProperty(g,n,{enumerable:h,value:l})}isContextual(o){return this.state.type===o&&!this.state.containsEsc}isUnparsedContextual(o,n){if(this.input.startsWith(n,o)){let l=this.input.charCodeAt(o+n.length);return!(si(l)||(l&64512)===55296)}return!1}isLookaheadContextual(o){let n=this.nextTokenStart();return this.isUnparsedContextual(n,o)}eatContextual(o){return this.isContextual(o)?(this.next(),!0):!1}expectContextual(o,n){if(!this.eatContextual(o)){if(n!=null)throw this.raise(n,this.state.startLoc);this.unexpected(null,o)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return _d(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return _d(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(o=!0){(o?this.isLineTerminator():this.eat(13))||this.raise(N.MissingSemicolon,this.state.lastTokEndLoc)}expect(o,n){this.eat(o)||this.unexpected(n,o)}tryParse(o,n=this.state.clone()){let l={node:null};try{let h=o((g=null)=>{throw l.node=g,l});if(this.state.errors.length>n.errors.length){let g=this.state;return this.state=n,this.state.tokensLength=g.tokensLength,{node:h,error:g.errors[n.errors.length],thrown:!1,aborted:!1,failState:g}}return{node:h,error:null,thrown:!1,aborted:!1,failState:null}}catch(h){let g=this.state;if(this.state=n,h instanceof SyntaxError)return{node:null,error:h,thrown:!0,aborted:!1,failState:g};if(h===l)return{node:l.node,error:null,thrown:!1,aborted:!0,failState:g};throw h}}checkExpressionErrors(o,n){if(!o)return!1;let{shorthandAssignLoc:l,doubleProtoLoc:h,privateKeyLoc:g,optionalParametersLoc:T,voidPatternLoc:w}=o,k=!!l||!!h||!!T||!!g||!!w;if(!n)return k;l!=null&&this.raise(N.InvalidCoverInitializedName,l),h!=null&&this.raise(N.DuplicateProto,h),g!=null&&this.raise(N.UnexpectedPrivateField,g),T!=null&&this.unexpected(T),w!=null&&this.raise(N.InvalidCoverDiscardElement,w)}isLiteralPropertyName(){return Td(this.state.type)}isPrivateName(o){return o.type==="PrivateName"}getPrivateNameSV(o){return o.id.name}hasPropertyAsPrivateName(o){return(o.type==="MemberExpression"||o.type==="OptionalMemberExpression")&&this.isPrivateName(o.property)}isObjectProperty(o){return o.type==="ObjectProperty"}isObjectMethod(o){return o.type==="ObjectMethod"}initializeScopes(o=this.options.sourceType==="module"){let n=this.state.labels;this.state.labels=[];let l=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let h=this.inModule;this.inModule=o;let g=this.scope,T=this.getScopeHandler();this.scope=new T(this,o);let w=this.prodParam;this.prodParam=new ZE;let k=this.classScope;this.classScope=new cA(this);let O=this.expressionScope;return this.expressionScope=new hA(this),()=>{this.state.labels=n,this.exportedIdentifiers=l,this.inModule=h,this.scope=g,this.prodParam=w,this.classScope=k,this.expressionScope=O}}enterInitialScopes(){let o=0;(this.inModule||this.optionFlags&1)&&(o|=2),this.optionFlags&32&&(o|=1);let n=!this.inModule&&this.options.sourceType==="commonjs";(n||this.optionFlags&2)&&(o|=4),this.prodParam.enter(o);let l=n?514:1;this.optionFlags&4&&(l|=512),this.optionFlags&16&&(l|=48),this.scope.enter(l)}checkDestructuringPrivate(o){let{privateKeyLoc:n}=o;n!==null&&this.expectPlugin("destructuringPrivate",n)}},Do=class{shorthandAssignLoc=null;doubleProtoLoc=null;privateKeyLoc=null;optionalParametersLoc=null;voidPatternLoc=null},dl=class{constructor(o,n,l){this.start=n,this.end=0,this.loc=new y(l),o?.optionFlags&128&&(this.range=[n,0]),o?.filename&&(this.loc.filename=o.filename)}type=""},Vd=dl.prototype,gA=class extends yA{startNode(){let o=this.state.startLoc;return new dl(this,o.index,o)}startNodeAt(o){return new dl(this,o.index,o)}startNodeAtNode(o){return this.startNodeAt(o.loc.start)}finishNode(o,n){return this.finishNodeAt(o,n,this.state.lastTokEndLoc)}finishNodeAt(o,n,l){return o.type=n,o.end=l.index,o.loc.end=l,this.optionFlags&128&&(o.range[1]=l.index),this.optionFlags&4096&&this.processComment(o),o}resetStartLocation(o,n){o.start=n.index,o.loc.start=n,this.optionFlags&128&&(o.range[0]=n.index)}resetEndLocation(o,n=this.state.lastTokEndLoc){o.end=n.index,o.loc.end=n,this.optionFlags&128&&(o.range[1]=n.index)}resetStartLocationFromNode(o,n){this.resetStartLocation(o,n.loc.start)}castNodeTo(o,n){return o.type=n,o}cloneIdentifier(o){let{type:n,start:l,end:h,loc:g,range:T,name:w}=o,k=Object.create(Vd);return k.type=n,k.start=l,k.end=h,k.loc=g,k.range=T,k.name=w,o.extra&&(k.extra=o.extra),k}cloneStringLiteral(o){let{type:n,start:l,end:h,loc:g,range:T,extra:w}=o,k=Object.create(Vd);return k.type=n,k.start=l,k.end=h,k.loc=g,k.range=T,k.extra=w,k.value=o.value,k}},fl=o=>o.type==="ParenthesizedExpression"?fl(o.expression):o,DA=class extends gA{toAssignable(o,n=!1){let l;switch((o.type==="ParenthesizedExpression"||o.extra?.parenthesized)&&(l=fl(o),n?l.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(N.InvalidParenthesizedAssignment,o):l.type!=="CallExpression"&&l.type!=="MemberExpression"&&!this.isOptionalMemberExpression(l)&&this.raise(N.InvalidParenthesizedAssignment,o):this.raise(N.InvalidParenthesizedAssignment,o)),o.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(o,"ObjectPattern");for(let h=0,g=o.properties.length,T=g-1;h<g;h++){let w=o.properties[h],k=h===T;this.toAssignableObjectExpressionProp(w,k,n),k&&w.type==="RestElement"&&o.extra?.trailingCommaLoc&&this.raise(N.RestTrailingComma,o.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:h,value:g}=o;this.isPrivateName(h)&&this.classScope.usePrivateName(this.getPrivateNameSV(h),h.loc.start),this.toAssignable(g,n);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":this.castNodeTo(o,"ArrayPattern"),this.toAssignableList(o.elements,o.extra?.trailingCommaLoc,n);break;case"AssignmentExpression":o.operator!=="="&&this.raise(N.MissingEqInAssignment,o.left.loc.end),this.castNodeTo(o,"AssignmentPattern"),delete o.operator,o.left.type==="VoidPattern"&&this.raise(N.VoidPatternInitializer,o.left),this.toAssignable(o.left,n);break;case"ParenthesizedExpression":this.toAssignable(l,n);break}}toAssignableObjectExpressionProp(o,n,l){if(o.type==="ObjectMethod")this.raise(o.kind==="get"||o.kind==="set"?N.PatternHasAccessor:N.PatternHasMethod,o.key);else if(o.type==="SpreadElement"){this.castNodeTo(o,"RestElement");let h=o.argument;this.checkToRestConversion(h,!1),this.toAssignable(h,l),n||this.raise(N.RestTrailingComma,o)}else this.toAssignable(o,l)}toAssignableList(o,n,l){let h=o.length-1;for(let g=0;g<=h;g++){let T=o[g];T&&(this.toAssignableListItem(o,g,l),T.type==="RestElement"&&(g<h?this.raise(N.RestTrailingComma,T):n&&this.raise(N.RestTrailingComma,n)))}}toAssignableListItem(o,n,l){let h=o[n];if(h.type==="SpreadElement"){this.castNodeTo(h,"RestElement");let g=h.argument;this.checkToRestConversion(g,!0),this.toAssignable(g,l)}else this.toAssignable(h,l)}isAssignable(o,n){switch(o.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let l=o.properties.length-1;return o.properties.every((h,g)=>h.type!=="ObjectMethod"&&(g===l||h.type!=="SpreadElement")&&this.isAssignable(h))}case"ObjectProperty":return this.isAssignable(o.value);case"SpreadElement":return this.isAssignable(o.argument);case"ArrayExpression":return o.elements.every(l=>l===null||this.isAssignable(l));case"AssignmentExpression":return o.operator==="=";case"ParenthesizedExpression":return this.isAssignable(o.expression);case"MemberExpression":case"OptionalMemberExpression":return!n;default:return!1}}toReferencedList(o,n){return o}toReferencedListDeep(o,n){this.toReferencedList(o,n);for(let l of o)l?.type==="ArrayExpression"&&this.toReferencedListDeep(l.elements)}parseSpread(o){let n=this.startNode();return this.next(),n.argument=this.parseMaybeAssignAllowIn(o,void 0),this.finishNode(n,"SpreadElement")}parseRestBinding(){let o=this.startNode();this.next();let n=this.parseBindingAtom();return n.type==="VoidPattern"&&this.raise(N.UnexpectedVoidPattern,n),o.argument=n,this.finishNode(o,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let o=this.startNode();return this.next(),o.elements=this.parseBindingList(3,93,1),this.finishNode(o,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(o,n,l){let h=l&1,g=[],T=!0;for(;!this.eat(o);)if(T?T=!1:this.expect(12),h&&this.match(12))g.push(null);else{if(this.eat(o))break;if(this.match(21)){let w=this.parseRestBinding();if(l&2&&(w=this.parseFunctionParamType(w)),g.push(w),!this.checkCommaAfterRest(n)){this.expect(o);break}}else{let w=[];if(l&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(N.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)w.push(this.parseDecorator());g.push(this.parseBindingElement(l,w))}}return g}parseBindingRestProperty(o){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(o.argument=this.parseVoidPattern(null),this.raise(N.UnexpectedVoidPattern,o.argument)):o.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(o,"RestElement")}parseBindingProperty(){let{type:o,startLoc:n}=this.state;if(o===21)return this.parseBindingRestProperty(this.startNode());let l=this.startNode();return o===139?(this.expectPlugin("destructuringPrivate",n),this.classScope.usePrivateName(this.state.value,n),l.key=this.parsePrivateName()):this.parsePropertyName(l),l.method=!1,this.parseObjPropValue(l,n,!1,!1,!0,!1)}parseBindingElement(o,n){let l=this.parseMaybeDefault();return o&2&&this.parseFunctionParamType(l),n.length&&(l.decorators=n,this.resetStartLocationFromNode(l,n[0])),this.parseMaybeDefault(l.loc.start,l)}parseFunctionParamType(o){return o}parseMaybeDefault(o,n){if(o??(o=this.state.startLoc),n=n??this.parseBindingAtom(),!this.eat(29))return n;let l=this.startNodeAt(o);return n.type==="VoidPattern"&&this.raise(N.VoidPatternInitializer,n),l.left=n,l.right=this.parseMaybeAssignAllowIn(),this.finishNode(l,"AssignmentPattern")}isValidLVal(o,n,l,h){switch(o){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!n&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(o){return o.type==="OptionalMemberExpression"}checkLVal(o,n,l=64,h=!1,g=!1,T=!1,w=!1){let k=o.type;if(this.isObjectMethod(o))return;let O=this.isOptionalMemberExpression(o);if(O||k==="MemberExpression"){O&&(this.expectPlugin("optionalChainingAssign",o.loc.start),n.type!=="AssignmentExpression"&&this.raise(N.InvalidLhsOptionalChaining,o,{ancestor:n})),l!==64&&this.raise(N.InvalidPropertyBindingPattern,o);return}if(k==="Identifier"){this.checkIdentifier(o,l,g);let{name:wt}=o;h&&(h.has(wt)?this.raise(N.ParamDupe,o):h.add(wt));return}else k==="VoidPattern"&&n.type==="CatchClause"&&this.raise(N.VoidPatternCatchClauseParam,o);let _=fl(o);w||(w=_.type==="CallExpression"&&(_.callee.type==="Import"||_.callee.type==="Super"));let Q=this.isValidLVal(k,w,!(T||o.extra?.parenthesized)&&n.type==="AssignmentExpression",l);if(Q===!0)return;if(Q===!1){let wt=l===64?N.InvalidLhs:N.InvalidLhsBinding;this.raise(wt,o,{ancestor:n});return}let ie,ve;typeof Q=="string"?(ie=Q,ve=k==="ParenthesizedExpression"):[ie,ve]=Q;let Be=k==="ArrayPattern"||k==="ObjectPattern"?{type:k}:n,ft=o[ie];if(Array.isArray(ft))for(let wt of ft)wt&&this.checkLVal(wt,Be,l,h,g,ve,!0);else ft&&this.checkLVal(ft,Be,l,h,g,ve,w)}checkIdentifier(o,n,l=!1){this.state.strict&&(l?Nd(o.name,this.inModule):Id(o.name))&&(n===64?this.raise(N.StrictEvalArguments,o,{referenceName:o.name}):this.raise(N.StrictEvalArgumentsBinding,o,{bindingName:o.name})),n&8192&&o.name==="let"&&this.raise(N.LetInLexicalBinding,o),n&64||this.declareNameFromIdentifier(o,n)}declareNameFromIdentifier(o,n){this.scope.declareName(o.name,n,o.loc.start)}checkToRestConversion(o,n){switch(o.type){case"ParenthesizedExpression":this.checkToRestConversion(o.expression,n);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(n)break;default:this.raise(N.InvalidRestAssignmentPattern,o)}}checkCommaAfterRest(o){return this.match(12)?(this.raise(this.lookaheadCharCode()===o?N.RestTrailingComma:N.ElementAfterRest,this.state.startLoc),!0):!1}},ml=/in(?:stanceof)?|as|satisfies/y;function xA(o){if(o==null)throw new Error(`Unexpected ${o} value.`);return o}function qd(o){if(!o)throw new Error("Assert fail")}var me=V`typescript`({AbstractMethodHasImplementation:({methodName:o})=>`Method '${o}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:o})=>`Property '${o}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"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:o})=>`'declare' is not allowed in ${o}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:o})=>`Accessibility modifier already seen: '${o}'.`,DuplicateModifier:({modifier:o})=>`Duplicate modifier: '${o}'.`,EmptyHeritageClauseType:({token:o})=>`'${o}' 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:o})=>`'${o[0]}' modifier cannot be used with '${o[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:o})=>`Index signatures cannot have an accessibility modifier ('${o}').`,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.",InvalidHeritageClauseType:({token:o})=>`'${o}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:o=>`'${o}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:o})=>`'${o}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:o})=>`'${o}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:o})=>`'${o}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:o=>`'${o}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:o})=>`'${o[0]}' modifier must precede '${o[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.",NonClassMethodPropertyHasAbstractModifier:"'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:o})=>`Private elements cannot have an accessibility modifier ('${o}').`,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.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:o})=>`Single type parameter ${o} should have a trailing comma. Example usage: <${o},>.`,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:o})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${o}.`,UsingDeclarationInAmbientContext:o=>`'${o}' declarations are not allowed in ambient contexts.`});function EA(o){switch(o){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 Hd(o){return o==="private"||o==="public"||o==="protected"}function AA(o){return o==="in"||o==="out"}function yl(o){if(o.extra?.parenthesized)return!1;switch(o.type){case"Identifier":return!0;case"MemberExpression":return!o.computed&&yl(o.object);case"TSInstantiationExpression":return yl(o.expression);default:return!1}}var CA=o=>class extends o{getScopeHandler(){return QE}tsIsIdentifier(){return ze(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(n,l,h){if(!ze(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let g=this.state.value;if(n.includes(g)){if(h&&this.match(106)||l&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return g}}tsParseModifiers({allowedModifiers:n,disallowedModifiers:l,stopOnStartOfClassStaticBlock:h,errorTemplate:g=me.InvalidModifierOnTypeMember},T){let w=(O,_,Q,ie)=>{_===Q&&T[ie]&&this.raise(me.InvalidModifiersOrder,O,{orderedModifiers:[Q,ie]})},k=(O,_,Q,ie)=>{(T[Q]&&_===ie||T[ie]&&_===Q)&&this.raise(me.IncompatibleModifiers,O,{modifiers:[Q,ie]})};for(;;){let{startLoc:O}=this.state,_=this.tsParseModifier(n.concat(l??[]),h,T.static);if(!_)break;Hd(_)?T.accessibility?this.raise(me.DuplicateAccessibilityModifier,O,{modifier:_}):(w(O,_,_,"override"),w(O,_,_,"static"),w(O,_,_,"readonly"),T.accessibility=_):AA(_)?(T[_]&&this.raise(me.DuplicateModifier,O,{modifier:_}),T[_]=!0,w(O,_,"in","out")):(Object.prototype.hasOwnProperty.call(T,_)?this.raise(me.DuplicateModifier,O,{modifier:_}):(w(O,_,"static","readonly"),w(O,_,"static","override"),w(O,_,"override","readonly"),w(O,_,"abstract","override"),k(O,_,"declare","override"),k(O,_,"static","abstract")),T[_]=!0),l?.includes(_)&&this.raise(g,O,{modifier:_})}}tsIsListTerminator(n){switch(n){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(n,l){let h=[];for(;!this.tsIsListTerminator(n);)h.push(l());return h}tsParseDelimitedList(n,l,h){return xA(this.tsParseDelimitedListWorker(n,l,!0,h))}tsParseDelimitedListWorker(n,l,h,g){let T=[],w=-1;for(;!this.tsIsListTerminator(n);){w=-1;let k=l();if(k==null)return;if(T.push(k),this.eat(12)){w=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(n))break;h&&this.expect(12);return}return g&&(g.value=w),T}tsParseBracketedList(n,l,h,g,T){g||(h?this.expect(0):this.expect(47));let w=this.tsParseDelimitedList(n,l,T);return h?this.expect(3):this.expect(48),w}tsParseImportType(){let n=this.startNode();return this.expect(83),this.expect(10),this.match(134)?n.argument=this.tsParseLiteralTypeNode():(this.raise(me.UnsupportedImportTypeArgument,this.state.startLoc),n.argument=this.tsParseNonConditionalType()),this.eat(12)?n.options=this.tsParseImportTypeOptions():n.options=null,this.expect(11),this.eat(16)&&(n.qualifier=this.tsParseEntityName(3)),this.match(47)&&(n.typeArguments=this.tsParseTypeArguments()),this.finishNode(n,"TSImportType")}tsParseImportTypeOptions(){let n=this.startNode();this.expect(5);let l=this.startNode();return this.isContextual(76)?(l.method=!1,l.key=this.parseIdentifier(!0),l.computed=!1,l.shorthand=!1):this.unexpected(null,76),this.expect(14),l.value=this.tsParseImportTypeWithPropertyValue(),n.properties=[this.finishObjectProperty(l)],this.eat(12),this.expect(8),this.finishNode(n,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let n=this.startNode(),l=[];for(this.expect(5);!this.match(8);){let h=this.state.type;ze(h)||h===134?l.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return n.properties=l,this.next(),this.finishNode(n,"ObjectExpression")}tsParseEntityName(n){let l;if(n&1&&this.match(78))if(n&2)l=this.parseIdentifier(!0);else{let h=this.startNode();this.next(),l=this.finishNode(h,"ThisExpression")}else l=this.parseIdentifier(!!(n&1));for(;this.eat(16);){let h=this.startNodeAtNode(l);h.left=l,h.right=this.parseIdentifier(!!(n&1)),l=this.finishNode(h,"TSQualifiedName")}return l}tsParseTypeReference(){let n=this.startNode();return n.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(n.typeArguments=this.tsParseTypeArguments()),this.finishNode(n,"TSTypeReference")}tsParseThisTypePredicate(n){this.next();let l=this.startNodeAtNode(n);return l.parameterName=n,l.typeAnnotation=this.tsParseTypeAnnotation(!1),l.asserts=!1,this.finishNode(l,"TSTypePredicate")}tsParseThisTypeNode(){let n=this.startNode();return this.next(),this.finishNode(n,"TSThisType")}tsParseTypeQuery(){let n=this.startNode();return this.expect(87),this.match(83)?n.exprName=this.tsParseImportType():n.exprName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(n.typeArguments=this.tsParseTypeArguments()),this.finishNode(n,"TSTypeQuery")}tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:me.InvalidModifierOnTypeParameter});tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:me.InvalidModifierOnTypeParameterPositions});tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:me.InvalidModifierOnTypeParameter});tsParseTypeParameter(n){let l=this.startNode();return n(l),l.name=this.tsParseTypeParameterName(),l.constraint=this.tsEatThenParseType(81),l.default=this.tsEatThenParseType(29),this.finishNode(l,"TSTypeParameter")}tsTryParseTypeParameters(n){if(this.match(47))return this.tsParseTypeParameters(n)}tsParseTypeParameters(n){let l=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let h={value:-1};return l.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,n),!1,!0,h),l.params.length===0&&this.raise(me.EmptyTypeParameters,l),h.value!==-1&&this.addExtra(l,"trailingComma",h.value),this.finishNode(l,"TSTypeParameterDeclaration")}tsFillSignature(n,l){let h=n===19,g="params",T="returnType";l.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),l[g]=this.tsParseBindingListForSignature(),h?l[T]=this.tsParseTypeOrTypePredicateAnnotation(n):this.match(n)&&(l[T]=this.tsParseTypeOrTypePredicateAnnotation(n))}tsParseBindingListForSignature(){let n=super.parseBindingList(11,41,2);for(let l of n){let{type:h}=l;(h==="AssignmentPattern"||h==="TSParameterProperty")&&this.raise(me.UnsupportedSignatureParameterKind,l,{type:h})}return n}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(n,l){return this.tsFillSignature(14,l),this.tsParseTypeMemberSemicolon(),this.finishNode(l,n)}tsIsUnambiguouslyIndexSignature(){return this.next(),ze(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(n){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let l=this.parseIdentifier();l.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(l),this.expect(3),n.parameters=[l];let h=this.tsTryParseTypeAnnotation();return h&&(n.typeAnnotation=h),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSIndexSignature")}tsParsePropertyOrMethodSignature(n,l){if(this.eat(17)&&(n.optional=!0),this.match(10)||this.match(47)){l&&this.raise(me.ReadonlyForMethodSignature,n);let h=n;h.kind&&this.match(47)&&this.raise(me.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,h),this.tsParseTypeMemberSemicolon();let g="params",T="returnType";if(h.kind==="get")h[g].length>0&&(this.raise(N.BadGetterArity,this.state.curPosition()),this.isThisParam(h[g][0])&&this.raise(me.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(h.kind==="set"){if(h[g].length!==1)this.raise(N.BadSetterArity,this.state.curPosition());else{let w=h[g][0];this.isThisParam(w)&&this.raise(me.AccessorCannotDeclareThisParameter,this.state.curPosition()),w.type==="Identifier"&&w.optional&&this.raise(me.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),w.type==="RestElement"&&this.raise(me.SetAccessorCannotHaveRestParameter,this.state.curPosition())}h[T]&&this.raise(me.SetAccessorCannotHaveReturnType,h[T])}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{let h=n;l&&(h.readonly=!0);let g=this.tsTryParseTypeAnnotation();return g&&(h.typeAnnotation=g),this.tsParseTypeMemberSemicolon(),this.finishNode(h,"TSPropertySignature")}}tsParseTypeMember(){let n=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",n);if(this.match(77)){let h=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",n):(n.key=this.createIdentifier(h,"new"),this.tsParsePropertyOrMethodSignature(n,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},n),this.tsTryParseIndexSignature(n)||(super.parsePropertyName(n),!n.computed&&n.key.type==="Identifier"&&(n.key.name==="get"||n.key.name==="set")&&this.tsTokenCanFollowModifier()&&(n.kind=n.key.name,super.parsePropertyName(n),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(n,!!n.readonly))}tsParseTypeLiteral(){let n=this.startNode();return n.members=this.tsParseObjectTypeMembers(),this.finishNode(n,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let n=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),n}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)))}tsParseMappedType(){let n=this.startNode();return this.expect(5),this.match(53)?(n.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(n.readonly=!0),this.expect(0),n.key=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),n.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(n.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(n.optional=!0),n.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(n,"TSMappedType")}tsParseTupleType(){let n=this.startNode();n.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let l=!1;return n.elementTypes.forEach(h=>{let{type:g}=h;l&&g!=="TSRestType"&&g!=="TSOptionalType"&&!(g==="TSNamedTupleMember"&&h.optional)&&this.raise(me.OptionalTypeBeforeRequired,h),l||(l=g==="TSNamedTupleMember"&&h.optional||g==="TSOptionalType")}),this.finishNode(n,"TSTupleType")}tsParseTupleElementType(){let n=this.state.startLoc,l=this.eat(21),{startLoc:h}=this.state,g,T,w,k,O=It(this.state.type)?this.lookaheadCharCode():null;if(O===58)g=!0,w=!1,T=this.parseIdentifier(!0),this.expect(14),k=this.tsParseType();else if(O===63){w=!0;let _=this.state.value,Q=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(g=!0,T=this.createIdentifier(this.startNodeAt(h),_),this.expect(17),this.expect(14),k=this.tsParseType()):(g=!1,k=Q,this.expect(17))}else k=this.tsParseType(),w=this.eat(17),g=this.eat(14);if(g){let _;T?(_=this.startNodeAt(h),_.optional=w,_.label=T,_.elementType=k,this.eat(17)&&(_.optional=!0,this.raise(me.TupleOptionalAfterType,this.state.lastTokStartLoc))):(_=this.startNodeAt(h),_.optional=w,this.raise(me.InvalidTupleMemberLabel,k),_.label=k,_.elementType=this.tsParseType()),k=this.finishNode(_,"TSNamedTupleMember")}else if(w){let _=this.startNodeAt(h);_.typeAnnotation=k,k=this.finishNode(_,"TSOptionalType")}if(l){let _=this.startNodeAt(n);_.typeAnnotation=k,k=this.finishNode(_,"TSRestType")}return k}tsParseParenthesizedType(){let n=this.startNode();return this.expect(10),n.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(n,"TSParenthesizedType")}tsParseFunctionOrConstructorType(n,l){let h=this.startNode();return n==="TSConstructorType"&&(h.abstract=!!l,l&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,h)),this.finishNode(h,n)}tsParseLiteralTypeNode(){let n=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:n.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(n,"TSLiteralType")}tsParseTemplateLiteralType(){{let n=this.state.startLoc,l=this.parseTemplateElement(!1),h=[l];if(l.tail){let g=this.startNodeAt(n),T=this.startNodeAt(n);return T.expressions=[],T.quasis=h,g.literal=this.finishNode(T,"TemplateLiteral"),this.finishNode(g,"TSLiteralType")}else{let g=[];for(;!l.tail;)g.push(this.tsParseType()),this.readTemplateContinuation(),h.push(l=this.parseTemplateElement(!1));let T=this.startNodeAt(n);return T.types=g,T.quasis=h,this.finishNode(T,"TSTemplateLiteralType")}}}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let n=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(n):n}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let n=this.startNode(),l=this.lookahead();return l.type!==135&&l.type!==136&&this.unexpected(),n.literal=this.parseMaybeUnary(),this.finishNode(n,"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:if(!(this.optionFlags&1024)){let n=this.state.startLoc;this.next();let l=this.tsParseType();return this.expect(11),this.addExtra(l,"parenthesized",!0),this.addExtra(l,"parenStart",n.index),l}return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:n}=this.state;if(ze(n)||n===88||n===84){let l=n===88?"TSVoidKeyword":n===84?"TSNullKeyword":EA(this.state.value);if(l!==void 0&&this.lookaheadCharCode()!==46){let h=this.startNode();return this.next(),this.finishNode(h,l)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:n}=this.state,l=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let h=this.startNodeAt(n);h.elementType=l,this.expect(3),l=this.finishNode(h,"TSArrayType")}else{let h=this.startNodeAt(n);h.objectType=l,h.indexType=this.tsParseType(),this.expect(3),l=this.finishNode(h,"TSIndexedAccessType")}return l}tsParseTypeOperator(){let n=this.startNode(),l=this.state.value;return this.next(),n.operator=l,n.typeAnnotation=this.tsParseTypeOperatorOrHigher(),l==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(n),this.finishNode(n,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(n){switch(n.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(me.UnexpectedReadonly,n)}}tsParseInferType(){let n=this.startNode();this.expectContextual(115);let l=this.startNode();return l.name=this.tsParseTypeParameterName(),l.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),n.typeParameter=this.finishNode(l,"TSTypeParameter"),this.finishNode(n,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let n=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return n}}tsParseTypeOperatorOrHigher(){return wE(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(n,l,h){let g=this.startNode(),T=this.eat(h),w=[];do w.push(l());while(this.eat(h));return w.length===1&&!T?w[0]:(g.types=w,this.finishNode(g,n))}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(ze(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:n}=this.state,l=n.length;try{return this.parseObjectLike(8,!0),n.length===l}catch{return!1}}if(this.match(0)){this.next();let{errors:n}=this.state,l=n.length;try{return super.parseBindingList(3,93,1),n.length===l}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(n){return this.tsInType(()=>{let l=this.startNode();this.expect(n);let h=this.startNode(),g=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(g&&this.match(78)){let k=this.tsParseThisTypeOrThisTypePredicate();return k.type==="TSThisType"?(h.parameterName=k,h.asserts=!0,h.typeAnnotation=null,k=this.finishNode(h,"TSTypePredicate")):(this.resetStartLocationFromNode(k,h),k.asserts=!0),l.typeAnnotation=k,this.finishNode(l,"TSTypeAnnotation")}let T=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!T)return g?(h.parameterName=this.parseIdentifier(),h.asserts=g,h.typeAnnotation=null,l.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(l,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,l);let w=this.tsParseTypeAnnotation(!1);return h.parameterName=T,h.typeAnnotation=w,h.asserts=g,l.typeAnnotation=this.finishNode(h,"TSTypePredicate"),this.finishNode(l,"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 n=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),n}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let n=this.state.containsEsc;return this.next(),!ze(this.state.type)&&!this.match(78)?!1:(n&&this.raise(N.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(n=!0,l=this.startNode()){return this.tsInType(()=>{n&&this.expect(14),l.typeAnnotation=this.tsParseType()}),this.finishNode(l,"TSTypeAnnotation")}tsParseType(){qd(this.state.inType);let n=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return n;let l=this.startNodeAtNode(n);return l.checkType=n,l.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),l.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),l.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(l,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}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(me.ReservedTypeAssertion,this.state.startLoc);let n=this.startNode();return n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),n.expression=this.parseMaybeUnary(),this.finishNode(n,"TSTypeAssertion")}tsParseHeritageClause(n){let l=this.state.startLoc,h=this.tsParseDelimitedList("HeritageClauseElement",()=>{{let g=super.parseExprSubscripts();yl(g)||this.raise(me.InvalidHeritageClauseType,g.loc.start,{token:n});let T=n==="extends"?"TSInterfaceHeritage":"TSClassImplements";if(g.type==="TSInstantiationExpression")return g.type=T,g;let w=this.startNodeAtNode(g);return w.expression=g,(this.match(47)||this.match(51))&&(w.typeArguments=this.tsParseTypeArgumentsInExpression()),this.finishNode(w,T)}});return h.length||this.raise(me.EmptyHeritageClauseType,l,{token:n}),h}tsParseInterfaceDeclaration(n,l={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),l.declare&&(n.declare=!0),ze(this.state.type)?(n.id=this.parseIdentifier(),this.checkIdentifier(n.id,130)):(n.id=null,this.raise(me.MissingInterfaceName,this.state.startLoc)),n.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(n.extends=this.tsParseHeritageClause("extends"));let h=this.startNode();return h.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),n.body=this.finishNode(h,"TSInterfaceBody"),this.finishNode(n,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(n){return n.id=this.parseIdentifier(),this.checkIdentifier(n.id,2),n.typeAnnotation=this.tsInType(()=>{if(n.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let l=this.startNode();return this.next(),this.finishNode(l,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(n,"TSTypeAliasDeclaration")}tsInTopLevelContext(n){if(this.curContext()!==he.brace){let l=this.state.context;this.state.context=[l[0]];try{return n()}finally{this.state.context=l}}else return n()}tsInType(n){let l=this.state.inType;this.state.inType=!0;try{return n()}finally{this.state.inType=l}}tsInDisallowConditionalTypesContext(n){let l=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return n()}finally{this.state.inDisallowConditionalTypesContext=l}}tsInAllowConditionalTypesContext(n){let l=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return n()}finally{this.state.inDisallowConditionalTypesContext=l}}tsEatThenParseType(n){if(this.match(n))return this.tsNextThenParseType()}tsExpectThenParseType(n){return this.tsInType(()=>(this.expect(n),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let n=this.startNode();return n.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(n.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(n,"TSEnumMember")}tsParseEnumDeclaration(n,l={}){return l.const&&(n.const=!0),l.declare&&(n.declare=!0),this.expectContextual(126),n.id=this.parseIdentifier(),this.checkIdentifier(n.id,n.const?8971:8459),n.body=this.tsParseEnumBody(),this.finishNode(n,"TSEnumDeclaration")}tsParseEnumBody(){let n=this.startNode();return this.expect(5),n.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(n,"TSEnumBody")}tsParseModuleBlock(){let n=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(n.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(n,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(n,l=!1){return n.id=this.tsParseEntityName(1),n.id.type==="Identifier"&&this.checkIdentifier(n.id,1024),this.scope.enter(1024),this.prodParam.enter(0),n.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit(),this.finishNode(n,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(n){return this.isContextual(112)?(n.kind="global",n.id=this.parseIdentifier()):this.match(134)?(n.kind="module",n.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),n.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(n,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(n,l,h){n.id=l||this.parseIdentifier(),this.checkIdentifier(n.id,4096),this.expect(29);let g=this.tsParseModuleReference();return n.importKind==="type"&&g.type!=="TSExternalModuleReference"&&this.raise(me.ImportAliasHasImportType,g),n.moduleReference=g,this.semicolon(),this.finishNode(n,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let n=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),n.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(n,"TSExternalModuleReference")}tsLookAhead(n){let l=this.state.clone(),h=n();return this.state=l,h}tsTryParseAndCatch(n){let l=this.tryParse(h=>n()||h());if(!(l.aborted||!l.node))return l.error&&(this.state=l.failState),l.node}tsTryParse(n){let l=this.state.clone(),h=n();if(h!==void 0&&h!==!1)return h;this.state=l}tsTryParseDeclare(n){if(this.isLineTerminator())return;let l=this.state.type;return this.tsInAmbientContext(()=>{switch(l){case 68:return n.declare=!0,super.parseFunctionStatement(n,!1,!1);case 80:return n.declare=!0,this.parseClass(n,!0,!1);case 126:return this.tsParseEnumDeclaration(n,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(n);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(n.declare=!0,this.parseVarStatement(n,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(n,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(me.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),n.declare=!0,this.parseVarStatement(n,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(me.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),n.declare=!0,this.next(),this.parseVarStatement(n,"await using",!0);break;case 129:{let h=this.tsParseInterfaceDeclaration(n,{declare:!0});if(h)return h}default:if(ze(l))return this.tsParseDeclaration(n,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(n,l,h,g){switch(l){case 124:if(this.tsCheckLineTerminator(h)&&(this.match(80)||ze(this.state.type)))return this.tsParseAbstractDeclaration(n,g);break;case 127:if(this.tsCheckLineTerminator(h)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(n);if(ze(this.state.type))return n.kind="module",this.tsParseModuleOrNamespaceDeclaration(n)}break;case 128:if(this.tsCheckLineTerminator(h)&&ze(this.state.type))return n.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(n);break;case 130:if(this.tsCheckLineTerminator(h)&&ze(this.state.type))return this.tsParseTypeAliasDeclaration(n);break}}tsCheckLineTerminator(n){return n?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(n){if(!this.match(47))return;let l=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let h=this.tsTryParseAndCatch(()=>{let g=this.startNodeAt(n);return g.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(g),g.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),g});if(this.state.maybeInArrowParameters=l,!!h)return super.parseArrowExpression(h,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let n=this.startNode();return n.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),n.params.length===0?this.raise(me.EmptyTypeArguments,n):!this.state.inType&&this.curContext()===he.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(n,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return PE(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(n,l){let h=l.length?l[0].loc.start:this.state.startLoc,g={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},g);let T=g.accessibility,w=g.override,k=g.readonly;!(n&4)&&(T||k||w)&&this.raise(me.UnexpectedParameterModifier,h);let O=this.parseMaybeDefault();n&2&&this.parseFunctionParamType(O);let _=this.parseMaybeDefault(O.loc.start,O);if(T||k||w){let Q=this.startNodeAt(h);return l.length&&(Q.decorators=l),T&&(Q.accessibility=T),k&&(Q.readonly=k),w&&(Q.override=w),_.type!=="Identifier"&&_.type!=="AssignmentPattern"&&this.raise(me.UnsupportedParameterPropertyKind,Q),Q.parameter=_,this.finishNode(Q,"TSParameterProperty")}return l.length&&(O.decorators=l),_}isSimpleParameter(n){return n.type==="TSParameterProperty"&&super.isSimpleParameter(n.parameter)||super.isSimpleParameter(n)}tsDisallowOptionalPattern(n){for(let l of n.params)l.type!=="Identifier"&&l.optional&&!this.state.isAmbientContext&&this.raise(me.PatternIsOptional,l)}setArrowFunctionParameters(n,l,h){super.setArrowFunctionParameters(n,l,h),this.tsDisallowOptionalPattern(n)}parseFunctionBodyAndFinish(n,l,h=!1){this.match(14)&&(n.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let g=l==="FunctionDeclaration"?"TSDeclareFunction":l==="ClassMethod"||l==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return g&&!this.match(5)&&this.isLineTerminator()?this.finishNode(n,g):g==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(me.DeclareFunctionHasImplementation,n),n.declare)?super.parseFunctionBodyAndFinish(n,g,h):(this.tsDisallowOptionalPattern(n),super.parseFunctionBodyAndFinish(n,l,h))}registerFunctionStatementId(n){!n.body&&n.id?this.checkIdentifier(n.id,1024):super.registerFunctionStatementId(n)}tsCheckForInvalidTypeCasts(n){n.forEach(l=>{l?.type==="TSTypeCastExpression"&&this.raise(me.UnexpectedTypeAnnotation,l.typeAnnotation)})}toReferencedList(n,l){return this.tsCheckForInvalidTypeCasts(n),n}parseArrayLike(n,l,h){let g=super.parseArrayLike(n,l,h);return g.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(g.elements),g}parseSubscript(n,l,h,g){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let w=this.startNodeAt(l);return w.expression=n,this.finishNode(w,"TSNonNullExpression")}let T=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(h)return g.stop=!0,n;g.optionalChainMember=T=!0,this.next()}if(this.match(47)||this.match(51)){let w,k=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(n)){let ie=this.tsTryParseGenericAsyncArrowFunction(l);if(ie)return g.stop=!0,ie}let O=this.tsParseTypeArgumentsInExpression();if(!O)return;if(T&&!this.match(10)){w=this.state.curPosition();return}if(il(this.state.type)){let ie=super.parseTaggedTemplateExpression(n,l,g);return ie.typeArguments=O,ie}if(!h&&this.eat(10)){let ie=this.startNodeAt(l);return ie.callee=n,ie.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(ie.arguments),ie.typeArguments=O,g.optionalChainMember&&(ie.optional=T),this.finishCallExpression(ie,g.optionalChainMember)}let _=this.state.type;if(_===48||_===52||_!==10&&Mn(_)&&!this.hasPrecedingLineBreak())return;let Q=this.startNodeAt(l);return Q.expression=n,Q.typeArguments=O,this.finishNode(Q,"TSInstantiationExpression")});if(w&&this.unexpected(w,10),k)return k.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(me.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(k.expression=super.stopParseSubscript(n,g))),k}return super.parseSubscript(n,l,h,g)}parseNewCallee(n){super.parseNewCallee(n);let{callee:l}=n;l.type==="TSInstantiationExpression"&&!l.extra?.parenthesized&&(n.typeArguments=l.typeArguments,n.callee=l.expression)}parseExprOp(n,l,h){let g;if(ho(58)>h&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(g=this.isContextual(120)))){let T=this.startNodeAt(l);return T.expression=n,T.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(g&&this.raise(N.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(T,g?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(T,l,h)}return super.parseExprOp(n,l,h)}checkReservedWord(n,l,h,g){this.state.isAmbientContext||super.checkReservedWord(n,l,h,g)}checkImportReflection(n){super.checkImportReflection(n),n.module&&n.importKind!=="value"&&this.raise(me.ImportReflectionHasImportType,n.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(n){if(super.isPotentialImportPhase(n))return!0;if(this.isContextual(130)){let l=this.lookaheadCharCode();return n?l===123||l===42:l!==61}return!n&&this.isContextual(87)}applyImportPhase(n,l,h,g){super.applyImportPhase(n,l,h,g),l?n.exportKind=h==="type"?"type":"value":n.importKind=h==="type"||h==="typeof"?h:"value"}parseImport(n){if(this.match(134))return n.importKind="value",super.parseImport(n);let l;if(ze(this.state.type)&&this.lookaheadCharCode()===61)return n.importKind="value",this.tsParseImportEqualsDeclaration(n);if(this.isContextual(130)){let h=this.parseMaybeImportPhase(n,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(n,h);l=super.parseImportSpecifiersAndAfter(n,h)}else l=super.parseImport(n);return l.importKind==="type"&&l.specifiers.length>1&&l.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(me.TypeImportCannotSpecifyDefaultAndNamed,l),l}parseExport(n,l){if(this.match(83)){let h=this.startNode();this.next();let g=null;this.isContextual(130)&&this.isPotentialImportPhase(!1)?g=this.parseMaybeImportPhase(h,!1):h.importKind="value";let T=this.tsParseImportEqualsDeclaration(h,g,!0);return n.attributes=[],n.declaration=T,n.exportKind="value",n.source=null,n.specifiers=[],this.finishNode(n,"ExportNamedDeclaration")}else if(this.eat(29)){let h=n;return h.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(h,"TSExportAssignment")}else if(this.eatContextual(93)){let h=n;return this.expectContextual(128),h.id=this.parseIdentifier(),this.semicolon(),this.finishNode(h,"TSNamespaceExportDeclaration")}else return super.parseExport(n,l)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let n=this.startNode();return this.next(),n.abstract=!0,this.parseClass(n,!0,!0)}if(this.match(129)){let n=this.tsParseInterfaceDeclaration(this.startNode());if(n)return n}return super.parseExportDefaultExpression()}parseVarStatement(n,l,h=!1){let{isAmbientContext:g}=this.state,T=super.parseVarStatement(n,l,h||g);if(!g)return T;if(!n.declare&&(l==="using"||l==="await using"))return this.raiseOverwrite(me.UsingDeclarationInAmbientContext,n,l),T;for(let{id:w,init:k}of T.declarations)k&&(l==="var"||l==="let"||w.typeAnnotation?this.raise(me.InitializerNotAllowedInAmbientContext,k):TA(k,this.hasPlugin("estree"))||this.raise(me.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,k));return T}parseStatementContent(n,l){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let h=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(h,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let h=this.state.type,g=this.startNode();this.next();let T=h===125?this.tsTryParseDeclare(g):this.tsParseAbstractDeclaration(g,l);return T?(h===125&&(T.declare=!0),T):(g.expression=this.createIdentifier(this.startNodeAt(g.loc.start),h===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(g,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let h=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(h)}break}case 129:{let h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let h=this.startNode();return this.next(),this.tsParseDeclaration(h,127,!1,l)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let h=this.startNode();return this.next(),this.tsParseDeclaration(h,128,!1,l)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let h=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(h)}break}}return super.parseStatementContent(n,l)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(n,l){return l.some(h=>Hd(h)?n.accessibility===h:!!n[h])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(n,l,h){let g=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:g,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:me.InvalidModifierOnTypeParameterPositions},l);let T=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(l,g)&&this.raise(me.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(n,l)):this.parseClassMemberWithIsStatic(n,l,h,!!l.static)};l.declare?this.tsInAmbientContext(T):T()}parseClassMemberWithIsStatic(n,l,h,g){let T=this.tsTryParseIndexSignature(l);if(T){n.body.push(T),l.abstract&&this.raise(me.IndexSignatureHasAbstract,l),l.accessibility&&this.raise(me.IndexSignatureHasAccessibility,l,{modifier:l.accessibility}),l.declare&&this.raise(me.IndexSignatureHasDeclare,l),l.override&&this.raise(me.IndexSignatureHasOverride,l);return}!this.state.inAbstractClass&&l.abstract&&this.raise(me.NonAbstractClassHasAbstractMethod,l),l.override&&(h.hadSuperClass||this.raise(me.OverrideNotInSubClass,l)),super.parseClassMemberWithIsStatic(n,l,h,g)}parsePostMemberNameModifiers(n){this.eat(17)&&(n.optional=!0),n.readonly&&this.match(10)&&this.raise(me.ClassMethodHasReadonly,n),n.declare&&this.match(10)&&this.raise(me.ClassMethodHasDeclare,n)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(n,l,h){if(!this.match(17))return n;if(this.state.maybeInArrowParameters){let g=this.lookaheadCharCode();if(g===44||g===61||g===58||g===41)return this.setOptionalParametersError(h),n}return super.parseConditional(n,l,h)}parseParenItem(n,l){let h=super.parseParenItem(n,l);if(this.eat(17)&&(h.optional=!0,this.resetEndLocation(n)),this.match(14)){let g=this.startNodeAt(l);return g.expression=n,g.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(g,"TSTypeCastExpression")}return n}parseExportDeclaration(n){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(n));let l=this.state.startLoc,h=this.eatContextual(125);if(h&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(me.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let g=ze(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(n);return g?((g.type==="TSInterfaceDeclaration"||g.type==="TSTypeAliasDeclaration"||h)&&(n.exportKind="type"),h&&g.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(g,l),g.declare=!0),g):null}parseClassId(n,l,h,g){if((!l||h)&&this.isContextual(113))return;super.parseClassId(n,l,h,n.declare?1024:8331);let T=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);T&&(n.typeParameters=T)}parseClassPropertyAnnotation(n){n.optional||(this.eat(35)?n.definite=!0:this.eat(17)&&(n.optional=!0));let l=this.tsTryParseTypeAnnotation();l&&(n.typeAnnotation=l)}parseClassProperty(n){if(this.parseClassPropertyAnnotation(n),this.state.isAmbientContext&&!(n.readonly&&!n.typeAnnotation)&&this.match(29)&&this.raise(me.DeclareClassFieldHasInitializer,this.state.startLoc),n.abstract&&this.match(29)){let{key:l}=n;this.raise(me.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:l.type==="Identifier"&&!n.computed?l.name:`[${this.input.slice(this.offsetToSourcePos(l.start),this.offsetToSourcePos(l.end))}]`})}return super.parseClassProperty(n)}parseClassPrivateProperty(n){return n.abstract&&this.raise(me.PrivateElementHasAbstract,n),n.accessibility&&this.raise(me.PrivateElementHasAccessibility,n,{modifier:n.accessibility}),this.parseClassPropertyAnnotation(n),super.parseClassPrivateProperty(n)}parseClassAccessorProperty(n){return this.parseClassPropertyAnnotation(n),n.optional&&this.raise(me.AccessorCannotBeOptional,n),super.parseClassAccessorProperty(n)}pushClassMethod(n,l,h,g,T,w){let k=this.tsTryParseTypeParameters(this.tsParseConstModifier);k&&T&&this.raise(me.ConstructorHasTypeParameters,k);let{declare:O=!1,kind:_}=l;O&&(_==="get"||_==="set")&&this.raise(me.DeclareAccessor,l,{kind:_}),k&&(l.typeParameters=k),super.pushClassMethod(n,l,h,g,T,w)}pushClassPrivateMethod(n,l,h,g){let T=this.tsTryParseTypeParameters(this.tsParseConstModifier);T&&(l.typeParameters=T),super.pushClassPrivateMethod(n,l,h,g)}declareClassPrivateMethodInScope(n,l){n.type!=="TSDeclareMethod"&&(n.type==="MethodDefinition"&&n.value.body==null||super.declareClassPrivateMethodInScope(n,l))}parseClassSuper(n){super.parseClassSuper(n),n.superClass&&(this.match(47)||this.match(51))&&(n.superTypeArguments=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(n.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(n,l,h,g,T,w,k){let O=this.tsTryParseTypeParameters(this.tsParseConstModifier);return O&&(n.typeParameters=O),super.parseObjPropValue(n,l,h,g,T,w,k)}parseFunctionParams(n,l){let h=this.tsTryParseTypeParameters(this.tsParseConstModifier);h&&(n.typeParameters=h),super.parseFunctionParams(n,l)}parseVarId(n,l){super.parseVarId(n,l),n.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(n.definite=!0);let h=this.tsTryParseTypeAnnotation();h&&(n.id.typeAnnotation=h,this.resetEndLocation(n.id))}parseAsyncArrowFromCallExpression(n,l){return this.match(14)&&(n.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(n,l)}parseMaybeAssign(n,l){let h,g,T;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(h=this.state.clone(),g=this.tryParse(()=>super.parseMaybeAssign(n,l),h),!g.error)return g.node;let{context:O}=this.state,_=O[O.length-1];(_===he.j_oTag||_===he.j_expr)&&O.pop()}if(!g?.error&&!this.match(47))return super.parseMaybeAssign(n,l);(!h||h===this.state)&&(h=this.state.clone());let w,k=this.tryParse(O=>{w=this.tsParseTypeParameters(this.tsParseConstModifier);let _=super.parseMaybeAssign(n,l);if((_.type!=="ArrowFunctionExpression"||_.extra?.parenthesized)&&O(),w?.params.length!==0&&this.resetStartLocationFromNode(_,w),_.typeParameters=w,this.hasPlugin("jsx")&&_.typeParameters.params.length===1&&!_.typeParameters.extra?.trailingComma){let Q=_.typeParameters.params[0];Q.constraint||this.raise(me.SingleTypeParameterWithoutTrailingComma,x(Q.loc.end,1),{typeParameterName:Q.name.name})}return _},h);if(!k.error&&!k.aborted)return w&&this.reportReservedArrowTypeParam(w),k.node;if(!g&&(qd(!this.hasPlugin("jsx")),T=this.tryParse(()=>super.parseMaybeAssign(n,l),h),!T.error))return T.node;if(g?.node)return this.state=g.failState,g.node;if(k.node)return this.state=k.failState,w&&this.reportReservedArrowTypeParam(w),k.node;if(T?.node)return this.state=T.failState,T.node;throw g?.error||k.error||T?.error}reportReservedArrowTypeParam(n){n.params.length===1&&!n.params[0].constraint&&!n.extra?.trailingComma&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(me.ReservedArrowTypeParam,n)}parseMaybeUnary(n,l){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(n,l)}parseArrow(n){if(this.match(14)){let l=this.tryParse(h=>{let g=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&h(),g});if(l.aborted)return;l.thrown||(l.error&&(this.state=l.failState),n.returnType=l.node)}return super.parseArrow(n)}parseFunctionParamType(n){this.eat(17)&&(n.optional=!0);let l=this.tsTryParseTypeAnnotation();return l&&(n.typeAnnotation=l),this.resetEndLocation(n),n}isAssignable(n,l){switch(n.type){case"TSTypeCastExpression":return this.isAssignable(n.expression,l);case"TSParameterProperty":return!0;default:return super.isAssignable(n,l)}}toAssignable(n,l=!1){switch(n.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(n,l);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":l?this.expressionScope.recordArrowParameterBindingError(me.UnexpectedTypeCastInParameter,n):this.raise(me.UnexpectedTypeCastInParameter,n),this.toAssignable(n.expression,l);break;case"AssignmentExpression":!l&&n.left.type==="TSTypeCastExpression"&&(n.left=this.typeCastToParameter(n.left));default:super.toAssignable(n,l)}}toAssignableParenthesizedExpression(n,l){switch(n.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(n.expression,l);break;default:super.toAssignable(n,l)}}checkToRestConversion(n,l){switch(n.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(n.expression,!1);break;default:super.checkToRestConversion(n,l)}}isValidLVal(n,l,h,g){switch(n){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(g!==64||!h)&&["expression",!0];default:return super.isValidLVal(n,l,h,g)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(n,l){if(this.match(47)||this.match(51)){let h=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let g=super.parseMaybeDecoratorArguments(n,l);return g.typeArguments=h,g}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(n,l)}checkCommaAfterRest(n){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===n?(this.next(),!1):super.checkCommaAfterRest(n)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(n,l){let h=super.parseMaybeDefault(n,l);return h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start&&this.raise(me.TypeAnnotationAfterAssign,h.typeAnnotation),h}getTokenFromCode(n){if(this.state.inType){if(n===62){this.finishOp(48,1);return}if(n===60){this.finishOp(47,1);return}}super.getTokenFromCode(n)}reScan_lt_gt(){let{type:n}=this.state;n===47?(this.state.pos-=1,this.readToken_lt()):n===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:n}=this.state;return n===51?(this.state.pos-=2,this.finishOp(47,1),47):n}toAssignableListItem(n,l,h){let g=n[l];g.type==="TSTypeCastExpression"&&(n[l]=this.typeCastToParameter(g)),super.toAssignableListItem(n,l,h)}typeCastToParameter(n){return n.expression.typeAnnotation=n.typeAnnotation,this.resetEndLocation(n.expression,n.typeAnnotation.loc.end),n.expression}shouldParseArrow(n){return this.match(14)?n.every(l=>this.isAssignable(l,!0)):super.shouldParseArrow(n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(n){if(this.match(47)||this.match(51)){let l=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());l&&(n.typeArguments=l)}return super.jsxParseOpeningElementAfterName(n)}getGetterSetterExpectedParamCount(n){let l=super.getGetterSetterExpectedParamCount(n),h=this.getObjectOrClassMethodParams(n)[0];return h&&this.isThisParam(h)?l+1:l}parseCatchClauseParam(){let n=super.parseCatchClauseParam(),l=this.tsTryParseTypeAnnotation();return l&&(n.typeAnnotation=l,this.resetEndLocation(n)),n}tsInAmbientContext(n){let{isAmbientContext:l,strict:h}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return n()}finally{this.state.isAmbientContext=l,this.state.strict=h}}parseClass(n,l,h){let g=this.state.inAbstractClass;this.state.inAbstractClass=!!n.abstract;try{return super.parseClass(n,l,h)}finally{this.state.inAbstractClass=g}}tsParseAbstractDeclaration(n,l){if(this.match(80))return n.abstract=!0,this.maybeTakeDecorators(l,this.parseClass(n,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(n.abstract=!0,this.raise(me.NonClassMethodPropertyHasAbstractModifier,n),this.tsParseInterfaceDeclaration(n));throw this.unexpected(null,80)}parseMethod(n,l,h,g,T,w,k){let O=super.parseMethod(n,l,h,g,T,w,k);if((O.abstract||O.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?O.value:O).body){let{key:_}=O;this.raise(me.AbstractMethodHasImplementation,O,{methodName:_.type==="Identifier"&&!O.computed?_.name:`[${this.input.slice(this.offsetToSourcePos(_.start),this.offsetToSourcePos(_.end))}]`})}return O}tsParseTypeParameterName(){return this.parseIdentifier()}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(n,l,h,g){return!l&&g?(this.parseTypeOnlyImportExportSpecifier(n,!1,h),this.finishNode(n,"ExportSpecifier")):(n.exportKind="value",super.parseExportSpecifier(n,l,h,g))}parseImportSpecifier(n,l,h,g,T){return!l&&g?(this.parseTypeOnlyImportExportSpecifier(n,!0,h),this.finishNode(n,"ImportSpecifier")):(n.importKind="value",super.parseImportSpecifier(n,l,h,g,h?4098:4096))}parseTypeOnlyImportExportSpecifier(n,l,h){let g=l?"imported":"local",T=l?"local":"exported",w=n[g],k,O=!1,_=!0,Q=w.loc.start;if(this.isContextual(93)){let ve=this.parseIdentifier();if(this.isContextual(93)){let Be=this.parseIdentifier();It(this.state.type)?(O=!0,w=ve,k=l?this.parseIdentifier():this.parseModuleExportName(),_=!1):(k=Be,_=!1)}else It(this.state.type)?(_=!1,k=l?this.parseIdentifier():this.parseModuleExportName()):(O=!0,w=ve)}else It(this.state.type)&&(O=!0,l?(w=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(w.name,w.loc.start,!0,!0)):w=this.parseModuleExportName());O&&h&&this.raise(l?me.TypeModifierIsUsedInTypeImports:me.TypeModifierIsUsedInTypeExports,Q),n[g]=w,n[T]=k;let ie=l?"importKind":"exportKind";n[ie]=O?"type":"value",_&&this.eatContextual(93)&&(n[T]=l?this.parseIdentifier():this.parseModuleExportName()),n[T]||(n[T]=this.cloneIdentifier(n[g])),l&&this.checkIdentifier(n[T],O?4098:4096)}fillOptionalPropertiesForTSESLint(n){switch(n.type){case"ExpressionStatement":n.directive??(n.directive=void 0);return;case"RestElement":n.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":n.decorators??(n.decorators=[]),n.optional??(n.optional=!1),n.typeAnnotation??(n.typeAnnotation=void 0);return;case"TSParameterProperty":n.accessibility??(n.accessibility=void 0),n.decorators??(n.decorators=[]),n.override??(n.override=!1),n.readonly??(n.readonly=!1),n.static??(n.static=!1);return;case"TSEmptyBodyFunctionExpression":n.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":n.declare??(n.declare=!1),n.returnType??(n.returnType=void 0),n.typeParameters??(n.typeParameters=void 0);return;case"Property":n.optional??(n.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":n.optional??(n.optional=!1);case"TSIndexSignature":n.accessibility??(n.accessibility=void 0),n.readonly??(n.readonly=!1),n.static??(n.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":n.declare??(n.declare=!1),n.definite??(n.definite=!1),n.readonly??(n.readonly=!1),n.typeAnnotation??(n.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":n.accessibility??(n.accessibility=void 0),n.decorators??(n.decorators=[]),n.override??(n.override=!1),n.optional??(n.optional=!1);return;case"ClassExpression":n.id??(n.id=null);case"ClassDeclaration":n.abstract??(n.abstract=!1),n.declare??(n.declare=!1),n.decorators??(n.decorators=[]),n.implements??(n.implements=[]),n.superTypeArguments??(n.superTypeArguments=void 0),n.typeParameters??(n.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":n.declare??(n.declare=!1);return;case"VariableDeclarator":n.definite??(n.definite=!1);return;case"TSEnumDeclaration":n.const??(n.const=!1),n.declare??(n.declare=!1);return;case"TSEnumMember":n.computed??(n.computed=!1);return;case"TSImportType":n.qualifier??(n.qualifier=null),n.options??(n.options=null),n.typeArguments??(n.typeArguments=null);return;case"TSInterfaceDeclaration":n.declare??(n.declare=!1),n.extends??(n.extends=[]);return;case"TSMappedType":n.optional??(n.optional=!1),n.readonly??(n.readonly=void 0);return;case"TSModuleDeclaration":n.declare??(n.declare=!1),n.global??(n.global=n.kind==="global");return;case"TSTypeParameter":n.const??(n.const=!1),n.in??(n.in=!1),n.out??(n.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(n,l){if(kr(n)){if(ml.lastIndex=l,ml.test(this.input)){let h=this.codePointAtPos(ml.lastIndex);if(!si(h)&&h!==92)return!1}return!0}else return n===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let n=this.nextTokenInLineStart(),l=this.codePointAtPos(n);return this.chStartsBindingIdentifierAndNotRelationalOperator(l,n)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let n=this.nextTokenInLineStart(),l=this.codePointAtPos(n);return this.chStartsBindingIdentifier(l,n)||l===34||l===39}};function bA(o){if(o.type!=="MemberExpression")return!1;let{computed:n,property:l}=o;return n&&l.type!=="StringLiteral"&&(l.type!=="TemplateLiteral"||l.expressions.length>0)?!1:Wd(o.object)}function TA(o,n){let{type:l}=o;if(o.extra?.parenthesized)return!1;if(n){if(l==="Literal"){let{value:h}=o;if(typeof h=="string"||typeof h=="boolean")return!0}}else if(l==="StringLiteral"||l==="BooleanLiteral")return!0;return!!(zd(o,n)||vA(o,n)||l==="TemplateLiteral"&&o.expressions.length===0||bA(o))}function zd(o,n){return n?o.type==="Literal"&&(typeof o.value=="number"||"bigint"in o):o.type==="NumericLiteral"||o.type==="BigIntLiteral"}function vA(o,n){if(o.type==="UnaryExpression"){let{operator:l,argument:h}=o;if(l==="-"&&zd(h,n))return!0}return!1}function Wd(o){return o.type==="Identifier"?!0:o.type!=="MemberExpression"||o.computed?!1:Wd(o.object)}var Jd=V`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),SA=o=>class extends o{parsePlaceholder(n){if(this.match(133)){let l=this.startNode();return this.next(),this.assertNoSpace(),l.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(l,n)}}finishPlaceholder(n,l){let h=n;return(!h.expectedNode||!h.type)&&(h=this.finishNode(h,"Placeholder")),h.expectedNode=l,h}getTokenFromCode(n){n===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(n)}parseExprAtom(n){return this.parsePlaceholder("Expression")||super.parseExprAtom(n)}parseIdentifier(n){return this.parsePlaceholder("Identifier")||super.parseIdentifier(n)}checkReservedWord(n,l,h,g){n!==void 0&&super.checkReservedWord(n,l,h,g)}cloneIdentifier(n){let l=super.cloneIdentifier(n);return l.type==="Placeholder"&&(l.expectedNode=n.expectedNode),l}cloneStringLiteral(n){return n.type==="Placeholder"?this.cloneIdentifier(n):super.cloneStringLiteral(n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(n,l,h,g){return n==="Placeholder"||super.isValidLVal(n,l,h,g)}toAssignable(n,l){n&&n.type==="Placeholder"&&n.expectedNode==="Expression"?n.expectedNode="Pattern":super.toAssignable(n,l)}chStartsBindingIdentifier(n,l){if(super.chStartsBindingIdentifier(n,l))return!0;let h=this.nextTokenStart();return this.input.charCodeAt(h)===37&&this.input.charCodeAt(h+1)===37}verifyBreakContinue(n,l){n.label&&n.label.type==="Placeholder"||super.verifyBreakContinue(n,l)}parseExpressionStatement(n,l){if(l.type!=="Placeholder"||l.extra?.parenthesized)return super.parseExpressionStatement(n,l);if(this.match(14)){let g=n;return g.label=this.finishPlaceholder(l,"Identifier"),this.next(),g.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(g,"LabeledStatement")}this.semicolon();let h=n;return h.name=l.name,this.finishPlaceholder(h,"Statement")}parseBlock(n,l,h){return this.parsePlaceholder("BlockStatement")||super.parseBlock(n,l,h)}parseFunctionId(n){return this.parsePlaceholder("Identifier")||super.parseFunctionId(n)}parseClass(n,l,h){let g=l?"ClassDeclaration":"ClassExpression";this.next();let T=this.state.strict,w=this.parsePlaceholder("Identifier");if(w)if(this.match(81)||this.match(133)||this.match(5))n.id=w;else{if(h||!l)return n.id=null,n.body=this.finishPlaceholder(w,"ClassBody"),this.finishNode(n,g);throw this.raise(Jd.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(n,l,h);return super.parseClassSuper(n),n.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!n.superClass,T),this.finishNode(n,g)}parseExport(n,l){let h=this.parsePlaceholder("Identifier");if(!h)return super.parseExport(n,l);let g=n;if(!this.isContextual(98)&&!this.match(12))return g.specifiers=[],g.source=null,g.declaration=this.finishPlaceholder(h,"Declaration"),this.finishNode(g,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let T=this.startNode();return T.exported=h,g.specifiers=[this.finishNode(T,"ExportDefaultSpecifier")],super.parseExport(g,l)}isExportDefaultSpecifier(){if(this.match(65)){let n=this.nextTokenStart();if(this.isUnparsedContextual(n,"from")&&this.input.startsWith(Ss(133),this.nextTokenStartSince(n+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(n,l){return n.specifiers?.length?!0:super.maybeParseExportDefaultSpecifier(n,l)}checkExport(n){let{specifiers:l}=n;l?.length&&(n.specifiers=l.filter(h=>h.exported.type==="Placeholder")),super.checkExport(n),n.specifiers=l}parseImport(n){let l=this.parsePlaceholder("Identifier");if(!l)return super.parseImport(n);if(n.specifiers=[],!this.isContextual(98)&&!this.match(12))return n.source=this.finishPlaceholder(l,"StringLiteral"),this.semicolon(),this.finishNode(n,"ImportDeclaration");let h=this.startNodeAtNode(l);return h.local=l,n.specifiers.push(this.finishNode(h,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(n)||this.parseNamedImportSpecifiers(n)),this.expectContextual(98),n.source=this.parseImportSource(),this.semicolon(),this.finishNode(n,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Jd.UnexpectedSpace,this.state.lastTokEndLoc)}},wA=o=>class extends o{parseV8Intrinsic(){if(this.match(54)){let n=this.state.startLoc,l=this.startNode();if(this.next(),ze(this.state.type)){let h=this.parseIdentifierName(),g=this.createIdentifier(l,h);if(this.castNodeTo(g,"V8IntrinsicIdentifier"),this.match(10))return g}this.unexpected(n)}}parseExprAtom(n){return this.parseV8Intrinsic()||super.parseExprAtom(n)}},Kd=["fsharp","hack"],Xd=["^^","@@","^","%","#"];function PA(o){if(o.has("decorators")){if(o.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=o.get("decorators").decoratorsBeforeExport;if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let l=o.get("decorators").allowCallParenthesized;if(l!=null&&typeof l!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(o.has("flow")&&o.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(o.has("placeholders")&&o.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(o.has("pipelineOperator")){let n=o.get("pipelineOperator").proposal;if(!Kd.includes(n)){let l=Kd.map(h=>`"${h}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${l}.`)}if(n==="hack"){if(o.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(o.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let l=o.get("pipelineOperator").topicToken;if(!Xd.includes(l)){let h=Xd.map(g=>`"${g}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${h}.`)}}}if(o.has("moduleAttributes"))throw new Error("`moduleAttributes` has been removed in Babel 8, please migrate to import attributes instead.");if(o.has("importAssertions"))throw new Error("`importAssertions` has been removed in Babel 8, please use import attributes instead. To use the non-standard `assert` syntax you can enable the `deprecatedImportAssert` parser plugin.");if(!o.has("deprecatedImportAssert")&&o.has("importAttributes")&&o.get("importAttributes").deprecatedAssertSyntax)throw new Error("The 'importAttributes' plugin has been removed in Babel 8. If you need to enable support for the deprecated `assert` syntax, you can enable the `deprecatedImportAssert` parser plugin.");if(o.has("recordAndTuple"))throw new Error("The 'recordAndTuple' plugin has been removed in Babel 8. Please remove it from your configuration.");if(o.has("asyncDoExpressions")&&!o.has("doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(o.has("optionalChainingAssign")&&o.get("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'.");if(o.has("discardBinding")&&o.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.");{if(o.has("decimal"))throw new Error("The 'decimal' plugin has been removed in Babel 8. Please remove it from your configuration.");if(o.has("importReflection"))throw new Error("The 'importReflection' plugin has been removed in Babel 8. Use 'sourcePhaseImports' instead, and replace 'import module' with 'import source' in your code.")}}var Gd={estree:Ae,jsx:GE,flow:JE,typescript:CA,v8intrinsic:wA,placeholders:SA},FA=Object.keys(Gd),kA=class extends DA{checkProto(o,n,l,h){if(o.type==="SpreadElement"||this.isObjectMethod(o)||o.computed||o.shorthand)return l;let g=o.key;return(g.type==="Identifier"?g.name:g.value)==="__proto__"?n?(this.raise(N.RecordNoProto,g),!0):(l&&(h?h.doubleProtoLoc===null&&(h.doubleProtoLoc=g.loc.start):this.raise(N.DuplicateProto,g)),!0):l}shouldExitDescending(o,n){return o.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(o.start)===n}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(N.ParseExpressionEmptyInput,this.state.startLoc);let o=this.parseExpression();if(!this.match(140))throw this.raise(N.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),o.comments=this.comments,o.errors=this.state.errors,this.optionFlags&256&&(o.tokens=this.tokens),o}parseExpression(o,n){return o?this.disallowInAnd(()=>this.parseExpressionBase(n)):this.allowInAnd(()=>this.parseExpressionBase(n))}parseExpressionBase(o){let n=this.state.startLoc,l=this.parseMaybeAssign(o);if(this.match(12)){let h=this.startNodeAt(n);for(h.expressions=[l];this.eat(12);)h.expressions.push(this.parseMaybeAssign(o));return this.toReferencedList(h.expressions),this.finishNode(h,"SequenceExpression")}return l}parseMaybeAssignDisallowIn(o,n){return this.disallowInAnd(()=>this.parseMaybeAssign(o,n))}parseMaybeAssignAllowIn(o,n){return this.allowInAnd(()=>this.parseMaybeAssign(o,n))}setOptionalParametersError(o){o.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(o,n){let l=this.state.startLoc,h=this.isContextual(108);if(h&&this.prodParam.hasYield){this.next();let k=this.parseYield(l);return n&&(k=n.call(this,k,l)),k}let g;o?g=!1:(o=new Do,g=!0);let{type:T}=this.state;(T===10||ze(T))&&(this.state.potentialArrowAt=this.state.start);let w=this.parseMaybeConditional(o);if(n&&(w=n.call(this,w,l)),CE(this.state.type)){let k=this.startNodeAt(l),O=this.state.value;if(k.operator=O,this.match(29)){this.toAssignable(w,!0),k.left=w;let _=l.index;o.doubleProtoLoc!=null&&o.doubleProtoLoc.index>=_&&(o.doubleProtoLoc=null),o.shorthandAssignLoc!=null&&o.shorthandAssignLoc.index>=_&&(o.shorthandAssignLoc=null),o.privateKeyLoc!=null&&o.privateKeyLoc.index>=_&&(this.checkDestructuringPrivate(o),o.privateKeyLoc=null),o.voidPatternLoc!=null&&o.voidPatternLoc.index>=_&&(o.voidPatternLoc=null)}else k.left=w;return this.next(),k.right=this.parseMaybeAssign(),this.checkLVal(w,this.finishNode(k,"AssignmentExpression"),void 0,void 0,void 0,void 0,O==="||="||O==="&&="||O==="??="),k}else g&&this.checkExpressionErrors(o,!0);if(h){let{type:k}=this.state;if((this.hasPlugin("v8intrinsic")?Mn(k):Mn(k)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(N.YieldNotInGeneratorFunction,l),this.parseYield(l)}return w}parseMaybeConditional(o){let n=this.state.startLoc,l=this.state.potentialArrowAt,h=this.parseExprOps(o);return this.shouldExitDescending(h,l)?h:this.parseConditional(h,n,o)}parseConditional(o,n,l){if(this.eat(17)){let h=this.startNodeAt(n);return h.test=o,h.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),h.alternate=this.parseMaybeAssign(),this.finishNode(h,"ConditionalExpression")}return o}parseMaybeUnaryOrPrivate(o){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(o)}parseExprOps(o){let n=this.state.startLoc,l=this.state.potentialArrowAt,h=this.parseMaybeUnaryOrPrivate(o);return this.shouldExitDescending(h,l)?h:this.parseExprOp(h,n,-1)}parseExprOp(o,n,l){if(this.isPrivateName(o)){let g=this.getPrivateNameSV(o);(l>=ho(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(N.PrivateInExpectedIn,o,{identifierName:g}),this.classScope.usePrivateName(g,o.loc.start)}let h=this.state.type;if(TE(h)&&(this.prodParam.hasIn||!this.match(58))){let g=ho(h);if(g>l){if(h===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return o;this.checkPipelineAtInfixOperator(o,n)}let T=this.startNodeAt(n);T.left=o,T.operator=this.state.value;let w=h===41||h===42,k=h===40;k&&(g=ho(42)),this.next(),T.right=this.parseExprOpRightExpr(h,g);let O=this.finishNode(T,w||k?"LogicalExpression":"BinaryExpression"),_=this.state.type;if(k&&(_===41||_===42)||w&&_===40)throw this.raise(N.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(O,n,l)}}return o}parseExprOpRightExpr(o,n){switch(this.state.startLoc,o){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(n))}default:return this.parseExprOpBaseRightExpr(o,n)}}parseExprOpBaseRightExpr(o,n){let l=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),l,FE(o)?n-1:n)}parseHackPipeBody(){let{startLoc:o}=this.state,n=this.parseMaybeAssign();return F.has(n.type)&&!n.extra?.parenthesized&&this.raise(N.PipeUnparenthesizedBody,o,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(N.PipeTopicUnused,o),n}checkExponentialAfterUnary(o){this.match(57)&&this.raise(N.UnexpectedTokenUnaryExponentiation,o.argument)}parseMaybeUnary(o,n){let l=this.state.startLoc,h=this.isContextual(96);if(h&&this.recordAwaitIfAllowed()){this.next();let k=this.parseAwait(l);return n||this.checkExponentialAfterUnary(k),k}let g=this.match(34),T=this.startNode();if(SE(this.state.type)){T.operator=this.state.value,T.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let k=this.match(89);if(this.next(),T.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(o,!0),this.state.strict&&k){let O=T.argument;O.type==="Identifier"?this.raise(N.StrictDelete,T):this.hasPropertyAsPrivateName(O)&&this.raise(N.DeletePrivateField,T)}if(!g)return n||this.checkExponentialAfterUnary(T),this.finishNode(T,"UnaryExpression")}let w=this.parseUpdate(T,g,o);if(h){let{type:k}=this.state;if((this.hasPlugin("v8intrinsic")?Mn(k):Mn(k)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(N.AwaitNotInAsyncContext,l),this.parseAwait(l)}return w}parseUpdate(o,n,l){if(n){let T=o;return this.checkLVal(T.argument,this.finishNode(T,"UpdateExpression")),o}let h=this.state.startLoc,g=this.parseExprSubscripts(l);if(this.checkExpressionErrors(l,!1))return g;for(;vE(this.state.type)&&!this.canInsertSemicolon();){let T=this.startNodeAt(h);T.operator=this.state.value,T.prefix=!1,T.argument=g,this.next(),this.checkLVal(g,g=this.finishNode(T,"UpdateExpression"))}return g}parseExprSubscripts(o){let n=this.state.startLoc,l=this.state.potentialArrowAt,h=this.parseExprAtom(o);return this.shouldExitDescending(h,l)?h:this.parseSubscripts(h,n)}parseSubscripts(o,n,l){let h={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(o),stop:!1};do o=this.parseSubscript(o,n,l,h),h.maybeAsyncArrow=!1;while(!h.stop);return o}parseSubscript(o,n,l,h){let{type:g}=this.state;if(!l&&g===15)return this.parseBind(o,n,l,h);if(il(g))return this.parseTaggedTemplateExpression(o,n,h);let T=!1;if(g===18){if(l&&(this.raise(N.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(o,h);h.optionalChainMember=T=!0,this.next()}if(!l&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(o,n,h,T);{let w=this.eat(0);return w||T||this.eat(16)?this.parseMember(o,n,h,w,T):this.stopParseSubscript(o,h)}}stopParseSubscript(o,n){return n.stop=!0,o}parseMember(o,n,l,h,g){let T=this.startNodeAt(n);return T.object=o,T.computed=h,h?(T.property=this.parseExpression(),this.expect(3)):this.match(139)?(o.type==="Super"&&this.raise(N.SuperPrivateField,n),this.classScope.usePrivateName(this.state.value,this.state.startLoc),T.property=this.parsePrivateName()):T.property=this.parseIdentifier(!0),l.optionalChainMember?(T.optional=g,this.finishNode(T,"OptionalMemberExpression")):this.finishNode(T,"MemberExpression")}parseBind(o,n,l,h){let g=this.startNodeAt(n);return g.object=o,this.next(),g.callee=this.parseNoCallExpr(),h.stop=!0,this.parseSubscripts(this.finishNode(g,"BindExpression"),n,l)}parseCoverCallAndAsyncArrowHead(o,n,l,h){let g=this.state.maybeInArrowParameters,T=null;this.state.maybeInArrowParameters=!0,this.next();let w=this.startNodeAt(n);w.callee=o;let{maybeAsyncArrow:k,optionalChainMember:O}=l;k&&(this.expressionScope.enter(mA()),T=new Do),O&&(w.optional=h),h?w.arguments=this.parseCallExpressionArguments():w.arguments=this.parseCallExpressionArguments(o.type!=="Super",w,T);let _=this.finishCallExpression(w,O);return k&&this.shouldParseAsyncArrow()&&!h?(l.stop=!0,this.checkDestructuringPrivate(T),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),_=this.parseAsyncArrowFromCallExpression(this.startNodeAt(n),_)):(k&&(this.checkExpressionErrors(T,!0),this.expressionScope.exit()),this.toReferencedArguments(_)),this.state.maybeInArrowParameters=g,_}toReferencedArguments(o,n){this.toReferencedListDeep(o.arguments,n)}parseTaggedTemplateExpression(o,n,l){let h=this.startNodeAt(n);return h.tag=o,h.quasi=this.parseTemplate(!0),l.optionalChainMember&&this.raise(N.OptionalChainingNoTemplate,n),this.finishNode(h,"TaggedTemplateExpression")}atPossibleAsyncArrow(o){return o.type==="Identifier"&&o.name==="async"&&this.state.lastTokEndLoc.index===o.end&&!this.canInsertSemicolon()&&o.end-o.start===5&&this.offsetToSourcePos(o.start)===this.state.potentialArrowAt}finishCallExpression(o,n){if(o.callee.type==="Import")if(o.arguments.length===0||o.arguments.length>2)this.raise(N.ImportCallArity,o);else for(let l of o.arguments)l.type==="SpreadElement"&&this.raise(N.ImportCallSpreadArgument,l);return this.finishNode(o,n?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(o,n,l){let h=[],g=!0,T=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(g)g=!1;else if(this.expect(12),this.match(11)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}h.push(this.parseExprListItem(11,!1,l,o))}return this.state.inFSharpPipelineDirectBody=T,h}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(o,n){return this.resetPreviousNodeTrailingComments(n),this.expect(19),this.parseArrowExpression(o,n.arguments,!0,n.extra?.trailingCommaLoc),n.innerComments&&Ui(o,n.innerComments),n.callee.trailingComments&&Ui(o,n.callee.trailingComments),o}parseNoCallExpr(){let o=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),o,!0)}parseExprAtom(o){let n,l=null,{type:h}=this.state;switch(h){case 79:return this.parseSuper();case 83:return n=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(n):this.match(10)?this.optionFlags&512?this.parseImportCall(n):this.finishNode(n,"Import"):(this.raise(N.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(n,"Import"));case 78:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134: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 g=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(g)}case 0:return this.parseArrayLike(3,!1,o);case 5:return this.parseObjectLike(8,!1,!1,o);case 68:return this.parseFunctionOrFunctionSent();case 26:l=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(l,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{n=this.startNode(),this.next(),n.object=null;let g=n.callee=this.parseNoCallExpr();if(g.type==="MemberExpression")return this.finishNode(n,"BindExpression");throw this.raise(N.UnsupportedBind,g)}case 139:return this.raise(N.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 g=this.getPluginOption("pipelineOperator","proposal");if(g)return this.parseTopicReference(g);throw this.unexpected()}case 47:{let g=this.input.codePointAt(this.nextTokenStart());throw kr(g)||g===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(ze(h)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let g=this.state.potentialArrowAt===this.state.start,T=this.state.containsEsc,w=this.parseIdentifier();if(!T&&w.name==="async"&&!this.canInsertSemicolon()){let{type:k}=this.state;if(k===68)return this.resetPreviousNodeTrailingComments(w),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(w));if(ze(k))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(w)):w;if(k===90)return this.resetPreviousNodeTrailingComments(w),this.parseDo(this.startNodeAtNode(w),!0)}return g&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(w),[w],!1)):w}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(o,n){let l=this.getPluginOption("pipelineOperator","proposal");if(l)return this.state.type=o,this.state.value=n,this.state.pos--,this.state.end--,this.state.endLoc=x(this.state.endLoc,-1),this.parseTopicReference(l);throw this.unexpected()}parseTopicReference(o){let n=this.startNode(),l=this.state.startLoc,h=this.state.type;return this.next(),this.finishTopicReference(n,l,o,h)}finishTopicReference(o,n,l,h){if(this.testTopicReferenceConfiguration(l,n,h))return this.topicReferenceIsAllowedInCurrentContext()||this.raise(N.PipeTopicUnbound,n),this.registerTopicReference(),this.finishNode(o,"TopicReference");throw this.raise(N.PipeTopicUnconfiguredToken,n,{token:Ss(h)})}testTopicReferenceConfiguration(o,n,l){switch(o){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ss(l)}]);case"smart":return l===27;default:throw this.raise(N.PipeTopicRequiresHackPipes,n)}}parseAsyncArrowUnaryFunction(o){this.prodParam.enter(mo(!0,this.prodParam.hasYield));let n=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(N.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(o,n,!0)}parseDo(o,n){this.expectPlugin("doExpressions"),n&&this.expectPlugin("asyncDoExpressions"),o.async=n,this.next();let l=this.state.labels;return this.state.labels=[],n?(this.prodParam.enter(2),o.body=this.parseBlock(),this.prodParam.exit()):o.body=this.parseBlock(),this.state.labels=l,this.finishNode(o,"DoExpression")}parseSuper(){let o=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.raise(N.SuperNotAllowed,o):this.scope.allowSuper||this.raise(N.UnexpectedSuper,o),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(N.UnsupportedSuper,o),this.finishNode(o,"Super")}parsePrivateName(){let o=this.startNode(),n=this.startNodeAt(x(this.state.startLoc,1)),l=this.state.value;return this.next(),o.id=this.createIdentifier(n,l),this.finishNode(o,"PrivateName")}parseFunctionOrFunctionSent(){let o=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let n=this.createIdentifier(this.startNodeAtNode(o),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(o,n,"sent")}return this.parseFunction(o)}parseMetaProperty(o,n,l){o.meta=n;let h=this.state.containsEsc;return o.property=this.parseIdentifier(!0),(o.property.name!==l||h)&&this.raise(N.UnsupportedMetaProperty,o.property,{target:n.name,onlyValidPropertyName:l}),this.finishNode(o,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(o){if(this.next(),this.isContextual(105)||this.isContextual(97)){let n=this.isContextual(105);return this.expectPlugin(n?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),o.phase=n?"source":"defer",this.parseImportCall(o)}else{let n=this.createIdentifierAt(this.startNodeAtNode(o),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(N.ImportMetaOutsideModule,n),this.sawUnambiguousESM=!0),this.parseMetaProperty(o,n,"meta")}}parseLiteralAtNode(o,n,l){return this.addExtra(l,"rawValue",o),this.addExtra(l,"raw",this.input.slice(this.offsetToSourcePos(l.start),this.state.end)),l.value=o,this.next(),this.finishNode(l,n)}parseLiteral(o,n){let l=this.startNode();return this.parseLiteralAtNode(o,n,l)}parseStringLiteral(o){return this.parseLiteral(o,"StringLiteral")}parseNumericLiteral(o){return this.parseLiteral(o,"NumericLiteral")}parseBigIntLiteral(o){{let n;try{n=BigInt(o)}catch{n=null}return this.parseLiteral(n,"BigIntLiteral")}}parseDecimalLiteral(o){return this.parseLiteral(o,"DecimalLiteral")}parseRegExpLiteral(o){let n=this.startNode();return this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.pattern=o.pattern,n.flags=o.flags,this.next(),this.finishNode(n,"RegExpLiteral")}parseBooleanLiteral(o){let n=this.startNode();return n.value=o,this.next(),this.finishNode(n,"BooleanLiteral")}parseNullLiteral(){let o=this.startNode();return this.next(),this.finishNode(o,"NullLiteral")}parseParenAndDistinguishExpression(o){let n=this.state.startLoc,l;this.next(),this.expressionScope.enter(fA());let h=this.state.maybeInArrowParameters,g=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let T=this.state.startLoc,w=[],k=new Do,O=!0,_,Q;for(;!this.match(11);){if(O)O=!1;else if(this.expect(12,k.optionalParametersLoc===null?null:k.optionalParametersLoc),this.match(11)){Q=this.state.startLoc;break}if(this.match(21)){let Be=this.state.startLoc;if(_=this.state.startLoc,w.push(this.parseParenItem(this.parseRestBinding(),Be)),!this.checkCommaAfterRest(41))break}else w.push(this.parseMaybeAssignAllowInOrVoidPattern(11,k,this.parseParenItem))}let ie=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=h,this.state.inFSharpPipelineDirectBody=g;let ve=this.startNodeAt(n);return o&&this.shouldParseArrow(w)&&(ve=this.parseArrow(ve))?(this.checkDestructuringPrivate(k),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(ve,w,!1),ve):(this.expressionScope.exit(),w.length||this.unexpected(this.state.lastTokStartLoc),Q&&this.unexpected(Q),_&&this.unexpected(_),this.checkExpressionErrors(k,!0),this.toReferencedListDeep(w,!0),w.length>1?(l=this.startNodeAt(T),l.expressions=w,this.finishNode(l,"SequenceExpression"),this.resetEndLocation(l,ie)):l=w[0],this.wrapParenthesis(n,l))}wrapParenthesis(o,n){if(!(this.optionFlags&1024))return this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",o.index),this.takeSurroundingComments(n,o.index,this.state.lastTokEndLoc.index),n;let l=this.startNodeAt(o);return l.expression=n,this.finishNode(l,"ParenthesizedExpression")}shouldParseArrow(o){return!this.canInsertSemicolon()}parseArrow(o){if(this.eat(19))return o}parseParenItem(o,n){return o}parseNewOrNewTarget(){let o=this.startNode();if(this.next(),this.match(16)){let n=this.createIdentifier(this.startNodeAtNode(o),"new");this.next();let l=this.parseMetaProperty(o,n,"target");return this.scope.allowNewTarget||this.raise(N.UnexpectedNewTarget,l),l}return this.parseNew(o)}parseNew(o){if(this.parseNewCallee(o),this.eat(10)){let n=this.parseExprList(11);this.toReferencedList(n),o.arguments=n}else o.arguments=[];return this.finishNode(o,"NewExpression")}parseNewCallee(o){let n=this.match(83),l=this.parseNoCallExpr();o.callee=l,n&&(l.type==="Import"||l.type==="ImportExpression")&&this.raise(N.ImportCallNotNewExpression,l)}parseTemplateElement(o){let{start:n,startLoc:l,end:h,value:g}=this.state,T=n+1,w=this.startNodeAt(x(l,1));g===null&&(o||this.raise(N.InvalidEscapeSequenceTemplate,x(this.state.firstInvalidTemplateEscapePos,1)));let k=this.match(24),O=k?-1:-2,_=h+O;w.value={raw:this.input.slice(T,_).replace(/\r\n?/g,`
|
|
177
|
-
`),cooked:g===null?null:g.slice(1,O)},w.tail=k,this.next();let Q=this.finishNode(w,"TemplateElement");return this.resetEndLocation(Q,x(this.state.lastTokEndLoc,O)),Q}parseTemplate(o){let n=this.startNode(),l=this.parseTemplateElement(o),h=[l],g=[];for(;!l.tail;)g.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),h.push(l=this.parseTemplateElement(o));return n.expressions=g,n.quasis=h,this.finishNode(n,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(o,n,l,h){l&&this.expectPlugin("recordAndTuple");let g=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let T=!1,w=!0,k=this.startNode();for(k.properties=[],this.next();!this.match(o);){if(w)w=!1;else if(this.expect(12),this.match(o)){this.addTrailingCommaExtraToNode(k);break}let _;n?_=this.parseBindingProperty():(_=this.parsePropertyDefinition(h),T=this.checkProto(_,l,T,h)),l&&!this.isObjectProperty(_)&&_.type!=="SpreadElement"&&this.raise(N.InvalidRecordProperty,_),k.properties.push(_)}this.next(),this.state.inFSharpPipelineDirectBody=g;let O="ObjectExpression";return n?O="ObjectPattern":l&&(O="RecordExpression"),this.finishNode(k,O)}addTrailingCommaExtraToNode(o){this.addExtra(o,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(o,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(o){return!o.computed&&o.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(o){let n=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(N.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)n.push(this.parseDecorator());let l=this.startNode(),h=!1,g=!1,T;if(this.match(21))return n.length&&this.unexpected(),this.parseSpread();n.length&&(l.decorators=n,n=[]),l.method=!1,o&&(T=this.state.startLoc);let w=this.eat(55);this.parsePropertyNamePrefixOperator(l);let k=this.state.containsEsc;if(this.parsePropertyName(l,o),!w&&!k&&this.maybeAsyncOrAccessorProp(l)){let{key:O}=l,_=O.name;_==="async"&&!this.hasPrecedingLineBreak()&&(h=!0,this.resetPreviousNodeTrailingComments(O),w=this.eat(55),this.parsePropertyName(l)),(_==="get"||_==="set")&&(g=!0,this.resetPreviousNodeTrailingComments(O),l.kind=_,this.match(55)&&(w=!0,this.raise(N.AccessorIsGenerator,this.state.curPosition(),{kind:_}),this.next()),this.parsePropertyName(l))}return this.parseObjPropValue(l,T,w,h,!1,g,o)}getGetterSetterExpectedParamCount(o){return o.kind==="get"?0:1}getObjectOrClassMethodParams(o){return o.params}checkGetterSetterParams(o){let n=this.getGetterSetterExpectedParamCount(o),l=this.getObjectOrClassMethodParams(o);l.length!==n&&this.raise(o.kind==="get"?N.BadGetterArity:N.BadSetterArity,o),o.kind==="set"&&l[l.length-1]?.type==="RestElement"&&this.raise(N.BadSetterRestParameter,o)}parseObjectMethod(o,n,l,h,g){if(g){let T=this.parseMethod(o,n,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(T),T}if(l||n||this.match(10))return h&&this.unexpected(),o.kind="method",o.method=!0,this.parseMethod(o,n,l,!1,!1,"ObjectMethod")}parseObjectProperty(o,n,l,h){if(o.shorthand=!1,this.eat(14))return o.value=l?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,h),this.finishObjectProperty(o);if(!o.computed&&o.key.type==="Identifier"){if(this.checkReservedWord(o.key.name,o.key.loc.start,!0,!1),l)o.value=this.parseMaybeDefault(n,this.cloneIdentifier(o.key));else if(this.match(29)){let g=this.state.startLoc;h!=null?h.shorthandAssignLoc===null&&(h.shorthandAssignLoc=g):this.raise(N.InvalidCoverInitializedName,g),o.value=this.parseMaybeDefault(n,this.cloneIdentifier(o.key))}else o.value=this.cloneIdentifier(o.key);return o.shorthand=!0,this.finishObjectProperty(o)}}finishObjectProperty(o){return this.finishNode(o,"ObjectProperty")}parseObjPropValue(o,n,l,h,g,T,w){let k=this.parseObjectMethod(o,l,h,g,T)||this.parseObjectProperty(o,n,g,w);return k||this.unexpected(),k}parsePropertyName(o,n){if(this.eat(0))o.computed=!0,o.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:l,value:h}=this.state,g;if(It(l))g=this.parseIdentifier(!0);else switch(l){case 135:g=this.parseNumericLiteral(h);break;case 134:g=this.parseStringLiteral(h);break;case 136:g=this.parseBigIntLiteral(h);break;case 139:{let T=this.state.startLoc;n!=null?n.privateKeyLoc===null&&(n.privateKeyLoc=T):this.raise(N.UnexpectedPrivateField,T),g=this.parsePrivateName();break}default:this.unexpected()}o.key=g,l!==139&&(o.computed=!1)}}initFunction(o,n){o.id=null,o.generator=!1,o.async=n}parseMethod(o,n,l,h,g,T,w=!1){this.initFunction(o,l),o.generator=n,this.scope.enter(530|(w?576:0)|(g?32:0)),this.prodParam.enter(mo(l,o.generator)),this.parseFunctionParams(o,h);let k=this.parseFunctionBodyAndFinish(o,T,!0);return this.prodParam.exit(),this.scope.exit(),k}parseArrayLike(o,n,l){n&&this.expectPlugin("recordAndTuple");let h=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let g=this.startNode();return this.next(),g.elements=this.parseExprList(o,!n,l,g),this.state.inFSharpPipelineDirectBody=h,this.finishNode(g,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(o,n,l,h){this.scope.enter(518);let g=mo(l,!1);!this.match(5)&&this.prodParam.hasIn&&(g|=8),this.prodParam.enter(g),this.initFunction(o,l);let T=this.state.maybeInArrowParameters;return n&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(o,n,h)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(o,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=T,this.finishNode(o,"ArrowFunctionExpression")}setArrowFunctionParameters(o,n,l){this.toAssignableList(n,l,!1),o.params=n}parseFunctionBodyAndFinish(o,n,l=!1){return this.parseFunctionBody(o,!1,l),this.finishNode(o,n)}parseFunctionBody(o,n,l=!1){let h=n&&!this.match(5);if(this.expressionScope.enter(Ud()),h)o.body=this.parseMaybeAssign(),this.checkParams(o,!1,n,!1);else{let g=this.state.strict,T=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),o.body=this.parseBlock(!0,!1,w=>{let k=!this.isSimpleParamList(o.params);w&&k&&this.raise(N.IllegalLanguageModeDirective,(o.kind==="method"||o.kind==="constructor")&&o.key?o.key.loc.end:o);let O=!g&&this.state.strict;this.checkParams(o,!this.state.strict&&!n&&!l&&!k,n,O),this.state.strict&&o.id&&this.checkIdentifier(o.id,65,O)}),this.prodParam.exit(),this.state.labels=T}this.expressionScope.exit()}isSimpleParameter(o){return o.type==="Identifier"}isSimpleParamList(o){for(let n=0,l=o.length;n<l;n++)if(!this.isSimpleParameter(o[n]))return!1;return!0}checkParams(o,n,l,h=!0){let g=!n&&new Set,T={type:"FormalParameters"};for(let w of o.params)this.checkLVal(w,T,5,g,h)}parseExprList(o,n,l,h){let g=[],T=!0;for(;!this.eat(o);){if(T)T=!1;else if(this.expect(12),this.match(o)){h&&this.addTrailingCommaExtraToNode(h),this.next();break}g.push(this.parseExprListItem(o,n,l))}return g}parseExprListItem(o,n,l,h){let g;if(this.match(12))n||this.raise(N.UnexpectedToken,this.state.curPosition(),{unexpected:","}),g=null;else if(this.match(21)){let T=this.state.startLoc;g=this.parseParenItem(this.parseSpread(l),T)}else if(this.match(17)){this.expectPlugin("partialApplication"),h||this.raise(N.UnexpectedArgumentPlaceholder,this.state.startLoc);let T=this.startNode();this.next(),g=this.finishNode(T,"ArgumentPlaceholder")}else g=this.parseMaybeAssignAllowInOrVoidPattern(o,l,this.parseParenItem);return g}parseIdentifier(o){let n=this.startNode(),l=this.parseIdentifierName(o);return this.createIdentifier(n,l)}createIdentifier(o,n){return o.name=n,o.loc.identifierName=n,this.finishNode(o,"Identifier")}createIdentifierAt(o,n,l){return o.name=n,o.loc.identifierName=n,this.finishNodeAt(o,"Identifier",l)}parseIdentifierName(o){let n,{startLoc:l,type:h}=this.state;It(h)?n=this.state.value:this.unexpected();let g=$i(h);return o?g&&this.replaceToken(132):this.checkReservedWord(n,l,g,!1),this.next(),n}checkReservedWord(o,n,l,h){if(!(o.length>10||!RE(o))){if(l&&OE(o)){this.raise(N.UnexpectedKeyword,n,{keyword:o});return}if((this.state.strict?h?Nd:kd:Fd)(o,this.inModule)){this.raise(N.UnexpectedReservedWord,n,{reservedWord:o});return}else if(o==="yield"){if(this.prodParam.hasYield){this.raise(N.YieldBindingIdentifier,n);return}}else if(o==="await"){if(this.prodParam.hasAwait){this.raise(N.AwaitBindingIdentifier,n);return}if(this.scope.inStaticBlock){this.raise(N.AwaitBindingIdentifierInStaticBlock,n);return}this.expressionScope.recordAsyncArrowParametersError(n)}else if(o==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(N.ArgumentsInClass,n);return}}}recordAwaitIfAllowed(){let o=this.prodParam.hasAwait;return o&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),o}parseAwait(o){let n=this.startNodeAt(o);return this.expressionScope.recordParameterInitializerError(N.AwaitExpressionFormalParameter,n),this.eat(55)&&this.raise(N.ObsoleteAwaitStar,n),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(n.argument=this.parseMaybeUnary(null,!0)),this.finishNode(n,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:o}=this.state;return o===53||o===10||o===0||il(o)||o===102&&!this.state.containsEsc||o===138||o===56||this.hasPlugin("v8intrinsic")&&o===54}parseYield(o){let n=this.startNodeAt(o);this.expressionScope.recordParameterInitializerError(N.YieldInParameter,n);let l=!1,h=null;if(!this.hasPrecedingLineBreak())switch(l=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!l)break;default:h=this.parseMaybeAssign()}return n.delegate=l,n.argument=h,this.finishNode(n,"YieldExpression")}parseImportCall(o){if(this.next(),o.source=this.parseMaybeAssignAllowIn(),o.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(o.source);else if(o.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(o.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(N.ImportCallArity,o)}}return this.expect(11),this.finishNode(o,"ImportExpression")}checkPipelineAtInfixOperator(o,n){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&o.type==="SequenceExpression"&&this.raise(N.PipelineHeadSequenceExpression,n)}parseSmartPipelineBodyInStyle(o,n){if(this.isSimpleReference(o)){let l=this.startNodeAt(n);return l.callee=o,this.finishNode(l,"PipelineBareFunction")}else{let l=this.startNodeAt(n);return this.checkSmartPipeTopicBodyEarlyErrors(n),l.expression=o,this.finishNode(l,"PipelineTopicExpression")}}isSimpleReference(o){switch(o.type){case"MemberExpression":return!o.computed&&this.isSimpleReference(o.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(o){if(this.match(19))throw this.raise(N.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(N.PipelineTopicUnused,o)}withTopicBindingContext(o){let n=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return o()}finally{this.state.topicContext=n}}withSmartMixTopicForbiddingContext(o){return o()}withSoloAwaitPermittingContext(o){let n=this.state.soloAwait;this.state.soloAwait=!0;try{return o()}finally{this.state.soloAwait=n}}allowInAnd(o){let n=this.prodParam.currentFlags();if(8&~n){this.prodParam.enter(n|8);try{return o()}finally{this.prodParam.exit()}}return o()}disallowInAnd(o){let n=this.prodParam.currentFlags();if(8&n){this.prodParam.enter(n&-9);try{return o()}finally{this.prodParam.exit()}}return o()}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(o){let n=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let l=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let h=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,o);return this.state.inFSharpPipelineDirectBody=l,h}parseModuleExpression(){this.expectPlugin("moduleBlocks");let o=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let n=this.startNodeAt(this.state.endLoc);this.next();let l=this.initializeScopes(!0);this.enterInitialScopes();try{o.body=this.parseProgram(n,8,"module")}finally{l()}return this.finishNode(o,"ModuleExpression")}parseVoidPattern(o){this.expectPlugin("discardBinding");let n=this.startNode();return o!=null&&(o.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(n,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(o,n,l){if(n!=null&&this.match(88)){let h=this.lookaheadCharCode();if(h===44||h===(o===3?93:o===8?125:41)||h===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(n))}return this.parseMaybeAssignAllowIn(n,l)}parsePropertyNamePrefixOperator(o){}},gl={kind:1},IA={kind:2},NA=/[\uD800-\uDFFF]/u,Dl=/in(?:stanceof)?/y;function BA(o,n,l){for(let h=0;h<o.length;h++){let g=o[h],{type:T}=g;typeof T=="number"&&(g.type=Sd(T))}return o}var _A=class extends kA{parseTopLevel(o,n){return o.program=this.parseProgram(n,140,this.options.sourceType==="module"?"module":"script"),o.comments=this.comments,this.optionFlags&256&&(o.tokens=BA(this.tokens,this.input,this.startIndex)),this.finishNode(o,"File")}parseProgram(o,n,l){if(o.sourceType=l,o.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(o,!0,!0,n),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[g,T]of Array.from(this.scope.undefinedExports))this.raise(N.ModuleExportUndefined,T,{localName:g});this.addExtra(o,"topLevelAwait",this.state.hasTopLevelAwait)}let h;return n===140?h=this.finishNode(o,"Program"):h=this.finishNodeAt(o,"Program",x(this.state.startLoc,-1)),h}stmtToDirective(o){let n=this.castNodeTo(o,"Directive"),l=this.castNodeTo(o.expression,"DirectiveLiteral"),h=l.value,g=this.input.slice(this.offsetToSourcePos(l.start),this.offsetToSourcePos(l.end)),T=l.value=g.slice(1,-1);return this.addExtra(l,"raw",g),this.addExtra(l,"rawValue",T),this.addExtra(l,"expressionValue",h),n.value=l,delete o.expression,n}parseInterpreterDirective(){if(!this.match(28))return null;let o=this.startNode();return o.value=this.state.value,this.next(),this.finishNode(o,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let o=this.nextTokenInLineStart(),n=this.codePointAtPos(o);if(this.isUnparsedContextual(o,"of")){let l=this.lookaheadCharCodeSince(o+2);if(l!==61&&l!==58&&l!==59)return!1}return!!(this.chStartsBindingIdentifier(n,o)||this.isUnparsedContextual(o,"void"))}nextTokenIsIdentifierOnSameLine(){let o=this.nextTokenInLineStart(),n=this.codePointAtPos(o);return this.chStartsBindingIdentifier(n,o)}isAwaitUsing(){if(!this.isContextual(96))return!1;let o=this.nextTokenInLineStart();if(this.isUnparsedContextual(o,"using")){o=this.nextTokenInLineStartSince(o+5);let n=this.codePointAtPos(o);if(this.chStartsBindingIdentifier(n,o))return!0}return!1}chStartsBindingIdentifier(o,n){if(kr(o)){if(Dl.lastIndex=n,Dl.test(this.input)){let l=this.codePointAtPos(Dl.lastIndex);if(!si(l)&&l!==92)return!1}return!0}else return o===92}chStartsBindingPattern(o){return o===91||o===123}hasFollowingBindingAtom(){let o=this.nextTokenStart(),n=this.codePointAtPos(o);return this.chStartsBindingPattern(n)||this.chStartsBindingIdentifier(n,o)}hasInLineFollowingBindingIdentifierOrBrace(){let o=this.nextTokenInLineStart(),n=this.codePointAtPos(o);return n===123||this.chStartsBindingIdentifier(n,o)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(o=!1){let n=0;return this.options.annexB&&!this.state.strict&&(n|=4,o&&(n|=8)),this.parseStatementLike(n)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(o){let n=null;return this.match(26)&&(n=this.parseDecorators(!0)),this.parseStatementContent(o,n)}parseStatementContent(o,n){let l=this.state.type,h=this.startNode(),g=!!(o&2),T=!!(o&4),w=o&1;switch(l){case 60:return this.parseBreakContinueStatement(h,!0);case 63:return this.parseBreakContinueStatement(h,!1);case 64:return this.parseDebuggerStatement(h);case 90:return this.parseDoWhileStatement(h);case 91:return this.parseForStatement(h);case 68:if(this.lookaheadCharCode()===46)break;return T||this.raise(this.state.strict?N.StrictFunction:this.options.annexB?N.SloppyFunctionAnnexB:N.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(h,!1,!g&&T);case 80:return g||this.unexpected(),this.parseClass(this.maybeTakeDecorators(n,h),!0);case 69:return this.parseIfStatement(h);case 70:return this.parseReturnStatement(h);case 71:return this.parseSwitchStatement(h);case 72:return this.parseThrowStatement(h);case 73:return this.parseTryStatement(h);case 96:if(this.isAwaitUsing())return this.allowsUsing()?g?this.recordAwaitIfAllowed()||this.raise(N.AwaitUsingNotInAsyncContext,h):this.raise(N.UnexpectedLexicalDeclaration,h):this.raise(N.UnexpectedUsingDeclaration,h),this.next(),this.parseVarStatement(h,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?g||this.raise(N.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(N.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(h,"using");case 100:{if(this.state.containsEsc)break;let _=this.nextTokenStart(),Q=this.codePointAtPos(_);if(Q!==91&&(!g&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(Q,_)&&Q!==123))break}case 75:g||this.raise(N.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let _=this.state.value;return this.parseVarStatement(h,_)}case 92:return this.parseWhileStatement(h);case 76:return this.parseWithStatement(h);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(h);case 83:{let _=this.lookaheadCharCode();if(_===40||_===46)break}case 82:{!(this.optionFlags&8)&&!w&&this.raise(N.UnexpectedImportExport,this.state.startLoc),this.next();let _;return l===83?_=this.parseImport(h):_=this.parseExport(h,n),this.assertModuleNodeAllowed(_),_}default:if(this.isAsyncFunction())return g||this.raise(N.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(h,!0,!g&&T)}let k=this.state.value,O=this.parseExpression();return ze(l)&&O.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(h,k,O,o):this.parseExpressionStatement(h,O,n)}assertModuleNodeAllowed(o){!(this.optionFlags&8)&&!this.inModule&&this.raise(N.ImportOutsideModule,o)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(o,n,l){return o&&(n.decorators?.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(N.DecoratorsBeforeAfterExport,n.decorators[0]),n.decorators.unshift(...o)):n.decorators=o,this.resetStartLocationFromNode(n,o[0]),l&&this.resetStartLocationFromNode(l,n)),n}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(o){let n=[];do n.push(this.parseDecorator());while(this.match(26));if(this.match(82))o||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(N.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(N.UnexpectedLeadingDecorator,this.state.startLoc);return n}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let o=this.startNode();if(this.next(),this.hasPlugin("decorators")){let n=this.state.startLoc,l;if(this.match(10)){let h=this.state.startLoc;this.next(),l=this.parseExpression(),this.expect(11),l=this.wrapParenthesis(h,l);let g=this.state.startLoc;o.expression=this.parseMaybeDecoratorArguments(l,h),this.getPluginOption("decorators","allowCallParenthesized")===!1&&o.expression!==l&&this.raise(N.DecoratorArgumentsOutsideParentheses,g)}else{for(l=this.parseIdentifier(!1);this.eat(16);){let h=this.startNodeAt(n);h.object=l,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),h.property=this.parsePrivateName()):h.property=this.parseIdentifier(!0),h.computed=!1,l=this.finishNode(h,"MemberExpression")}o.expression=this.parseMaybeDecoratorArguments(l,n)}}else o.expression=this.parseExprSubscripts();return this.finishNode(o,"Decorator")}parseMaybeDecoratorArguments(o,n){if(this.eat(10)){let l=this.startNodeAt(n);return l.callee=o,l.arguments=this.parseCallExpressionArguments(),this.toReferencedList(l.arguments),this.finishNode(l,"CallExpression")}return o}parseBreakContinueStatement(o,n){return this.next(),this.isLineTerminator()?o.label=null:(o.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(o,n),this.finishNode(o,n?"BreakStatement":"ContinueStatement")}verifyBreakContinue(o,n){let l;for(l=0;l<this.state.labels.length;++l){let h=this.state.labels[l];if((o.label==null||h.name===o.label.name)&&(h.kind!=null&&(n||h.kind===1)||o.label&&n))break}if(l===this.state.labels.length){let h=n?"BreakStatement":"ContinueStatement";this.raise(N.IllegalBreakContinue,o,{type:h})}}parseDebuggerStatement(o){return this.next(),this.semicolon(),this.finishNode(o,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let o=this.parseExpression();return this.expect(11),o}parseDoWhileStatement(o){return this.next(),this.state.labels.push(gl),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),o.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(o,"DoWhileStatement")}parseForStatement(o){this.next(),this.state.labels.push(gl);let n=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(n=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return n!==null&&this.unexpected(n),this.parseFor(o,null);let l=this.isContextual(100);{let k=this.isAwaitUsing(),O=k||this.isForUsing(),_=l&&this.hasFollowingBindingAtom()||O;if(this.match(74)||this.match(75)||_){let Q=this.startNode(),ie;k?(ie="await using",this.recordAwaitIfAllowed()||this.raise(N.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):ie=this.state.value,this.next(),this.parseVar(Q,!0,ie);let ve=this.finishNode(Q,"VariableDeclaration"),Be=this.match(58);return Be&&O&&this.raise(N.ForInUsing,ve),(Be||this.isContextual(102))&&ve.declarations.length===1?this.parseForIn(o,ve,n):(n!==null&&this.unexpected(n),this.parseFor(o,ve))}}let h=this.isContextual(95),g=new Do,T=this.parseExpression(!0,g),w=this.isContextual(102);if(w&&(l&&this.raise(N.ForOfLet,T),n===null&&h&&T.type==="Identifier"&&this.raise(N.ForOfAsync,T)),w||this.match(58)){this.checkDestructuringPrivate(g),this.toAssignable(T,!0);let k=w?"ForOfStatement":"ForInStatement";return this.checkLVal(T,{type:k}),this.parseForIn(o,T,n)}else this.checkExpressionErrors(g,!0);return n!==null&&this.unexpected(n),this.parseFor(o,T)}parseFunctionStatement(o,n,l){return this.next(),this.parseFunction(o,1|(l?2:0)|(n?8:0))}parseIfStatement(o){return this.next(),o.test=this.parseHeaderExpression(),o.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),o.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(o,"IfStatement")}parseReturnStatement(o){return this.prodParam.hasReturn||this.raise(N.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?o.argument=null:(o.argument=this.parseExpression(),this.semicolon()),this.finishNode(o,"ReturnStatement")}parseSwitchStatement(o){this.next(),o.discriminant=this.parseHeaderExpression();let n=o.cases=[];this.expect(5),this.state.labels.push(IA),this.scope.enter(256);let l;for(let h;!this.match(8);)if(this.match(61)||this.match(65)){let g=this.match(61);l&&this.finishNode(l,"SwitchCase"),n.push(l=this.startNode()),l.consequent=[],this.next(),g?l.test=this.parseExpression():(h&&this.raise(N.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),h=!0,l.test=null),this.expect(14)}else l?l.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),l&&this.finishNode(l,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(o,"SwitchStatement")}parseThrowStatement(o){return this.next(),this.hasPrecedingLineBreak()&&this.raise(N.NewlineAfterThrow,this.state.lastTokEndLoc),o.argument=this.parseExpression(),this.semicolon(),this.finishNode(o,"ThrowStatement")}parseCatchClauseParam(){let o=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&o.type==="Identifier"?8:0),this.checkLVal(o,{type:"CatchClause"},9),o}parseTryStatement(o){if(this.next(),o.block=this.parseBlock(),o.handler=null,this.match(62)){let n=this.startNode();this.next(),this.match(10)?(this.expect(10),n.param=this.parseCatchClauseParam(),this.expect(11)):(n.param=null,this.scope.enter(0)),n.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),o.handler=this.finishNode(n,"CatchClause")}return o.finalizer=this.eat(67)?this.parseBlock():null,!o.handler&&!o.finalizer&&this.raise(N.NoCatchOrFinally,o),this.finishNode(o,"TryStatement")}parseVarStatement(o,n,l=!1){return this.next(),this.parseVar(o,!1,n,l),this.semicolon(),this.finishNode(o,"VariableDeclaration")}parseWhileStatement(o){return this.next(),o.test=this.parseHeaderExpression(),this.state.labels.push(gl),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(o,"WhileStatement")}parseWithStatement(o){return this.state.strict&&this.raise(N.StrictWith,this.state.startLoc),this.next(),o.object=this.parseHeaderExpression(),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(o,"WithStatement")}parseEmptyStatement(o){return this.next(),this.finishNode(o,"EmptyStatement")}parseLabeledStatement(o,n,l,h){for(let T of this.state.labels)T.name===n&&this.raise(N.LabelRedeclaration,l,{labelName:n});let g=bE(this.state.type)?1:this.match(71)?2:null;for(let T=this.state.labels.length-1;T>=0;T--){let w=this.state.labels[T];if(w.statementStart===o.start)w.statementStart=this.sourceToOffsetPos(this.state.start),w.kind=g;else break}return this.state.labels.push({name:n,kind:g,statementStart:this.sourceToOffsetPos(this.state.start)}),o.body=h&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),o.label=l,this.finishNode(o,"LabeledStatement")}parseExpressionStatement(o,n,l){return o.expression=n,this.semicolon(),this.finishNode(o,"ExpressionStatement")}parseBlock(o=!1,n=!0,l){let h=this.startNode();return o&&this.state.strictErrors.clear(),this.expect(5),n&&this.scope.enter(0),this.parseBlockBody(h,o,!1,8,l),n&&this.scope.exit(),this.finishNode(h,"BlockStatement")}isValidDirective(o){return o.type==="ExpressionStatement"&&o.expression.type==="StringLiteral"&&!o.expression.extra.parenthesized}parseBlockBody(o,n,l,h,g){let T=o.body=[],w=o.directives=[];this.parseBlockOrModuleBlockBody(T,n?w:void 0,l,h,g)}parseBlockOrModuleBlockBody(o,n,l,h,g){let T=this.state.strict,w=!1,k=!1;for(;!this.match(h);){let O=l?this.parseModuleItem():this.parseStatementListItem();if(n&&!k){if(this.isValidDirective(O)){let _=this.stmtToDirective(O);n.push(_),!w&&_.value.value==="use strict"&&(w=!0,this.setStrict(!0));continue}k=!0,this.state.strictErrors.clear()}o.push(O)}g?.call(this,w),T||this.setStrict(!1),this.next()}parseFor(o,n){return o.init=n,this.semicolon(!1),o.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),o.update=this.match(11)?null:this.parseExpression(),this.expect(11),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(o,"ForStatement")}parseForIn(o,n,l){let h=this.match(58);return this.next(),h?l!==null&&this.unexpected(l):o.await=l!==null,n.type==="VariableDeclaration"&&n.declarations[0].init!=null&&(!h||!this.options.annexB||this.state.strict||n.kind!=="var"||n.declarations[0].id.type!=="Identifier")&&this.raise(N.ForInOfLoopInitializer,n,{type:h?"ForInStatement":"ForOfStatement"}),n.type==="AssignmentPattern"&&this.raise(N.InvalidLhs,n,{ancestor:{type:"ForStatement"}}),o.left=n,o.right=h?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),o.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(o,h?"ForInStatement":"ForOfStatement")}parseVar(o,n,l,h=!1){let g=o.declarations=[];for(o.kind=l;;){let T=this.startNode();if(this.parseVarId(T,l),T.init=this.eat(29)?n?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,T.init===null&&!h&&(T.id.type!=="Identifier"&&!(n&&(this.match(58)||this.isContextual(102)))?this.raise(N.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(l==="const"||l==="using"||l==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(N.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:l})),g.push(this.finishNode(T,"VariableDeclarator")),!this.eat(12))break}return o}parseVarId(o,n){let l=this.parseBindingAtom();n==="using"||n==="await using"?(l.type==="ArrayPattern"||l.type==="ObjectPattern")&&this.raise(N.UsingDeclarationHasBindingPattern,l.loc.start):l.type==="VoidPattern"&&this.raise(N.UnexpectedVoidPattern,l.loc.start),this.checkLVal(l,{type:"VariableDeclarator"},n==="var"?5:8201),o.id=l}parseAsyncFunctionExpression(o){return this.parseFunction(o,8)}parseFunction(o,n=0){let l=n&2,h=!!(n&1),g=h&&!(n&4),T=!!(n&8);this.initFunction(o,T),this.match(55)&&(l&&this.raise(N.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),o.generator=!0),h&&(o.id=this.parseFunctionId(g));let w=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(mo(T,o.generator)),h||(o.id=this.parseFunctionId()),this.parseFunctionParams(o,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(o,h?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),h&&!l&&this.registerFunctionStatementId(o),this.state.maybeInArrowParameters=w,o}parseFunctionId(o){return o||ze(this.state.type)?this.parseIdentifier():null}parseFunctionParams(o,n){this.expect(10),this.expressionScope.enter(dA()),o.params=this.parseBindingList(11,41,2|(n?4:0)),this.expressionScope.exit()}registerFunctionStatementId(o){o.id&&this.scope.declareName(o.id.name,!this.options.annexB||this.state.strict||o.generator||o.async?this.scope.treatFunctionsAsVar?5:8201:17,o.id.loc.start)}parseClass(o,n,l){this.next();let h=this.state.strict;return this.state.strict=!0,this.parseClassId(o,n,l),this.parseClassSuper(o),o.body=this.parseClassBody(!!o.superClass,h),this.finishNode(o,n?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(o){return o.type==="Identifier"&&o.name==="constructor"||o.type==="StringLiteral"&&o.value==="constructor"}isNonstaticConstructor(o){return!o.computed&&!o.static&&this.nameIsConstructor(o.key)}parseClassBody(o,n){this.classScope.enter();let l={hadConstructor:!1,hadSuperClass:o},h=[],g=this.startNode();if(g.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(h.length>0)throw this.raise(N.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){h.push(this.parseDecorator());continue}let T=this.startNode();h.length&&(T.decorators=h,this.resetStartLocationFromNode(T,h[0]),h=[]),this.parseClassMember(g,T,l),T.kind==="constructor"&&T.decorators&&T.decorators.length>0&&this.raise(N.DecoratorConstructor,T)}}),this.state.strict=n,this.next(),h.length)throw this.raise(N.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(g,"ClassBody")}parseClassMemberFromModifier(o,n){let l=this.parseIdentifier(!0);if(this.isClassMethod()){let h=n;return h.kind="method",h.computed=!1,h.key=l,h.static=!1,this.pushClassMethod(o,h,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let h=n;return h.computed=!1,h.key=l,h.static=!1,o.body.push(this.parseClassProperty(h)),!0}return this.resetPreviousNodeTrailingComments(l),!1}parseClassMember(o,n,l){let h=this.isContextual(106);if(h){if(this.parseClassMemberFromModifier(o,n))return;if(this.eat(5)){this.parseClassStaticBlock(o,n);return}}this.parseClassMemberWithIsStatic(o,n,l,h)}parseClassMemberWithIsStatic(o,n,l,h){let g=n,T=n,w=n,k=n,O=n,_=g,Q=g;if(n.static=h,this.parsePropertyNamePrefixOperator(n),this.eat(55)){_.kind="method";let ot=this.match(139);if(this.parseClassElementName(_),this.parsePostMemberNameModifiers(_),ot){this.pushClassPrivateMethod(o,T,!0,!1);return}this.isNonstaticConstructor(g)&&this.raise(N.ConstructorIsGenerator,g.key),this.pushClassMethod(o,g,!0,!1,!1,!1);return}let ie=!this.state.containsEsc&&ze(this.state.type),ve=this.parseClassElementName(n),Be=ie?ve.name:null,ft=this.isPrivateName(ve),wt=this.state.startLoc;if(this.parsePostMemberNameModifiers(Q),this.isClassMethod()){if(_.kind="method",ft){this.pushClassPrivateMethod(o,T,!1,!1);return}let ot=this.isNonstaticConstructor(g),ut=!1;ot&&(g.kind="constructor",l.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(N.DuplicateConstructor,ve),ot&&this.hasPlugin("typescript")&&n.override&&this.raise(N.OverrideOnConstructor,ve),l.hadConstructor=!0,ut=l.hadSuperClass),this.pushClassMethod(o,g,!1,!1,ot,ut)}else if(this.isClassProperty())ft?this.pushClassPrivateProperty(o,k):this.pushClassProperty(o,w);else if(Be==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(ve);let ot=this.eat(55);Q.optional&&this.unexpected(wt),_.kind="method";let ut=this.match(139);this.parseClassElementName(_),this.parsePostMemberNameModifiers(Q),ut?this.pushClassPrivateMethod(o,T,ot,!0):(this.isNonstaticConstructor(g)&&this.raise(N.ConstructorIsAsync,g.key),this.pushClassMethod(o,g,ot,!0,!1,!1))}else if((Be==="get"||Be==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(ve),_.kind=Be;let ot=this.match(139);this.parseClassElementName(g),ot?this.pushClassPrivateMethod(o,T,!1,!1):(this.isNonstaticConstructor(g)&&this.raise(N.ConstructorIsAccessor,g.key),this.pushClassMethod(o,g,!1,!1,!1,!1)),this.checkGetterSetterParams(g)}else if(Be==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(ve);let ot=this.match(139);this.parseClassElementName(w),this.pushClassAccessorProperty(o,O,ot)}else this.isLineTerminator()?ft?this.pushClassPrivateProperty(o,k):this.pushClassProperty(o,w):this.unexpected()}parseClassElementName(o){let{type:n,value:l}=this.state;if((n===132||n===134)&&o.static&&l==="prototype"&&this.raise(N.StaticPrototype,this.state.startLoc),n===139){l==="constructor"&&this.raise(N.ConstructorClassPrivateField,this.state.startLoc);let h=this.parsePrivateName();return o.key=h,h}return this.parsePropertyName(o),o.key}parseClassStaticBlock(o,n){this.scope.enter(720);let l=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let h=n.body=[];this.parseBlockOrModuleBlockBody(h,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=l,o.body.push(this.finishNode(n,"StaticBlock")),n.decorators?.length&&this.raise(N.DecoratorStaticBlock,n)}pushClassProperty(o,n){!n.computed&&this.nameIsConstructor(n.key)&&this.raise(N.ConstructorClassField,n.key),o.body.push(this.parseClassProperty(n))}pushClassPrivateProperty(o,n){let l=this.parseClassPrivateProperty(n);o.body.push(l),this.classScope.declarePrivateName(this.getPrivateNameSV(l.key),0,l.key.loc.start)}pushClassAccessorProperty(o,n,l){!l&&!n.computed&&this.nameIsConstructor(n.key)&&this.raise(N.ConstructorClassField,n.key);let h=this.parseClassAccessorProperty(n);o.body.push(h),l&&this.classScope.declarePrivateName(this.getPrivateNameSV(h.key),0,h.key.loc.start)}pushClassMethod(o,n,l,h,g,T){o.body.push(this.parseMethod(n,l,h,g,T,"ClassMethod",!0))}pushClassPrivateMethod(o,n,l,h){let g=this.parseMethod(n,l,h,!1,!1,"ClassPrivateMethod",!0);o.body.push(g);let T=g.kind==="get"?g.static?6:2:g.kind==="set"?g.static?5:1:0;this.declareClassPrivateMethodInScope(g,T)}declareClassPrivateMethodInScope(o,n){this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),n,o.key.loc.start)}parsePostMemberNameModifiers(o){}parseClassPrivateProperty(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassPrivateProperty")}parseClassProperty(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassProperty")}parseClassAccessorProperty(o){return this.parseInitializer(o),this.semicolon(),this.finishNode(o,"ClassAccessorProperty")}parseInitializer(o){this.scope.enter(592),this.expressionScope.enter(Ud()),this.prodParam.enter(0),o.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(o,n,l,h=8331){if(ze(this.state.type))o.id=this.parseIdentifier(),n&&this.declareNameFromIdentifier(o.id,h);else if(l||!n)o.id=null;else throw this.raise(N.MissingClassName,this.state.startLoc)}parseClassSuper(o){o.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(o,n){let l=this.parseMaybeImportPhase(o,!0),h=this.maybeParseExportDefaultSpecifier(o,l),g=!h||this.eat(12),T=g&&this.eatExportStar(o),w=T&&this.maybeParseExportNamespaceSpecifier(o),k=g&&(!w||this.eat(12)),O=h||T;if(T&&!w){if(h&&this.unexpected(),n)throw this.raise(N.UnsupportedDecoratorExport,o);return this.parseExportFrom(o,!0),this.sawUnambiguousESM=!0,this.finishNode(o,"ExportAllDeclaration")}let _=this.maybeParseExportNamedSpecifiers(o);h&&g&&!T&&!_&&this.unexpected(null,5),w&&k&&this.unexpected(null,98);let Q;if(O||_){if(Q=!1,n)throw this.raise(N.UnsupportedDecoratorExport,o);this.parseExportFrom(o,O)}else Q=this.maybeParseExportDeclaration(o);if(O||_||Q){let ie=o;if(this.checkExport(ie,!0,!1,!!ie.source),ie.declaration?.type==="ClassDeclaration")this.maybeTakeDecorators(n,ie.declaration,ie);else if(n)throw this.raise(N.UnsupportedDecoratorExport,o);return this.sawUnambiguousESM=!0,this.finishNode(ie,"ExportNamedDeclaration")}if(this.eat(65)){let ie=o,ve=this.parseExportDefaultExpression();if(ie.declaration=ve,ve.type==="ClassDeclaration")this.maybeTakeDecorators(n,ve,ie);else if(n)throw this.raise(N.UnsupportedDecoratorExport,o);return this.checkExport(ie,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(ie,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(o){return this.eat(55)}maybeParseExportDefaultSpecifier(o,n){if(n||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",n?.loc.start);let l=n||this.parseIdentifier(!0),h=this.startNodeAtNode(l);return h.exported=l,o.specifiers=[this.finishNode(h,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(o){if(this.isContextual(93)){o.specifiers??(o.specifiers=[]);let n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),o.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(o){if(this.match(5)){let n=o;n.specifiers||(n.specifiers=[]);let l=n.exportKind==="type";return n.specifiers.push(...this.parseExportSpecifiers(l)),n.source=null,n.attributes=[],n.declaration=null,!0}return!1}maybeParseExportDeclaration(o){return this.shouldParseExportDeclaration()?(o.specifiers=[],o.source=null,o.attributes=[],o.declaration=this.parseExportDeclaration(o),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let o=this.nextTokenInLineStart();return this.isUnparsedContextual(o,"function")}parseExportDefaultExpression(){let o=this.startNode();if(this.match(68))return this.next(),this.parseFunction(o,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(o,13);if(this.match(80))return this.parseClass(o,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(N.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(N.UnsupportedDefaultExport,this.state.startLoc);let n=this.parseMaybeAssignAllowIn();return this.semicolon(),n}parseExportDeclaration(o){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:o}=this.state;if(ze(o)){if(o===95&&!this.state.containsEsc||o===100)return!1;if((o===130||o===129)&&!this.state.containsEsc){let h=this.nextTokenStart(),g=this.input.charCodeAt(h);if(g===123||this.chStartsBindingIdentifier(g,h)&&!this.input.startsWith("from",h))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let n=this.nextTokenStart(),l=this.isUnparsedContextual(n,"from");if(this.input.charCodeAt(n)===44||ze(this.state.type)&&l)return!0;if(this.match(65)&&l){let h=this.input.charCodeAt(this.nextTokenStartSince(n+4));return h===34||h===39}return!1}parseExportFrom(o,n){this.eatContextual(98)?(o.source=this.parseImportSource(),this.checkExport(o),this.maybeParseImportAttributes(o),this.checkJSONModuleImport(o)):n&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:o}=this.state;return o===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(N.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(N.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(N.UsingDeclarationExport,this.state.startLoc),!0):o===74||o===75||o===68||o===80||this.isLet()||this.isAsyncFunction()}checkExport(o,n,l,h){if(n){if(l){if(this.checkDuplicateExports(o,"default"),this.hasPlugin("exportDefaultFrom")){let g=o.declaration;g.type==="Identifier"&&g.name==="from"&&g.end-g.start===4&&!g.extra?.parenthesized&&this.raise(N.ExportDefaultFromAsIdentifier,g)}}else if(o.specifiers?.length)for(let g of o.specifiers){let{exported:T}=g,w=T.type==="Identifier"?T.name:T.value;if(this.checkDuplicateExports(g,w),!h&&g.local){let{local:k}=g;k.type!=="Identifier"?this.raise(N.ExportBindingIsString,g,{localName:k.value,exportName:w}):(this.checkReservedWord(k.name,k.loc.start,!0,!1),this.scope.checkLocalExport(k))}}else if(o.declaration){let g=o.declaration;if(g.type==="FunctionDeclaration"||g.type==="ClassDeclaration"){let{id:T}=g;if(!T)throw new Error("Assertion failure");this.checkDuplicateExports(o,T.name)}else if(g.type==="VariableDeclaration")for(let T of g.declarations)this.checkDeclaration(T.id)}}}checkDeclaration(o){if(o.type==="Identifier")this.checkDuplicateExports(o,o.name);else if(o.type==="ObjectPattern")for(let n of o.properties)this.checkDeclaration(n);else if(o.type==="ArrayPattern")for(let n of o.elements)n&&this.checkDeclaration(n);else o.type==="ObjectProperty"?this.checkDeclaration(o.value):o.type==="RestElement"?this.checkDeclaration(o.argument):o.type==="AssignmentPattern"&&this.checkDeclaration(o.left)}checkDuplicateExports(o,n){this.exportedIdentifiers.has(n)&&(n==="default"?this.raise(N.DuplicateDefaultExport,o):this.raise(N.DuplicateExport,o,{exportName:n})),this.exportedIdentifiers.add(n)}parseExportSpecifiers(o){let n=[],l=!0;for(this.expect(5);!this.eat(8);){if(l)l=!1;else if(this.expect(12),this.eat(8))break;let h=this.isContextual(130),g=this.match(134),T=this.startNode();T.local=this.parseModuleExportName(),n.push(this.parseExportSpecifier(T,g,o,h))}return n}parseExportSpecifier(o,n,l,h){return this.eatContextual(93)?o.exported=this.parseModuleExportName():n?o.exported=this.cloneStringLiteral(o.local):o.exported||(o.exported=this.cloneIdentifier(o.local)),this.finishNode(o,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let o=this.parseStringLiteral(this.state.value),n=NA.exec(o.value);return n&&this.raise(N.ModuleExportNameHasLoneSurrogate,o,{surrogateCharCode:n[0].charCodeAt(0)}),o}return this.parseIdentifier(!0)}isJSONModuleImport(o){return o.assertions!=null?o.assertions.some(({key:n,value:l})=>l.value==="json"&&(n.type==="Identifier"?n.name==="type":n.value==="type")):!1}checkImportReflection(o){let{specifiers:n}=o,l=n.length===1?n[0].type:null;o.phase==="source"?l!=="ImportDefaultSpecifier"&&this.raise(N.SourcePhaseImportRequiresDefault,n[0].loc.start):o.phase==="defer"?l!=="ImportNamespaceSpecifier"&&this.raise(N.DeferImportRequiresNamespace,n[0].loc.start):o.module&&(l!=="ImportDefaultSpecifier"&&this.raise(N.ImportReflectionNotBinding,n[0].loc.start),o.assertions?.length>0&&this.raise(N.ImportReflectionHasAssertion,n[0].loc.start))}checkJSONModuleImport(o){if(this.isJSONModuleImport(o)&&o.type!=="ExportAllDeclaration"){let{specifiers:n}=o;if(n!=null){let l=n.find(h=>{let g;if(h.type==="ExportSpecifier"?g=h.local:h.type==="ImportSpecifier"&&(g=h.imported),g!==void 0)return g.type==="Identifier"?g.name!=="default":g.value!=="default"});l!==void 0&&this.raise(N.ImportJSONBindingNotDefault,l.loc.start)}}}isPotentialImportPhase(o){return o?!1:this.isContextual(105)||this.isContextual(97)}applyImportPhase(o,n,l,h){n||(this.hasPlugin("importReflection")&&(o.module=!1),l==="source"?(this.expectPlugin("sourcePhaseImports",h),o.phase="source"):l==="defer"?(this.expectPlugin("deferredImportEvaluation",h),o.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(o.phase=null))}parseMaybeImportPhase(o,n){if(!this.isPotentialImportPhase(n))return this.applyImportPhase(o,n,null),null;let l=this.startNode(),h=this.parseIdentifierName(!0),{type:g}=this.state;return(It(g)?g!==98||this.lookaheadCharCode()===102:g!==12)?(this.applyImportPhase(o,n,h,l.loc.start),null):(this.applyImportPhase(o,n,null),this.createIdentifier(l,h))}isPrecedingIdImportPhase(o){let{type:n}=this.state;return ze(n)?n!==98||this.lookaheadCharCode()===102:n!==12}parseImport(o){return this.match(134)?this.parseImportSourceAndAttributes(o):this.parseImportSpecifiersAndAfter(o,this.parseMaybeImportPhase(o,!1))}parseImportSpecifiersAndAfter(o,n){o.specifiers=[];let l=!this.maybeParseDefaultImportSpecifier(o,n)||this.eat(12),h=l&&this.maybeParseStarImportSpecifier(o);return l&&!h&&this.parseNamedImportSpecifiers(o),this.expectContextual(98),this.parseImportSourceAndAttributes(o)}parseImportSourceAndAttributes(o){return o.specifiers??(o.specifiers=[]),o.source=this.parseImportSource(),this.maybeParseImportAttributes(o),this.checkImportReflection(o),this.checkJSONModuleImport(o),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(o,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(o,n,l){n.local=this.parseIdentifier(),o.specifiers.push(this.finishImportSpecifier(n,l))}finishImportSpecifier(o,n,l=8201){return this.checkLVal(o.local,{type:n},l),this.finishNode(o,n)}parseImportAttributes(){this.expect(5);let o=[],n=new Set;do{if(this.match(8))break;let l=this.startNode(),h=this.state.value;if(n.has(h)&&this.raise(N.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:h}),n.add(h),this.match(134)?l.key=this.parseStringLiteral(h):l.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(N.ModuleAttributeInvalidValue,this.state.startLoc);l.value=this.parseStringLiteral(this.state.value),o.push(this.finishNode(l,"ImportAttribute"))}while(this.eat(12));return this.expect(8),o}parseModuleAttributes(){let o=[],n=new Set;do{let l=this.startNode();if(l.key=this.parseIdentifier(!0),l.key.name!=="type"&&this.raise(N.ModuleAttributeDifferentFromType,l.key),n.has(l.key.name)&&this.raise(N.ModuleAttributesWithDuplicateKeys,l.key,{key:l.key.name}),n.add(l.key.name),this.expect(14),!this.match(134))throw this.raise(N.ModuleAttributeInvalidValue,this.state.startLoc);l.value=this.parseStringLiteral(this.state.value),o.push(this.finishNode(l,"ImportAttribute"))}while(this.eat(12));return o}maybeParseImportAttributes(o){let n;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),n=this.parseImportAttributes()}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.raise(N.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(o,"deprecatedAssertSyntax",!0),this.next(),n=this.parseImportAttributes()):n=[];o.attributes=n}maybeParseDefaultImportSpecifier(o,n){if(n){let l=this.startNodeAtNode(n);return l.local=n,o.specifiers.push(this.finishImportSpecifier(l,"ImportDefaultSpecifier")),!0}else if(It(this.state.type))return this.parseImportSpecifierLocal(o,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(o){if(this.match(55)){let n=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(o,n,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(o){let n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else{if(this.eat(14))throw this.raise(N.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let l=this.startNode(),h=this.match(134),g=this.isContextual(130);l.imported=this.parseModuleExportName();let T=this.parseImportSpecifier(l,h,o.importKind==="type"||o.importKind==="typeof",g,void 0);o.specifiers.push(T)}}parseImportSpecifier(o,n,l,h,g){if(this.eatContextual(93))o.local=this.parseIdentifier();else{let{imported:T}=o;if(n)throw this.raise(N.ImportBindingIsString,o,{importName:T.value});this.checkReservedWord(T.name,o.loc.start,!0,!0),o.local||(o.local=this.cloneIdentifier(T))}return this.finishImportSpecifier(o,"ImportSpecifier",g)}isThisParam(o){return o.type==="Identifier"&&o.name==="this"}},Yd=class extends _A{constructor(o,n,l){let h=te(o);super(h,n),this.options=h,this.initializeScopes(),this.plugins=l,this.filename=h.sourceFilename,this.startIndex=h.startIndex;let g=0;h.allowAwaitOutsideFunction&&(g|=1),h.allowReturnOutsideFunction&&(g|=2),h.allowImportExportEverywhere&&(g|=8),h.allowSuperOutsideMethod&&(g|=16),h.allowUndeclaredExports&&(g|=64),h.allowNewTargetOutsideFunction&&(g|=4),h.allowYieldOutsideFunction&&(g|=32),h.ranges&&(g|=128),h.tokens&&(g|=256),h.createImportExpressions&&(g|=512),h.createParenthesizedExpressions&&(g|=1024),h.errorRecovery&&(g|=2048),h.attachComment&&(g|=4096),h.annexB&&(g|=8192),this.optionFlags=g}getScopeHandler(){return ll}parse(){this.enterInitialScopes();let o=this.startNode(),n=this.startNode();this.nextToken(),o.errors=null;let l=this.parseTopLevel(o,n);return l.errors=this.state.errors,l.comments.length=this.state.commentsLen,l}};function Qd(o,n){if(n?.sourceType==="unambiguous"){n=Object.assign({},n);try{n.sourceType="module";let l=Rn(n,o),h=l.parse();if(l.sawUnambiguousESM)return h;if(l.ambiguousScriptDifferentAst)try{return n.sourceType="script",Rn(n,o).parse()}catch{}else h.program.sourceType="script";return h}catch(l){try{return n.sourceType="script",Rn(n,o).parse()}catch{}throw l}}else return Rn(n,o).parse()}function Zd(o,n){let l=Rn(n,o);return l.options.strictMode&&(l.state.strict=!0),l.getExpression()}function LA(o){let n={};for(let l of Object.keys(o))n[l]=Sd(o[l]);return n}LA(ri);function Rn(o,n){let l=Yd,h=new Map;if(o?.plugins){for(let g of o.plugins){let T,w;typeof g=="string"?T=g:[T,w]=g,h.has(T)||h.set(T,w||{})}PA(h),l=OA(h)}return new l(o,n,h)}var ef=new Map;function OA(o){let n=[];for(let g of FA)o.has(g)&&n.push(g);let l=n.join("|"),h=ef.get(l);if(!h){h=Yd;for(let g of n)h=Gd[g](h);ef.set(l,h)}return h}function tf(o){return(n,l,h)=>{let g=!!h?.backwards;if(l===!1)return!1;let{length:T}=n,w=l;for(;w>=0&&w<T;){let k=n.charAt(w);if(o instanceof RegExp){if(!o.test(k))return w}else if(!o.includes(k))return w;g?w--:w++}return w===-1||w===T?w:!1}}var MA=tf(" "),$A=tf(/[^\n\r]/u);function RA(o,n){if(n===!1)return!1;if(o.charAt(n)==="/"&&o.charAt(n+1)==="*"){for(let l=n+2;l<o.length;++l)if(o.charAt(l)==="*"&&o.charAt(l+1)==="/")return l+2}return n}var jA=RA,rf=o=>o===`
|
|
178
|
-
`||o==="\r"||o==="\u2028"||o==="\u2029";function UA(o,n,l){let h=!!l?.backwards;if(n===!1)return!1;let g=o.charAt(n);if(h){if(o.charAt(n-1)==="\r"&&g===`
|
|
179
|
-
`)return n-2;if(rf(g))return n-1}else{if(g==="\r"&&o.charAt(n+1)===`
|
|
180
|
-
`)return n+2;if(rf(g))return n+1}return n}var VA=UA;function qA(o,n){return n===!1?!1:o.charAt(n)==="/"&&o.charAt(n+1)==="/"?$A(o,n):n}var HA=qA;function zA(o,n){let l=null,h=n;for(;h!==l;)l=h,h=MA(o,h),h=jA(o,h),h=HA(o,h),h=VA(o,h);return h}var WA=zA;function JA(o){let n=[];for(let l of o)try{return l()}catch(h){n.push(h)}throw Object.assign(new Error("All combinations failed"),{errors:n})}function KA(o){if(!o.startsWith("#!"))return"";let n=o.indexOf(`
|
|
181
|
-
`);return n===-1?o:o.slice(0,n)}var sf=KA,xl=(o,n)=>(l,h,...g)=>l|1&&h==null?void 0:(n.call(h)??h[o]).apply(h,g),XA=Array.prototype.findLast??function(o){for(let n=this.length-1;n>=0;n--){let l=this[n];if(o(l,n,this))return l}},GA=xl("findLast",function(){if(Array.isArray(this))return XA}),YA=GA;function QA(o){return this[o<0?this.length+o:o]}var ZA=xl("at",function(){if(Array.isArray(this)||typeof this=="string")return QA}),eC=ZA;function ts(o){let n=o.range?.[0]??o.start,l=(o.declaration?.decorators??o.decorators)?.[0];return l?Math.min(ts(l),n):n}function Ir(o){return o.range?.[1]??o.end}function tC(o){let n=new Set(o);return l=>n.has(l?.type)}var El=tC,rC=El(["Block","CommentBlock","MultiLine"]),Al=rC,sC=El(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),iC=sC,Cl=new WeakMap;function nC(o){return Cl.has(o)||Cl.set(o,Al(o)&&o.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(o.value)),Cl.get(o)}var aC=nC;function oC(o){if(!Al(o))return!1;let n=`*${o.value}*`.split(`
|
|
182
|
-
`);return n.length>1&&n.every(l=>l.trimStart()[0]==="*")}var bl=new WeakMap;function uC(o){return bl.has(o)||bl.set(o,oC(o)),bl.get(o)}var nf=uC;function lC(o){if(o.length<2)return;let n;for(let l=o.length-1;l>=0;l--){let h=o[l];if(n&&Ir(h)===ts(n)&&nf(h)&&nf(n)&&(o.splice(l+1,1),h.value+="*//*"+n.value,h.range=[ts(h),Ir(n)]),!iC(h)&&!Al(h))throw new TypeError(`Unknown comment type: "${h.type}".`);n=h}}var pC=lC;function cC(o){return o!==null&&typeof o=="object"}var hC=cC,jn=null;function Un(o){if(jn!==null&&typeof jn.property){let n=jn;return jn=Un.prototype=null,n}return jn=Un.prototype=o??Object.create(null),new Un}var dC=10;for(let o=0;o<=dC;o++)Un();function fC(o){return Un(o)}function mC(o,n="type"){fC(o);function l(h){let g=h[n],T=o[g];if(!Array.isArray(T))throw Object.assign(new Error(`Missing visitor keys for '${g}'.`),{node:h});return T}return l}var yC=mC,L=[["decorators","key","typeAnnotation","value"],[],["elementType"],["expression"],["expression","typeAnnotation"],["left","right"],["argument"],["directives","body"],["label"],["callee","typeArguments","arguments"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body","superTypeParameters"],["id","typeParameters"],["decorators","key","typeParameters","params","returnType","body"],["decorators","variance","key","typeAnnotation","value"],["name","typeAnnotation"],["test","consequent","alternate"],["checkType","extendsType","trueType","falseType"],["value"],["id","body"],["declaration","specifiers","source","attributes"],["id"],["id","typeParameters","extends","body"],["typeAnnotation"],["id","typeParameters","right"],["body","test"],["members"],["id","init"],["exported"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["id","params","body","typeParameters","returnType"],["key","value"],["local"],["objectType","indexType"],["typeParameter"],["types"],["node"],["object","property"],["argument","cases"],["pattern","body","guard"],["literal"],["decorators","key","value"],["expressions"],["qualification","id"],["decorators","key","typeAnnotation"],["typeParameters","params","returnType"],["expression","typeArguments"],["params"],["parameterName","typeAnnotation"]],gC={AccessorProperty:L[0],AnyTypeAnnotation:L[1],ArgumentPlaceholder:L[1],ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrayTypeAnnotation:L[2],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],AsConstExpression:L[3],AsExpression:L[4],AssignmentExpression:L[5],AssignmentPattern:["left","right","decorators","typeAnnotation"],AwaitExpression:L[6],BigIntLiteral:L[1],BigIntLiteralTypeAnnotation:L[1],BigIntTypeAnnotation:L[1],BinaryExpression:L[5],BindExpression:["object","callee"],BlockStatement:L[7],BooleanLiteral:L[1],BooleanLiteralTypeAnnotation:L[1],BooleanTypeAnnotation:L[1],BreakStatement:L[8],CallExpression:L[9],CatchClause:["param","body"],ChainExpression:L[3],ClassAccessorProperty:L[0],ClassBody:L[10],ClassDeclaration:L[11],ClassExpression:L[11],ClassImplements:L[12],ClassMethod:L[13],ClassPrivateMethod:L[13],ClassPrivateProperty:L[14],ClassProperty:L[14],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:L[15],ConditionalExpression:L[16],ConditionalTypeAnnotation:L[17],ContinueStatement:L[8],DebuggerStatement:L[1],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclaredPredicate:L[18],DeclareEnum:L[19],DeclareExportAllDeclaration:["source","attributes"],DeclareExportDeclaration:L[20],DeclareFunction:["id","predicate"],DeclareHook:L[21],DeclareInterface:L[22],DeclareModule:L[19],DeclareModuleExports:L[23],DeclareNamespace:L[19],DeclareOpaqueType:["id","typeParameters","supertype","lowerBound","upperBound"],DeclareTypeAlias:L[24],DeclareVariable:L[21],Decorator:L[3],Directive:L[18],DirectiveLiteral:L[1],DoExpression:L[10],DoWhileStatement:L[25],EmptyStatement:L[1],EmptyTypeAnnotation:L[1],EnumBigIntBody:L[26],EnumBigIntMember:L[27],EnumBooleanBody:L[26],EnumBooleanMember:L[27],EnumDeclaration:L[19],EnumDefaultedMember:L[21],EnumNumberBody:L[26],EnumNumberMember:L[27],EnumStringBody:L[26],EnumStringMember:L[27],EnumSymbolBody:L[26],ExistsTypeAnnotation:L[1],ExperimentalRestProperty:L[6],ExperimentalSpreadProperty:L[6],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportDefaultSpecifier:L[28],ExportNamedDeclaration:L[20],ExportNamespaceSpecifier:L[28],ExportSpecifier:["local","exported"],ExpressionStatement:L[3],File:["program"],ForInStatement:L[29],ForOfStatement:L[29],ForStatement:["init","test","update","body"],FunctionDeclaration:L[30],FunctionExpression:L[30],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:L[15],GenericTypeAnnotation:L[12],HookDeclaration:L[31],HookTypeAnnotation:["params","returnType","rest","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:L[16],ImportAttribute:L[32],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:L[33],ImportExpression:["source","options"],ImportNamespaceSpecifier:L[33],ImportSpecifier:["imported","local"],IndexedAccessType:L[34],InferredPredicate:L[1],InferTypeAnnotation:L[35],InterfaceDeclaration:L[22],InterfaceExtends:L[12],InterfaceTypeAnnotation:["extends","body"],InterpreterDirective:L[1],IntersectionTypeAnnotation:L[36],JsExpressionRoot:L[37],JsonRoot:L[37],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:L[1],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:L[1],JSXExpressionContainer:L[3],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:L[1],JSXMemberExpression:L[38],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeArguments","attributes"],JSXOpeningFragment:L[1],JSXSpreadAttribute:L[6],JSXSpreadChild:L[3],JSXText:L[1],KeyofTypeAnnotation:L[6],LabeledStatement:["label","body"],Literal:L[1],LogicalExpression:L[5],MatchArrayPattern:["elements","rest"],MatchAsPattern:["pattern","target"],MatchBindingPattern:L[21],MatchExpression:L[39],MatchExpressionCase:L[40],MatchIdentifierPattern:L[21],MatchLiteralPattern:L[41],MatchMemberPattern:["base","property"],MatchObjectPattern:["properties","rest"],MatchObjectPatternProperty:["key","pattern"],MatchOrPattern:["patterns"],MatchRestPattern:L[6],MatchStatement:L[39],MatchStatementCase:L[40],MatchUnaryPattern:L[6],MatchWildcardPattern:L[1],MemberExpression:L[38],MetaProperty:["meta","property"],MethodDefinition:L[42],MixedTypeAnnotation:L[1],ModuleExpression:L[10],NeverTypeAnnotation:L[1],NewExpression:L[9],NGChainedExpression:L[43],NGEmptyExpression:L[1],NGMicrosyntax:L[10],NGMicrosyntaxAs:["key","alias"],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKey:L[1],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:L[32],NGPipeExpression:["left","right","arguments"],NGRoot:L[37],NullableTypeAnnotation:L[23],NullLiteral:L[1],NullLiteralTypeAnnotation:L[1],NumberLiteralTypeAnnotation:L[1],NumberTypeAnnotation:L[1],NumericLiteral:L[1],ObjectExpression:["properties"],ObjectMethod:L[13],ObjectPattern:["decorators","properties","typeAnnotation"],ObjectProperty:L[42],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeCallProperty:L[18],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeInternalSlot:["id","value"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:L[6],OpaqueType:["id","typeParameters","supertype","impltype","lowerBound","upperBound"],OptionalCallExpression:L[9],OptionalIndexedAccessType:L[34],OptionalMemberExpression:L[38],ParenthesizedExpression:L[3],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:L[1],PipelineTopicExpression:L[3],Placeholder:L[1],PrivateIdentifier:L[1],PrivateName:L[21],Program:L[7],Property:L[32],PropertyDefinition:L[14],QualifiedTypeIdentifier:L[44],QualifiedTypeofIdentifier:L[44],RegExpLiteral:L[1],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:L[6],SatisfiesExpression:L[4],SequenceExpression:L[43],SpreadElement:L[6],StaticBlock:L[10],StringLiteral:L[1],StringLiteralTypeAnnotation:L[1],StringTypeAnnotation:L[1],Super:L[1],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],SymbolTypeAnnotation:L[1],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:L[1],TemplateLiteral:["quasis","expressions"],ThisExpression:L[1],ThisTypeAnnotation:L[1],ThrowStatement:L[6],TopicReference:L[1],TryStatement:["block","handler","finalizer"],TSAbstractAccessorProperty:L[45],TSAbstractKeyword:L[1],TSAbstractMethodDefinition:L[32],TSAbstractPropertyDefinition:L[45],TSAnyKeyword:L[1],TSArrayType:L[2],TSAsExpression:L[4],TSAsyncKeyword:L[1],TSBigIntKeyword:L[1],TSBooleanKeyword:L[1],TSCallSignatureDeclaration:L[46],TSClassImplements:L[47],TSConditionalType:L[17],TSConstructorType:L[46],TSConstructSignatureDeclaration:L[46],TSDeclareFunction:L[31],TSDeclareKeyword:L[1],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSEnumBody:L[26],TSEnumDeclaration:L[19],TSEnumMember:["id","initializer"],TSExportAssignment:L[3],TSExportKeyword:L[1],TSExternalModuleReference:L[3],TSFunctionType:L[46],TSImportEqualsDeclaration:["id","moduleReference"],TSImportType:["options","qualifier","typeArguments","source"],TSIndexedAccessType:L[34],TSIndexSignature:["parameters","typeAnnotation"],TSInferType:L[35],TSInstantiationExpression:L[47],TSInterfaceBody:L[10],TSInterfaceDeclaration:L[22],TSInterfaceHeritage:L[47],TSIntersectionType:L[36],TSIntrinsicKeyword:L[1],TSJSDocAllType:L[1],TSJSDocNonNullableType:L[23],TSJSDocNullableType:L[23],TSJSDocUnknownType:L[1],TSLiteralType:L[41],TSMappedType:["key","constraint","nameType","typeAnnotation"],TSMethodSignature:["key","typeParameters","params","returnType"],TSModuleBlock:L[10],TSModuleDeclaration:L[19],TSNamedTupleMember:["label","elementType"],TSNamespaceExportDeclaration:L[21],TSNeverKeyword:L[1],TSNonNullExpression:L[3],TSNullKeyword:L[1],TSNumberKeyword:L[1],TSObjectKeyword:L[1],TSOptionalType:L[23],TSParameterProperty:["parameter","decorators"],TSParenthesizedType:L[23],TSPrivateKeyword:L[1],TSPropertySignature:["key","typeAnnotation"],TSProtectedKeyword:L[1],TSPublicKeyword:L[1],TSQualifiedName:L[5],TSReadonlyKeyword:L[1],TSRestType:L[23],TSSatisfiesExpression:L[4],TSStaticKeyword:L[1],TSStringKeyword:L[1],TSSymbolKeyword:L[1],TSTemplateLiteralType:["quasis","types"],TSThisType:L[1],TSTupleType:["elementTypes"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSTypeAnnotation:L[23],TSTypeAssertion:L[4],TSTypeLiteral:L[26],TSTypeOperator:L[23],TSTypeParameter:["name","constraint","default"],TSTypeParameterDeclaration:L[48],TSTypeParameterInstantiation:L[48],TSTypePredicate:L[49],TSTypeQuery:["exprName","typeArguments"],TSTypeReference:["typeName","typeArguments"],TSUndefinedKeyword:L[1],TSUnionType:L[36],TSUnknownKeyword:L[1],TSVoidKeyword:L[1],TupleTypeAnnotation:["types","elementTypes"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeAlias:L[24],TypeAnnotation:L[23],TypeCastExpression:L[4],TypeofTypeAnnotation:["argument","typeArguments"],TypeOperator:L[23],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:L[48],TypeParameterInstantiation:L[48],TypePredicate:L[49],UnaryExpression:L[6],UndefinedTypeAnnotation:L[1],UnionTypeAnnotation:L[36],UnknownTypeAnnotation:L[1],UpdateExpression:L[6],V8IntrinsicIdentifier:L[1],VariableDeclaration:["declarations"],VariableDeclarator:L[27],Variance:L[1],VoidPattern:L[1],VoidTypeAnnotation:L[1],WhileStatement:L[25],WithStatement:["object","body"],YieldExpression:L[6]},DC=yC(gC),xC=DC;function xo(o,n){if(!hC(o))return o;if(Array.isArray(o)){for(let h=0;h<o.length;h++)o[h]=xo(o[h],n);return o}if(n.onEnter){let h=n.onEnter(o)??o;if(h!==o)return xo(h,n);o=h}let l=xC(o);for(let h=0;h<l.length;h++)o[l[h]]=xo(o[l[h]],n);return n.onLeave&&(o=n.onLeave(o)||o),o}var EC=xo;El(["RegExpLiteral","BigIntLiteral","NumericLiteral","StringLiteral","DirectiveLiteral","Literal","JSXText","TemplateElement","StringLiteralTypeAnnotation","NumberLiteralTypeAnnotation","BigIntLiteralTypeAnnotation"]);function AC(o,n){let{parser:l,text:h}=n,{comments:g}=o,T=l==="oxc"&&n.oxcAstType==="ts";pC(g);let w=o.type==="File"?o.program:o;w.interpreter&&(g.unshift(w.interpreter),delete w.interpreter),T&&o.hashbang&&(g.unshift(o.hashbang),delete o.hashbang),o.type==="Program"&&(o.range=[0,h.length]);let k;return o=EC(o,{onEnter(O){switch(O.type){case"ParenthesizedExpression":{let{expression:_}=O,Q=ts(O);if(_.type==="TypeCastExpression")return _.range=[Q,Ir(O)],_;let ie=!1;if(!T){if(!k){k=[];for(let Be of g)aC(Be)&&k.push(Ir(Be))}let ve=YA(0,k,Be=>Be<=Q);ie=ve&&h.slice(ve,Q).trim().length===0}return ie?void 0:(_.extra={..._.extra,parenthesized:!0},_)}case"TemplateLiteral":if(O.expressions.length!==O.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(l==="flow"||l==="hermes"||l==="espree"||l==="typescript"||T){let _=ts(O)+1,Q=Ir(O)-(O.tail?1:2);O.range=[_,Q]}break;case"VariableDeclaration":{let _=eC(0,O.declarations,-1);_?.init&&h[Ir(_)]!==";"&&(O.range=[ts(O),Ir(_)]);break}case"TSParenthesizedType":return O.typeAnnotation;case"TopicReference":o.extra={...o.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(O.types.length===1)return O.types[0];break;case"ImportExpression":l==="hermes"&&O.attributes&&!O.options&&(O.options=O.attributes);break}},onLeave(O){switch(O.type){case"LogicalExpression":if(af(O))return Tl(O);break;case"TSImportType":!O.source&&O.argument.type==="TSLiteralType"&&(O.source=O.argument.literal,delete O.argument);break}}}),o}function af(o){return o.type==="LogicalExpression"&&o.right.type==="LogicalExpression"&&o.operator===o.right.operator}function Tl(o){return af(o)?Tl({type:"LogicalExpression",operator:o.operator,left:Tl({type:"LogicalExpression",operator:o.operator,left:o.left,right:o.right.left,range:[ts(o.left),Ir(o.right.left)]}),right:o.right.right,range:[ts(o),Ir(o)]}):o}var CC=AC;function bC(o,n){let l=new SyntaxError(o+" ("+n.loc.start.line+":"+n.loc.start.column+")");return Object.assign(l,n)}var of=bC,uf="Unexpected parseExpression() input: ";function TC(o){let{message:n,loc:l,reasonCode:h}=o;if(!l)return o;let{line:g,column:T}=l,w=o;(h==="MissingPlugin"||h==="MissingOneOfPlugins")&&(n="Unexpected token.",w=void 0);let k=` (${g}:${T})`;return n.endsWith(k)&&(n=n.slice(0,-k.length)),n.startsWith(uf)&&(n=n.slice(uf.length)),of(n,{loc:{start:{line:g,column:T+1}},cause:w})}var lf=TC,vC=String.prototype.replaceAll??function(o,n){return o.global?this.replace(o,n):this.split(o).join(n)},SC=xl("replaceAll",function(){if(typeof this=="string")return vC}),Eo=SC,wC=/\*\/$/,PC=/^\/\*\*?/,FC=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,kC=/(^|\s+)\/\/([^\n\r]*)/g,pf=/^(\r?\n)+/,IC=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,cf=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,NC=/(\r?\n|^) *\* ?/g,BC=[];function _C(o){let n=o.match(FC);return n?n[0].trimStart():""}function LC(o){o=Eo(0,o.replace(PC,"").replace(wC,""),NC,"$1");let n="";for(;n!==o;)n=o,o=Eo(0,o,IC,`
|
|
183
|
-
$1 $2
|
|
184
|
-
`);o=o.replace(pf,"").trimEnd();let l=Object.create(null),h=Eo(0,o,cf,"").replace(pf,"").trimEnd(),g;for(;g=cf.exec(o);){let T=Eo(0,g[2],kC,"");if(typeof l[g[1]]=="string"||Array.isArray(l[g[1]])){let w=l[g[1]];l[g[1]]=[...BC,...Array.isArray(w)?w:[w],T]}else l[g[1]]=T}return{comments:h,pragmas:l}}var OC=["noformat","noprettier"],MC=["format","prettier"];function hf(o){let n=sf(o);n&&(o=o.slice(n.length+1));let l=_C(o),{pragmas:h,comments:g}=LC(l);return{shebang:n,text:o,pragmas:h,comments:g}}function $C(o){let{pragmas:n}=hf(o);return MC.some(l=>Object.prototype.hasOwnProperty.call(n,l))}function RC(o){let{pragmas:n}=hf(o);return OC.some(l=>Object.prototype.hasOwnProperty.call(n,l))}function jC(o){return o=typeof o=="function"?{parse:o}:o,{astFormat:"estree",hasPragma:$C,hasIgnorePragma:RC,locStart:ts,locEnd:Ir,...o}}var Vn=jC,vl="module",df="commonjs";function UC(o){if(typeof o=="string"){if(o=o.toLowerCase(),/\.(?:mjs|mts)$/iu.test(o))return vl;if(/\.(?:cjs|cts)$/iu.test(o))return df}}function VC(o,n){let{type:l="JsExpressionRoot",rootMarker:h,text:g}=n,{tokens:T,comments:w}=o;return delete o.tokens,delete o.comments,{tokens:T,comments:w,type:l,node:o,range:[0,g.length],rootMarker:h}}var ff=VC,Vi=o=>Vn(JC(o)),qC={sourceType:vl,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},mf="v8intrinsic",yf=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],rs=(o,n=qC)=>({...n,plugins:[...n.plugins,...o]}),HC=/@(?:no)?flow\b/u;function zC(o,n){if(n?.endsWith(".js.flow"))return!0;let l=sf(o);l&&(o=o.slice(l.length));let h=WA(o,0);return h!==!1&&(o=o.slice(0,h)),HC.test(o)}function WC(o,n,l){let h=o(n,l),g=h.errors.find(T=>!KC.has(T.reasonCode));if(g)throw g;return h}function JC({isExpression:o=!1,optionsCombinations:n}){return(l,h={})=>{let{filepath:g}=h;if(typeof g!="string"&&(g=void 0),(h.parser==="babel"||h.parser==="__babel_estree")&&zC(l,g))return h.parser="babel-flow",Cf.parse(l,h);let T=n,w=h.__babelSourceType??UC(g);w&&w!==vl&&(T=T.map(Q=>({...Q,sourceType:w,...w===df?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let k=/%[A-Z]/u.test(l);l.includes("|>")?T=(k?[...yf,mf]:yf).flatMap(Q=>T.map(ie=>rs([Q],ie))):k&&(T=T.map(Q=>rs([mf],Q)));let O=o?Zd:Qd,_;try{_=JA(T.map(Q=>()=>WC(O,l,Q)))}catch({errors:[Q]}){throw lf(Q)}return o&&(_=ff(_,{text:l,rootMarker:h.rootMarker})),CC(_,{text:l})}}var KC=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert","DeclarationMissingInitializer"]),gf=[rs(["jsx"])],Df=Vi({optionsCombinations:gf}),xf=Vi({optionsCombinations:[rs(["jsx","typescript"]),rs(["typescript"])]}),Ef=Vi({isExpression:!0,optionsCombinations:[rs(["jsx"])]}),Af=Vi({isExpression:!0,optionsCombinations:[rs(["typescript"])]}),Cf=Vi({optionsCombinations:[rs(["jsx",["flow",{all:!0}],"flowComments"])]}),XC=Vi({optionsCombinations:gf.map(o=>rs(["estree"],o))}),bf={};u(bf,{json:()=>QC,"json-stringify":()=>tb,json5:()=>ZC,jsonc:()=>eb});function GC(o){return Array.isArray(o)&&o.length>0}var Tf=GC,vf={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function YC(o){let n=Qd(o,vf),{program:l}=n;if(l.body.length===0&&l.directives.length===0&&!l.interpreter)return n}function Ao(o,n={}){let{allowComments:l=!0,allowEmpty:h=!1}=n,g;try{g=Zd(o,vf)}catch(T){if(h&&T.code==="BABEL_PARSER_SYNTAX_ERROR"&&T.reasonCode==="ParseExpressionEmptyInput")try{g=YC(o)}catch{}if(!g)throw lf(T)}if(!l&&Tf(g.comments))throw Ps(g.comments[0],"Comment");return g=ff(g,{type:"JsonRoot",text:o}),g.node.type==="File"?delete g.node:qi(g.node),g}function Ps(o,n){let[l,h]=[o.loc.start,o.loc.end].map(({line:g,column:T})=>({line:g,column:T+1}));return of(`${n} is not allowed in JSON.`,{loc:{start:l,end:h}})}function qi(o){switch(o.type){case"ArrayExpression":for(let n of o.elements)n!==null&&qi(n);return;case"ObjectExpression":for(let n of o.properties)qi(n);return;case"ObjectProperty":if(o.computed)throw Ps(o.key,"Computed key");if(o.shorthand)throw Ps(o.key,"Shorthand property");o.key.type!=="Identifier"&&qi(o.key),qi(o.value);return;case"UnaryExpression":{let{operator:n,argument:l}=o;if(n!=="+"&&n!=="-")throw Ps(o,`Operator '${o.operator}'`);if(l.type==="NumericLiteral"||l.type==="Identifier"&&(l.name==="Infinity"||l.name==="NaN"))return;throw Ps(l,`Operator '${n}' before '${l.type}'`)}case"Identifier":if(o.name!=="Infinity"&&o.name!=="NaN"&&o.name!=="undefined")throw Ps(o,`Identifier '${o.name}'`);return;case"TemplateLiteral":if(Tf(o.expressions))throw Ps(o.expressions[0],"'TemplateLiteral' with expression");for(let n of o.quasis)qi(n);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Ps(o,`'${o.type}'`)}}var QC=Vn({parse:o=>Ao(o),hasPragma:()=>!0,hasIgnorePragma:()=>!1}),ZC=Vn(o=>Ao(o)),eb=Vn(o=>Ao(o,{allowEmpty:!0})),tb=Vn({parse:o=>Ao(o,{allowComments:!1}),astFormat:"estree-json"}),rb={...f,...bf};return c(m)})})(mp)),mp.exports}var dE=pR();const cR=sb(dE),hR=Mb({__proto__:null,default:cR},[dE]),dR=async(t,e)=>{switch(e){case"ts":return await as(t,{parser:"typescript",plugins:[Hl,No]});case"js":return await as(t,{parser:"babel",plugins:[Hl,No]});case"json":return await as(t,{parser:"json",plugins:[hR,No]});case"vue":return await as(t,{parser:"vue",plugins:[dM,Hl,No,Vo]});case"less":return await as(t,{parser:"less",plugins:[Vo]});case"scss":case"sass":return await as(t,{parser:"scss",plugins:[Vo]});case"css":return await as(t,{parser:"css",plugins:[Vo]})}},fR={class:"flex items-center gap-1 flex-1"},mR=St({__name:"DirChangeTree",props:{resultTree:{type:Array,default:()=>[]}},setup(t){const e={children:"children",label:"name"},r={[Or.NodeStatus.Added]:{tag:"success",color:"var(--el-color-success)"},[Or.NodeStatus.Deleted]:{tag:"danger",color:"var(--el-color-danger)"},[Or.NodeStatus.Unchanged]:{tag:"info",color:"var(--el-color-info)"},[Or.NodeStatus.Changed]:{tag:"warning",color:"var(--el-color-warning)"}};function s(a){return r[a].tag??"primary"}function i(a){return r[a].color}return(a,u)=>(be(),Ke(ne(tg),ng({data:t.resultTree,props:e,"default-expand-all":"","highlight-current":""},a.$attrs),{default:oe(({data:p})=>[We("div",fR,[de(ne(di),{effect:"dark",disableTransitions:"",type:s(p.status),size:"small"},{default:oe(()=>[lt(He(p.status[0].toUpperCase()),1)]),_:2},1032,["type"]),p.status===ne(Or).NodeStatus.Deleted?(be(),nt("del",{key:0,style:qo({color:i(p.status)})},He(p.name),5)):(be(),nt("span",{key:1,style:qo({color:i(p.status)})},He(p.name),5)),We("div",{class:"w-2 h-2 rounded-full ml-auto mr-2",style:qo({backgroundColor:i(p.status)})},null,4)])]),_:1},16,["data"]))}});var mt;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(mt||(mt={}));const yR={LINE_BY_LINE:"line-by-line"},gR={NONE:"none"},DR={WORD:"word"};var on;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(on||(on={}));const xR=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],ER=RegExp("["+xR.join("\\")+"]","g");function AR(t){return t.replace(ER,"\\$&")}function Vy(t){return t&&t.replace(/\\/g,"/")}function CR(t){let e,r,s,i=0;for(e=0,s=t.length;e<s;e++)r=t.charCodeAt(e),i=(i<<5)-i+r,i|=0;return i}function fE(t){const e=t.length;let r=-1/0;for(let s=0;s<e;s++)r=Math.max(r,t[s]);return r}function qy(t,e){const r=t.split(".");return r.length>1?r[r.length-1]:e}function Hy(t,e){return e.reduce((r,s)=>r||t.startsWith(s),!1)}const zy=["a/","b/","i/","w/","c/","o/"];function Ms(t,e,r){const s=r!==void 0?[...zy,r]:zy,i=e?new RegExp(`^${AR(e)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,a=""]=i.exec(t)||[],u=s.find(c=>a.indexOf(c)===0);return(u?a.slice(u.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function bR(t,e){return Ms(t,"---",e)}function TR(t,e){return Ms(t,"+++",e)}function vR(t,e={}){const r=[];let s=null,i=null,a=null,u=null,p=null,c=null,m=null;const f="--- ",d="+++ ",D="@@",y=/^old mode (\d{6})/,x=/^new mode (\d{6})/,E=/^deleted file mode (\d{6})/,C=/^new file mode (\d{6})/,b=/^copy from "?(.+)"?/,A=/^copy to "?(.+)"?/,v=/^rename from "?(.+)"?/,P=/^rename to "?(.+)"?/,S=/^similarity index (\d+)%/,F=/^dissimilarity index (\d+)%/,B=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,I=/^Binary files (.*) and (.*) differ/,R=/^GIT binary patch/,j=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,V=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,N=/^new file mode (\d{6})/,q=/^deleted file mode (\d{6}),(\d{6})/,te=t.replace(/\/g,"").replace(/\r\n?/g,`
|
|
185
|
-
`).split(`
|
|
186
|
-
`);function W(){i!==null&&s!==null&&(s.blocks.push(i),i=null)}function Y(){s!==null&&(!s.oldName&&c!==null&&(s.oldName=c),!s.newName&&m!==null&&(s.newName=m),s.newName&&(r.push(s),s=null)),c=null,m=null}function ge(){W(),Y(),s={blocks:[],deletedLines:0,addedLines:0}}function Ae(G){W();let X;s!==null&&((X=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(G))?(s.isCombined=!1,a=parseInt(X[1],10),p=parseInt(X[2],10)):(X=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(G))?(s.isCombined=!0,a=parseInt(X[1],10),u=parseInt(X[2],10),p=parseInt(X[3],10)):(G.startsWith(D)&&console.error("Failed to parse lines, starting in 0!"),a=0,p=0,s.isCombined=!1)),i={lines:[],oldStartLine:a,oldStartLine2:u,newStartLine:p,header:G}}function Ie(G){if(s===null||i===null||a===null||p===null)return;const X={content:G},le=s.isCombined?["+ "," +","++"]:["+"],we=s.isCombined?["- "," -","--"]:["-"];Hy(G,le)?(s.addedLines++,X.type=mt.INSERT,X.oldNumber=void 0,X.newNumber=p++):Hy(G,we)?(s.deletedLines++,X.type=mt.DELETE,X.oldNumber=a++,X.newNumber=void 0):(X.type=mt.CONTEXT,X.oldNumber=a++,X.newNumber=p++),i.lines.push(X)}function he(G,X){let le=X;for(;le<te.length-3;){if(G.startsWith("diff"))return!1;if(te[le].startsWith(f)&&te[le+1].startsWith(d)&&te[le+2].startsWith(D))return!0;le++}return!1}return te.forEach((G,X)=>{if(!G||G.startsWith("*"))return;let le;const we=te[X-1],Qe=te[X+1],gt=te[X+2];if(G.startsWith("diff --git")||G.startsWith("diff --combined")){if(ge(),(le=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(G))&&(c=Ms(le[1],void 0,e.dstPrefix),m=Ms(le[2],void 0,e.srcPrefix)),s===null)throw new Error("Where is my file !!!");s.isGitDiff=!0;return}if(G.startsWith("Binary files")&&!s?.isGitDiff){if(ge(),(le=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(G))&&(c=Ms(le[1],void 0,e.dstPrefix),m=Ms(le[2],void 0,e.srcPrefix)),s===null)throw new Error("Where is my file !!!");s.isBinary=!0;return}if((!s||!s.isGitDiff&&s&&G.startsWith(f)&&Qe.startsWith(d)&>.startsWith(D))&&ge(),s?.isTooBig)return;if(s&&(typeof e.diffMaxChanges=="number"&&s.addedLines+s.deletedLines>e.diffMaxChanges||typeof e.diffMaxLineLength=="number"&&G.length>e.diffMaxLineLength)){s.isTooBig=!0,s.addedLines=0,s.deletedLines=0,s.blocks=[],i=null;const K=typeof e.diffTooBigMessage=="function"?e.diffTooBigMessage(r.length):"Diff too big to be displayed";Ae(K);return}if(G.startsWith(f)&&Qe.startsWith(d)||G.startsWith(d)&&we.startsWith(f)){if(s&&!s.oldName&&G.startsWith("--- ")&&(le=bR(G,e.srcPrefix))){s.oldName=le,s.language=qy(s.oldName,s.language);return}if(s&&!s.newName&&G.startsWith("+++ ")&&(le=TR(G,e.dstPrefix))){s.newName=le,s.language=qy(s.newName,s.language);return}}if(s&&(G.startsWith(D)||s.isGitDiff&&s.oldName&&s.newName&&!i)){Ae(G);return}if(i&&(G.startsWith("+")||G.startsWith("-")||G.startsWith(" "))){Ie(G);return}const se=!he(G,X);if(s===null)throw new Error("Where is my file !!!");(le=y.exec(G))?s.oldMode=le[1]:(le=x.exec(G))?s.newMode=le[1]:(le=E.exec(G))?(s.deletedFileMode=le[1],s.isDeleted=!0):(le=C.exec(G))?(s.newFileMode=le[1],s.isNew=!0):(le=b.exec(G))?(se&&(s.oldName=le[1]),s.isCopy=!0):(le=A.exec(G))?(se&&(s.newName=le[1]),s.isCopy=!0):(le=v.exec(G))?(se&&(s.oldName=le[1]),s.isRename=!0):(le=P.exec(G))?(se&&(s.newName=le[1]),s.isRename=!0):(le=I.exec(G))?(s.isBinary=!0,s.oldName=Ms(le[1],void 0,e.srcPrefix),s.newName=Ms(le[2],void 0,e.dstPrefix),Ae("Binary file")):R.test(G)?(s.isBinary=!0,Ae(G)):(le=S.exec(G))?s.unchangedPercentage=parseInt(le[1],10):(le=F.exec(G))?s.changedPercentage=parseInt(le[1],10):(le=B.exec(G))?(s.checksumBefore=le[1],s.checksumAfter=le[2],le[3]&&(s.mode=le[3])):(le=j.exec(G))?(s.checksumBefore=[le[2],le[3]],s.checksumAfter=le[1]):(le=V.exec(G))?(s.oldMode=[le[2],le[3]],s.newMode=le[1]):(le=N.exec(G))?(s.newFileMode=le[1],s.isNew=!0):(le=q.exec(G))&&(s.deletedFileMode=le[1],s.isDeleted=!0)}),W(),Y(),r}let mE=class{diff(e,r,s={}){let i;typeof s=="function"?(i=s,s={}):"callback"in s&&(i=s.callback);const a=this.castInput(e,s),u=this.castInput(r,s),p=this.removeEmpty(this.tokenize(a,s)),c=this.removeEmpty(this.tokenize(u,s));return this.diffWithOptionsObj(p,c,s,i)}diffWithOptionsObj(e,r,s,i){var a;const u=A=>{if(A=this.postProcess(A,s),i){setTimeout(function(){i(A)},0);return}else return A},p=r.length,c=e.length;let m=1,f=p+c;s.maxEditLength!=null&&(f=Math.min(f,s.maxEditLength));const d=(a=s.timeout)!==null&&a!==void 0?a:1/0,D=Date.now()+d,y=[{oldPos:-1,lastComponent:void 0}];let x=this.extractCommon(y[0],r,e,0,s);if(y[0].oldPos+1>=c&&x+1>=p)return u(this.buildValues(y[0].lastComponent,r,e));let E=-1/0,C=1/0;const b=()=>{for(let A=Math.max(E,-m);A<=Math.min(C,m);A+=2){let v;const P=y[A-1],S=y[A+1];P&&(y[A-1]=void 0);let F=!1;if(S){const I=S.oldPos-A;F=S&&0<=I&&I<p}const B=P&&P.oldPos+1<c;if(!F&&!B){y[A]=void 0;continue}if(!B||F&&P.oldPos<S.oldPos?v=this.addToPath(S,!0,!1,0,s):v=this.addToPath(P,!1,!0,1,s),x=this.extractCommon(v,r,e,A,s),v.oldPos+1>=c&&x+1>=p)return u(this.buildValues(v.lastComponent,r,e))||!0;y[A]=v,v.oldPos+1>=c&&(C=Math.min(C,A-1)),x+1>=p&&(E=Math.max(E,A+1))}m++};if(i)(function A(){setTimeout(function(){if(m>f||Date.now()>D)return i(void 0);b()||A()},0)})();else for(;m<=f&&Date.now()<=D;){const A=b();if(A)return A}}addToPath(e,r,s,i,a){const u=e.lastComponent;return u&&!a.oneChangePerToken&&u.added===r&&u.removed===s?{oldPos:e.oldPos+i,lastComponent:{count:u.count+1,added:r,removed:s,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:r,removed:s,previousComponent:u}}}extractCommon(e,r,s,i,a){const u=r.length,p=s.length;let c=e.oldPos,m=c-i,f=0;for(;m+1<u&&c+1<p&&this.equals(s[c+1],r[m+1],a);)m++,c++,f++,a.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(e.lastComponent={count:f,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=c,m}equals(e,r,s){return s.comparator?s.comparator(e,r):e===r||!!s.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){const r=[];for(let s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,s){const i=[];let a;for(;e;)i.push(e),a=e.previousComponent,delete e.previousComponent,e=a;i.reverse();const u=i.length;let p=0,c=0,m=0;for(;p<u;p++){const f=i[p];if(f.removed)f.value=this.join(s.slice(m,m+f.count)),m+=f.count;else{if(!f.added&&this.useLongestToken){let d=r.slice(c,c+f.count);d=d.map(function(D,y){const x=s[m+y];return x.length>D.length?x:D}),f.value=this.join(d)}else f.value=this.join(r.slice(c,c+f.count));c+=f.count,f.added||(m+=f.count)}}return i}};class SR extends mE{}const wR=new SR;function PR(t,e,r){return wR.diff(t,e,r)}const Wy="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class FR extends mE{tokenize(e){const r=new RegExp(`(\\r?\\n)|[${Wy}]+|[^\\S\\n\\r]+|[^${Wy}]`,"ug");return e.match(r)||[]}}const kR=new FR;function IR(t,e,r){return kR.diff(t,e,r)}function NR(t,e){if(t.length===0)return e.length;if(e.length===0)return t.length;const r=[];let s;for(s=0;s<=e.length;s++)r[s]=[s];let i;for(i=0;i<=t.length;i++)r[0][i]=i;for(s=1;s<=e.length;s++)for(i=1;i<=t.length;i++)e.charAt(s-1)===t.charAt(i-1)?r[s][i]=r[s-1][i-1]:r[s][i]=Math.min(r[s-1][i-1]+1,Math.min(r[s][i-1]+1,r[s-1][i]+1));return r[e.length][t.length]}function xd(t){return(e,r)=>{const s=t(e).trim(),i=t(r).trim();return NR(s,i)/(s.length+i.length)}}function Ed(t){function e(s,i,a=new Map){let u=1/0,p;for(let c=0;c<s.length;++c)for(let m=0;m<i.length;++m){const f=JSON.stringify([s[c],i[m]]);let d;a.has(f)&&(d=a.get(f))||(d=t(s[c],i[m]),a.set(f,d)),d<u&&(u=d,p={indexA:c,indexB:m,score:u})}return p}function r(s,i,a=0,u=new Map){const p=e(s,i,u);if(!p||s.length+i.length<3)return[[s,i]];const c=s.slice(0,p.indexA),m=i.slice(0,p.indexB),f=[s[p.indexA]],d=[i[p.indexB]],D=p.indexA+1,y=p.indexB+1,x=s.slice(D),E=i.slice(y),C=r(c,m,a+1,u),b=r(f,d,a+1,u),A=r(x,E,a+1,u);let v=b;return(p.indexA>0||p.indexB>0)&&(v=C.concat(v)),(s.length>D||i.length>y)&&(v=v.concat(A)),v}return r}const $t={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},tl={matching:gR.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:DR.WORD,colorScheme:on.LIGHT},Br="/",yE=xd(t=>t.value),BR=Ed(yE);function yp(t){return t.indexOf("dev/null")!==-1}function _R(t){return t.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,"")}function LR(t){return t.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function fu(t){switch(t){case mt.CONTEXT:return $t.CONTEXT;case mt.INSERT:return $t.INSERTS;case mt.DELETE:return $t.DELETES}}function Ad(t){switch(t){case on.DARK:return"d2h-dark-color-scheme";case on.AUTO:return"d2h-auto-color-scheme";case on.LIGHT:default:return"d2h-light-color-scheme"}}function OR(t){return t?2:1}function un(t){return t.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Ur(t,e,r=!0){const s=OR(e);return{prefix:t.substring(0,s),content:r?un(t.substring(s)):t.substring(s)}}function rl(t){const e=Vy(t.oldName),r=Vy(t.newName);if(e!==r&&!yp(e)&&!yp(r)){const s=[],i=[],a=e.split(Br),u=r.split(Br),p=a.length,c=u.length;let m=0,f=p-1,d=c-1;for(;m<f&&m<d&&a[m]===u[m];)s.push(u[m]),m+=1;for(;f>m&&d>m&&a[f]===u[d];)i.unshift(u[d]),f-=1,d-=1;const D=s.join(Br),y=i.join(Br),x=a.slice(m,f+1).join(Br),E=u.slice(m,d+1).join(Br);return D.length&&y.length?D+Br+"{"+x+" → "+E+"}"+Br+y:D.length?D+Br+"{"+x+" → "+E+"}":y.length?"{"+x+" → "+E+"}"+Br+y:e+" → "+r}else return yp(r)?e:r}function Cd(t){return`d2h-${CR(rl(t)).toString().slice(-6)}`}function bd(t){let e="file-changed";return t.isRename||t.isCopy?e="file-renamed":t.isNew?e="file-added":t.isDeleted?e="file-deleted":t.newName!==t.oldName&&(e="file-renamed"),e}function gE(t,e,r,s={}){const{matching:i,maxLineLengthHighlight:a,matchWordsThreshold:u,diffStyle:p}=Object.assign(Object.assign({},tl),s),c=Ur(t,r,!1),m=Ur(e,r,!1);if(c.content.length>a||m.content.length>a)return{oldLine:{prefix:c.prefix,content:un(c.content)},newLine:{prefix:m.prefix,content:un(m.content)}};const f=p==="char"?PR(c.content,m.content):IR(c.content,m.content),d=[];if(p==="word"&&i==="words"){const y=f.filter(C=>C.removed),x=f.filter(C=>C.added);BR(x,y).forEach(C=>{C[0].length===1&&C[1].length===1&&yE(C[0][0],C[1][0])<u&&(d.push(C[0][0]),d.push(C[1][0]))})}const D=f.reduce((y,x)=>{const E=x.added?"ins":x.removed?"del":null,C=d.indexOf(x)>-1?' class="d2h-change"':"",b=un(x.value);return E!==null?`${y}<${E}${C}>${b}</${E}>`:`${y}${b}`},"");return{oldLine:{prefix:c.prefix,content:_R(D)},newLine:{prefix:m.prefix,content:LR(D)}}}const Jy="file-summary",MR="icon",$R={colorScheme:tl.colorScheme};class RR{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},$R),r)}render(e){const r=e.map(s=>this.hoganUtils.render(Jy,"line",{fileHtmlId:Cd(s),oldName:s.oldName,newName:s.newName,fileName:rl(s),deletedLines:"-"+s.deletedLines,addedLines:"+"+s.addedLines},{fileIcon:this.hoganUtils.template(MR,bd(s))})).join(`
|
|
187
|
-
`);return this.hoganUtils.render(Jy,"wrapper",{colorScheme:Ad(this.config.colorScheme),filesNumber:e.length,files:r})}}const DE=Object.assign(Object.assign({},tl),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),aa="generic",Ky="line-by-line",jR="icon",UR="tag";class VR{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},DE),r)}render(e){const r=e.map(s=>{let i;return s.blocks.length?i=this.generateFileHtml(s):i=this.generateEmptyDiff(),this.makeFileDiffHtml(s,i)}).join(`
|
|
188
|
-
`);return this.hoganUtils.render(aa,"wrapper",{colorScheme:Ad(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";const s=this.hoganUtils.template(Ky,"file-diff"),i=this.hoganUtils.template(aa,"file-path"),a=this.hoganUtils.template(jR,"file"),u=this.hoganUtils.template(UR,bd(e));return s.render({file:e,fileHtmlId:Cd(e),diffs:r,filePath:i.render({fileDiffName:rl(e)},{fileIcon:a,fileTag:u})})}generateEmptyDiff(){return this.hoganUtils.render(aa,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:$t})}generateFileHtml(e){const r=Ed(xd(s=>Ur(s.content,e.isCombined).content));return e.blocks.map(s=>{let i=this.hoganUtils.render(aa,"block-header",{CSSLineClass:$t,blockHeader:e.isTooBig?s.header:un(s.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(s).forEach(([a,u,p])=>{if(u.length&&p.length&&!a.length)this.applyRematchMatching(u,p,r).map(([c,m])=>{const{left:f,right:d}=this.processChangedLines(e,e.isCombined,c,m);i+=f,i+=d});else if(a.length)a.forEach(c=>{const{prefix:m,content:f}=Ur(c.content,e.isCombined);i+=this.generateSingleLineHtml(e,{type:$t.CONTEXT,prefix:m,content:f,oldNumber:c.oldNumber,newNumber:c.newNumber})});else if(u.length||p.length){const{left:c,right:m}=this.processChangedLines(e,e.isCombined,u,p);i+=c,i+=m}else console.error("Unknown state reached while processing groups of lines",a,u,p)}),i}).join(`
|
|
189
|
-
`)}applyLineGroupping(e){const r=[];let s=[],i=[];for(let a=0;a<e.lines.length;a++){const u=e.lines[a];(u.type!==mt.INSERT&&i.length||u.type===mt.CONTEXT&&s.length>0)&&(r.push([[],s,i]),s=[],i=[]),u.type===mt.CONTEXT?r.push([[u],[],[]]):u.type===mt.INSERT&&s.length===0?r.push([[],[],[u]]):u.type===mt.INSERT&&s.length>0?i.push(u):u.type===mt.DELETE&&s.push(u)}return(s.length||i.length)&&(r.push([[],s,i]),s=[],i=[]),r}applyRematchMatching(e,r,s){const i=e.length*r.length,a=fE(e.concat(r).map(p=>p.content.length));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?s(e,r):[[e,r]]}processChangedLines(e,r,s,i){const a={right:"",left:""},u=Math.max(s.length,i.length);for(let p=0;p<u;p++){const c=s[p],m=i[p],f=c!==void 0&&m!==void 0?gE(c.content,m.content,r,this.config):void 0,d=c!==void 0&&c.oldNumber!==void 0?Object.assign(Object.assign({},f!==void 0?{prefix:f.oldLine.prefix,content:f.oldLine.content,type:$t.DELETE_CHANGES}:Object.assign(Object.assign({},Ur(c.content,r)),{type:fu(c.type)})),{oldNumber:c.oldNumber,newNumber:c.newNumber}):void 0,D=m!==void 0&&m.newNumber!==void 0?Object.assign(Object.assign({},f!==void 0?{prefix:f.newLine.prefix,content:f.newLine.content,type:$t.INSERT_CHANGES}:Object.assign(Object.assign({},Ur(m.content,r)),{type:fu(m.type)})),{oldNumber:m.oldNumber,newNumber:m.newNumber}):void 0,{left:y,right:x}=this.generateLineHtml(e,d,D);a.left+=y,a.right+=x}return a}generateLineHtml(e,r,s){return{left:this.generateSingleLineHtml(e,r),right:this.generateSingleLineHtml(e,s)}}generateSingleLineHtml(e,r){if(r===void 0)return"";const s=this.hoganUtils.render(Ky,"numbers",{oldNumber:r.oldNumber||"",newNumber:r.newNumber||""});return this.hoganUtils.render(aa,"line",{type:r.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:r.prefix===" "?" ":r.prefix,content:r.content,lineNumber:s,line:r,file:e})}}const xE=Object.assign(Object.assign({},tl),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),oa="generic",qR="side-by-side",HR="icon",zR="tag";class WR{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},xE),r)}render(e){const r=e.map(s=>{let i;return s.blocks.length?i=this.generateFileHtml(s):i=this.generateEmptyDiff(),this.makeFileDiffHtml(s,i)}).join(`
|
|
190
|
-
`);return this.hoganUtils.render(oa,"wrapper",{colorScheme:Ad(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";const s=this.hoganUtils.template(qR,"file-diff"),i=this.hoganUtils.template(oa,"file-path"),a=this.hoganUtils.template(HR,"file"),u=this.hoganUtils.template(zR,bd(e));return s.render({file:e,fileHtmlId:Cd(e),diffs:r,filePath:i.render({fileDiffName:rl(e)},{fileIcon:a,fileTag:u})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(oa,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:$t})}}generateFileHtml(e){const r=Ed(xd(s=>Ur(s.content,e.isCombined).content));return e.blocks.map(s=>{const i={left:this.makeHeaderHtml(s.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(s).forEach(([a,u,p])=>{if(u.length&&p.length&&!a.length)this.applyRematchMatching(u,p,r).map(([c,m])=>{const{left:f,right:d}=this.processChangedLines(e.isCombined,c,m);i.left+=f,i.right+=d});else if(a.length)a.forEach(c=>{const{prefix:m,content:f}=Ur(c.content,e.isCombined),{left:d,right:D}=this.generateLineHtml({type:$t.CONTEXT,prefix:m,content:f,number:c.oldNumber},{type:$t.CONTEXT,prefix:m,content:f,number:c.newNumber});i.left+=d,i.right+=D});else if(u.length||p.length){const{left:c,right:m}=this.processChangedLines(e.isCombined,u,p);i.left+=c,i.right+=m}else console.error("Unknown state reached while processing groups of lines",a,u,p)}),i}).reduce((s,i)=>({left:s.left+i.left,right:s.right+i.right}),{left:"",right:""})}applyLineGroupping(e){const r=[];let s=[],i=[];for(let a=0;a<e.lines.length;a++){const u=e.lines[a];(u.type!==mt.INSERT&&i.length||u.type===mt.CONTEXT&&s.length>0)&&(r.push([[],s,i]),s=[],i=[]),u.type===mt.CONTEXT?r.push([[u],[],[]]):u.type===mt.INSERT&&s.length===0?r.push([[],[],[u]]):u.type===mt.INSERT&&s.length>0?i.push(u):u.type===mt.DELETE&&s.push(u)}return(s.length||i.length)&&(r.push([[],s,i]),s=[],i=[]),r}applyRematchMatching(e,r,s){const i=e.length*r.length,a=fE(e.concat(r).map(p=>p.content.length));return i<this.config.matchingMaxComparisons&&a<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?s(e,r):[[e,r]]}makeHeaderHtml(e,r){return this.hoganUtils.render(oa,"block-header",{CSSLineClass:$t,blockHeader:r?.isTooBig?e:un(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,r,s){const i={right:"",left:""},a=Math.max(r.length,s.length);for(let u=0;u<a;u++){const p=r[u],c=s[u],m=p!==void 0&&c!==void 0?gE(p.content,c.content,e,this.config):void 0,f=p!==void 0&&p.oldNumber!==void 0?Object.assign(Object.assign({},m!==void 0?{prefix:m.oldLine.prefix,content:m.oldLine.content,type:$t.DELETE_CHANGES}:Object.assign(Object.assign({},Ur(p.content,e)),{type:fu(p.type)})),{number:p.oldNumber}):void 0,d=c!==void 0&&c.newNumber!==void 0?Object.assign(Object.assign({},m!==void 0?{prefix:m.newLine.prefix,content:m.newLine.content,type:$t.INSERT_CHANGES}:Object.assign(Object.assign({},Ur(c.content,e)),{type:fu(c.type)})),{number:c.newNumber}):void 0,{left:D,right:y}=this.generateLineHtml(f,d);i.left+=D,i.right+=y}return i}generateLineHtml(e,r){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(r)}}generateSingleHtml(e){const r="d2h-code-side-linenumber",s="d2h-code-side-line";return this.hoganUtils.render(oa,"line",{type:e?.type||`${$t.CONTEXT} d2h-emptyplaceholder`,lineClass:e!==void 0?r:`${r} d2h-code-side-emptyplaceholder`,contentClass:e!==void 0?s:`${s} d2h-code-side-emptyplaceholder`,prefix:e?.prefix===" "?" ":e?.prefix,content:e?.content,lineNumber:e?.number})}}var gp={},Xy;function JR(){return Xy||(Xy=1,(function(t){(function(e){var r=/\S/,s=/\"/g,i=/\n/g,a=/\r/g,u=/\\/g,p=/\u2028/,c=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(R,j){var V=R.length,N=0,q=1,te=2,W=N,Y=null,ge=null,Ae="",Ie=[],he=!1,G=0,X=0,le="{{",we="}}";function Qe(){Ae.length>0&&(Ie.push({tag:"_t",text:new String(Ae)}),Ae="")}function gt(){for(var H=!0,De=X;De<Ie.length;De++)if(H=e.tags[Ie[De].tag]<e.tags._v||Ie[De].tag=="_t"&&Ie[De].text.match(r)===null,!H)return!1;return H}function se(H,De){if(Qe(),H&>())for(var Pe=X,je;Pe<Ie.length;Pe++)Ie[Pe].text&&((je=Ie[Pe+1])&&je.tag==">"&&(je.indent=Ie[Pe].text.toString()),Ie.splice(Pe,1));else De||Ie.push({tag:`
|
|
191
|
-
`});he=!1,X=Ie.length}function K(H,De){var Pe="="+we,je=H.indexOf(Pe,De),Ct=f(H.substring(H.indexOf("=",De)+1,je)).split(" ");return le=Ct[0],we=Ct[Ct.length-1],je+Pe.length-1}for(j&&(j=j.split(" "),le=j[0],we=j[1]),G=0;G<V;G++)W==N?d(le,R,G)?(--G,Qe(),W=q):R.charAt(G)==`
|
|
192
|
-
`?se(he):Ae+=R.charAt(G):W==q?(G+=le.length-1,ge=e.tags[R.charAt(G+1)],Y=ge?R.charAt(G+1):"_v",Y=="="?(G=K(R,G),W=N):(ge&&G++,W=te),he=G):d(we,R,G)?(Ie.push({tag:Y,n:f(Ae),otag:le,ctag:we,i:Y=="/"?he-le.length:G+we.length}),Ae="",G+=we.length-1,W=N,Y=="{"&&(we=="}}"?G++:m(Ie[Ie.length-1]))):Ae+=R.charAt(G);return se(he,!0),Ie};function m(I){I.n.substr(I.n.length-1)==="}"&&(I.n=I.n.substring(0,I.n.length-1))}function f(I){return I.trim?I.trim():I.replace(/^\s*|\s*$/g,"")}function d(I,R,j){if(R.charAt(j)!=I.charAt(0))return!1;for(var V=1,N=I.length;V<N;V++)if(R.charAt(j+V)!=I.charAt(V))return!1;return!0}var D={_t:!0,"\n":!0,$:!0,"/":!0};function y(I,R,j,V){var N=[],q=null,te=null,W=null;for(te=j[j.length-1];I.length>0;){if(W=I.shift(),te&&te.tag=="<"&&!(W.tag in D))throw new Error("Illegal content in < super tag.");if(e.tags[W.tag]<=e.tags.$||x(W,V))j.push(W),W.nodes=y(I,W.tag,j,V);else if(W.tag=="/"){if(j.length===0)throw new Error("Closing tag without opener: /"+W.n);if(q=j.pop(),W.n!=q.n&&!E(W.n,q.n,V))throw new Error("Nesting error: "+q.n+" vs. "+W.n);return q.end=W.i,N}else W.tag==`
|
|
193
|
-
`&&(W.last=I.length==0||I[0].tag==`
|
|
194
|
-
`);N.push(W)}if(j.length>0)throw new Error("missing closing tag: "+j.pop().n);return N}function x(I,R){for(var j=0,V=R.length;j<V;j++)if(R[j].o==I.n)return I.tag="#",!0}function E(I,R,j){for(var V=0,N=j.length;V<N;V++)if(j[V].c==I&&j[V].o==R)return!0}function C(I){var R=[];for(var j in I)R.push('"'+v(j)+'": function(c,p,t,i) {'+I[j]+"}");return"{ "+R.join(",")+" }"}function b(I){var R=[];for(var j in I.partials)R.push('"'+v(j)+'":{name:"'+v(I.partials[j].name)+'", '+b(I.partials[j])+"}");return"partials: {"+R.join(",")+"}, subs: "+C(I.subs)}e.stringify=function(I,R,j){return"{code: function (c,p,i) { "+e.wrapMain(I.code)+" },"+b(I)+"}"};var A=0;e.generate=function(I,R,j){A=0;var V={code:"",subs:{},partials:{}};return e.walk(I,V),j.asString?this.stringify(V,R,j):this.makeTemplate(V,R,j)},e.wrapMain=function(I){return'var t=this;t.b(i=i||"");'+I+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(I,R,j){var V=this.makePartials(I);return V.code=new Function("c","p","i",this.wrapMain(I.code)),new this.template(V,R,this,j)},e.makePartials=function(I){var R,j={subs:{},partials:I.partials,name:I.name};for(R in j.partials)j.partials[R]=this.makePartials(j.partials[R]);for(R in I.subs)j.subs[R]=new Function("c","p","t","i",I.subs[R]);return j};function v(I){return I.replace(u,"\\\\").replace(s,'\\"').replace(i,"\\n").replace(a,"\\r").replace(p,"\\u2028").replace(c,"\\u2029")}function P(I){return~I.indexOf(".")?"d":"f"}function S(I,R){var j="<"+(R.prefix||""),V=j+I.n+A++;return R.partials[V]={name:I.n,partials:{}},R.code+='t.b(t.rp("'+v(V)+'",c,p,"'+(I.indent||"")+'"));',V}e.codegen={"#":function(I,R){R.code+="if(t.s(t."+P(I.n)+'("'+v(I.n)+'",c,p,1),c,p,0,'+I.i+","+I.end+',"'+I.otag+" "+I.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(I.nodes,R),R.code+="});c.pop();}"},"^":function(I,R){R.code+="if(!t.s(t."+P(I.n)+'("'+v(I.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(I.nodes,R),R.code+="};"},">":S,"<":function(I,R){var j={partials:{},code:"",subs:{},inPartial:!0};e.walk(I.nodes,j);var V=R.partials[S(I,R)];V.subs=j.subs,V.partials=j.partials},$:function(I,R){var j={subs:{},code:"",partials:R.partials,prefix:I.n};e.walk(I.nodes,j),R.subs[I.n]=j.code,R.inPartial||(R.code+='t.sub("'+v(I.n)+'",c,p,i);')},"\n":function(I,R){R.code+=B('"\\n"'+(I.last?"":" + i"))},_v:function(I,R){R.code+="t.b(t.v(t."+P(I.n)+'("'+v(I.n)+'",c,p,0)));'},_t:function(I,R){R.code+=B('"'+v(I.text)+'"')},"{":F,"&":F};function F(I,R){R.code+="t.b(t.t(t."+P(I.n)+'("'+v(I.n)+'",c,p,0)));'}function B(I){return"t.b("+I+");"}e.walk=function(I,R){for(var j,V=0,N=I.length;V<N;V++)j=e.codegen[I[V].tag],j&&j(I[V],R);return R},e.parse=function(I,R,j){return j=j||{},y(I,"",[],j.sectionTags||[])},e.cache={},e.cacheKey=function(I,R){return[I,!!R.asString,!!R.disableLambda,R.delimiters,!!R.modelGet].join("||")},e.compile=function(I,R){R=R||{};var j=e.cacheKey(I,R),V=this.cache[j];if(V){var N=V.partials;for(var q in N)delete N[q].instance;return V}return V=this.generate(this.parse(this.scan(I,R.delimiters),I,R),I,R),this.cache[j]=V}})(t)})(gp)),gp}var Dp={},Gy;function KR(){return Gy||(Gy=1,(function(t){(function(e){e.Template=function(y,x,E,C){y=y||{},this.r=y.code||this.r,this.c=E,this.options=C||{},this.text=x||"",this.partials=y.partials||{},this.subs=y.subs||{},this.buf=""},e.Template.prototype={r:function(y,x,E){return""},v:d,t:f,render:function(x,E,C){return this.ri([x],E||{},C)},ri:function(y,x,E){return this.r(y,x,E)},ep:function(y,x){var E=this.partials[y],C=x[E.name];if(E.instance&&E.base==C)return E.instance;if(typeof C=="string"){if(!this.c)throw new Error("No compiler available.");C=this.c.compile(C,this.options)}if(!C)return null;if(this.partials[y].base=C,E.subs){x.stackText||(x.stackText={});for(key in E.subs)x.stackText[key]||(x.stackText[key]=this.activeSub!==void 0&&x.stackText[this.activeSub]?x.stackText[this.activeSub]:this.text);C=s(C,E.subs,E.partials,this.stackSubs,this.stackPartials,x.stackText)}return this.partials[y].instance=C,C},rp:function(y,x,E,C){var b=this.ep(y,E);return b?b.ri(x,E,C):""},rs:function(y,x,E){var C=y[y.length-1];if(!D(C)){E(y,x,this);return}for(var b=0;b<C.length;b++)y.push(C[b]),E(y,x,this),y.pop()},s:function(y,x,E,C,b,A,v){var P;return D(y)&&y.length===0?!1:(typeof y=="function"&&(y=this.ms(y,x,E,C,b,A,v)),P=!!y,!C&&P&&x&&x.push(typeof y=="object"?y:x[x.length-1]),P)},d:function(y,x,E,C){var b,A=y.split("."),v=this.f(A[0],x,E,C),P=this.options.modelGet,S=null;if(y==="."&&D(x[x.length-2]))v=x[x.length-1];else for(var F=1;F<A.length;F++)b=r(A[F],v,P),b!==void 0?(S=v,v=b):v="";return C&&!v?!1:(!C&&typeof v=="function"&&(x.push(S),v=this.mv(v,x,E),x.pop()),v)},f:function(y,x,E,C){for(var b=!1,A=null,v=!1,P=this.options.modelGet,S=x.length-1;S>=0;S--)if(A=x[S],b=r(y,A,P),b!==void 0){v=!0;break}return v?(!C&&typeof b=="function"&&(b=this.mv(b,x,E)),b):C?!1:""},ls:function(y,x,E,C,b,A){var v=this.options.delimiters;return this.options.delimiters=A,this.b(this.ct(f(y.call(x,b,E)),x,C)),this.options.delimiters=v,!1},ct:function(y,x,E){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(y,this.options).render(x,E)},b:function(y){this.buf+=y},fl:function(){var y=this.buf;return this.buf="",y},ms:function(y,x,E,C,b,A,v){var P,S=x[x.length-1],F=y.call(S);return typeof F=="function"?C?!0:(P=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(F,S,x,E,P.substring(b,A),v)):F},mv:function(y,x,E){var C=x[x.length-1],b=y.call(C);return typeof b=="function"?this.ct(f(b.call(C)),C,E):b},sub:function(y,x,E,C){var b=this.subs[y];b&&(this.activeSub=y,b(x,E,this,C),this.activeSub=!1)}};function r(y,x,E){var C;return x&&typeof x=="object"&&(x[y]!==void 0?C=x[y]:E&&x.get&&typeof x.get=="function"&&(C=x.get(y))),C}function s(y,x,E,C,b,A){function v(){}v.prototype=y;function P(){}P.prototype=y.subs;var S,F=new v;F.subs=new P,F.subsText={},F.buf="",C=C||{},F.stackSubs=C,F.subsText=A;for(S in x)C[S]||(C[S]=x[S]);for(S in C)F.subs[S]=C[S];b=b||{},F.stackPartials=b;for(S in E)b[S]||(b[S]=E[S]);for(S in b)F.partials[S]=b[S];return F}var i=/&/g,a=/</g,u=/>/g,p=/\'/g,c=/\"/g,m=/[&<>\"\']/;function f(y){return String(y??"")}function d(y){return y=f(y),m.test(y)?y.replace(i,"&").replace(a,"<").replace(u,">").replace(p,"'").replace(c,"""):y}var D=Array.isArray||function(y){return Object.prototype.toString.call(y)==="[object Array]"}})(t)})(Dp)),Dp}var xp,Yy;function XR(){if(Yy)return xp;Yy=1;var t=JR();return t.Template=KR().Template,t.template=t.Template,xp=t,xp}var dt=XR();const yt={};yt["file-summary-line"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<li class="d2h-file-list-line">'),s.b(`
|
|
195
|
-
`+r),s.b(' <span class="d2h-file-name-wrapper">'),s.b(`
|
|
196
|
-
`+r),s.b(s.rp("<fileIcon0",t,e," ")),s.b(' <a href="#'),s.b(s.v(s.f("fileHtmlId",t,e,0))),s.b('" class="d2h-file-name">'),s.b(s.v(s.f("fileName",t,e,0))),s.b("</a>"),s.b(`
|
|
197
|
-
`+r),s.b(' <span class="d2h-file-stats">'),s.b(`
|
|
198
|
-
`+r),s.b(' <span class="d2h-lines-added">'),s.b(s.v(s.f("addedLines",t,e,0))),s.b("</span>"),s.b(`
|
|
199
|
-
`+r),s.b(' <span class="d2h-lines-deleted">'),s.b(s.v(s.f("deletedLines",t,e,0))),s.b("</span>"),s.b(`
|
|
200
|
-
`+r),s.b(" </span>"),s.b(`
|
|
201
|
-
`+r),s.b(" </span>"),s.b(`
|
|
202
|
-
`+r),s.b("</li>"),s.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}});yt["file-summary-wrapper"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<div class="d2h-file-list-wrapper '),s.b(s.v(s.f("colorScheme",t,e,0))),s.b('">'),s.b(`
|
|
203
|
-
`+r),s.b(' <div class="d2h-file-list-header">'),s.b(`
|
|
204
|
-
`+r),s.b(' <span class="d2h-file-list-title">Files changed ('),s.b(s.v(s.f("filesNumber",t,e,0))),s.b(")</span>"),s.b(`
|
|
205
|
-
`+r),s.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),s.b(`
|
|
206
|
-
`+r),s.b(' <a class="d2h-file-switch d2h-show">show</a>'),s.b(`
|
|
207
|
-
`+r),s.b(" </div>"),s.b(`
|
|
208
|
-
`+r),s.b(' <ol class="d2h-file-list">'),s.b(`
|
|
209
|
-
`+r),s.b(" "),s.b(s.t(s.f("files",t,e,0))),s.b(`
|
|
210
|
-
`+r),s.b(" </ol>"),s.b(`
|
|
211
|
-
`+r),s.b("</div>"),s.fl()},partials:{},subs:{}});yt["generic-block-header"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b("<tr>"),s.b(`
|
|
212
|
-
`+r),s.b(' <td class="'),s.b(s.v(s.f("lineClass",t,e,0))),s.b(" "),s.b(s.v(s.d("CSSLineClass.INFO",t,e,0))),s.b('"></td>'),s.b(`
|
|
213
|
-
`+r),s.b(' <td class="'),s.b(s.v(s.d("CSSLineClass.INFO",t,e,0))),s.b('">'),s.b(`
|
|
214
|
-
`+r),s.b(' <div class="'),s.b(s.v(s.f("contentClass",t,e,0))),s.b('">'),s.s(s.f("blockHeader",t,e,1),t,e,0,156,173,"{{ }}")&&(s.rs(t,e,function(i,a,u){u.b(u.t(u.f("blockHeader",i,a,0)))}),t.pop()),s.s(s.f("blockHeader",t,e,1),t,e,1,0,0,"")||s.b(" "),s.b("</div>"),s.b(`
|
|
215
|
-
`+r),s.b(" </td>"),s.b(`
|
|
216
|
-
`+r),s.b("</tr>"),s.fl()},partials:{},subs:{}});yt["generic-empty-diff"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b("<tr>"),s.b(`
|
|
217
|
-
`+r),s.b(' <td class="'),s.b(s.v(s.d("CSSLineClass.INFO",t,e,0))),s.b('">'),s.b(`
|
|
218
|
-
`+r),s.b(' <div class="'),s.b(s.v(s.f("contentClass",t,e,0))),s.b('">'),s.b(`
|
|
219
|
-
`+r),s.b(" File without changes"),s.b(`
|
|
220
|
-
`+r),s.b(" </div>"),s.b(`
|
|
221
|
-
`+r),s.b(" </td>"),s.b(`
|
|
222
|
-
`+r),s.b("</tr>"),s.fl()},partials:{},subs:{}});yt["generic-file-path"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<span class="d2h-file-name-wrapper">'),s.b(`
|
|
223
|
-
`+r),s.b(s.rp("<fileIcon0",t,e," ")),s.b(' <span class="d2h-file-name">'),s.b(s.v(s.f("fileDiffName",t,e,0))),s.b("</span>"),s.b(`
|
|
224
|
-
`+r),s.b(s.rp("<fileTag1",t,e," ")),s.b("</span>"),s.b(`
|
|
225
|
-
`+r),s.b('<label class="d2h-file-collapse">'),s.b(`
|
|
226
|
-
`+r),s.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),s.b(`
|
|
227
|
-
`+r),s.b(" Viewed"),s.b(`
|
|
228
|
-
`+r),s.b("</label>"),s.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}});yt["generic-line"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b("<tr>"),s.b(`
|
|
229
|
-
`+r),s.b(' <td class="'),s.b(s.v(s.f("lineClass",t,e,0))),s.b(" "),s.b(s.v(s.f("type",t,e,0))),s.b('">'),s.b(`
|
|
230
|
-
`+r),s.b(" "),s.b(s.t(s.f("lineNumber",t,e,0))),s.b(`
|
|
231
|
-
`+r),s.b(" </td>"),s.b(`
|
|
232
|
-
`+r),s.b(' <td class="'),s.b(s.v(s.f("type",t,e,0))),s.b('">'),s.b(`
|
|
233
|
-
`+r),s.b(' <div class="'),s.b(s.v(s.f("contentClass",t,e,0))),s.b('">'),s.b(`
|
|
234
|
-
`+r),s.s(s.f("prefix",t,e,1),t,e,0,162,238,"{{ }}")&&(s.rs(t,e,function(i,a,u){u.b(' <span class="d2h-code-line-prefix">'),u.b(u.t(u.f("prefix",i,a,0))),u.b("</span>"),u.b(`
|
|
235
|
-
`+r)}),t.pop()),s.s(s.f("prefix",t,e,1),t,e,1,0,0,"")||(s.b(' <span class="d2h-code-line-prefix"> </span>'),s.b(`
|
|
236
|
-
`+r)),s.s(s.f("content",t,e,1),t,e,0,371,445,"{{ }}")&&(s.rs(t,e,function(i,a,u){u.b(' <span class="d2h-code-line-ctn">'),u.b(u.t(u.f("content",i,a,0))),u.b("</span>"),u.b(`
|
|
237
|
-
`+r)}),t.pop()),s.s(s.f("content",t,e,1),t,e,1,0,0,"")||(s.b(' <span class="d2h-code-line-ctn"><br></span>'),s.b(`
|
|
238
|
-
`+r)),s.b(" </div>"),s.b(`
|
|
239
|
-
`+r),s.b(" </td>"),s.b(`
|
|
240
|
-
`+r),s.b("</tr>"),s.fl()},partials:{},subs:{}});yt["generic-wrapper"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<div class="d2h-wrapper '),s.b(s.v(s.f("colorScheme",t,e,0))),s.b('">'),s.b(`
|
|
241
|
-
`+r),s.b(" "),s.b(s.t(s.f("content",t,e,0))),s.b(`
|
|
242
|
-
`+r),s.b("</div>"),s.fl()},partials:{},subs:{}});yt["icon-file-added"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),s.b(`
|
|
243
|
-
`+r),s.b(' width="14">'),s.b(`
|
|
244
|
-
`+r),s.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),s.b(`
|
|
245
|
-
`+r),s.b("</svg>"),s.fl()},partials:{},subs:{}});yt["icon-file-changed"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),s.b(`
|
|
246
|
-
`+r),s.b(' viewBox="0 0 14 16" width="14">'),s.b(`
|
|
247
|
-
`+r),s.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),s.b(`
|
|
248
|
-
`+r),s.b("</svg>"),s.fl()},partials:{},subs:{}});yt["icon-file-deleted"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),s.b(`
|
|
249
|
-
`+r),s.b(' viewBox="0 0 14 16" width="14">'),s.b(`
|
|
250
|
-
`+r),s.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),s.b(`
|
|
251
|
-
`+r),s.b("</svg>"),s.fl()},partials:{},subs:{}});yt["icon-file-renamed"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),s.b(`
|
|
252
|
-
`+r),s.b(' viewBox="0 0 14 16" width="14">'),s.b(`
|
|
253
|
-
`+r),s.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),s.b(`
|
|
254
|
-
`+r),s.b("</svg>"),s.fl()},partials:{},subs:{}});yt["icon-file"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),s.b(`
|
|
255
|
-
`+r),s.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),s.b(`
|
|
256
|
-
`+r),s.b("</svg>"),s.fl()},partials:{},subs:{}});yt["line-by-line-file-diff"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<div id="'),s.b(s.v(s.f("fileHtmlId",t,e,0))),s.b('" class="d2h-file-wrapper" data-lang="'),s.b(s.v(s.d("file.language",t,e,0))),s.b('">'),s.b(`
|
|
257
|
-
`+r),s.b(' <div class="d2h-file-header">'),s.b(`
|
|
258
|
-
`+r),s.b(" "),s.b(s.t(s.f("filePath",t,e,0))),s.b(`
|
|
259
|
-
`+r),s.b(" </div>"),s.b(`
|
|
260
|
-
`+r),s.b(' <div class="d2h-file-diff">'),s.b(`
|
|
261
|
-
`+r),s.b(' <div class="d2h-code-wrapper">'),s.b(`
|
|
262
|
-
`+r),s.b(' <table class="d2h-diff-table">'),s.b(`
|
|
263
|
-
`+r),s.b(' <tbody class="d2h-diff-tbody">'),s.b(`
|
|
264
|
-
`+r),s.b(" "),s.b(s.t(s.f("diffs",t,e,0))),s.b(`
|
|
265
|
-
`+r),s.b(" </tbody>"),s.b(`
|
|
266
|
-
`+r),s.b(" </table>"),s.b(`
|
|
267
|
-
`+r),s.b(" </div>"),s.b(`
|
|
268
|
-
`+r),s.b(" </div>"),s.b(`
|
|
269
|
-
`+r),s.b("</div>"),s.fl()},partials:{},subs:{}});yt["line-by-line-numbers"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<div class="line-num1">'),s.b(s.v(s.f("oldNumber",t,e,0))),s.b("</div>"),s.b(`
|
|
270
|
-
`+r),s.b('<div class="line-num2">'),s.b(s.v(s.f("newNumber",t,e,0))),s.b("</div>"),s.fl()},partials:{},subs:{}});yt["side-by-side-file-diff"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<div id="'),s.b(s.v(s.f("fileHtmlId",t,e,0))),s.b('" class="d2h-file-wrapper" data-lang="'),s.b(s.v(s.d("file.language",t,e,0))),s.b('">'),s.b(`
|
|
271
|
-
`+r),s.b(' <div class="d2h-file-header">'),s.b(`
|
|
272
|
-
`+r),s.b(" "),s.b(s.t(s.f("filePath",t,e,0))),s.b(`
|
|
273
|
-
`+r),s.b(" </div>"),s.b(`
|
|
274
|
-
`+r),s.b(' <div class="d2h-files-diff">'),s.b(`
|
|
275
|
-
`+r),s.b(' <div class="d2h-file-side-diff">'),s.b(`
|
|
276
|
-
`+r),s.b(' <div class="d2h-code-wrapper">'),s.b(`
|
|
277
|
-
`+r),s.b(' <table class="d2h-diff-table">'),s.b(`
|
|
278
|
-
`+r),s.b(' <tbody class="d2h-diff-tbody">'),s.b(`
|
|
279
|
-
`+r),s.b(" "),s.b(s.t(s.d("diffs.left",t,e,0))),s.b(`
|
|
280
|
-
`+r),s.b(" </tbody>"),s.b(`
|
|
281
|
-
`+r),s.b(" </table>"),s.b(`
|
|
282
|
-
`+r),s.b(" </div>"),s.b(`
|
|
283
|
-
`+r),s.b(" </div>"),s.b(`
|
|
284
|
-
`+r),s.b(' <div class="d2h-file-side-diff">'),s.b(`
|
|
285
|
-
`+r),s.b(' <div class="d2h-code-wrapper">'),s.b(`
|
|
286
|
-
`+r),s.b(' <table class="d2h-diff-table">'),s.b(`
|
|
287
|
-
`+r),s.b(' <tbody class="d2h-diff-tbody">'),s.b(`
|
|
288
|
-
`+r),s.b(" "),s.b(s.t(s.d("diffs.right",t,e,0))),s.b(`
|
|
289
|
-
`+r),s.b(" </tbody>"),s.b(`
|
|
290
|
-
`+r),s.b(" </table>"),s.b(`
|
|
291
|
-
`+r),s.b(" </div>"),s.b(`
|
|
292
|
-
`+r),s.b(" </div>"),s.b(`
|
|
293
|
-
`+r),s.b(" </div>"),s.b(`
|
|
294
|
-
`+r),s.b("</div>"),s.fl()},partials:{},subs:{}});yt["tag-file-added"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),s.fl()},partials:{},subs:{}});yt["tag-file-changed"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),s.fl()},partials:{},subs:{}});yt["tag-file-deleted"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),s.fl()},partials:{},subs:{}});yt["tag-file-renamed"]=new dt.Template({code:function(t,e,r){var s=this;return s.b(r=r||""),s.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),s.fl()},partials:{},subs:{}});class GR{constructor({compiledTemplates:e={},rawTemplates:r={}}){const s=Object.entries(r).reduce((i,[a,u])=>{const p=dt.compile(u,{asString:!1});return Object.assign(Object.assign({},i),{[a]:p})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},yt),e),s)}static compile(e){return dt.compile(e,{asString:!1})}render(e,r,s,i,a){const u=this.templateKey(e,r);try{return this.preCompiledTemplates[u].render(s,i,a)}catch{throw new Error(`Could not find template to render '${u}'`)}}template(e,r){return this.preCompiledTemplates[this.templateKey(e,r)]}templateKey(e,r){return`${e}-${r}`}}const YR=Object.assign(Object.assign(Object.assign({},DE),xE),{outputFormat:yR.LINE_BY_LINE,drawFileList:!0});function QR(t,e={}){const r=Object.assign(Object.assign({},YR),e),s=typeof t=="string"?vR(t,r):t,i=new GR(r),{colorScheme:a}=r,u={colorScheme:a},p=r.drawFileList?new RR(i,u).render(s):"",c=r.outputFormat==="side-by-side"?new WR(i,r).render(s):new VR(i,r).render(s);return p+c}class ZR{diff(e,r,s={}){let i;typeof s=="function"?(i=s,s={}):"callback"in s&&(i=s.callback);const a=this.castInput(e,s),u=this.castInput(r,s),p=this.removeEmpty(this.tokenize(a,s)),c=this.removeEmpty(this.tokenize(u,s));return this.diffWithOptionsObj(p,c,s,i)}diffWithOptionsObj(e,r,s,i){var a;const u=A=>{if(A=this.postProcess(A,s),i){setTimeout(function(){i(A)},0);return}else return A},p=r.length,c=e.length;let m=1,f=p+c;s.maxEditLength!=null&&(f=Math.min(f,s.maxEditLength));const d=(a=s.timeout)!==null&&a!==void 0?a:1/0,D=Date.now()+d,y=[{oldPos:-1,lastComponent:void 0}];let x=this.extractCommon(y[0],r,e,0,s);if(y[0].oldPos+1>=c&&x+1>=p)return u(this.buildValues(y[0].lastComponent,r,e));let E=-1/0,C=1/0;const b=()=>{for(let A=Math.max(E,-m);A<=Math.min(C,m);A+=2){let v;const P=y[A-1],S=y[A+1];P&&(y[A-1]=void 0);let F=!1;if(S){const I=S.oldPos-A;F=S&&0<=I&&I<p}const B=P&&P.oldPos+1<c;if(!F&&!B){y[A]=void 0;continue}if(!B||F&&P.oldPos<S.oldPos?v=this.addToPath(S,!0,!1,0,s):v=this.addToPath(P,!1,!0,1,s),x=this.extractCommon(v,r,e,A,s),v.oldPos+1>=c&&x+1>=p)return u(this.buildValues(v.lastComponent,r,e))||!0;y[A]=v,v.oldPos+1>=c&&(C=Math.min(C,A-1)),x+1>=p&&(E=Math.max(E,A+1))}m++};if(i)(function A(){setTimeout(function(){if(m>f||Date.now()>D)return i(void 0);b()||A()},0)})();else for(;m<=f&&Date.now()<=D;){const A=b();if(A)return A}}addToPath(e,r,s,i,a){const u=e.lastComponent;return u&&!a.oneChangePerToken&&u.added===r&&u.removed===s?{oldPos:e.oldPos+i,lastComponent:{count:u.count+1,added:r,removed:s,previousComponent:u.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:r,removed:s,previousComponent:u}}}extractCommon(e,r,s,i,a){const u=r.length,p=s.length;let c=e.oldPos,m=c-i,f=0;for(;m+1<u&&c+1<p&&this.equals(s[c+1],r[m+1],a);)m++,c++,f++,a.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return f&&!a.oneChangePerToken&&(e.lastComponent={count:f,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=c,m}equals(e,r,s){return s.comparator?s.comparator(e,r):e===r||!!s.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){const r=[];for(let s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,s){const i=[];let a;for(;e;)i.push(e),a=e.previousComponent,delete e.previousComponent,e=a;i.reverse();const u=i.length;let p=0,c=0,m=0;for(;p<u;p++){const f=i[p];if(f.removed)f.value=this.join(s.slice(m,m+f.count)),m+=f.count;else{if(!f.added&&this.useLongestToken){let d=r.slice(c,c+f.count);d=d.map(function(D,y){const x=s[m+y];return x.length>D.length?x:D}),f.value=this.join(d)}else f.value=this.join(r.slice(c,c+f.count));c+=f.count,f.added||(m+=f.count)}}return i}}class ej extends ZR{constructor(){super(...arguments),this.tokenize=rj}equals(e,r,s){return s.ignoreWhitespace?((!s.newlineIsToken||!e.includes(`
|
|
295
|
-
`))&&(e=e.trim()),(!s.newlineIsToken||!r.includes(`
|
|
296
|
-
`))&&(r=r.trim())):s.ignoreNewlineAtEof&&!s.newlineIsToken&&(e.endsWith(`
|
|
297
|
-
`)&&(e=e.slice(0,-1)),r.endsWith(`
|
|
298
|
-
`)&&(r=r.slice(0,-1))),super.equals(e,r,s)}}const tj=new ej;function Qy(t,e,r){return tj.diff(t,e,r)}function rj(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
299
|
-
`));const r=[],s=t.split(/(\n|\r\n)/);s[s.length-1]||s.pop();for(let i=0;i<s.length;i++){const a=s[i];i%2&&!e.newlineIsToken?r[r.length-1]+=a:r.push(a)}return r}function sj(t){for(let e=0;e<t.length;e++)if(t[e]<" "||t[e]>"~"||t[e]==='"'||t[e]==="\\")return!0;return!1}function _s(t){if(!sj(t))return t;let e='"';const r=new TextEncoder().encode(t);let s=0;for(;s<r.length;){const i=r[s];i===7?e+="\\a":i===8?e+="\\b":i===9?e+="\\t":i===10?e+="\\n":i===11?e+="\\v":i===12?e+="\\f":i===13?e+="\\r":i===34?e+='\\"':i===92?e+="\\\\":i>=32&&i<=126?e+=String.fromCharCode(i):e+="\\"+i.toString(8).padStart(3,"0"),s++}return e+='"',e}const Zy={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function ij(t,e,r,s,i,a,u){let p;p={},typeof p.context>"u"&&(p.context=4);const c=p.context;if(p.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(p.callback){const{callback:f}=p;Qy(r,s,Object.assign(Object.assign({},p),{callback:d=>{const D=m(d);f(D)}}))}else return m(Qy(r,s,p));function m(f){if(!f)return;f.push({value:"",lines:[]});function d(A){return A.map(function(v){return" "+v})}const D=[];let y=0,x=0,E=[],C=1,b=1;for(let A=0;A<f.length;A++){const v=f[A],P=v.lines||oj(v.value);if(v.lines=P,v.added||v.removed){if(!y){const S=f[A-1];y=C,x=b,S&&(E=c>0?d(S.lines.slice(-c)):[],y-=E.length,x-=E.length)}for(const S of P)E.push((v.added?"+":"-")+S);v.added?b+=P.length:C+=P.length}else{if(y)if(P.length<=c*2&&A<f.length-2)for(const S of d(P))E.push(S);else{const S=Math.min(P.length,c);for(const B of d(P.slice(0,S)))E.push(B);const F={oldStart:y,oldLines:C-y+S,newStart:x,newLines:b-x+S,lines:E};D.push(F),y=0,x=0,E=[]}C+=P.length,b+=P.length}}for(const A of D)for(let v=0;v<A.lines.length;v++)A.lines[v].endsWith(`
|
|
300
|
-
`)?A.lines[v]=A.lines[v].slice(0,-1):(A.lines.splice(v+1,0,"\"),v++);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:a,hunks:D}}}function EE(t,e){var r,s,i,a,u,p;if(e||(e=Zy),Array.isArray(t)){if(t.length>1&&!e.includeFileHeaders&&!t.every(f=>f.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(f=>EE(f,e)).join(`
|
|
301
|
-
`)}const c=[];if(t.isGit){if(e=Zy,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let f=t.oldFileName,d=t.newFileName;t.isCreate&&f==="/dev/null"?f=d.replace(/^b\//,"a/"):t.isDelete&&d==="/dev/null"&&(d=f.replace(/^a\//,"b/")),c.push("diff --git "+_s(f)+" "+_s(d)),t.isDelete&&c.push("deleted file mode "+((r=t.oldMode)!==null&&r!==void 0?r:"100644")),t.isCreate&&c.push("new file mode "+((s=t.newMode)!==null&&s!==void 0?s:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(c.push("old mode "+t.oldMode),c.push("new mode "+t.newMode)),t.isRename&&(c.push("rename from "+_s(((i=t.oldFileName)!==null&&i!==void 0?i:"").replace(/^a\//,""))),c.push("rename to "+_s(((a=t.newFileName)!==null&&a!==void 0?a:"").replace(/^b\//,"")))),t.isCopy&&(c.push("copy from "+_s(((u=t.oldFileName)!==null&&u!==void 0?u:"").replace(/^a\//,""))),c.push("copy to "+_s(((p=t.newFileName)!==null&&p!==void 0?p:"").replace(/^b\//,""))))}else e.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&c.push("Index: "+t.oldFileName),e.includeUnderline&&c.push("===================================================================");const m=t.hunks.length>0;e.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||m)&&(c.push("--- "+_s(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),c.push("+++ "+_s(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let f=0;f<t.hunks.length;f++){const d=t.hunks[f],D=d.oldLines===0?d.oldStart-1:d.oldStart,y=d.newLines===0?d.newStart-1:d.newStart;c.push("@@ -"+D+","+d.oldLines+" +"+y+","+d.newLines+" @@");for(const x of d.lines)c.push(x)}return c.join(`
|
|
302
|
-
`)+`
|
|
303
|
-
`}function nj(t,e,r,s,i,a,u){{const p=ij(t,e,r,s,i,a);return p?EE(p,void 0):void 0}}function aj(t,e,r,s,i,a){return nj(t,t,e,r,s,i)}function oj(t){const e=t.endsWith(`
|
|
304
|
-
`),r=t.split(`
|
|
305
|
-
`).map(s=>s+`
|
|
306
|
-
`);return e?r.pop():r.push(r.pop().slice(0,-1)),r}const uj=["innerHTML"],lj=St({__name:"DiffCode",props:dc({oldMeta:{default:()=>({version:""})},newMeta:{default:()=>({version:""})},formatCode:{type:Boolean,default:!1}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const r=t,s=hc(t,"modelValue"),i=rg(),{t:a}=Lt(),u=sr(""),p=sr(),c=new Map;function m(S){try{return new URL(S,location.href).pathname.split(".").pop()}catch{return}}async function f(S){return S?await fetch(S).then(async B=>{if(B.ok){const I=await B.text();try{const R=JSON.parse(I);return R.code===500?"":JSON.stringify(R,null,2)}catch{return I}}return""}).catch(()=>"")??"":""}async function d(S,F){return!F||!r.formatCode?S:await dR(S,F)??S}function D(S){return/^@@/m.test(S)}async function y(S){const F=S.content;if(!F)return null;const B=F.find(ge=>ge.type==="old"),I=F.find(ge=>ge.type==="new");if(!B?.accessPath&&!I?.accessPath)return null;const[R,j]=await Promise.all([f(B?.accessPath),f(I?.accessPath)]),V=m(B?.accessPath??""),N=m(I?.accessPath??""),[q,te]=await Promise.all([d(R,V),d(j,N)]),W=aj(S.path,q,te),Y=D(W);return S.status!==Or.NodeStatus.Added&&S.status!==Or.NodeStatus.Deleted&&(S.status=Y?Or.NodeStatus.Changed:Or.NodeStatus.Unchanged),Y?W:null}async function x(S){const F=[];async function B(I){for(const R of I){R.children?.length&&await B(R.children);const j=await y(R);j&&F.push(j)}}return await B(S),{patches:F,updatedTree:mu(S)}}function E(S){if(S.length===0)return`<div class="no-diff">${a("comp.noChanges")}</div>`;const F=S.map(I=>I+`
|
|
307
|
-
`).join(""),B=i.value?"dark":"light";return QR(F,{outputFormat:"side-by-side",colorScheme:B})}function C(){if(!p.value)return;c.clear(),p.value.querySelectorAll(".d2h-file-wrapper").forEach((F,B)=>{const R=F.querySelector(".d2h-file-name")?.textContent??`file-${B}`,j=F.getAttribute("id");c.set(R,j??"")})}function b(){const S=window.location.hash.slice(1);if(!S||!p.value)return;const F=p.value.querySelector(`#${CSS.escape(S)}`);F&&(F.scrollIntoView({behavior:"smooth",block:"start"}),F.classList.add("highlight-file"),setTimeout(()=>{F.classList.remove("highlight-file")},1500))}function A(){b()}function v(S){const F=c.get(S);F&&(window.location.hash=F)}async function P(){await ln();const{patches:S,updatedTree:F}=await x(s.value);u.value=E(S),s.value=F,await ln(),C(),b()}return yr(()=>JSON.stringify(s.value),()=>P(),{immediate:!0}),yr(()=>r.formatCode,()=>P()),ib(window,"hashchange",A),e({scrollToFile:v}),(S,F)=>(be(),nt("div",{ref_key:"diffContainer",ref:p,class:"relative",innerHTML:u.value},null,8,uj))}}),pj=En(lj,[["__scopeId","data-v-9fd6359c"]]),cj={class:"flex items-center gap-4"},hj={class:"w-full h-full flex flex-col"},dj={class:"flex items-center gap-2 justify-start p-1 h-[30px] bg-[var(--el-fill-color-light)]"},fj={class:"flex items-center gap-2 justify-start p-1 h-[30px] bg-[var(--el-fill-color-light)] px-2"},mj={class:"flex-1 overflow-auto"},yj=St({__name:"DiffDialog",props:{resultTree:{type:Array,default:()=>[]},oldMeta:{type:Object,default:()=>({version:"10.1.0"})},newMeta:{type:Object,default:()=>({version:"10.1.1"})}},emits:["refresh"],setup(t,{expose:e}){const{t:r}=Lt(),s=t,i=Hs("diffCode"),a=sr(!1),u=sr([]),p=sr(!1);function c(){p.value=!0}function m(){p.value=!1}function f(d){i.value?.scrollToFile(d.path)}return yr(()=>s.resultTree,()=>{u.value=mu(s.resultTree)},{immediate:!0}),e({open:c,close:m}),(d,D)=>(be(),Ke(ne(cg),{modelValue:p.value,"onUpdate:modelValue":D[3]||(D[3]=y=>p.value=y),class:"diff-container",title:"",width:"55%","show-close":"",fullscreen:""},{header:oe(()=>[We("div",cj,[de(ne(Ks),{type:"primary",size:"small",onClick:D[0]||(D[0]=y=>d.$emit("refresh"))},{default:oe(()=>[lt(He(ne(r)("common.refresh")),1)]),_:1})])]),default:oe(()=>[de(ne(yu),{class:"w-full h-full card-no-padding"},{default:oe(()=>[de(ne(sg),{class:"w-full h-full"},{default:oe(()=>[de(ne(Ep),{size:"20%",collapsible:""},{default:oe(()=>[We("div",hj,[We("div",dj,[de(ne(di),{type:"warning",size:"small"},{default:oe(()=>[lt(He(ne(r)("comp.diff.changed")),1)]),_:1}),de(ne(di),{type:"info",size:"small"},{default:oe(()=>[lt(He(ne(r)("comp.diff.unchanged")),1)]),_:1}),de(ne(di),{type:"success",size:"small"},{default:oe(()=>[lt(He(ne(r)("comp.diff.added")),1)]),_:1}),de(ne(di),{type:"danger",size:"small"},{default:oe(()=>[lt(He(ne(r)("comp.diff.deleted")),1)]),_:1})]),de(ne(Hr),{class:"flex-1 bg-[var(--el-fill-color-blank)]"},{default:oe(()=>[de(ne(mR),{resultTree:u.value,onNodeClick:f},null,8,["resultTree"])]),_:1})])]),_:1}),de(ne(Ep),{class:"w-full h-full overflow-hidden flex flex-col"},{default:oe(()=>[We("div",fj,[de(ne(nb),{modelValue:a.value,"onUpdate:modelValue":D[1]||(D[1]=y=>a.value=y),"inactive-text":ne(r)("comp.formatCode")},null,8,["modelValue","inactive-text"]),de(ne(ab),{effect:"dark",content:ne(r)("comp.formatCodeTooltip"),placement:"right"},{default:oe(()=>[de(ne(fb),{icon:"material-symbols:question-mark-rounded"})]),_:1},8,["content"])]),We("div",mj,[de(ne(Hr),null,{default:oe(()=>[de(ne(pj),{ref:"diffCode",modelValue:u.value,"onUpdate:modelValue":D[2]||(D[2]=y=>u.value=y),oldMeta:t.oldMeta,newMeta:t.newMeta,formatCode:a.value},null,8,["modelValue","oldMeta","newMeta","formatCode"])]),_:1})])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),gj=En(yj,[["__scopeId","data-v-d0e0d42a"]]),Dj={class:"flex justify-between items-center w-full gap-1"},xj=St({__name:"PreviewPathItem",props:{modelValue:{},pathConfig:{},cascaderOptions:{},disabled:{type:Boolean}},emits:["change","view"],setup(t,{emit:e}){const r=t,s=e,{t:i}=Lt(),a={value:"path",label:"name"},u=Le(()=>{const f=r.modelValue[r.pathConfig.pathKey];return Array.isArray(f)?f:[]}),p=Le(()=>r.modelValue.activeTab===r.pathConfig.type);function c(f){s("change",f??[])}function m(){s("view")}return(f,d)=>{const D=ob,y=fc("Icon"),x=Ks,E=Ua;return be(),Ke(E,{label:t.pathConfig.label+":",prop:t.pathConfig.prop},{default:oe(()=>[We("div",Dj,[de(D,{class:"flex-1","model-value":u.value,options:t.cascaderOptions,props:a,placeholder:ne(i)("comp.pleaseSelectPreviewFile"),clearable:t.pathConfig.clearable,onChange:c},null,8,["model-value","options","placeholder","clearable"]),de(x,{type:p.value?"primary":"info",circle:"",disabled:t.disabled,onClick:ag(m,["stop"])},{default:oe(()=>[de(y,{icon:"material-symbols:eye-tracking"})]),_:1},8,["type","disabled"])])]),_:1},8,["label","prop"])}}}),Ej={class:"text-right"},Aj=St({__name:"Item",props:dc({index:{}},{modelValue:{default:()=>({id:"",desc:"",miniPath:[],fullPath:[],activeTab:Ee.COMP_EDIT_TAB_TYPE_MINI})},modelModifiers:{}}),emits:["update:modelValue"],setup(t,{expose:e}){const r={LOCAL_PREFIX:Ee.COMP_PREVIEW_PREFIX_LOCAL,VUE_EXTENSION:".vue"},s=t,i=hc(t,"modelValue"),{t:a}=Lt(),u=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),p=Hs("form"),c=Le(()=>u.compCarouselIndex===f.value),m=Le(()=>s.index===0),f=Le(()=>u.previewList.findIndex(B=>B._id===i.value._id)),d=Le(()=>u.selectedFolder?.path),D=Le(()=>u.directory?Ap.mapTree(u.directory,I=>{const R=I.type==="file"&&I.name.endsWith(r.VUE_EXTENSION);return I.disabled=I.type==="file"&&!R,I}).children??[]:[]),y=Le(()=>m.value?{miniPath:[{required:!0,validator:(B,I,R)=>{!I||I.length===0?R(new Error(a("comp.pleaseSelectPreviewFile"))):R()},trigger:"blur"}]}:{}),x=Le(()=>[{type:Ee.COMP_EDIT_TAB_TYPE_MINI,label:a("comp.miniPreviewFile"),prop:m.value?"miniPath":"",pathKey:"miniPath",urlKey:"miniEntryUrl",clearable:!m.value},{type:Ee.COMP_EDIT_TAB_TYPE_FULL,label:a("comp.fullPreviewFile"),prop:"fullPath",pathKey:"fullPath",urlKey:"fullEntryUrl",clearable:!0}]);function E(B){if(!B.length)return"";const I=u.isOnlineUpdate||u.isAddComp,R=u.isOfflineUpdate&&u.editCompId;if(I){const j=Fa.getPreviewUrl(d.value,B);return`${r.LOCAL_PREFIX}/${j}`}return R?C(B):""}function C(B){const R=og(u.editCompId)().latestVersionToFileAccessPath,j=new Map(R.map(({path:N,signedUrl:q})=>[N,q])),V=ka.replaceBackslashWithSlash(B.at(-1)??"");return j.get(V)??""}function b(B){i.value={...i.value,desc:B}}function A(){u.setCompCarouselIndex(f.value)}function v(B){i.value={...i.value,activeTab:B}}async function P(B,I){const R=I??[],j=E(R),V={[Ee.COMP_EDIT_TAB_TYPE_MINI]:{miniPath:R,miniEntryUrl:j},[Ee.COMP_EDIT_TAB_TYPE_FULL]:{fullPath:R,fullEntryUrl:j}};i.value={...i.value,...V[B]},B===Ee.COMP_EDIT_TAB_TYPE_MINI&&m.value&&(await ln(),p.value?.validateField("miniPath"))}function S(){i.value._id&&u.delPreviewCompItemById(i.value._id)}function F(){return p.value?.validate()}return e({validateForm:F}),(B,I)=>{const R=Du,j=Ua,V=gu,N=Ks,q=yu;return be(),Ke(q,{"body-class":"!p-0",class:ig(["cursor-pointer p-[5px] overflow-auto",{active:c.value}]),onClick:A},{default:oe(()=>[de(V,{ref:"form",model:i.value,rules:y.value,"label-width":"auto"},{default:oe(()=>[(be(!0),nt(Rs,null,fi(x.value,te=>(be(),Ke(xj,{key:te.type,modelValue:i.value,"onUpdate:modelValue":I[0]||(I[0]=W=>i.value=W),"path-config":te,"cascader-options":D.value,disabled:!c.value,onChange:W=>P(te.type,W),onView:()=>v(te.type)},null,8,["modelValue","path-config","cascader-options","disabled","onChange","onView"]))),128)),de(j,{label:ne(a)("comp.remarkDesc")+":"},{default:oe(()=>[de(R,{"model-value":i.value.desc,type:"textarea",onInput:b},null,8,["model-value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),We("div",Ej,[de(N,{type:"danger",disabled:m.value,onClick:ag(S,["stop"])},{default:oe(()=>[lt(He(ne(a)("common.delete")),1)]),_:1},8,["disabled"])])]),_:1},8,["class"])}}}),Cj=En(Aj,[["__scopeId","data-v-520b6ba3"]]),bj={class:"size-full overflow-auto flex flex-col gap-2 items-start"},Tj=St({__name:"index",setup(t){const{t:e}=Lt(),r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=Kt(Ee.PROVIDE_KEY_CALLBACKS),i=Hs("items");async function a(){if(r.previewList.length>=5){xu.error(e("comp.maxPreviewEntry",{n:5}));return}r.addPreviewCompItem({_id:nu(),miniPath:[],fullPath:[],activeTab:Ee.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}),await ln(),r.setCompCarouselIndex(r.previewList.length-1)}function u(p){const{_id:c}=p;c&&r.updatePreviewCompItemById(c,p)}return s.set(Ee.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM,()=>{i.value?.forEach(p=>{p?.validateForm()})}),(p,c)=>{const m=Ks,f=Hr;return be(),nt("div",bj,[de(m,{type:"primary",onClick:a},{default:oe(()=>[lt(He(ne(e)("comp.addPreviewEntry")),1)]),_:1}),de(f,{class:"flex-1 overflow-x-hidden size-full"},{default:oe(()=>[de(ne(ug),{class:"size-full",isEmpty:!ne(r).previewList.length,emptyDescription:ne(e)("comp.pleaseAddPreviewEntry")},{default:oe(()=>[de(ne(Vb),{"item-min-width":350},{default:oe(()=>[(be(!0),nt(Rs,null,fi(ne(r).previewList,(d,D)=>(be(),Ke(Cj,{ref_for:!0,ref:"items",key:d._id,index:D,"model-value":d,"onUpdate:modelValue":u},null,8,["index","model-value"]))),128))]),_:1})]),_:1},8,["isEmpty","emptyDescription"])]),_:1})])}}}),vj=St({__name:"ExtraInfo",setup(t){const{t:e}=Lt(),r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=Kt(Ee.PROVIDE_KEY_CALLBACKS),i=Hs("form"),a=sr(200),u={name:[{required:!0,validator:(d,D,y)=>{if(!D)return y(new Error(e("comp.compNameRequired")));ka.validateCompName(D)?y():y(new Error(e("comp.compNameNamingRule")))},trigger:["blur"]}],description:[{required:!0,message:e("comp.remarksDescRequired"),trigger:"blur"},{min:3,max:a.value,message:e("comp.lengthBetween",{min:3,max:a.value}),trigger:"blur"}]},p=Le(()=>r.selectedFolder.basename);async function c(){await i.value?.validate()}function m(d){r.setExtraInfo({...r.extraInfo,description:d.trim()})}function f(d){r.setExtraInfo({...r.extraInfo,name:d.trim()})}return yr(p,d=>{r.extraInfo.name||r.setExtraInfo({...r.extraInfo,name:d})},{immediate:!0}),s.set(Ee.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM,c),(d,D)=>{const y=Du,x=Ua,E=Hr;return be(),Ke(E,{class:"size-full"},{default:oe(()=>[de(ne(gu),{ref:"form","label-width":"auto",model:ne(r).extraInfo,rules:u},{default:oe(()=>[de(x,{label:ne(e)("comp.name")+":",prop:"name"},{default:oe(()=>[de(y,{maxlength:50,"show-word-limit":"","model-value":ne(r).extraInfo.name,placeholder:ne(e)("comp.pleaseInputCompName"),onInput:f},null,8,["model-value","placeholder"])]),_:1},8,["label"]),de(x,{label:ne(e)("comp.remarksDesc")+":",prop:"description"},{default:oe(()=>[de(y,{maxlength:a.value,"show-word-limit":"","model-value":ne(r).extraInfo.description,placeholder:ne(e)("comp.pleaseInputRemarks"),rows:4,type:"textarea",onInput:m},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1})}}}),Sj={class:"flex items-center gap-[50px]"},wj=St({__name:"Dir",setup(t){const e={children:"children",label:"name"},r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=sr([]);return yr(()=>r.directory,i=>{i?.children&&(s.value=mu(i.children))},{deep:!0,immediate:!0}),(i,a)=>{const u=tg,p=Hr;return be(),Ke(p,{class:"size-full tree-container"},{default:oe(()=>[de(u,{data:s.value,props:e},{default:oe(({node:c})=>[We("div",Sj,[We("span",null,He(c.label),1)])]),_:1},8,["data"])]),_:1})}}}),Pj={class:"flex gap-[10px] items-center justify-center"},Fj={class:"inline-block"},kj={key:0,class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},Ij={class:"inline-block"},Nj={class:"size-full flex justify-center items-center"},Bj={class:"inline-block"},_j={class:"flex gap-2"},Lj={key:0},Oj={class:"ml-auto"},Mj=St({__name:"Deps",setup(t){const{t:e}=Lt(),r=Le(()=>({TITLE_LOCAL:e("comp.localDep"),TITLE_ONLINE:e("comp.onlineDep"),TITLE_FINAL:e("comp.finalDep"),LABEL_LOCAL:e("comp.localVersion"),LABEL_ONLINE:e("comp.onlineVersion"),EMPTY_ONLINE_DEPS:e("comp.onlineDepEmpty"),TAG_CONSISTENT:e("comp.versionConsistent"),TAG_CHANGE:e("comp.versionChange"),TAG_CHANGE_CONFIRMED:e("comp.versionChangeConfirmed"),TAG_ADD:e("comp.newDep"),TYPE_CONSISTENT:"consistent",TYPE_CHANGE:"change",TYPE_ADD:"add",SOURCE_LOCAL:"local",SOURCE_ONLINE:"online"})),s=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),i=sr({}),a=Le(()=>Fa.handleDepData(s.compDep)),u=Le(()=>Fa.handleDepData(s.onlineCompDep)),p=Le(()=>{const f={};return u.value.length===0&&s.isEditComp||a.value.forEach(d=>{const D={},y=u.value.find(x=>x.name===d.name);y?iu.isVersionEqual(d.version??"",y.version??"")?(D.selectedVersion=d.version,D.type=r.value.TYPE_CONSISTENT):(D.type=r.value.TYPE_CHANGE,D.selectedVersion=i.value[d.name]||"",D.versions=[{version:d.version,type:r.value.SOURCE_LOCAL},{version:y.version,type:r.value.SOURCE_ONLINE}]):(D.selectedVersion=d.version,D.type=r.value.TYPE_ADD),f[d.name]=D}),f}),c=Le(()=>Object.keys(u.value).length===0);function m(f,d){i.value[f]=d}return yr(()=>p.value,f=>{for(const d in f){const D=f[d];D.type!==r.value.TYPE_CHANGE&&(i.value[d]=D.selectedVersion)}},{immediate:!0,deep:!0}),Eb(()=>{s.setAffirmCompDep(mu(i.value))}),(f,d)=>{const D=lb,y=ub,x=yu,E=cb,C=pb,b=di,A=Hr;return be(),Ke(A,{class:"size-full"},{default:oe(()=>[We("div",Pj,[de(x,{"body-class":"!p-0",class:"p-[5px]"},{default:oe(()=>[We("div",null,[de(y,{title:r.value.TITLE_LOCAL,column:1,border:"","label-width":"auto"},{default:oe(()=>[(be(!0),nt(Rs,null,fi(a.value,(v,P)=>(be(),Ke(D,{key:P},{label:oe(()=>[We("div",Fj,He(v.name),1)]),default:oe(()=>[lt(" "+He(v.version),1)]),_:2},1024))),128))]),_:1},8,["title"])])]),_:1}),c.value?rr("",!0):(be(),nt("div",kj,"+")),c.value?rr("",!0):(be(),Ke(x,{key:1,"body-class":"!p-0",class:"p-[5px]"},{default:oe(()=>[de(ne(ug),{isEmpty:c.value,class:"size-full"},{"empty-content":oe(()=>[We("div",Nj,He(r.value.EMPTY_ONLINE_DEPS),1)]),default:oe(()=>[de(y,{title:r.value.TITLE_ONLINE,column:1,border:"","label-width":"auto"},{default:oe(()=>[(be(!0),nt(Rs,null,fi(u.value,(v,P)=>(be(),Ke(D,{key:P},{label:oe(()=>[We("div",Ij,He(v.name),1)]),default:oe(()=>[lt(" "+He(v.version),1)]),_:2},1024))),128))]),_:1},8,["title"])]),_:1},8,["isEmpty"])]),_:1})),d[0]||(d[0]=We("div",{class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},"=",-1)),de(x,{"body-class":"!p-0 !overflow-hidden",class:"p-[5px] overflow-hidden"},{default:oe(()=>[de(y,{title:r.value.TITLE_FINAL,column:1,border:"","label-width":"auto"},{default:oe(()=>[(be(!0),nt(Rs,null,fi(p.value,(v,P)=>(be(),Ke(D,{key:P},{label:oe(()=>[We("div",Bj,He(P),1)]),default:oe(()=>[We("div",_j,[We("div",null,[v.versions?.length?(be(),Ke(C,{key:1,"model-value":v.selectedVersion,size:"small",class:"ml-[10px]",onChange:S=>m(P,S)},{default:oe(()=>[(be(!0),nt(Rs,null,fi(v.versions,S=>(be(),Ke(E,{key:S.version,value:S.version},{default:oe(()=>[We("span",null,He(S.type===r.value.SOURCE_LOCAL?r.value.LABEL_LOCAL:r.value.LABEL_ONLINE)+" "+He(S.version),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["model-value","onChange"])):(be(),nt("span",Lj,He(v.selectedVersion),1))]),We("div",Oj,[v.type===r.value.TYPE_CONSISTENT?(be(),Ke(b,{key:0,type:"info","disable-transitions":""},{default:oe(()=>[lt(He(r.value.TAG_CONSISTENT),1)]),_:1})):v.type===r.value.TYPE_CHANGE&&!v.selectedVersion?(be(),Ke(b,{key:1,type:"danger","disable-transitions":""},{default:oe(()=>[lt(He(r.value.TAG_CHANGE),1)]),_:1})):v.type===r.value.TYPE_CHANGE&&v.selectedVersion?(be(),Ke(b,{key:2,type:"success","disable-transitions":""},{default:oe(()=>[lt(He(r.value.TAG_CHANGE_CONFIRMED),1)]),_:1})):v.type===r.value.TYPE_ADD?(be(),Ke(b,{key:3,type:"success","disable-transitions":""},{default:oe(()=>[lt(He(r.value.TAG_ADD),1)]),_:1})):rr("",!0)])])]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})])]),_:1})}}}),$j={class:"flex items-center gap-[4px]"},Rj={key:0},jj=St({__name:"VersionInput",props:dc({disabled:{type:Boolean},latestVersion:{}},{modelValue:{default:()=>({major:"",minor:"",patch:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=hc(t,"modelValue"),{t:s}=Lt(),i=["major","minor","patch"],a={width:"60px"};function u(m){return`${m.major}.${m.minor}.${m.patch}`}function p(m,f){const d={...r.value,[f]:m},D=u(d);if(c(D)){xu.warning(s("comp.versionCannotBeLessThanLatest",{version:e.latestVersion}));return}r.value=d}function c(m){return e.latestVersion?iu.compareVersions(m,e.latestVersion)===Ee.VERSION_COMPARE_LESS:!1}return(m,f)=>{const d=Du;return be(),nt("div",$j,[(be(),nt(Rs,null,fi(i,(D,y)=>(be(),nt(Rs,{key:D},[de(d,{"model-value":r.value[D],style:a,min:0,size:"small",type:"number",disabled:t.disabled,onInput:x=>p(x,D)},null,8,["model-value","disabled","onInput"]),y<i.length-1?(be(),nt("span",Rj,".")):rr("",!0)],64))),64))])}}}),Uj={class:"flex gap-2 items-center"},Vj={key:0},qj={class:"flex items-center gap-2"},Hj={key:0},zj={class:"text-red-500"},Wj=St({__name:"index",emits:["showDiff"],setup(t){const{t:e}=Lt(),r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=Kt(Ee.PROVIDE_KEY_CALLBACKS),i=sr({major:"",minor:"",patch:""}),a=Le(()=>r.selectedFolder?.path??""),u=Le(()=>r.configStatus?.compJsonPath??""),p=Le(()=>r.configStatus?.entryIndexPath??""),c=Le(()=>r.configStatus?.errorMsg??""),m=Le(()=>r.isNeedAddVersion||r.isEditCompFileChange);async function f(){const E=await $s.v1Comp.compcontrollerCheck({compPath:a.value});r.setConfigStatus(E.data)}async function d(){await $s.v1Comp.compcontrollerGeneratecompjson({compPath:a.value});const E=await $s.v1Comp.compcontrollerDir({compPath:a.value}),{tree:C,files:b}=E.data;r.setOriginalDirectory(C),r.setOriginalDirectoryList(b),await f(),xu.success(e("common.generateSuccess"))}function D(E){const[C="1",b="0",A="0"]=E.split(".");return{major:C,minor:b,patch:A}}function y(E){const{major:C,minor:b,patch:A}=E,v=["undefined","null"];return![C,b,A].some(P=>P===""||mb.isType(P,v))}function x(E){return`${E.major}.${E.minor}.${E.patch}`}return yr(i,async(E,C)=>{if(!y(E))return;const b=x(E),A=C?x(C):"";b!==A&&(await $s.v1Comp.compcontrollerUpdateversion({compPath:a.value,version:b}),await f(),r.setLocalCompVersion(b))},{deep:!0}),yr(()=>r.localCompVersion,E=>{E&&(i.value=D(E))},{immediate:!0}),s.set(Ee.COMP_METHOD_KEY_CHECK_COMP_CONFIG,f),(E,C)=>{const b=Ua,A=Ks,v=di,P=gu,S=Hr;return be(),Ke(S,{class:"size-full"},{default:oe(()=>[de(P,{"label-width":"auto"},{default:oe(()=>[de(b,{label:ne(e)("comp.entryFile")+":"},{default:oe(()=>[We("span",null,He(p.value),1)]),_:1},8,["label"]),de(b,{label:ne(e)("comp.configFile")+":"},{default:oe(()=>[We("div",Uj,[u.value?(be(),nt("span",Vj,He(u.value),1)):(be(),Ke(A,{key:1,size:"small",onClick:d},{default:oe(()=>[lt(He(ne(e)("common.generate")),1)]),_:1})),c.value&&u.value?(be(),Ke(A,{key:2,size:"small",onClick:d},{default:oe(()=>[lt(He(ne(e)("common.regenerate")),1)]),_:1})):rr("",!0)])]),_:1},8,["label"]),de(b,{label:ne(e)("comp.version")+":"},{default:oe(()=>[We("div",qj,[de(jj,{modelValue:i.value,"onUpdate:modelValue":C[0]||(C[0]=F=>i.value=F),"latest-version":ne(r).prodCompVersion,disabled:!ne(r).compFileIsChange},null,8,["modelValue","latest-version","disabled"]),m.value?(be(),nt("div",Hj,[ne(r).isNeedAddVersion?(be(),Ke(v,{key:0,type:"danger","disable-transitions":!0},{default:oe(()=>[lt(He(ne(e)("comp.fileChangedNeedVersion")),1)]),_:1})):rr("",!0),ne(r).isEditCompFileChange?(be(),Ke(A,{key:1,size:"small",class:"ml-2",onClick:C[1]||(C[1]=F=>E.$emit("showDiff"))},{default:oe(()=>[lt(He(ne(e)("comp.viewFileChanges")),1)]),_:1})):rr("",!0)])):ne(r).isVersionChangeButFileSame?(be(),Ke(v,{key:1,type:"danger","disable-transitions":!0},{default:oe(()=>[lt(He(ne(e)("comp.versionChangedButFileSame")),1)]),_:1})):rr("",!0)])]),_:1},8,["label"]),c.value?(be(),Ke(b,{key:0,label:ne(e)("comp.errorMsg")+":"},{default:oe(()=>[We("span",zj,He(c.value),1)]),_:1},8,["label"])):rr("",!0)]),_:1})]),_:1})}}}),Jj=St({__name:"UpgradeLog",setup(t){const{t:e}=Lt(),r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=Kt(Ee.PROVIDE_KEY_CALLBACKS),i=sr(200),a=Hs("form"),u=Le(()=>({upgradeLog:[{required:!0,message:e("comp.pleaseInputUpgradeLog"),trigger:"blur"},{min:3,max:i.value,message:e("comp.lengthBetween",{min:3,max:i.value}),trigger:"blur"}]}));function p(m){r.setUpgradeInfo({...r.upgradeInfo,upgradeLog:m})}async function c(){await a.value?.validate()}return s.set(Ee.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM,c),(m,f)=>{const d=Du,D=Ua,y=Hr;return be(),Ke(y,{class:"size-full"},{default:oe(()=>[de(ne(gu),{ref:"form","label-width":"auto",model:ne(r).upgradeInfo,rules:u.value},{default:oe(()=>[de(D,{label:ne(e)("comp.upgradeLog")+":",prop:"upgradeLog"},{default:oe(()=>[de(d,{maxlength:i.value,"show-word-limit":"","model-value":ne(r).upgradeInfo.upgradeLog,placeholder:ne(e)("comp.pleaseInputUpgradeLog"),rows:4,type:"textarea",onInput:p},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})}}}),Kj={class:"size-full"},Xj=["src"],Gj=St({__name:"index",props:{compType:{},iuid:{}},setup(t){const e=t,r=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),s=Kt(Ee.PROVIDE_KEY_CALLBACKS),{instanceUid:i,messageListener:a,sendMessageToTargetIframe:u}=Nb(),p=Fb(!1,window.__GLOBAL_CONFIG__.subPort),{createIframeParams:c}=kb(),{addListener:m}=a(),f=yb(),D=rg().value,{locale:y}=Lt(),x=(()=>{const S={topOrigin:window.location.origin,instanceUid:[i.value,e.iuid].filter(Boolean).join(",")??"",isSfc:!0},F={params:c(S),isDark:D.toString()},B=new URLSearchParams(F).toString();return`${p}/${Ee.WEBSITE_PATH_ITEM}/${e.compType}?${B}`})(),E=Hs("iframe"),C=Le(()=>r.selectedFolder?.path),{IFRAME_POST_MESSAGE_TYPE:b}=Ib;async function A(){const F=Pb(r.compDep,f.deps).map(R=>R.name),B=await $s.v1Module.modulecontrollerPrebuild({deps:F}),{entryNameToFile:I={}}=B.data;return I}function v(S,F,B,I){m(S,Sf(F,async()=>{const R=E.value?.contentWindow;if(R){const j=I?await I(F.value):F.value;u(R,B,j,p)}}).triggerCallback)}v(b.COMP_PREVIEW_LIST_GET,Le(()=>r.previewList),b.COMP_PREVIEW_LIST_SET),v(b.SELECTED_FOLDER_GET,Le(()=>r.selectedFolder),b.SELECTED_FOLDER_SET),v(b.SHOW_REFRESH_BTN_GET,Le(()=>r.isShowRefreshBtn),b.SHOW_REFRESH_BTN_SET),v(b.IS_ONLINE_UPDATE_GET,Le(()=>r.isOnlineUpdate),b.IS_ONLINE_UPDATE_SET),v(b.CAROUSEL_INDEX_GET,Le(()=>r.compCarouselIndex),b.CAROUSEL_INDEX_SET),v(b.IS_ADD_GET,Le(()=>r.isAddComp),b.IS_ADD_SET),v(b.BG_COLOR_GET,Le(()=>r.compBgColor),b.BG_COLOR_SET),v(b.COMP_RENDER_INFO_GET,Le(()=>r.compDep),b.COMP_RENDER_INFO_SET,async S=>({entryNameToFile:await A(),compDep:S,signedUrls:r.signedUrls})),m(b.COMP_EDIT_TAB_TYPE_SET,S=>{S._id&&r.updatePreviewCompItemById(S._id,S)}),m(b.ACTION_REFRESH,S=>{if(S.activeTab===Ee.COMP_EDIT_TAB_TYPE_MINI&&S.miniPath?.length){const F=Fa.getPreviewUrl(C?.value||"",S.miniPath),B=F?`${Ee.COMP_PREVIEW_PREFIX_LOCAL}/${F}?v=${nu()}`:"";r.updatePreviewCompItemById(S._id,{...S,miniEntryUrl:B})}if(S.activeTab===Ee.COMP_EDIT_TAB_TYPE_FULL&&S.fullPath?.length){const F=Fa.getPreviewUrl(C?.value||"",S.fullPath||[]),B=F?`${Ee.COMP_PREVIEW_PREFIX_LOCAL}/${F}?v=${nu()}`:"";r.updatePreviewCompItemById(S._id,{...S,fullEntryUrl:B})}}),m(b.BG_COLOR_SET,S=>{r.setCompBgColor(S)}),m(Pl.LOCALE_GET,()=>{const{stopWatch:S,triggerCallback:F}=Sf(Le(()=>y.value),()=>{const B=E.value?.contentWindow;B?u(B,Pl.LOCALE_SET,y.value,p):S()});F()});const P=sr(!1);return m(Pl.COMP_RENDER_ERROR_SET,({hasError:S,hasWarn:F})=>{P.value=S||F}),yr(P,S=>{S?s.set(Ee.COMP_METHOD_KEY_GET_COMP_ERROR,()=>!0):s.delete(Ee.COMP_METHOD_KEY_GET_COMP_ERROR)},{immediate:!0}),(S,F)=>(be(),nt("div",Kj,[We("iframe",{ref:"iframe",class:"size-full",src:ne(x),frameborder:"0"},null,8,Xj)]))}}),eg=St({__name:"MarkdownPreview",props:{result:{}},setup(t){const{t:e}=Lt(),r=Ab(),{markdownSrc:s}=lg();function i(){const{href:a}=r.resolve({name:"mdPreview",query:{markdownSrc:s.value}});window.open(a,"_blank")}return(a,u)=>{const p=fc("Icon"),c=Ks,m=Hr;return be(),Ke(m,{"wrap-class":"md-container",class:"relative"},{default:oe(()=>[ne(s)?(be(),Ke(c,{key:0,type:"primary",circle:"",title:ne(e)("common.newPage"),class:"absolute top-0 right-3 z-100",onClick:i},{default:oe(()=>[de(p,{icon:"material-symbols:screen-share-rounded"})]),_:1},8,["title"])):rr("",!0),de(pg,{result:t.result,src:ne(s),"show-toc":!0,scrollContainer:".md-container","is-debug":!0},null,8,["result","src"])]),_:1})}}}),Yj=t=>{const{locale:e}=Lt();return{src:Le(()=>`/${Ee.WEBSITE_PATH_MAIN}/md/${t.replace(".md",`.${e.value}.md`)}`)}},Qj={class:"h-[70vh] overflow-hidden flex flex-col"},Zj={key:0,class:"flex justify-end"},eU={class:"text-lg"},tU={class:"text-lg"},rU=St({__name:"index",props:{isAction:{type:Boolean,default:!0}},setup(t,{expose:e}){const{t:r}=Lt(),s=sr(!1),{src:i}=Yj("PUT_TREATY.md");let a;function u(m){s.value=!0,a=m}function p(){s.value=!1}function c(m){a?.(m),p()}return e({open:u,close:p}),(m,f)=>{const d=Hr,D=Ks;return be(),Ke(ne(cg),{modelValue:s.value,"onUpdate:modelValue":f[2]||(f[2]=y=>s.value=y),title:"",width:"55%","show-close":"",top:"10vh"},{default:oe(()=>[We("div",Qj,[de(d,{class:"flex-1 flex justify-center"},{default:oe(()=>[de(pg,{src:ne(i)},null,8,["src"])]),_:1}),t.isAction?(be(),nt("div",Zj,[de(D,{onClick:f[0]||(f[0]=y=>c(!1))},{default:oe(()=>[We("span",eU,He(ne(r)("team.reject")),1)]),_:1}),de(D,{type:"primary",onClick:f[1]||(f[1]=y=>c(!0))},{default:oe(()=>[We("span",tU,He(ne(r)("team.agree")),1)]),_:1})])):rr("",!0)])]),_:1},8,["modelValue"])}}}),sU={class:"size-full"},iU={class:"flex justify-between mt-auto items-center p-1"},nU={class:"flex gap-2"},aU={class:"text-xs"},oU={class:"flex-1 overflow-hidden p-2"},uU={class:"flex justify-center p-1"},lU=St({__name:"index",emits:["confirmUpload","reload"],setup(t,{emit:e}){const r=e,{t:s}=Lt(),i=vb(),a=Kt(Ee.PROVIDE_KEY_COMP_EDIT_STORE),u=Sb(new Map);Cb(Ee.PROVIDE_KEY_CALLBACKS,u);const p=Hs("diffDialog"),c=Hs("dialogPutTreaty"),m=sr([]),f=Le(()=>a.selectedFolder?.path),d=Le(()=>({version:s("comp.remoteVersionPrefix")+a.prodCompVersion})),D=Le(()=>({version:s("comp.localVersionPrefix")+a.localCompVersion})),{markdownSrc:y}=lg(),x=Bb(y),E=Le(()=>[{label:s("comp.previewConfig"),value:Ee.TAB_TYPE_PREVIEW,isDot:a.previewIsError,component:Tj,visible:()=>!0,validate:()=>a.previewIsError?{valid:!1,callbackKey:Ee.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM}:{valid:!0}},{label:s("comp.baseInfo"),value:Ee.TAB_TYPE_EXTRA,isDot:a.extraIsError,component:vj,visible:()=>!0,validate:()=>a.extraIsError?{valid:!1,callbackKey:Ee.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM}:{valid:!0}},{label:s("comp.checkConfig"),value:Ee.TAB_TYPE_CONFIG,isDot:a.configIsError,component:Wj,visible:()=>a.isOnlineUpdate||a.isAddComp,validate:()=>a.configIsError?{valid:!1,callbackKey:Ee.COMP_METHOD_KEY_CHECK_COMP_CONFIG}:{valid:!0}},{label:s("comp.dep"),value:Ee.TAB_TYPE_DEPS,isDot:a.compDepIsError,component:Mj,visible:()=>a.isOnlineUpdate||a.isAddComp,validate:()=>a.compDepIsError?{valid:!1}:{valid:!0}},{label:s("comp.upgradeLog"),value:Ee.TAB_TYPE_UPGRADE_LOG,isDot:a.upgradeLogIsError,component:Jj,visible:()=>a.isShowUpgradeLogTab,validate:()=>a.upgradeLogIsError?{valid:!1,callbackKey:Ee.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM}:{valid:!0}},{label:"README.md",value:Ee.TAB_TYPE_README,isDot:a.markdownIsError,component:eg,visible:()=>!a.isOfflineUpdate,validate:()=>a.markdownIsError?{valid:!1}:{valid:!0}},{label:s("comp.dir"),value:Ee.TAB_TYPE_DIR,component:wj,visible:()=>a.isOnlineUpdate||a.isAddComp}]),C=Le(()=>E.value.filter(W=>W.visible?.()??!0)),b=Le(()=>C.value.find(Y=>Y.value===a.activeName)?.component||{render:()=>null}),A=Le(()=>b.value===eg?{result:x.result.value}:{});function v(){c.value?.open()}function P(W,Y){Y(W),a.setCompBgColor(W??"")}function S(W){a.setActiveName(W)}async function F(){for(const W of u.keys())if(W.startsWith(Ee.COMP_METHOD_KEY_GET_COMP_ERROR)&&u.get(W)?.())return!0;return!1}async function B(W){if(W.start(),await F()&&(a.isOnlineUpdate||a.isAddComp)){xu.error(s("message.error.pleaseFixCompileError")),W.end();return}for(const Y of C.value){if(!Y.validate)continue;const ge=Y.validate();if(!ge.valid){a.setActiveName(""),await ln(),a.setActiveName(Y.value),ge.callbackKey&&u.get(ge.callbackKey)?.(),W.end();return}}r("confirmUpload",{end:W.end})}async function I(){const W=await $s.v1Comp.compcontrollerCheck({compPath:f.value});a.setConfigStatus(W.data)}async function R(){const Y=(a.originalDirectory.children||[]).find(he=>he.name===Ee.COMP_CONFIG_FILENAME);if(!Y)return;const ge=await $s.v1Comp.compcontrollerFile({filePath:Y.path}),{content:Ae}=ge.data,Ie=JSON.parse(Ae);a.setLocalCompVersion(Ie.version)}async function j(){await q(),m.value=N(),await ln(),p.value?.open()}async function V(){await q(),m.value=N()}function N(){const W=a.localDirectory?.children??[],Y=a.onlineDirectory?.children??[],ge=Or.mergeAndMarkTree(W,Y),Ie=og(a.editCompId)().latestVersionToFileAccessPath;function he(G){for(const X of G){if(X.type==="file"){X.path=ka.replaceBackslashWithSlash(X.path);const we={type:"old",accessPath:Ie.find(K=>K.path===X.path)?.signedUrl??""},gt=`${f.value.replace(Ee.FILE_MANAGER_DIRNAME,"")}${X.path}`,se={type:"new",accessPath:`${Ee.COMP_PREVIEW_PREFIX_LOCAL}/${gt}`};X.content=[we,se]}X.children?.length&&he(X.children)}}return he(ge),ge}async function q(){const W=await $s.v1Comp.compcontrollerDir({compPath:f.value}),{tree:Y,files:ge}=W.data;a.setOriginalDirectory(Y),a.setOriginalDirectoryList(ge)}function te(){r("reload")}return yr(()=>a.originalDirectory,async()=>{await R()},{immediate:!0,deep:!0}),yr(()=>f.value,async(W,Y)=>{W===Y||!W||(await q(),await I())},{immediate:!0}),yr(x.result,W=>{if(!W)return;const{headings:Y=[]}=W;if(Y.length){const ge=Y.every(Ae=>{const Ie=Ae.tokens.map(G=>G?.text||"").join(""),{valid:he}=ka.validateHash(Ie);return he});a.setMarkdownValid(ge)}}),(W,Y)=>{const ge=fc("Icon"),Ae=hb,Ie=db,he=yu,G=Ep,X=Ks,le=sg;return be(),nt("div",sU,[de(le,{class:"size-full",layout:"vertical"},{default:oe(()=>[de(G,{class:"size-full",size:"50%",min:300},{default:oe(()=>[de(he,{"body-class":"!p-0",class:"size-full"},{default:oe(()=>[de(ne(_b),{class:"size-full flex flex-col",bg:ne(a).compBgColor},{default:oe(({bg:we,updateColor:Qe})=>[de(Gj,{class:"flex-1",compType:ne(Ee).IFRAME_ROUTES.ITEM.EDIT_PANEL,iuid:ne(i)?.uid},null,8,["compType","iuid"]),We("div",iU,[We("div",nU,[ne(a).isOnlineUpdate||ne(a).isAddComp?(be(),Ke(Ae,{key:0,title:ne(s)("comp.reload"),class:"ml-2",type:"primary",underline:"always",onClick:te},{default:oe(()=>[de(ge,{icon:"material-symbols:frame-reload",height:ne(Ee).COMP_ACTION_ICON_HEIGHT},null,8,["height"])]),_:1},8,["title"])):rr("",!0),de(Ae,{title:ne(s)("comp.uploadProtocol"),type:"primary",underline:"always",onClick:Y[0]||(Y[0]=gt=>v())},{default:oe(()=>[de(ge,{icon:"material-symbols:docs",height:ne(Ee).COMP_ACTION_ICON_HEIGHT},null,8,["height"])]),_:1},8,["title"])]),We("div",aU,[We("span",null,He(ne(s)("comp.bgPanel"))+":",1),de(Ie,{modelValue:we,clearable:"",onChange:gt=>P(gt,Qe),onActiveChange:gt=>P(gt,Qe)},null,8,["modelValue","onChange","onActiveChange"])])])]),_:1},8,["bg"])]),_:1})]),_:1}),de(G,{class:"size-full",collapsible:""},{default:oe(()=>[de(he,{"body-class":"!p-0 flex flex-col",class:"size-full"},{default:oe(()=>[de(he,{"body-class":"!p-0"},{default:oe(()=>[de(ne(Lb),{"model-value":ne(a).activeName,options:C.value,onChange:S},{default:oe(({item:we})=>[de(ne(Rb),{"is-dot":we.isDot},{default:oe(()=>[lt(He(we.label),1)]),_:2},1032,["is-dot"])]),_:1},8,["model-value","options"])]),_:1}),We("div",oU,[de(ne(gb),null,{default:oe(()=>[(be(),Ke(bb,null,[(be(),Ke(Tb(b.value),ng(A.value,{onShowDiff:j}),null,16))],1024))]),_:1})]),We("div",uU,[de(ne(Ob),null,{default:oe(({instance:we,loading:Qe})=>[de(X,{loading:Qe,type:"primary",class:"w-[200px]",round:"",onClick:gt=>B(we)},{default:oe(()=>[lt(He(ne(a).compSubmitBtnText),1)]),_:1},8,["loading","onClick"])]),_:1})])]),_:1})]),_:1})]),_:1}),de(rU,{ref:"dialogPutTreaty",isAction:!1},null,512),m.value.length?(be(),Ke(ne(gj),{key:0,ref:"diffDialog",resultTree:m.value,oldMeta:d.value,newMeta:D.value,onRefresh:V},null,8,["resultTree","oldMeta","newMeta"])):rr("",!0)])}}}),MV=En(lU,[["__scopeId","data-v-3756da76"]]),$V=(t,e)=>{const{t:r}=Lt();return wb(`compEdit_${t}`,{state:()=>({scopeId:t,extraInfo:{},upgradeInfo:{},previewList:[],compDep:[],onlineCompDep:[],affirmCompDep:{},activeName:"preview",compCarouselIndex:0,selectedFolder:{},originalDirectory:{},originalDirectoryList:[],compDialogType:e??"",editCompId:"",compBgColor:"",configStatus:{},compDetail:{},localCompHash:"",remoteCompHash:"",localCompVersion:"",loading:!1,compUpdateType:"",signedUrls:[],markdownValid:!0}),getters:{isInitState:s=>s.compDialogType.trim()==="",isEditComp:s=>s.compDialogType===Ee.DIALOG_TYPE_EDIT,isAddComp:s=>s.compDialogType===Ee.DIALOG_TYPE_ADD,isOnlineUpdate:s=>s.compUpdateType===Ee.COMP_UPDATE_TYPE_ONLINE,isOfflineUpdate:s=>s.compUpdateType===Ee.COMP_UPDATE_TYPE_OFFLINE,isShowRefreshBtn(){return this.isOnlineUpdate||this.isAddComp},prodCompVersion:s=>s.compDetail?.version||"",versionCompareResult(){return!this.localCompVersion||!this.prodCompVersion?Ee.VERSION_COMPARE_GREATER:iu.compareVersions(this.localCompVersion,this.prodCompVersion)},isEditCompFileChange(){return this.compFileIsChange&&this.isEditComp},isNeedAddVersion(){return this.versionCompareResult!==1&&this.isEditCompFileChange},compSubmitBtnText(){return this.isEditComp?r("comp.update"):this.isAddComp?r("comp.upload"):""},previewIsError(s){return this.isInitState||this.loading?!1:!s.previewList[0]?.miniPath?.length},configIsException:s=>{const{errorMsg:i}=s.configStatus;return!!i},configIsError(){return this.isInitState||this.loading||this.isOfflineUpdate?!1:!!(this.isNeedAddVersion||this.configIsException||this.isVersionChangeButFileSame)},extraIsError(s){if(this.isInitState||this.loading)return!1;const i=s.extraInfo.name?.trim()||"";return(s.extraInfo?.description||"").length<3||!ka.validateCompName(i)},compDepIsError(s){if(!s.onlineCompDep.length||this.isOfflineUpdate)return!1;let i=!1;return s.compDep.forEach(a=>{const u=s.onlineCompDep.find(m=>m.name===a.name),p=s.affirmCompDep[a.name]??s.affirmCompDep[a?.parent?.name??""];!iu.isVersionEqual(a?.version??"",u?.version??"")&&!p&&(i=!0)}),i},compFileIsChange:s=>s.localCompHash!==s.remoteCompHash,isVersionChangeButFileSame(){return this.versionCompareResult!==Ee.VERSION_COMPARE_SAME&&!this.compFileIsChange&&this.isEditComp},isShowUpgradeLogTab(s){return this.isInitState||this.loading?!1:!!(this.compFileIsChange&&s.editCompId)},upgradeLogIsError(s){if(this.isOfflineUpdate)return!1;const i=s.upgradeInfo?.upgradeLog||"",a=this.versionCompareResult===Ee.VERSION_COMPARE_GREATER;return(i.length||0)<3&&(this.compFileIsChange||a)&&this.isEditComp},markdownIsError(s){return this.hasMdFile?!s.markdownValid:!1},affirmCompDepVersion:s=>s.compDep.map(i=>{const a=s.affirmCompDep[i.name],u=s.affirmCompDep[i?.parent?.name??""],p=a??u??i.version,c=i.parent?{parent:{...i.parent,version:p}}:{};return{...i,version:p,...c}}),localDirectory:s=>{const{srcPath:i,sep:a}=window.__GLOBAL_CONFIG__,u=s.selectedFolder.path;if(!u||Object.keys(s.originalDirectory).length===0)return null;const p=u.replace(Ee.FILE_MANAGER_DIRNAME,"").replaceAll("/",a);return Ap.mapTree(s.originalDirectory,m=>(m.path=m.path.replace(`${i}${a}${p}`,""),m))},onlineDirectory:s=>s.compDetail.files?.length?Ap.convertFlatToTree(s.compDetail.files,{pathSeparator:"\\",createNode:(i,a,u)=>({name:a,path:u.startsWith("\\")?u:"\\"+u,type:i,children:[]})}):null,directory(){return this.localDirectory?this.localDirectory:this.onlineDirectory},hasMdFile(){return this.directory?.children?.find(s=>s.name===Ee.COMP_README_FILENAME)!==void 0}},actions:{setMarkdownValid(s){this.$patch({markdownValid:s})},setSignedUrls(s){this.$patch({signedUrls:s})},setCompUpdateType(s){this.$patch({compUpdateType:s})},setLocalCompVersion(s){this.$patch({localCompVersion:s})},setOriginalDirectory(s){this.$patch({originalDirectory:s})},setOriginalDirectoryList(s){this.$patch({originalDirectoryList:s})},setLoading(s){this.$patch({loading:s})},setLocalCompHash(s){this.$patch({localCompHash:s})},setRemoteCompHash(s){this.$patch({remoteCompHash:s})},setCompDetail(s){this.$patch({compDetail:s})},setUpgradeInfo(s){this.$patch({upgradeInfo:s})},setConfigStatus(s){this.$patch({configStatus:s})},setExtraInfo(s){this.$patch({extraInfo:s})},addPreviewCompItem(s){this.$patch(i=>{i.previewList.push(s)})},delPreviewCompItemById(s){this.$patch(i=>{i.previewList=i.previewList.filter(a=>a._id!==s)})},setPreviewCompList(s){this.$patch({previewList:s})},updatePreviewCompItemById(s,i){this.$patch(a=>{const u=a.previewList.findIndex(p=>p._id===s);u!==-1&&(a.previewList[u]=i)})},initPreviewCompList(){this.$patch(s=>{s.compDialogType===Ee.DIALOG_TYPE_ADD&&(s.previewList=[{_id:nu(),miniPath:[],fullPath:[],activeTab:Ee.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}])})},setCompDep(s){this.$patch({compDep:s})},setOnlineCompDep(s){this.$patch({onlineCompDep:s})},setAffirmCompDep(s){this.$patch({affirmCompDep:s})},setActiveName(s){this.$patch({activeName:s})},setCompCarouselIndex(s){this.$patch({compCarouselIndex:s})},setSelectedFolder(s){this.$patch({selectedFolder:s})},setEditCompId(s){this.$patch({editCompId:s})},setCompBgColor(s){this.$patch({compBgColor:s})},getCompSubmitParams(){if(this.extraIsError)throw new Error("组件信息不完整,请检查组件名称和描述");if(this.previewIsError)throw new Error("预览配置不完整,请检查预览配置");if(this.configIsError)throw new Error("配置检查未通过,请检查配置");const s=this.selectedFolder.path,{name:i,description:a}=this.extraInfo,u=this.previewList.map(m=>({miniPath:m.miniPath,fullPath:m.fullPath,desc:m?.desc||""})),p=this.upgradeInfo?.upgradeLog??"",c=this.isEditComp?{upgradeDesc:p}:{};return{compPath:s,dep:this.affirmCompDepVersion,name:i,desc:a,previewConfigs:u,bgColor:this.compBgColor,...c}}}})};export{MV as C,rU as _,$V as c,Yj as u};
|