UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

11 lines • 320 kB
import{b as os,g as Ze}from"./chunk-VPRTJUIN.js";function ps(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;s[i]=t[i]}return s}function D(t,e){let{line:s,column:i,index:r}=t;return new z(s,i+e,r+e)}function st(t,e,s){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:s})}function Ps({toMessage:t,code:e,reasonCode:s,syntaxPlugin:i}){let r=s==="MissingPlugin"||s==="MissingOneOfPlugins";return function a(n,o){let l=new SyntaxError;return l.code=e,l.reasonCode=s,l.loc=n,l.pos=n.index,l.syntaxPlugin=i,r&&(l.missingPlugin=o.missingPlugin),st(l,"clone",function(h={}){let{line:u,column:d,index:x}=h.loc??n;return a(new z(u,d,x),Object.assign({},o,h.details))}),st(l,"details",o),Object.defineProperty(l,"message",{configurable:!0,get(){let h=`${t(o)} (${n.line}:${n.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),l}}function L(t,e){if(Array.isArray(t))return i=>L(i,t[0]);let s={};for(let i of Object.keys(t)){let r=t[i],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=ps(a,xs),l=typeof n=="string"?()=>n:n;s[i]=Ps(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:l},e?{syntaxPlugin:e}:{},o))}return s}function As(){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 gs(t){let e=As();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 s of Object.keys(e))t[s]!=null&&(e[s]=t[s]);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}function Y(t){return it(t.loc.start,"index"),it(t.loc.end,"index"),t}function b(t,e={}){e.keyword=t;let s=y(t,e);return Re.set(t,s),s}function k(t,e){return y(t,{beforeExpr:g,binop:e})}function y(t,e={}){return++ie,je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt(t,e)),ie}function T(t,e={}){return++ie,Re.set(t,ie),je.push(t),_e.push(e.binop??-1),Ve.push(e.beforeExpr??!1),ze.push(e.startsExpr??!1),He.push(e.prefix??!1),Ue.push(new Nt("name",e)),ie}function E(t){return t>=93&&t<=133}function Ss(t){return t<=92}function F(t){return t>=58&&t<=133}function kt(t){return t>=58&&t<=137}function ws(t){return Ve[t]}function te(t){return ze[t]}function Is(t){return t>=29&&t<=33}function rt(t){return t>=129&&t<=131}function Ns(t){return t>=90&&t<=92}function qe(t){return t>=58&&t<=92}function ks(t){return t>=39&&t<=59}function vs(t){return t===34}function Ds(t){return He[t]}function Fs(t){return t>=121&&t<=123}function Ls(t){return t>=124&&t<=130}function H(t){return je[t]}function ce(t){return _e[t]}function Ms(t){return t===57}function ke(t){return t>=24&&t<=25}function vt(t){return Ue[t]}function ve(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function M(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Bs.test(String.fromCharCode(t)):ve(t,Ft)}function $(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&&Os.test(String.fromCharCode(t)):ve(t,Ft)||ve(t,Rs)}function Lt(t,e){return e&&t==="await"||t==="enum"}function Mt(t,e){return Lt(t,e)||js.has(t)}function Bt(t){return _s.has(t)}function Ot(t,e){return Mt(t,e)||Bt(t)}function Vs(t){return Us.has(t)}function zs(t,e,s){return t===64&&e===64&&M(s)}function qs(t){return Hs.has(t)}function Ws(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function at(t){return t.importKind==="type"||t.importKind==="typeof"}function Gs(t,e){let s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}function W(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function nt(t,e,s){for(let i=e;i<s;i++)if(W(t.charCodeAt(i)))return!0;return!1}function ei(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}}function _(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function J(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return J(t.object)+"."+J(t.property);throw new Error("Node had unexpected type: "+t.type)}function ue(t,e){return(t?2:0)|(e?1:0)}function Rt(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function ni(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function X(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function q(t,e,s){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>s.start?X(t,s.comments):Rt(i,s.comments)}function ht(t,e,s,i,r,a){let n=s,o=i,l=r,h="",u=null,d=s,{length:x}=e;for(;;){if(s>=x){a.unterminated(n,o,l),h+=e.slice(d,s);break}let A=e.charCodeAt(s);if(pi(t,A,e,s)){h+=e.slice(d,s);break}if(A===92){h+=e.slice(d,s);let I=ci(e,s,i,r,t==="template",a);I.ch===null&&!u?u={pos:s,lineStart:i,curLine:r}:h+=I.ch,{pos:s,lineStart:i,curLine:r}=I,d=s}else A===8232||A===8233?(++s,++r,i=s):A===10||A===13?t==="template"?(h+=e.slice(d,s)+` `,++s,A===13&&e.charCodeAt(s)===10&&++s,++r,d=i=s):a.unterminated(n,o,l):++s}return{pos:s,str:h,firstInvalidLoc:u,lineStart:i,curLine:r}}function pi(t,e,s,i){return t==="template"?e===96||e===36&&s.charCodeAt(i+1)===123:e===(t==="double"?34:39)}function ci(t,e,s,i,r,a){let n=!r;e++;let o=h=>({pos:e,ch:h,lineStart:s,curLine:i}),l=t.charCodeAt(e++);switch(l){case 110:return o(` `);case 114:return o("\r");case 120:{let h;return{code:h,pos:e}=De(t,e,s,i,2,!1,n,a),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:e}=_t(t,e,s,i,n,a),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:s=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(e-1,s,i);default:if(l>=48&&l<=55){let h=e-1,u=/^[0-7]+/.exec(t.slice(h,e+2))[0],d=parseInt(u,8);d>255&&(u=u.slice(0,-1),d=parseInt(u,8)),e+=u.length-1;let x=t.charCodeAt(e);if(u!=="0"||x===56||x===57){if(r)return o(null);a.strictNumericEscape(h,s,i)}return o(String.fromCharCode(d))}return o(String.fromCharCode(l))}}function De(t,e,s,i,r,a,n,o){let l=e,h;return{n:h,pos:e}=jt(t,e,s,i,16,r,a,!1,o,!n),h===null&&(n?o.invalidEscapeSequence(l,s,i):e=l-1),{code:h,pos:e}}function jt(t,e,s,i,r,a,n,o,l,h){let u=e,d=r===16?ot.hex:ot.decBinOct,x=r===16?he.hex:r===10?he.dec:r===8?he.oct:he.bin,A=!1,I=0;for(let N=0,S=a??1/0;N<S;++N){let w=t.charCodeAt(e),v;if(w===95&&o!=="bail"){let Ae=t.charCodeAt(e-1),ge=t.charCodeAt(e+1);if(o){if(Number.isNaN(ge)||!x(ge)||d.has(Ae)||d.has(ge)){if(h)return{n:null,pos:e};l.unexpectedNumericSeparator(e,s,i)}}else{if(h)return{n:null,pos:e};l.numericSeparatorInEscapeSequence(e,s,i)}++e;continue}if(w>=97?v=w-97+10:w>=65?v=w-65+10:li(w)?v=w-48:v=1/0,v>=r){if(v<=9&&h)return{n:null,pos:e};if(v<=9&&l.invalidDigit(e,s,i,r))v=0;else if(n)v=0,A=!0;else break}++e,I=I*r+v}return e===u||a!=null&&e-u!==a||A?{n:null,pos:e}:{n:I,pos:e}}function _t(t,e,s,i,r,a){let n=t.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=De(t,e,s,i,t.indexOf("}",e)-e,!0,r,a),++e,o!==null&&o>1114111)if(r)a.invalidCodePoint(e,s,i);else return{code:null,pos:e}}else({code:o,pos:e}=De(t,e,s,i,4,!1,r,a));return{code:o,pos:e}}function Z(t,e,s){return new z(s,t-e,t)}function Pi(){return new ye(3)}function Ai(){return new Vt(1)}function gi(){return new Vt(2)}function zt(){return new ye}function Ci(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function pt(t){if(!t)throw new Error("Assert fail")}function Si(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 ct(t){return t==="private"||t==="public"||t==="protected"}function wi(t){return t==="in"||t==="out"}function Me(t){if(t.extra?.parenthesized)return!1;switch(t.type){case"Identifier":return!0;case"MemberExpression":return!t.computed&&Me(t.object);case"TSInstantiationExpression":return Me(t.expression);default:return!1}}function Ni(t){if(t.type!=="MemberExpression")return!1;let{computed:e,property:s}=t;return e&&s.type!=="StringLiteral"&&(s.type!=="TemplateLiteral"||s.expressions.length>0)?!1:qt(t.object)}function ki(t,e){let{type:s}=t;if(t.extra?.parenthesized)return!1;if(e){if(s==="Literal"){let{value:i}=t;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(Ht(t,e)||vi(t,e)||s==="TemplateLiteral"&&t.expressions.length===0||Ni(t))}function Ht(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function vi(t,e){if(t.type==="UnaryExpression"){let{operator:s,argument:i}=t;if(s==="-"&&Ht(i,e))return!0}return!1}function qt(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:qt(t.object)}function Li(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 s=t.get("decorators").allowCallParenthesized;if(s!=null&&typeof s!="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(!dt.includes(e)){let s=dt.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}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 s=t.get("pipelineOperator").topicToken;if(!mt.includes(s)){let i=mt.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}}}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.")}}function Ui(t,e,s){for(let i=0;i<t.length;i++){let r=t[i],{type:a}=r;typeof a=="number"&&(r.type=vt(a))}return t}function Jt(t,e){if(e?.sourceType==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let s=se(e,t),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return e.sourceType="script",se(e,t).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return e.sourceType="script",se(e,t).parse()}catch{}throw s}}else return se(e,t).parse()}function Wt(t,e){let s=se(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function _i(t){let e={};for(let s of Object.keys(t))e[s]=vt(t[s]);return e}function se(t,e){let s=Kt,i=new Map;if(t?.plugins){for(let r of t.plugins){let a,n;typeof r=="string"?a=r:[a,n]=r,i.has(a)||i.set(a,n||{})}Li(i),s=Vi(i)}return new s(t,e,i)}function Vi(t){let e=[];for(let r of Mi)t.has(r)&&e.push(r);let s=e.join("|"),i=ft.get(s);if(!i){i=Kt;for(let r of e)i=$t[r](i);ft.set(s,i)}return i}function xe(t){return(e,s,i)=>{let r=!!i?.backwards;if(s===!1)return!1;let{length:a}=e,n=s;for(;n>=0&&n<a;){let o=e.charAt(n);if(t instanceof RegExp){if(!t.test(o))return n}else if(!t.includes(o))return n;r?n--:n++}return n===-1||n===a?n:!1}}function qi(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}function Ki(t,e,s){let i=!!s?.backwards;if(e===!1)return!1;let r=t.charAt(e);if(i){if(t.charAt(e-1)==="\r"&&r===` `)return e-2;if(yt(r))return e-1}else{if(r==="\r"&&t.charAt(e+1)===` `)return e+2;if(yt(r))return e+1}return e}function Wi(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Hi(t,e):e}function Gi(t,e){let s=null,i=e;for(;i!==s;)s=i,i=zi(t,i),i=$i(t,i),i=Xi(t,i),i=Ji(t,i);return i}function Qi(t){let e=[];for(let s of t)try{return s()}catch(i){e.push(i)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function Zi(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(` `);return e===-1?t:t.slice(0,e)}function ir(t){return this[t<0?this.length+t:t]}function R(t){let e=t.range?.[0]??t.start,s=(t.declaration?.decorators??t.decorators)?.[0];return s?Math.min(R(s),e):e}function B(t){return t.range?.[1]??t.end}function nr(t){let e=new Set(t);return s=>e.has(s?.type)}function pr(t){return Ie.has(t)||Ie.set(t,Ye(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(t.value)),Ie.get(t)}function ur(t){if(!Ye(t))return!1;let e=`*${t.value}*`.split(` `);return e.length>1&&e.every(s=>s.trimStart()[0]==="*")}function dr(t){return Ne.has(t)||Ne.set(t,ur(t)),Ne.get(t)}function mr(t){if(t.length<2)return;let e;for(let s=t.length-1;s>=0;s--){let i=t[s];if(e&&B(i)===R(e)&&xt(i)&&xt(e)&&(t.splice(s+1,1),i.value+="*//*"+e.value,i.range=[R(i),B(e)]),!lr(i)&&!Ye(i))throw new TypeError(`Unknown comment type: "${i.type}".`);e=i}}function yr(t){return t!==null&&typeof t=="object"}function re(t){if(ee!==null&&typeof ee.property){let e=ee;return ee=re.prototype=null,e}return ee=re.prototype=t??Object.create(null),new re}function Ar(t){return re(t)}function gr(t,e="type"){Ar(t);function s(i){let r=i[e],a=t[r];if(!Array.isArray(a))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return a}return s}function me(t,e){if(!xr(t))return t;if(Array.isArray(t)){for(let i=0;i<t.length;i++)t[i]=me(t[i],e);return t}if(e.onEnter){let i=e.onEnter(t)??t;if(i!==t)return me(i,e);t=i}let s=Cr(t);for(let i=0;i<s.length;i++)t[s[i]]=me(t[s[i]],e);return e.onLeave&&(t=e.onLeave(t)||t),t}function wr(t,e){let{parser:s,text:i}=e,{comments:r}=t,a=s==="oxc"&&e.oxcAstType==="ts";fr(r);let n=t.type==="File"?t.program:t;n.interpreter&&(r.unshift(n.interpreter),delete n.interpreter),a&&t.hashbang&&(r.unshift(t.hashbang),delete t.hashbang),t.type==="Program"&&(t.range=[0,i.length]);let o;return t=Sr(t,{onEnter(l){switch(l.type){case"ParenthesizedExpression":{let{expression:h}=l,u=R(l);if(h.type==="TypeCastExpression")return h.range=[u,B(l)],h;let d=!1;if(!a){if(!o){o=[];for(let A of r)cr(A)&&o.push(B(A))}let x=sr(0,o,A=>A<=u);d=x&&i.slice(x,u).trim().length===0}return d?void 0:(h.extra={...h.extra,parenthesized:!0},h)}case"TemplateLiteral":if(l.expressions.length!==l.quasis.length-1)throw new Error("Malformed template literal.");break;case"TemplateElement":if(s==="flow"||s==="hermes"||s==="espree"||s==="typescript"||a){let h=R(l)+1,u=B(l)-(l.tail?1:2);l.range=[h,u]}break;case"VariableDeclaration":{let h=ar(0,l.declarations,-1);h?.init&&i[B(h)]!==";"&&(l.range=[R(l),B(h)]);break}case"TSParenthesizedType":return l.typeAnnotation;case"TopicReference":t.extra={...t.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(l.types.length===1)return l.types[0];break;case"ImportExpression":s==="hermes"&&l.attributes&&!l.options&&(l.options=l.attributes);break}},onLeave(l){switch(l.type){case"LogicalExpression":if(Gt(l))return Be(l);break;case"TSImportType":!l.source&&l.argument.type==="TSLiteralType"&&(l.source=l.argument.literal,delete l.argument);break}}}),t}function Gt(t){return t.type==="LogicalExpression"&&t.right.type==="LogicalExpression"&&t.operator===t.right.operator}function Be(t){return Gt(t)?Be({type:"LogicalExpression",operator:t.operator,left:Be({type:"LogicalExpression",operator:t.operator,left:t.left,right:t.right.left,range:[R(t.left),B(t.right.left)]}),right:t.right.right,range:[R(t),B(t)]}):t}function Nr(t,e){let s=new SyntaxError(t+" ("+e.loc.start.line+":"+e.loc.start.column+")");return Object.assign(s,e)}function kr(t){let{message:e,loc:s,reasonCode:i}=t;if(!s)return t;let{line:r,column:a}=s,n=t;(i==="MissingPlugin"||i==="MissingOneOfPlugins")&&(e="Unexpected token.",n=void 0);let o=` (${r}:${a})`;return e.endsWith(o)&&(e=e.slice(0,-o.length)),e.startsWith(Pt)&&(e=e.slice(Pt.length)),Yt(e,{loc:{start:{line:r,column:a+1}},cause:n})}function jr(t){let e=t.match(Mr);return e?e[0].trimStart():""}function _r(t){t=le(0,t.replace(Lr,"").replace(Fr,""),Rr,"$1");let e="";for(;e!==t;)e=t,t=le(0,t,Or,` $1 $2 `);t=t.replace(At,"").trimEnd();let s=Object.create(null),i=le(0,t,gt,"").replace(At,"").trimEnd(),r;for(;r=gt.exec(t);){let a=le(0,r[2],Br,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let n=s[r[1]];s[r[1]]=[...Ur,...Array.isArray(n)?n:[n],a]}else s[r[1]]=a}return{comments:i,pragmas:s}}function Zt(t){let e=Xt(t);e&&(t=t.slice(e.length+1));let s=jr(t),{pragmas:i,comments:r}=_r(s);return{shebang:e,text:t,pragmas:i,comments:r}}function Hr(t){let{pragmas:e}=Zt(t);return zr.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function qr(t){let{pragmas:e}=Zt(t);return Vr.some(s=>Object.prototype.hasOwnProperty.call(e,s))}function $r(t){return t=typeof t=="function"?{parse:t}:t,{astFormat:"estree",hasPragma:Hr,hasIgnorePragma:qr,locStart:R,locEnd:B,...t}}function Kr(t){if(typeof t=="string"){if(t=t.toLowerCase(),/\.(?:mjs|mts)$/iu.test(t))return Qe;if(/\.(?:cjs|cts)$/iu.test(t))return es}}function Jr(t,e){let{type:s="JsExpressionRoot",rootMarker:i,text:r}=e,{tokens:a,comments:n}=t;return delete t.tokens,delete t.comments,{tokens:a,comments:n,type:s,node:t,range:[0,r.length],rootMarker:i}}function Gr(t,e){if(e?.endsWith(".js.flow"))return!0;let s=Xt(t);s&&(t=t.slice(s.length));let i=Yi(t,0);return i!==!1&&(t=t.slice(0,i)),Xr.test(t)}function Yr(t,e,s){let i=t(e,s),r=i.errors.find(a=>!Zr.has(a.reasonCode));if(r)throw r;return i}function Qr({isExpression:t=!1,optionsCombinations:e}){return(s,i={})=>{let{filepath:r}=i;if(typeof r!="string"&&(r=void 0),(i.parser==="babel"||i.parser==="__babel_estree")&&Gr(s,r))return i.parser="babel-flow",is.parse(s,i);let a=e,n=i.__babelSourceType??Kr(r);n&&n!==Qe&&(a=a.map(u=>({...u,sourceType:n,...n===es?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/u.test(s);s.includes("|>")?a=(o?[...bt,Tt]:bt).flatMap(u=>a.map(d=>U([u],d))):o&&(a=a.map(u=>U([Tt],u)));let l=t?Wt:Jt,h;try{h=Qi(a.map(u=>()=>Yr(l,s,u)))}catch({errors:[u]}){throw Qt(u)}return t&&(h=ts(h,{text:s,rootMarker:i.rootMarker})),Ir(h,{text:s})}}function ta(t){return Array.isArray(t)&&t.length>0}function sa(t){let e=Jt(t,ns),{program:s}=e;if(s.body.length===0&&s.directives.length===0&&!s.interpreter)return e}function Pe(t,e={}){let{allowComments:s=!0,allowEmpty:i=!1}=e,r;try{r=Wt(t,ns)}catch(a){if(i&&a.code==="BABEL_PARSER_SYNTAX_ERROR"&&a.reasonCode==="ParseExpressionEmptyInput")try{r=sa(t)}catch{}if(!r)throw Qt(a)}if(!s&&as(r.comments))throw V(r.comments[0],"Comment");return r=ts(r,{type:"JsonRoot",text:t}),r.node.type==="File"?delete r.node:K(r.node),r}function V(t,e){let[s,i]=[t.loc.start,t.loc.end].map(({line:r,column:a})=>({line:r,column:a+1}));return Yt(`${e} is not allowed in JSON.`,{loc:{start:s,end:i}})}function K(t){switch(t.type){case"ArrayExpression":for(let e of t.elements)e!==null&&K(e);return;case"ObjectExpression":for(let e of t.properties)K(e);return;case"ObjectProperty":if(t.computed)throw V(t.key,"Computed key");if(t.shorthand)throw V(t.key,"Shorthand property");t.key.type!=="Identifier"&&K(t.key),K(t.value);return;case"UnaryExpression":{let{operator:e,argument:s}=t;if(e!=="+"&&e!=="-")throw V(t,`Operator '${t.operator}'`);if(s.type==="NumericLiteral"||s.type==="Identifier"&&(s.name==="Infinity"||s.name==="NaN"))return;throw V(s,`Operator '${e}' before '${s.type}'`)}case"Identifier":if(t.name!=="Infinity"&&t.name!=="NaN"&&t.name!=="undefined")throw V(t,`Identifier '${t.name}'`);return;case"TemplateLiteral":if(as(t.expressions))throw V(t.expressions[0],"'TemplateLiteral' with expression");for(let e of t.quasis)K(e);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw V(t,`'${t.type}'`)}}var hs,Oe,ls,It,z,fe,et,cs,tt,pe,us,ds,ms,fs,ys,xs,c,Ts,it,bs,ne,C,g,m,Te,Q,j,Es,Nt,Re,ie,Ue,je,_e,Ve,ze,He,Cs,$e,Dt,Bs,Os,Ft,Rs,Ke,Us,js,_s,Hs,Je,We,$s,Ks,Js,P,Xs,Ys,Qs,Zs,oe,be,Ee,O,ti,si,ii,ri,ai,oi,hi,li,ot,he,ui,di,mi,fi,yi,ye,Vt,xi,Ti,de,Fe,lt,bi,Le,Ei,Ce,f,Ii,ut,Di,Fi,dt,mt,$t,Mi,Bi,Se,Oi,Ri,we,ji,Kt,la,ft,pa,zi,ca,Hi,$i,yt,Ji,Xi,Yi,Xt,Xe,er,tr,sr,rr,ar,Ge,or,Ye,hr,lr,Ie,cr,Ne,xt,fr,xr,ee,Pr,Tr,p,br,Er,Cr,Sr,ua,Ir,Yt,Pt,Qt,vr,Dr,le,Fr,Lr,Mr,Br,At,Or,gt,Rr,Ur,Vr,zr,ae,Qe,es,ts,G,Wr,Tt,bt,U,Xr,Zr,ss,Et,Ct,St,wt,is,ea,rs,as,ns,ia,ra,aa,na,oa,ha=os(()=>{Ze();hs=Object.defineProperty,Oe=(t,e)=>{for(var s in e)hs(t,s,{get:e[s],enumerable:!0})},ls={};Oe(ls,{parsers:()=>oa});It={};Oe(It,{__babel_estree:()=>ea,__js_expression:()=>St,__ts_expression:()=>wt,__vue_event_binding:()=>Et,__vue_expression:()=>St,__vue_ts_event_binding:()=>Ct,__vue_ts_expression:()=>wt,babel:()=>Et,"babel-flow":()=>is,"babel-ts":()=>Ct});z=class{line;column;index;constructor(t,e,s){this.line=t,this.column=e,this.index=s}},fe=class{start;end;filename;identifierName;constructor(t,e){this.start=t,this.end=e}};et="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",cs={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:et},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:et}},tt={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"},pe=t=>t.type==="UpdateExpression"?tt.UpdateExpression[`${t.prefix}`]:tt[t.type],us={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\`. - 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. - 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 ${pe(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${pe(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${pe(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."},ds={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."},ms={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)}\`.`},fs=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),ys=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 ${pe({type:t})}; please wrap it in parentheses.`},{}),xs=["message"];c=Object.assign({},L(cs),L(us),L(ds),L(ms),L`pipelineOperator`(ys));({defineProperty:Ts}=Object),it=(t,e)=>{t&&Ts(t,e,{enumerable:!1,value:t[e]})};bs=t=>class extends t{parse(){let e=Y(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(Y)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let s=this.estreeParseLiteral(null);return s.decimal=String(s.value||e),s}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,s){let i=this.startNodeAtNode(e);return i.expression=e,this.finishNodeAt(i,"ChainExpression",s)}directiveToStmt(e){let s=e.value;delete e.value,this.castNodeTo(s,"Literal"),s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=this.castNodeTo(e,"ExpressionStatement");return i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:s,end:i,loc:r,range:a,raw:n,value:o}=e,l=Object.create(e.constructor.prototype);return l.type="Literal",l.start=s,l.end=i,l.loc=r,l.range=a,l.raw=n,l.value=o,l}initFunction(e,s){super.initFunction(e,s),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,s,i,r,a){super.parseBlockBody(e,s,i,r,a);let n=e.directives.map(o=>this.directiveToStmt(o));e.body=n.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.convertPrivateNameToPrivateIdentifier(e)}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return delete e.id,e.name=s,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return e.type==="PrivateIdentifier"}getPrivateNameSV(e){return e.name}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,r,a,n,o=!1){let l=this.startNode();l.kind=e.kind,l=super.parseMethod(l,s,i,r,a,n,o),delete l.kind;let{typeParameters:h}=e;h&&(delete e.typeParameters,l.typeParameters=h,this.resetStartLocationFromNode(l,h));let u=this.castNodeTo(l,this.hasPlugin("typescript")&&!l.body?"TSEmptyBodyFunctionExpression":"FunctionExpression");return e.value=u,n==="ClassPrivateMethod"&&(e.computed=!1),this.hasPlugin("typescript")&&e.abstract?(delete e.abstract,this.finishNode(e,"TSAbstractMethodDefinition")):n==="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 s=super.parseClassProperty(...e);return s.abstract&&this.hasPlugin("typescript")?(delete s.abstract,this.castNodeTo(s,"TSAbstractPropertyDefinition")):this.castNodeTo(s,"PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return s.abstract&&this.hasPlugin("typescript")?this.castNodeTo(s,"TSAbstractPropertyDefinition"):this.castNodeTo(s,"PropertyDefinition"),s.computed=!1,s}parseClassAccessorProperty(e){let s=super.parseClassAccessorProperty(e);return s.abstract&&this.hasPlugin("typescript")?(delete s.abstract,this.castNodeTo(s,"TSAbstractAccessorProperty")):this.castNodeTo(s,"AccessorProperty"),s}parseObjectProperty(e,s,i,r){let a=super.parseObjectProperty(e,s,i,r);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,s,i,r){return e==="Property"?"value":super.isValidLVal(e,s,i,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(c.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(c.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);return i.callee.type==="Import"?(this.castNodeTo(i,"ImportExpression"),i.source=i.arguments[0],i.options=i.arguments[1]??null,delete i.arguments,delete i.callee):i.type==="OptionalCallExpression"?this.castNodeTo(i,"CallExpression"):i.optional=!1,i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(r,"ExportAllDeclaration"),r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{let{declaration:a}=r;a?.type==="ClassDeclaration"&&a.decorators?.length>0&&a.start===r.start&&this.resetStartLocation(r,i)}break}return r}stopParseSubscript(e,s){let i=super.stopParseSubscript(e,s);return s.optionalChainMember?this.estreeParseChainExpression(i,e.loc.end):i}parseMember(e,s,i,r,a){let n=super.parseMember(e,s,i,r,a);return n.type==="OptionalMemberExpression"?this.castNodeTo(n,"MemberExpression"):n.optional=!1,n}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,s){let i=super.castNodeTo(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}cloneIdentifier(e){let s=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(s),s}cloneStringLiteral(e){return e.type==="Literal"?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,s,i){return Y(super.finishNodeAt(e,s,i))}finishNode(e,s){let i=super.finishNode(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}resetStartLocation(e,s){super.resetStartLocation(e,s),Y(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Y(e)}},ne=class{constructor(t,e){this.token=t,this.preserveSpace=!!e}token;preserveSpace},C={brace:new ne("{"),j_oTag:new ne("<tag"),j_cTag:new ne("</tag"),j_expr:new ne("<tag>...</tag>",!0)},g=!0,m=!0,Te=!0,Q=!0,j=!0,Es=!0,Nt=class{label;keyword;beforeExpr;startsExpr;rightAssociative;isLoop;isAssign;prefix;postfix;binop;constructor(t,e={}){this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null}},Re=new Map;ie=-1,Ue=[],je=[],_e=[],Ve=[],ze=[],He=[];Cs={bracketL:y("[",{beforeExpr:g,startsExpr:m}),bracketHashL:y("#[",{beforeExpr:g,startsExpr:m}),bracketBarL:y("[|",{beforeExpr:g,startsExpr:m}),bracketR:y("]"),bracketBarR:y("|]"),braceL:y("{",{beforeExpr:g,startsExpr:m}),braceBarL:y("{|",{beforeExpr:g,startsExpr:m}),braceHashL:y("#{",{beforeExpr:g,startsExpr:m}),braceR:y("}"),braceBarR:y("|}"),parenL:y("(",{beforeExpr:g,startsExpr:m}),parenR:y(")"),comma:y(",",{beforeExpr:g}),semi:y(";",{beforeExpr:g}),colon:y(":",{beforeExpr:g}),doubleColon:y("::",{beforeExpr:g}),dot: