@tslite/core 0.1.0 → 0.3.0

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.
@@ -0,0 +1 @@
1
+ 'use strict';var o=class extends Error{constructor(t,n,i){super(n),this.name="TSLiteError",this.code=t,this.details=i;}};var s="#ast";var p=["Identifier","MemberExpression","CallExpression","ArrowFunctionExpression","FunctionExpression","BinaryExpression","LogicalExpression","UnaryExpression","UpdateExpression","ConditionalExpression","AssignmentExpression","NewExpression","ArrayExpression","ObjectExpression","AwaitExpression","TemplateLiteral","TaggedTemplateExpression","SequenceExpression","ChainExpression","JSXElement","JSXFragment","Program"];function l(e){return p.includes(e)}function m(e){return new o("invalid-ast-entry",`Invalid #ast entry type: "${e}". The #ast marker is used to embed executable logic inside JSON. Only expression types that can be used as VALUES are allowed: ${p.join(", ")}. "${e}" is not a valid entry point because it cannot be used as a value in JSON.`,{type:e,validTypes:p})}var b=e=>{let{type:t,...n}=e;if(!t||typeof t!="string")throw new o("missing-node-type","ast() requires a node with a valid type property");if(!l(t))throw m(t);return {[s]:t,...n}},A=e=>{if(!e||typeof e!="object"||!(s in e))return e;let{[s]:t,...n}=e;return {type:t,...n}},J=e=>({type:"Identifier",name:e}),X=e=>e instanceof RegExp?{type:"Literal",value:e,regex:{pattern:e.source,flags:e.flags}}:typeof e=="bigint"?{type:"Literal",value:e,bigint:String(e)}:{type:"Literal",value:e},C=e=>({type:"ArrayExpression",elements:e}),h=e=>({type:"ObjectExpression",properties:e}),D=(e,t,n=false,i=false)=>({type:"Property",shorthand:n,computed:i,key:e,value:t,kind:"init"}),w=e=>({type:"SpreadElement",argument:e}),I=(e,t,n=false)=>({type:"CallExpression",callee:e,arguments:t,optional:n}),T=(e,t)=>({type:"NewExpression",callee:e,arguments:t}),P=(e,t,n=false,i=false)=>({type:"MemberExpression",object:e,property:t,computed:n,optional:i}),F=e=>({type:"ChainExpression",expression:e}),O=(e,t,n)=>({type:"BinaryExpression",left:t,right:n,operator:e}),N=(e,t,n)=>({type:"LogicalExpression",operator:e,left:t,right:n}),L=(e,t)=>({type:"UnaryExpression",operator:e,argument:t,prefix:true}),k=(e,t,n=false)=>({type:"UpdateExpression",operator:e,argument:t,prefix:n}),B=(e,t,n)=>({type:"AssignmentExpression",operator:e,left:t,right:n}),R=(e,t,n)=>({type:"ConditionalExpression",test:e,consequent:t,alternate:n}),j=e=>({type:"AwaitExpression",argument:e}),M=(e,t=false)=>({type:"TemplateElement",value:e,tail:t}),V=(e,t)=>({type:"TemplateLiteral",quasis:e,expressions:t}),v=(e,t,n=false,i=false)=>({type:"ArrowFunctionExpression",expression:t.type!="BlockStatement",generator:i,async:n,params:e,body:t}),q=(e=null,t,n,i=false,a=false)=>({type:"FunctionExpression",id:e,params:t,body:n,async:i,generator:a}),U=(e,t,n,i=false,a=false)=>({type:"FunctionDeclaration",id:e,params:t,body:n,generator:i,async:a}),_=e=>({type:"BlockStatement",body:e}),W=e=>({type:"ExpressionStatement",expression:e}),Y=e=>({type:"ReturnStatement",argument:e}),H=(e,t,n=null)=>({type:"IfStatement",test:e,consequent:t,alternate:n}),K=(e,t)=>({type:"SwitchStatement",cases:t,discriminant:e}),$=(e,t)=>({type:"SwitchCase",consequent:t,test:e}),z=e=>({type:"ThrowStatement",argument:e}),Z=(e,t,n=null)=>({type:"TryStatement",block:e,handler:t,finalizer:n}),G=(e,t)=>({type:"CatchClause",param:e,body:t}),Q=(e=null)=>({type:"BreakStatement",label:e}),ee=(e=null)=>({type:"ContinueStatement",label:e}),te=()=>({type:"EmptyStatement"}),ne=(e,t,n,i)=>({type:"ForStatement",init:e,test:t,update:n,body:i}),re=(e,t,n)=>({type:"ForInStatement",body:n,left:e,right:t}),ie=(e,t,n,i=false)=>({type:"ForOfStatement",body:n,left:e,right:t,await:i}),oe=(e,t)=>({type:"WhileStatement",test:e,body:t}),se=(e,t)=>({type:"DoWhileStatement",body:e,test:t}),ae=(e,t)=>({type:"VariableDeclaration",declarations:t,kind:e}),pe=(e,t=null)=>({type:"VariableDeclarator",id:e,init:t}),le=e=>({type:"ObjectPattern",properties:e}),me=e=>({type:"ArrayPattern",elements:e}),xe=(e,t=e,n=false,i=false)=>({type:"Property",key:e,kind:"init",value:t,shorthand:n,computed:i,method:false}),ce=e=>({type:"RestElement",argument:e}),Ee=(e,t)=>({type:"AssignmentPattern",left:e,right:t}),Se=(e,t="script")=>({type:"Program",body:e,sourceType:t}),x=e=>({type:"JsonExpression",body:e}),ye=(e,t)=>({type:"ImportDeclaration",specifiers:e,source:t}),de=(e,t)=>({type:"ImportSpecifier",imported:e,local:t}),ue=e=>({type:"ImportDefaultSpecifier",local:e}),ge=e=>({type:"ImportNamespaceSpecifier",local:e}),fe=(e=null,t=[],n=null)=>({type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:n}),be=e=>({type:"ExportDefaultDeclaration",declaration:e}),Ae=(e,t=e)=>({type:"ExportSpecifier",local:e,exported:t}),Je=e=>({type:"JSXIdentifier",name:e}),Xe=(e,t)=>({type:"JSXMemberExpression",object:e,property:t}),Ce=(e,t)=>({type:"JSXNamespacedName",namespace:e,name:t}),he=()=>({type:"JSXEmptyExpression"}),De=e=>({type:"JSXExpressionContainer",expression:e}),we=e=>({type:"JSXSpreadAttribute",argument:e}),Ie=(e,t=null)=>({type:"JSXAttribute",name:e,value:t}),Te=(e,t=[],n=false)=>({type:"JSXOpeningElement",name:e,attributes:t,selfClosing:n}),Pe=e=>({type:"JSXClosingElement",name:e}),c=()=>({type:"JSXOpeningFragment"}),E=()=>({type:"JSXClosingFragment"}),Fe=(e,t=e)=>({type:"JSXText",value:e,raw:t}),Oe=(e,t=[],n=null)=>({type:"JSXElement",openingElement:e,children:t,closingElement:n}),Ne=(e=[],t=c(),n=E())=>({type:"JSXFragment",openingFragment:t,children:e,closingFragment:n}),Le=x;exports.arrayExpression=C;exports.arrayPattern=me;exports.arrowFunctionExpression=v;exports.assignmentExpression=B;exports.assignmentPattern=Ee;exports.assignmentProperty=xe;exports.ast=b;exports.awaitExpression=j;exports.binaryExpression=O;exports.blockStatement=_;exports.breakStatement=Q;exports.callExpression=I;exports.catchClause=G;exports.chainExpression=F;exports.conditionalExpression=R;exports.continueStatement=ee;exports.doWhileStatement=se;exports.emptyStatement=te;exports.exportDefaultDeclaration=be;exports.exportNamedDeclaration=fe;exports.exportSpecifier=Ae;exports.expressionStatement=W;exports.forInStatement=re;exports.forOfStatement=ie;exports.forStatement=ne;exports.fromAstMarker=A;exports.functionDeclaration=U;exports.functionExpression=q;exports.identifier=J;exports.ifStatement=H;exports.importDeclaration=ye;exports.importDefaultSpecifier=ue;exports.importNamespaceSpecifier=ge;exports.importSpecifier=de;exports.json=Le;exports.jsonExpression=x;exports.jsxAttribute=Ie;exports.jsxClosingElement=Pe;exports.jsxClosingFragment=E;exports.jsxElement=Oe;exports.jsxEmptyExpression=he;exports.jsxExpressionContainer=De;exports.jsxFragment=Ne;exports.jsxIdentifier=Je;exports.jsxMemberExpression=Xe;exports.jsxNamespacedName=Ce;exports.jsxOpeningElement=Te;exports.jsxOpeningFragment=c;exports.jsxSpreadAttribute=we;exports.jsxText=Fe;exports.literal=X;exports.logicalExpression=N;exports.memberExpression=P;exports.newExpression=T;exports.objectExpression=h;exports.objectPattern=le;exports.program=Se;exports.property=D;exports.restElement=ce;exports.returnStatement=Y;exports.spreadElement=w;exports.switchCase=$;exports.switchStatement=K;exports.templateElement=M;exports.templateLiteral=V;exports.throwStatement=z;exports.tryStatement=Z;exports.unaryExpression=L;exports.updateExpression=k;exports.variableDeclaration=ae;exports.variableDeclarator=pe;exports.whileStatement=oe;
@@ -0,0 +1 @@
1
+ export { c8 as arrayExpression, c9 as arrayPattern, ca as arrowFunctionExpression, cb as assignmentExpression, cc as assignmentPattern, cd as assignmentProperty, c3 as ast, ce as awaitExpression, cf as binaryExpression, cg as blockStatement, ch as breakStatement, ci as callExpression, cj as catchClause, ck as chainExpression, cl as conditionalExpression, cm as continueStatement, cn as doWhileStatement, co as emptyStatement, cp as exportDefaultDeclaration, cq as exportNamedDeclaration, cr as exportSpecifier, cs as expressionStatement, ct as forInStatement, cu as forOfStatement, cv as forStatement, c4 as fromAstMarker, cw as functionDeclaration, cx as functionExpression, cy as identifier, cz as ifStatement, cA as importDeclaration, cB as importDefaultSpecifier, cC as importNamespaceSpecifier, cD as importSpecifier, c5 as json, c6 as jsonExpression, cE as jsxAttribute, cF as jsxClosingElement, cG as jsxClosingFragment, cH as jsxElement, cI as jsxEmptyExpression, cJ as jsxExpressionContainer, cK as jsxFragment, cL as jsxIdentifier, cM as jsxMemberExpression, cN as jsxNamespacedName, cO as jsxOpeningElement, cP as jsxOpeningFragment, cQ as jsxSpreadAttribute, cR as jsxText, cS as literal, cT as logicalExpression, cU as memberExpression, cV as newExpression, cW as objectExpression, cX as objectPattern, cY as program, cZ as property, c_ as restElement, c$ as returnStatement, d0 as spreadElement, d1 as switchCase, d2 as switchStatement, d3 as templateElement, d4 as templateLiteral, d5 as throwStatement, d6 as tryStatement, d7 as unaryExpression, d8 as updateExpression, d9 as variableDeclaration, da as variableDeclarator, db as whileStatement } from './index-CcVx_Zur.cjs';
@@ -0,0 +1 @@
1
+ export { c8 as arrayExpression, c9 as arrayPattern, ca as arrowFunctionExpression, cb as assignmentExpression, cc as assignmentPattern, cd as assignmentProperty, c3 as ast, ce as awaitExpression, cf as binaryExpression, cg as blockStatement, ch as breakStatement, ci as callExpression, cj as catchClause, ck as chainExpression, cl as conditionalExpression, cm as continueStatement, cn as doWhileStatement, co as emptyStatement, cp as exportDefaultDeclaration, cq as exportNamedDeclaration, cr as exportSpecifier, cs as expressionStatement, ct as forInStatement, cu as forOfStatement, cv as forStatement, c4 as fromAstMarker, cw as functionDeclaration, cx as functionExpression, cy as identifier, cz as ifStatement, cA as importDeclaration, cB as importDefaultSpecifier, cC as importNamespaceSpecifier, cD as importSpecifier, c5 as json, c6 as jsonExpression, cE as jsxAttribute, cF as jsxClosingElement, cG as jsxClosingFragment, cH as jsxElement, cI as jsxEmptyExpression, cJ as jsxExpressionContainer, cK as jsxFragment, cL as jsxIdentifier, cM as jsxMemberExpression, cN as jsxNamespacedName, cO as jsxOpeningElement, cP as jsxOpeningFragment, cQ as jsxSpreadAttribute, cR as jsxText, cS as literal, cT as logicalExpression, cU as memberExpression, cV as newExpression, cW as objectExpression, cX as objectPattern, cY as program, cZ as property, c_ as restElement, c$ as returnStatement, d0 as spreadElement, d1 as switchCase, d2 as switchStatement, d3 as templateElement, d4 as templateLiteral, d5 as throwStatement, d6 as tryStatement, d7 as unaryExpression, d8 as updateExpression, d9 as variableDeclaration, da as variableDeclarator, db as whileStatement } from './index-CcVx_Zur.js';
@@ -0,0 +1 @@
1
+ export{o as arrayExpression,aa as arrayPattern,F as arrowFunctionExpression,A as assignmentExpression,da as assignmentPattern,ba as assignmentProperty,k as ast,C as awaitExpression,w as binaryExpression,I as blockStatement,R as breakStatement,s as callExpression,Q as catchClause,v as chainExpression,B as conditionalExpression,S as continueStatement,Y as doWhileStatement,T as emptyStatement,la as exportDefaultDeclaration,ka as exportNamedDeclaration,ma as exportSpecifier,J as expressionStatement,V as forInStatement,W as forOfStatement,U as forStatement,l as fromAstMarker,H as functionDeclaration,G as functionExpression,m as identifier,L as ifStatement,ga as importDeclaration,ia as importDefaultSpecifier,ja as importNamespaceSpecifier,ha as importSpecifier,Ba as json,fa as jsonExpression,ta as jsxAttribute,va as jsxClosingElement,xa as jsxClosingFragment,za as jsxElement,qa as jsxEmptyExpression,ra as jsxExpressionContainer,Aa as jsxFragment,na as jsxIdentifier,oa as jsxMemberExpression,pa as jsxNamespacedName,ua as jsxOpeningElement,wa as jsxOpeningFragment,sa as jsxSpreadAttribute,ya as jsxText,n as literal,x as logicalExpression,u as memberExpression,t as newExpression,p as objectExpression,$ as objectPattern,ea as program,q as property,ca as restElement,K as returnStatement,r as spreadElement,N as switchCase,M as switchStatement,D as templateElement,E as templateLiteral,O as throwStatement,P as tryStatement,y as unaryExpression,z as updateExpression,Z as variableDeclaration,_ as variableDeclarator,X as whileStatement}from'./chunk-JQLO5K6J.js';
@@ -0,0 +1 @@
1
+ var S=Object.defineProperty;var y=(e,t)=>{for(var n in t)S(e,n,{get:t[n],enumerable:true});};var Fe={};y(Fe,{arrayExpression:()=>b,arrayPattern:()=>se,arrowFunctionExpression:()=>R,assignmentExpression:()=>O,assignmentPattern:()=>le,assignmentProperty:()=>ae,ast:()=>d,awaitExpression:()=>L,binaryExpression:()=>I,blockStatement:()=>V,breakStatement:()=>$,callExpression:()=>C,catchClause:()=>K,chainExpression:()=>w,conditionalExpression:()=>N,continueStatement:()=>z,doWhileStatement:()=>ne,emptyStatement:()=>Z,exportDefaultDeclaration:()=>de,exportNamedDeclaration:()=>ye,exportSpecifier:()=>ue,expressionStatement:()=>v,forInStatement:()=>Q,forOfStatement:()=>ee,forStatement:()=>G,fromAstMarker:()=>u,functionDeclaration:()=>M,functionExpression:()=>j,identifier:()=>g,ifStatement:()=>U,importDeclaration:()=>xe,importDefaultSpecifier:()=>Ee,importNamespaceSpecifier:()=>Se,importSpecifier:()=>ce,json:()=>Pe,jsonExpression:()=>x,jsxAttribute:()=>Ce,jsxClosingElement:()=>De,jsxClosingFragment:()=>E,jsxElement:()=>Ie,jsxEmptyExpression:()=>Ae,jsxExpressionContainer:()=>Je,jsxFragment:()=>Te,jsxIdentifier:()=>ge,jsxMemberExpression:()=>fe,jsxNamespacedName:()=>be,jsxOpeningElement:()=>he,jsxOpeningFragment:()=>c,jsxSpreadAttribute:()=>Xe,jsxText:()=>we,literal:()=>f,logicalExpression:()=>T,memberExpression:()=>D,newExpression:()=>h,objectExpression:()=>A,objectPattern:()=>oe,program:()=>me,property:()=>J,restElement:()=>pe,returnStatement:()=>q,spreadElement:()=>X,switchCase:()=>W,switchStatement:()=>_,templateElement:()=>k,templateLiteral:()=>B,throwStatement:()=>Y,tryStatement:()=>H,unaryExpression:()=>P,updateExpression:()=>F,variableDeclaration:()=>re,variableDeclarator:()=>ie,whileStatement:()=>te});var o=class extends Error{constructor(t,n,i){super(n),this.name="TSLiteError",this.code=t,this.details=i;}};var s="#ast",ke=/^[a-zA-Z_][a-zA-Z_0-9]*$/,p=["Identifier","MemberExpression","CallExpression","ArrowFunctionExpression","FunctionExpression","BinaryExpression","LogicalExpression","UnaryExpression","UpdateExpression","ConditionalExpression","AssignmentExpression","NewExpression","ArrayExpression","ObjectExpression","AwaitExpression","TemplateLiteral","TaggedTemplateExpression","SequenceExpression","ChainExpression","JSXElement","JSXFragment","Program"];function l(e){return p.includes(e)}function m(e){return new o("invalid-ast-entry",`Invalid #ast entry type: "${e}". The #ast marker is used to embed executable logic inside JSON. Only expression types that can be used as VALUES are allowed: ${p.join(", ")}. "${e}" is not a valid entry point because it cannot be used as a value in JSON.`,{type:e,validTypes:p})}var Be={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportExpression:["source"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JsonExpression:[],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],JSXElement:["openingElement","children","closingElement"],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningElement:["name","attributes"],JSXClosingElement:["name"],JSXOpeningFragment:[],JSXClosingFragment:[],JSXAttribute:["name","value"],JSXSpreadAttribute:["argument"],JSXExpressionContainer:["expression"],JSXEmptyExpression:[],JSXText:[],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"]},r={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,Coalesce:3,LogicalOR:4,LogicalAND:5,BitwiseOR:6,BitwiseXOR:7,BitwiseAND:8,Equality:9,Relational:10,BitwiseSHIFT:11,Additive:12,Multiplicative:13,Exponentiation:14,Await:15,Unary:15,Postfix:16,OptionalChaining:17,Call:18,New:19,TaggedTemplate:20,Member:21,Primary:22},Re={"??":r.Coalesce,"||":r.LogicalOR,"&&":r.LogicalAND,"|":r.BitwiseOR,"^":r.BitwiseXOR,"&":r.BitwiseAND,"==":r.Equality,"!=":r.Equality,"===":r.Equality,"!==":r.Equality,is:r.Equality,isnt:r.Equality,"<":r.Relational,">":r.Relational,"<=":r.Relational,">=":r.Relational,in:r.Relational,instanceof:r.Relational,"<<":r.BitwiseSHIFT,">>":r.BitwiseSHIFT,">>>":r.BitwiseSHIFT,"+":r.Additive,"-":r.Additive,"*":r.Multiplicative,"%":r.Multiplicative,"/":r.Multiplicative,"**":r.Exponentiation};var d=e=>{let{type:t,...n}=e;if(!t||typeof t!="string")throw new o("missing-node-type","ast() requires a node with a valid type property");if(!l(t))throw m(t);return {[s]:t,...n}},u=e=>{if(!e||typeof e!="object"||!(s in e))return e;let{[s]:t,...n}=e;return {type:t,...n}},g=e=>({type:"Identifier",name:e}),f=e=>e instanceof RegExp?{type:"Literal",value:e,regex:{pattern:e.source,flags:e.flags}}:typeof e=="bigint"?{type:"Literal",value:e,bigint:String(e)}:{type:"Literal",value:e},b=e=>({type:"ArrayExpression",elements:e}),A=e=>({type:"ObjectExpression",properties:e}),J=(e,t,n=false,i=false)=>({type:"Property",shorthand:n,computed:i,key:e,value:t,kind:"init"}),X=e=>({type:"SpreadElement",argument:e}),C=(e,t,n=false)=>({type:"CallExpression",callee:e,arguments:t,optional:n}),h=(e,t)=>({type:"NewExpression",callee:e,arguments:t}),D=(e,t,n=false,i=false)=>({type:"MemberExpression",object:e,property:t,computed:n,optional:i}),w=e=>({type:"ChainExpression",expression:e}),I=(e,t,n)=>({type:"BinaryExpression",left:t,right:n,operator:e}),T=(e,t,n)=>({type:"LogicalExpression",operator:e,left:t,right:n}),P=(e,t)=>({type:"UnaryExpression",operator:e,argument:t,prefix:true}),F=(e,t,n=false)=>({type:"UpdateExpression",operator:e,argument:t,prefix:n}),O=(e,t,n)=>({type:"AssignmentExpression",operator:e,left:t,right:n}),N=(e,t,n)=>({type:"ConditionalExpression",test:e,consequent:t,alternate:n}),L=e=>({type:"AwaitExpression",argument:e}),k=(e,t=false)=>({type:"TemplateElement",value:e,tail:t}),B=(e,t)=>({type:"TemplateLiteral",quasis:e,expressions:t}),R=(e,t,n=false,i=false)=>({type:"ArrowFunctionExpression",expression:t.type!="BlockStatement",generator:i,async:n,params:e,body:t}),j=(e=null,t,n,i=false,a=false)=>({type:"FunctionExpression",id:e,params:t,body:n,async:i,generator:a}),M=(e,t,n,i=false,a=false)=>({type:"FunctionDeclaration",id:e,params:t,body:n,generator:i,async:a}),V=e=>({type:"BlockStatement",body:e}),v=e=>({type:"ExpressionStatement",expression:e}),q=e=>({type:"ReturnStatement",argument:e}),U=(e,t,n=null)=>({type:"IfStatement",test:e,consequent:t,alternate:n}),_=(e,t)=>({type:"SwitchStatement",cases:t,discriminant:e}),W=(e,t)=>({type:"SwitchCase",consequent:t,test:e}),Y=e=>({type:"ThrowStatement",argument:e}),H=(e,t,n=null)=>({type:"TryStatement",block:e,handler:t,finalizer:n}),K=(e,t)=>({type:"CatchClause",param:e,body:t}),$=(e=null)=>({type:"BreakStatement",label:e}),z=(e=null)=>({type:"ContinueStatement",label:e}),Z=()=>({type:"EmptyStatement"}),G=(e,t,n,i)=>({type:"ForStatement",init:e,test:t,update:n,body:i}),Q=(e,t,n)=>({type:"ForInStatement",body:n,left:e,right:t}),ee=(e,t,n,i=false)=>({type:"ForOfStatement",body:n,left:e,right:t,await:i}),te=(e,t)=>({type:"WhileStatement",test:e,body:t}),ne=(e,t)=>({type:"DoWhileStatement",body:e,test:t}),re=(e,t)=>({type:"VariableDeclaration",declarations:t,kind:e}),ie=(e,t=null)=>({type:"VariableDeclarator",id:e,init:t}),oe=e=>({type:"ObjectPattern",properties:e}),se=e=>({type:"ArrayPattern",elements:e}),ae=(e,t=e,n=false,i=false)=>({type:"Property",key:e,kind:"init",value:t,shorthand:n,computed:i,method:false}),pe=e=>({type:"RestElement",argument:e}),le=(e,t)=>({type:"AssignmentPattern",left:e,right:t}),me=(e,t="script")=>({type:"Program",body:e,sourceType:t}),x=e=>({type:"JsonExpression",body:e}),xe=(e,t)=>({type:"ImportDeclaration",specifiers:e,source:t}),ce=(e,t)=>({type:"ImportSpecifier",imported:e,local:t}),Ee=e=>({type:"ImportDefaultSpecifier",local:e}),Se=e=>({type:"ImportNamespaceSpecifier",local:e}),ye=(e=null,t=[],n=null)=>({type:"ExportNamedDeclaration",declaration:e,specifiers:t,source:n}),de=e=>({type:"ExportDefaultDeclaration",declaration:e}),ue=(e,t=e)=>({type:"ExportSpecifier",local:e,exported:t}),ge=e=>({type:"JSXIdentifier",name:e}),fe=(e,t)=>({type:"JSXMemberExpression",object:e,property:t}),be=(e,t)=>({type:"JSXNamespacedName",namespace:e,name:t}),Ae=()=>({type:"JSXEmptyExpression"}),Je=e=>({type:"JSXExpressionContainer",expression:e}),Xe=e=>({type:"JSXSpreadAttribute",argument:e}),Ce=(e,t=null)=>({type:"JSXAttribute",name:e,value:t}),he=(e,t=[],n=false)=>({type:"JSXOpeningElement",name:e,attributes:t,selfClosing:n}),De=e=>({type:"JSXClosingElement",name:e}),c=()=>({type:"JSXOpeningFragment"}),E=()=>({type:"JSXClosingFragment"}),we=(e,t=e)=>({type:"JSXText",value:e,raw:t}),Ie=(e,t=[],n=null)=>({type:"JSXElement",openingElement:e,children:t,closingElement:n}),Te=(e=[],t=c(),n=E())=>({type:"JSXFragment",openingFragment:t,children:e,closingFragment:n}),Pe=x;export{oe as $,O as A,Te as Aa,N as B,Pe as Ba,L as C,Fe as Ca,k as D,B as E,R as F,j as G,M as H,V as I,v as J,q as K,U as L,_ as M,W as N,Y as O,H as P,K as Q,$ as R,z as S,Z as T,G as U,Q as V,ee as W,te as X,ne as Y,re as Z,ie as _,y as a,se as aa,o as b,ae as ba,s as c,pe as ca,ke as d,le as da,p as e,me as ea,l as f,x as fa,m as g,xe as ga,Be as h,ce as ha,r as i,Ee as ia,Re as j,Se as ja,d as k,ye as ka,u as l,de as la,g as m,ue as ma,f as n,ge as na,b as o,fe as oa,A as p,be as pa,J as q,Ae as qa,X as r,Je as ra,C as s,Xe as sa,h as t,Ce as ta,D as u,he as ua,w as v,De as va,I as w,c as wa,T as x,E as xa,P as y,we as ya,F as z,Ie as za};