@pandacss/language-server 0.0.0-dev-20230927192702 → 0.0.0-dev-20230928093358

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -11
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -30773,7 +30773,7 @@ ${qt}`}gn.exports={isPragma:Kt,hasPragma:E,insertPragma:B}}}),RS=ms({"src/langua
30773
30773
  ${r.type!=="rule"&&a>0?`
30774
30774
  `:""}${" ".repeat(e)}`),hxn(i,e+1)})}function HXe(){return r=>{hxn(r),r.first&&(r.first.raws.before="")}}HXe.postcssPlugin="panda-prettify";var Nar=[":link",":visited",":focus-within",":focus",":focus-visible",":hover",":active"],ixn=r=>Nar.findIndex(i=>r.trim().includes(i))+1;function M5t(){let r=e=>{let i=[],a=[],u=[];e.each(d=>{switch(d.type){case"rule":{d.first?.type==="atrule"?u.push(d):a.push(d);break}case"atrule":{u.push(d);break}default:i.push(d)}}),a.sort((d,h)=>{let b=d.selectors.length?d.selectors[0]:d.selector,x=h.selectors.length?h.selectors[0]:h.selector;return ixn(b)-ixn(x)}),e.nodes=[...i,...a,...u],e.nodes.forEach(d=>{"nodes"in d&&r(d)})};return r}M5t.postcssPlugin="panda-sort-css";var Bxn=/(!?\(\s*min(-device-)?-width)(.|\n)+\(\s*max(-device)?-width/i,Rar=/\(\s*min(-device)?-width/i,gxn=/(!?\(\s*max(-device)?-width)(.|\n)+\(\s*min(-device)?-width/i,Lar=/\(\s*max(-device)?-width/i,x5t=fgt(Bxn,gxn,Rar),oxn=fgt(gxn,Bxn,Lar),yxn=/(!?\(\s*min(-device)?-height)(.|\n)+\(\s*max(-device)?-height/i,Mar=/\(\s*min(-device)?-height/i,Cxn=/(!?\(\s*max(-device)?-height)(.|\n)+\(\s*min(-device)?-height/i,Far=/\(\s*max(-device)?-height/i,E5t=fgt(yxn,Cxn,Mar),sxn=fgt(Cxn,yxn,Far),axn=/print/i,lxn=/^print$/i,VXe=Number.MAX_VALUE;function cxn(r){let e=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(r);if(e===null&&(x5t(r)||E5t(r))&&(e=/(\d)/.exec(r)),e==="0")return 0;if(e===null)return VXe;let i=e[1];switch(e[2]){case"ch":i=parseFloat(i)*8.8984375;break;case"em":case"rem":i=parseFloat(i)*16;break;case"ex":i=parseFloat(i)*8.296875;break;case"px":i=parseFloat(i);break}return+i}function fgt(r,e,i){return function(a){return r.test(a)?!0:e.test(a)?!1:i.test(a)}}function Oar(r,e){let i=axn.test(r),a=lxn.test(r),u=axn.test(e),d=lxn.test(e);return i&&u?!a&&d?1:a&&!d?-1:r.localeCompare(e):i?1:u?-1:null}function War(r={}){let{unitlessMqAlwaysFirst:e}=r;return function(a,u){let d=Oar(a,u);if(d!==null)return d;let h=x5t(a)||E5t(a),b=oxn(a)||sxn(a),x=x5t(u)||E5t(u),w=oxn(u)||sxn(u);if(e&&(!h&&!b||!x&&!w))return!h&&!b&&!x&&!w?a.localeCompare(u):!x&&!w?1:-1;{if(h&&w)return-1;if(b&&x)return 1;let L=cxn(a),q=cxn(u);return L===VXe&&q===VXe?a.localeCompare(u):L===VXe?1:q===VXe?-1:L>q?b?-1:1:L<q?b?1:-1:a.localeCompare(u)}}}var Gar=War();function F5t(){let r=e=>{e.nodes.sort((i,a)=>Sg({a:i,b:a}).with({a:{type:"atrule",name:"media"},b:{type:"atrule",name:"media"}},({a:u,b:d})=>Gar(u.params,d.params)).with({a:{type:"atrule",name:"media"},b:xD.any},()=>1).with({a:xD.any,b:{type:"atrule",name:"media"}},()=>-1).otherwise(()=>0)),e.nodes.forEach(i=>{"nodes"in i&&r(i)})};return r}F5t.postcssPlugin="panda-sort-mq";function pgt(r,e={}){let{minify:i=!1}=e,a=[(0,ugt.default)(),L5t(),F5t(),(0,I5t.default)(),(0,P5t.default)(),M5t(),(0,w5t.default)()];i?a.push((0,R5t.default)(),(0,N5t.default)()):a.push(HXe());let{css:u}=s0(a).process(r);return u}function zar(r,e={}){let{token:i,raw:a}=e,{css:u}=s0([Par(i,a)]).process(r);return u}function dgt(r,e={}){let{minify:i=!1}=e,a=[(0,ugt.default)(),L5t(),F5t(),(0,I5t.default)(),(0,P5t.default)(),M5t(),(0,w5t.default)()];i?a.push((0,R5t.default)(),(0,N5t.default)()):a.push(HXe());let{css:u}=s0(a).process(r);return u}function vxn(r){let{css:e}=s0([(0,ugt.default)(),HXe()]).process(r);return e}function bxn(r){let{css:e}=s0([HXe()]).process(r);return e}function mgt(r,e){let i=UXe(r),a=UXe(e),u=i.nodes.filter($fe({type:"atrule",name:"layer",params:"utilities"}));return a.walkAtRules("layer",d=>{d.params==="utilities"&&u.forEach(h=>{d.append(h.nodes)})}),dgt(a)}var L7={classNames:new Map,styles:new Map,nodes:new Map,slots:new Map},O5t=class{constructor(r={},e){this.recipes=r,this.context=e,this.assignRules()}rules=new Map;keys=[];getPropKey=(r,e,i)=>`${r} (${e} = ${i})`;get separator(){return this.context.utility.separator??"_"}getClassName=(r,e,i)=>`${r}--${e}${this.separator}${i}`;save=()=>{for(let[r,e]of Object.entries(this.recipes))if(aRe(e)){let i=MKe(e),a=new Map;Object.entries(i).forEach(([u,d])=>{let h=this.getSlotKey(r,u);this.normalize(h,d),a.set(h,d)}),this.assignRecipe(r,e),L7.slots.set(r,a)}else this.assignRecipe(r,this.normalize(r,e))};assignRecipe=(r,e)=>{let i=Object.keys(e.variants??{}),a=e.jsx??[B4(r)],u=LKe(a);L7.nodes.set(r,{...this.getNames(r),jsx:a,type:"recipe",variantKeys:i,variantKeyMap:Object.fromEntries(Object.entries(e.variants??{}).map(([d,h])=>[d,Object.keys(h)])),match:u,config:e,splitProps:d=>_Ft(d,i),props:i})};getSlotKey=(r,e)=>`${r}__${e}`;assignRules=()=>{if(this.context)for(let[r,e]of Object.entries(this.recipes))aRe(e)?e.slots.forEach(i=>{let a=this.getSlotKey(r,i);this.rules.set(a,this.createRule(a,!0))}):this.rules.set(r,this.createRule(r)),this.keys.push(r)};isEmpty=()=>L7.nodes.size===0;getNames=zE(r=>({baseName:r,upperName:B4(r),dashName:PKe(r),jsxName:B4(r)}));getRecipe=zE(r=>L7.nodes.get(r));getConfig=zE(r=>this.recipes[r]);find=zE(r=>this.details.find(e=>e.match.test(r)));filter=zE(r=>this.details.filter(e=>e.match.test(r)));get details(){return Array.from(L7.nodes.values())}splitProps=(r,e)=>{let i=this.details.find(a=>a.baseName===r);return i?i.splitProps(e):[{},e]};normalize=(r,e)=>{let{className:i,jsx:a=[B4(r)],base:u={},variants:d={},defaultVariants:h={},description:b="",compoundVariants:x=[]}=e,w={...e,jsx:a,className:i,description:b,base:{},variants:{},defaultVariants:h,compoundVariants:x};w.base=this.serialize(u),L7.styles.set(r,w.base),L7.classNames.set(r,i);for(let[L,q]of Object.entries(d))for(let[te,me]of Object.entries(q)){let Ee=this.getPropKey(r,L,te),ke=this.getClassName(e.className,L,te),Ue=this.serialize(me);L7.styles.set(Ee,Ue),L7.classNames.set(Ee,ke),(0,Sxn.default)(w.variants,{[L]:{[te]:Ue}})}return w};serialize=r=>this.context?k5t(r,this.context):r;getTransform=r=>(e,i)=>{if(i==="__ignore__")return{layer:"_base",className:L7.classNames.get(r),styles:L7.styles.get(r)??{}};let a=this.getPropKey(r,e,i);return{className:L7.classNames.get(a),styles:L7.styles.get(a)??{}}};createRule=(r,e)=>{if(!this.context)throw new Error("Can't create a rule without a context");let i=new cgt({...this.context,transform:this.getTransform(r)}),a=this.context.layers.recipes;return i.layer=e?`${a}.slots`:a,i};check=(r,e,i)=>{let{defaultVariants:a={},base:u={}}=r,d=Object.assign({[e]:"__ignore__"},a,i),h=Object.keys(d);return{styles:d,isEmpty:h.length===1&&Object.keys(u).length===0}};process=(r,e)=>{let{styles:i}=e,a=this.getRecipe(r);if(!a)return;let u=L7.slots.get(r);if(u)u.forEach((d,h)=>{let{isEmpty:b,styles:x}=this.check(d,h,i);if(b)return;this.rules.get(h)?.process({styles:x})});else{let{isEmpty:d,styles:h}=this.check(a.config,a.config.className,i);if(d)return;this.rules.get(r)?.process({styles:h})}};toCss=()=>this.context?this.context.root.toString():""},jar=/\s&/g;function Exn(r){let e=new Set;(0,xxn.default)(a=>{a.each(u=>{let d=S5t(u.toString());Sg(d).with({type:"parent-nesting"},()=>{e.add(u.toString().replace(jar,"").trim())}).otherwise(()=>{})})}).processSync(r);let i=Array.from(e).join(", ").trim();return e.size>1?`:where(${i})`:i}var Fgi=agt(),v5t=(r,e)=>r.breakpoints.includes(e)?e:`_${e}`;function Dxn(r){let{css:e=[],recipes:i={}}=r,a={css:[],recipes:[]};return u=>(e.forEach(d=>{let h=d.conditions||[];d.responsive&&h.push(...u.breakpoints),Object.entries(d.properties).forEach(([b,x])=>{x.flatMap(L=>L==="*"?u.getPropertyKeys(b):L).forEach(L=>{let q=h.reduce((te,me)=>({base:L,...te,[v5t(u,me)]:L}),{});a.css.push({[b]:h.length?q:L})})})}),Object.entries(i).forEach(([d,h])=>{h.forEach(b=>{let{__base:x,...w}=u.getRecipeKeys(d),L=b==="*",{conditions:q=[],responsive:te=L,...me}=L?w:b;if(te&&q.push(...u.breakpoints),x){let Ee=q.reduce((ke,Ue)=>({base:x,...ke,[v5t(u,Ue)]:x}),{});a.recipes.push({[d]:q.length?Ee:x})}Object.entries(me).forEach(([Ee,ke])=>{if(!Array.isArray(ke))return;ke.flatMap(Fe=>Fe==="*"?w[Ee]:Fe).forEach(Fe=>{let We=q.reduce((Tt,Vt)=>({base:Fe,...Tt,[v5t(u,Vt)]:Fe}),{});a.recipes.push({[d]:{[Ee]:q.length?We:Fe}})})})})}),a)}var Txn=class{constructor(r,e){this.context=r,this.options=e;let{recipes:i={},slotRecipes:a={}}=e??{},u=Object.assign({},i,a);this.recipes=new O5t(u,r)}recipes;processGlobalCss=r=>{let{conditions:e,utility:i}=this.context,a=Sar(r,{conditions:e,utility:i}),u=s0.atRule({name:"layer",params:this.context.layers.base,nodes:[a]});this.context.root.append(u)};processSelectorObject(r,e){let i=kj(e),{nodes:a}=UXe(i);if(a.length===0)return;let u=s0.rule({selector:r,nodes:i.root.nodes});this.context.root.append(u)}processObject(r){let i=kj(r).root;this.context.root.append(i)}processAtomic=(...r)=>{let e=new cgt(this.context);r.forEach(i=>{i&&e.process({styles:i})})};processStyleProps=r=>{let{css:e,...i}=r;this.processAtomic(i,e)};processCompoundVariants=r=>{r.compoundVariants?.forEach(e=>{if(aRe(r))for(let i of Object.values(e.css))this.processAtomic(i);else this.processAtomic(e.css)})};processRecipe=(r,e,i)=>{this.recipes.process(r,{styles:i}),this.processCompoundVariants(e)};processAtomicSlotRecipe=r=>{let e=MKe(r);for(let i of Object.values(e))this.processAtomicRecipe(i)};processAtomicRecipe=r=>{let{base:e={},variants:i={},compoundVariants:a=[]}=r;this.processAtomic(e);for(let u of Object.values(i))for(let d of Object.values(u))this.processAtomic(d);a.forEach(u=>{this.processAtomic(u.css)})};toCss=({optimize:r=!1,minify:e}={})=>{try{let{conditions:{breakpoints:i},utility:a}=this.context;i.expandScreenAtRule(this.context.root),zar(this.context.root,{token:a.getToken,raw:this.context.utility.tokens.getByName});let u=this.context.root.toString();return r&&(u=pgt(u,{minify:e})),this.options?.content&&(u=`${this.options.content}
30775
30775
 
30776
- ${u}`),r?dgt(u,{minify:e}):u}catch(i){throw i instanceof WZt&&(v2.error("sheet",i.message),i.plugin&&v2.error("sheet",`By plugin: ${i.plugin}:`),i.source&&(v2.error("sheet",`Line ${i.line}:${i.column}, in:`),v2.error("sheet",i.source))),i}};append=(...r)=>{this.context.root.append(...r)};prepend=(...r)=>{this.context.root.prepend(...r)}},Axn=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";strictTokens=!1;constructor(r){let{tokens:e,config:i={},separator:a,prefix:u,shorthands:d,strictTokens:h}=r;this.tokens=e,this.config=i,a&&(this.separator=a),u&&(this.prefix=u),h&&(this.strictTokens=h),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(r,e)=>{this.assignProperty(r,e),this.assignPropertyType(r,e),this.config[r]=e};assignShorthands=()=>{for(let[r,e]of Object.entries(this.config)){let{shorthand:i}=this.normalize(e)??{};if(!i)continue;(Array.isArray(i)?i:[i]).forEach(u=>{this.shorthands.set(u,r)})}};assignColorPaletteProperty=()=>{let r=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(r),transform(e){return r[e]}}};resolveShorthand=r=>this.shorthands.get(r)??r;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,i])=>[e,i.className]);getPropKey=(r,e)=>`(${r} = ${e})`;hash=(r,e)=>`${r}${this.separator}${e}`;getPropertyValues=(r,e)=>{let{values:i}=r,a=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return bj(i)?a?.(i)??this.tokens.getValue(i)??{}:Array.isArray(i)?i.reduce((u,d)=>(u[d]=d,u),{}):cFt(i)?i(e?a:this.getToken.bind(this)):i};getToken=r=>this.tokens.get(r);normalize=r=>r;assignProperty=(r,e)=>{let i=this.normalize(e);if(this.setTransform(r,i?.transform),!i)return;this.configs.set(r,i);let a=this.getPropertyValues(i);if(a)for(let[u,d]of Object.entries(a)){let h=this.getPropKey(r,u);this.setStyles(r,d,u,h),this.setClassName(r,u)}};assignProperties=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignProperty(r,e)};getPropertyKeys=r=>{let e=this.propertyKeys.get(r);return e?Array.from(e):[]};assignPropertyType=(r,e)=>{let i=this.normalize(e);if(!i)return;let a=this.getPropertyValues(i,d=>`type:Tokens["${d}"]`);if(typeof a=="object"&&a.type){this.types.set(r,new Set([`type:${a.type}`]));return}if(a){let d=new Set(Object.keys(a));this.types.set(r,d),this.propertyKeys.set(r,d)}let u=this.types.get(r)??new Set;!this.strictTokens&&i.property&&this.types.set(r,u.add(`CssProperties["${i.property}"]`))};assignPropertyTypes=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignPropertyType(r,e)};getTypes=()=>{let r=new Map;for(let[e,i]of this.types.entries()){if(i.size===0){r.set(e,["string"]);continue}let a=Array.from(i).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));r.set(e,a)}return r};defaultTransform=zE((r,e)=>{if(e.startsWith("--")){let a=this.tokens.getTokenVar(r);r=typeof a=="string"?a:r}return{[e]:r}});setTransform=(r,e)=>{let a=e??(u=>this.defaultTransform(u,r));return this.transforms.set(r,a),this};setStyles=(r,e,i,a)=>{a=a??this.getPropKey(r,e);let u=x=>this.defaultTransform(x,r),d=this.transforms.get(r)??u,h=Object.assign(this.getToken.bind(this),{raw:x=>this.tokens.getByName(x)}),b=d(e,{token:h,raw:i});return this.styles.set(a,b??{}),this};formatClassName=r=>[this.prefix,r].filter(Boolean).join("-");setClassName=(r,e)=>{let i=this.getPropKey(r,e),a=this.configs.get(r),u;return!a||!a.className?u=this.hash(Fve(r),e):u=this.hash(a.className,e),this.classNames.set(i,u),this};isProperty=r=>this.configs.has(r);getOrCreateClassName=(r,e)=>((a,u)=>{let d=this.getPropKey(a,u);return this.classNames.has(d)||(this.isProperty(a)&&this.customValues.set(a,u),this.setClassName(a,u)),this.classNames.get(d)})(r,e);getOrCreateStyle=(r,e)=>{let i=this.getPropKey(r,e);return this.styles.get(i)??this.setStyles(r,e,e,i),this.styles.get(i)};transform=(r,e)=>{if(e==null)return{className:"",styles:{}};let i=this.resolveShorthand(r);return Ufe({layer:this.configs.get(i)?.layer,className:this.getOrCreateClassName(i,NKe(e)),styles:this.getOrCreateStyle(i,e)})};keys=()=>{let r=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...r,...e]};getPropShorthandsMap=()=>{let r=new Map;return this.shorthands.forEach((e,i)=>{let a=r.get(e)??[];a.push(i),r.set(e,a)}),r};getPropShorthands=r=>this.getPropShorthandsMap().get(r)??[]};ae();ae();var FRe=b_(NW(),1);var tm=b_(NW(),1);ae();var Odr=b_(nzt(),1),RW=b_(YAn(),1);ae();var Mj=b_(require("path"),1),$An=b_(require("os"),1),Bdr=/(^\/\w:\/)|(^\/\w:\\)/,QAn=Mj.default.parse(process.cwd()).root,ZAn=/^\w:/,gdr=$An.default.platform();function ydr(r){return/\\/.test(r)||ZAn.test(r)}function ekn(r){let e=/^\\\\\?\\/.test(r),i=/[^\u0000-\u0080]+/.test(r);return e||i?r:r.replace(/\\/g,"/")}function Cdr(r){let e=typeof r=="string"?r:r.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),Bdr.test(e)&&(e=e.slice(1))),rzt(e)}function tkn(r){return[...r].some(e=>typeof e=="string"&&ydr(e))?Mj.default.win32:Mj.default}function Spe(r,e){return ekn(tkn(e)[r](...e))}function nkn(r,e){return Mj.default.posix[r](...[...e].map(i=>typeof i=="string"?ekn(i):i))}function vdr(r){return nkn("parse",arguments)}function bdr(r){return nkn("extname",arguments)}function Sdr(r){return tkn(arguments).isAbsolute(r)}function xdr(...r){return Spe("join",arguments)}function rzt(r){let e=Spe("normalize",arguments);return r.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function Edr(r,e){return Spe("relative",arguments)}function Ddr(...r){return Spe("resolve",arguments)}function Tdr(r){return Spe("dirname",arguments)}function Adr(r,e){return Spe("basename",arguments)}function kdr(r){return Spe("format",arguments)}function Idr(r){return Spe("toNamespacedPath",arguments)}function wdr(r){return gdr!=="win32"||ZAn.test(r)||r.startsWith(QAn)||!Mj.default.win32.isAbsolute(Mj.default.win32.normalize(r))?r:Mj.default.win32.join(QAn,r)}var izt={sep:Mj.default.posix.sep,delimiter:Mj.default.posix.delimiter,parse:vdr,isAbsolute:Sdr,join:xdr,extname:bdr,normalize:rzt,relative:Edr,resolve:Ddr,dirname:Tdr,basename:Adr,format:kdr,toNamespacedPath:Idr,get posix(){return this},get win32(){return rkn}},rkn={...Mj.default.win32,get posix(){return izt},get win32(){return this}},Pdr=Mj.default,D1e={...izt,posix:izt,win32:rkn,native:Pdr,includeDriveLetter:wdr,urlToFilename:Cdr};var hkn=require("module"),Bkn=require("util"),gkn=b_(ckn(),1),sbt=()=>{let r={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{r.AggregateError=AggregateError}catch{}try{r.FinalizationRegistry=FinalizationRegistry}catch{}try{r.WeakRef=WeakRef}catch{}try{r.BigInt=BigInt}catch{}try{r.Reflect=Reflect}catch{}try{r.WeakMap=WeakMap}catch{}try{r.WeakSet=WeakSet}catch{}try{r.Set=Set}catch{}try{r.Map=Map}catch{}try{r.Uint8Array=Uint8Array}catch{}try{r.BigUint64Array=BigUint64Array}catch{}try{r.BigInt64Array=BigInt64Array}catch{}try{r.Atomics=Atomics}catch{}try{r.SharedArrayBuffer=SharedArrayBuffer}catch{}try{r.WebAssembly=WebAssembly}catch{}try{r.Uint8ClampedArray=Uint8ClampedArray}catch{}try{r.Uint16Array=Uint16Array}catch{}try{r.Uint32Array=Uint32Array}catch{}try{r.Intl=Intl}catch{}try{r.Int8Array=Int8Array}catch{}try{r.Int16Array=Int16Array}catch{}try{r.Int32Array=Int32Array}catch{}try{r.Float32Array=Float32Array}catch{}try{r.Float64Array=Float64Array}catch{}try{r.ArrayBuffer=ArrayBuffer}catch{}try{r.DataView=DataView}catch{}try{r.isFinite=isFinite}catch{}try{r.Promise=Promise}catch{}try{r.Proxy=Proxy}catch{}try{r.Symbol=Symbol}catch{}return r};function Epe(r,e,i){let a={};return[r,e??{},i??{}].forEach(h=>Object.defineProperties(a,Object.getOwnPropertyDescriptors(h))),a}function $1t(r,e){let i={};return Object.getOwnPropertyNames(r).forEach(a=>{a in e||Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(r,a))}),i}var ykn=(0,hkn.createRequire)(dt),Wdr=()=>{let r=sbt(),e=Epe($1t(global,r),r,{require:ykn,process,__dirname:i=>D1e.native.normalize(D1e.native.dirname(i)),__filename:i=>D1e.native.normalize(i)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Gdr(r){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),b=Math.max(0,16-(h-e)),x=r.setTimeout(function(){d(h+b)},b);return e=h+b,x},cancelAnimationFrame:function(d){clearTimeout(d)}}}var X1t;function zdr(r=!1){return X1t??(X1t=jdr("evaluate against a browser environment",r,"jsdom"))}function jdr(r,e,i=r){try{return ykn(i)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${i}' in order to ${r} with ts-evaluator`);return}}var Vdr=()=>{let{JSDOM:r}=zdr(!0),{window:e}=new r("",{url:"https://example.com"}),i=sbt(),a=Gdr(e),u=Epe($1t(e,i),$1t(a,e),i);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},Vx="[return]",uF="[break]",G7="[continue]",z7="this",T1e="super",Udr=()=>{let r=sbt(),e=Epe($1t(global,r),r,{import:{meta:{url:i=>{let a=D1e.normalize(i);return`file:///${a.startsWith("/")?a.slice(1):a}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Ckn(r,e){return e.isDeclaration(r)}function Hdr(r,e){return e.isPropertyAccessExpression(r)?!1:"name"in r&&r.name!=null}function vkn(r,e){return r.flags!==e.NodeFlags.Const&&r.flags!==e.NodeFlags.Let}var j7=class extends Error{constructor({node:e,environment:i,message:a}){super(a),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=i}};function Ire(r){return typeof r=="object"&&r!=null&&r instanceof j7}var Z1t=class extends j7{constructor({path:e,node:i,environment:a,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:a,node:i}),this.path=e}},mR=class extends j7{constructor({node:e,environment:i,typescript:a,message:u=`Unexpected Node: '${a.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:i})}};function Jdr(r){var e;let{node:i,evaluate:a,environment:u,typescript:d,throwError:h}=r,b=d.getNameOfDeclaration(i);if(b!=null)return d.isIdentifier(b)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,b)||d.isStringLiteralLike(b)?b.text:d.isNumericLiteral(b)?Number(b.text):d.isComputedPropertyName(b)?a.expression(b.expression,r):h(new mR({node:b,environment:u,typescript:d}))}function bkn(r,e){let{node:i,typescript:a}=e;if(!a.isExternalModuleNameRelative(r))return r;let u=i.getSourceFile().fileName;return D1e.join(D1e.dirname(u),r)}function ebt(r){var e,i,a,u,d;let{node:h,typescript:b,throwError:x,environment:w}=r,L=Jdr(r);if(Ire(L))return L;if(L==null)return x(new mR({node:h,environment:w,typescript:b}));let q=BI(h,r.environment,L);if(q!=null&&q.literal!=null)return q.literal;let te=BI(h,r.environment,"require").literal,me=b.isModuleDeclaration(h)?h:qdr(h,b.SyntaxKind.ModuleDeclaration,b);if(me==null)return x(new mR({node:h,environment:w,typescript:b}));let Ee=me.name.text,ke=bkn(Ee,r);try{let Ue=(u=(i=(e=r.moduleOverrides)===null||e===void 0?void 0:e[Ee])!==null&&i!==void 0?i:(a=r.moduleOverrides)===null||a===void 0?void 0:a[ke])!==null&&u!==void 0?u:te(ke);return b.isModuleDeclaration(h)?Ue:(d=Ue[L])!==null&&d!==void 0?d:Ue}catch(Ue){return Ire(Ue)?Ue:x(new Z1t({node:me,environment:w,path:ke}))}}function Y1t(r,e,i){var a,u,d,h,b,x;let{node:w,throwError:L,environment:q}=i,te=BI(w,i.environment,"require").literal,me=bkn(e,i);try{let Ee=(h=(u=(a=i.moduleOverrides)===null||a===void 0?void 0:a[e])!==null&&u!==void 0?u:(d=i.moduleOverrides)===null||d===void 0?void 0:d[me])!==null&&h!==void 0?h:te(me);return(x=(b=Ee[r])!==null&&b!==void 0?b:Ee.default)!==null&&x!==void 0?x:Ee}catch(Ee){return Ire(Ee)?Ee:L(new Z1t({node:w,environment:q,path:me}))}}function qdr(r,e,i){let a=r;for(;;){if(a=a.parent,a==null)return;if(a.kind===e){let u=i.getCombinedNodeFlags(a);if(!((u&i.NodeFlags.Namespace)!==0||(u&i.NodeFlags.NestedNamespace)!==0))return a}if(i.isSourceFile(a))return}}function yzt(r,e,i,a=new WeakSet){let{typescript:u}=i,d;function h(x,w=0){var L,q,te,me,Ee;if(a.has(x))return!1;if(a.add(x),u.isIdentifier(x)){if(x.text===e)return d=x,!0}else{if(u.isShorthandPropertyAssignment(x))return!1;if(u.isPropertyAssignment(x))return!1;if(u.isImportDeclaration(x)){if(x.importClause!=null){if(x.importClause.name!=null&&h(x.importClause.name)){let ke=x.moduleSpecifier;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}else if(x.importClause.namedBindings!=null&&h(x.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(x)){if(x.name!=null&&h(x.name)){if(u.isIdentifier(x.moduleReference))return d=yzt(x.parent,x.moduleReference.text,i,a),d!=null;if(u.isQualifiedName(x.moduleReference))return!1;{let ke=x.moduleReference.expression;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}}return!1}else if(u.isNamespaceImport(x)){if(h(x.name)){let ke=(q=(L=x.parent)===null||L===void 0?void 0:L.parent)===null||q===void 0?void 0:q.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isNamedImports(x)){for(let ke of x.elements)if(h(ke))return!0}else if(u.isImportSpecifier(x)){if(h(x.name)){let ke=(Ee=(me=(te=x.parent)===null||te===void 0?void 0:te.parent)===null||me===void 0?void 0:me.parent)===null||Ee===void 0?void 0:Ee.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isSourceFile(x)){for(let ke of x.statements)if(h(ke))return!0}else if(u.isVariableStatement(x)){for(let ke of x.declarationList.declarations)if(h(ke)&&(vkn(x.declarationList,u)||w<1))return!0}else if(u.isBlock(x)){for(let ke of x.statements)if(h(ke,w+1))return!0}else if(Hdr(x,u)&&x.name!=null&&h(x.name))return d=x,!0}return!1}return u.findAncestor(r,x=>h(x))?d:void 0}function ukn(r,e){let i=r;for(;;){if(i=i.parent,i==null)return;if(Ckn(i,e)||e.isSourceFile(i))return i}}function Kdr(r){return r!=null&&(typeof r=="function"||typeof r=="object")}function fkn(r){return Kdr(r)}function Czt(r,e){switch(r){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let i=BI(void 0,e,"Function").literal;switch(r){case i.prototype.bind:case i.prototype.call:case i.prototype.apply:return!0}}return!1}var kre=class{constructor(e){this.intent=e}construct(e,i){return this.intent(e,i)}};function Skn(r){return typeof r=="object"&&r!=null&&r instanceof kre}function abt(r,e,i){return Skn(i)?e.throwError(i.construct(r,e)):i}function azt(r){return r.map(e=>typeof e=="symbol"?e.description:e).join(".")}function pkn({hook:r,item:e,scope:i,policy:a}){function u(d,h){let b=(x,w)=>{if(x!==!1)return Skn(x)||Ire(x)?x:w()};return!fkn(h)||Czt(h)?h:new Proxy(h,{construct(x,w,L){return b(r({kind:"__$$_PROXY_CONSTRUCT",policy:a,newTarget:L,argArray:w,target:x,path:azt(d)}),()=>Reflect.construct(x,w,L))},apply(x,w,L=[]){return b(r({kind:"__$$_PROXY_APPLY",policy:a,thisArg:w,argArray:L,target:x,path:azt(d)}),()=>Reflect.apply(x,w,L))},get(x,w,L){let q=[...d,w];return b(r({kind:"__$$_PROXY_GET",policy:a,path:azt(q),target:x}),()=>{let te=Reflect.get(x,w,L),me=Reflect.getOwnPropertyDescriptor(h,w);return me!=null&&me.configurable===!1&&me.writable===!1?h[w]:u(q,te)})}})}return fkn(e)?u([i],e):e}function dkn(r,e){switch(r){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var xkn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Xdr={...xkn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...r)=>r.length===0&&!(r[0]instanceof Date)}};function Ydr(r,e){return typeof r==typeof e||typeof r=="function"}function Qdr(r){return typeof r=="function"}function A1e(r,e,i){let a=i.path.split(".");return czt(r,e,i,a)}function czt(r,e,i,a){let[u,...d]=a;if(u==null)return!1;let h=r[u];if(h==null)return!1;if(typeof h=="string")return czt(r,e,i,[h,...d]);if(Ydr(h,e))return mkn(h,e,i);{let b=h[i.kind];return b!=null?mkn(b,e,i):czt(h,e,i,d)}}function mkn(r,e,i){if(Qdr(r)){let a=i;return a.argArray!=null&&r(...a.argArray)===e}else return r===e}function $dr(r){return A1e(Xdr,!0,r)}var Dpe=class extends j7{constructor({violation:e,node:i,environment:a,message:u}){super({node:i,environment:a,message:`[${e}]: ${u}`}),this.violation=e}},uzt=class extends Dpe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Ekn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function Zdr(r){return A1e(Ekn,"read",r)}var tbt=class extends Dpe{constructor({node:e,environment:i,kind:a,message:u=`${a} operations are in violation of the policy`}){super({violation:"io",message:u,environment:i,node:e}),this.kind=a}};function emr(r){return A1e(Ekn,"write",r)}function tmr(r){return A1e(xkn,!0,r)}var fzt=class extends Dpe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Dkn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function nmr(r){return A1e(Dkn,"exit",r)}var nbt=class extends Dpe{constructor({kind:e,node:i,environment:a,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:i,environment:a}),this.kind=e}};function rmr(r){return A1e(Dkn,"spawnChild",r)}var imr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function omr(r){return A1e(imr,!0,r)}function smr({policy:r,env:e}){let i=h=>!r.console&&omr(h)?!1:!r.io.read&&Zdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"read"})):!r.io.write&&emr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"write"})):!r.process.exit&&nmr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"exit"})):!r.process.exit&&rmr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"spawnChild"})):!r.network&&tmr(h)?new kre((b,x)=>new fzt({...x,node:b,operation:dkn(h.kind,h.path)})):r.deterministic&&$dr(h)?new kre((b,x)=>new uzt({...x,node:b,operation:dkn(h.kind,h.path)})):!0,a=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...a.filter(([,h])=>!("value"in h)).map(([h,b])=>({[h]:b}))),d=Object.assign({},...a.filter(([,h])=>"value"in h).map(([h,b])=>({[h]:h==="require"?new Proxy(b.value,{apply(x,w,L=[]){let[q]=L;return pkn({policy:r,item:Reflect.apply(x,w,L),scope:q,hook:i})}}):pkn({policy:r,item:b.value,scope:h,hook:i})})));return Object.defineProperties(d,{...u})}function MYe(r,e){let[i]=e.split(".");if(RW.default.has(r.env,i))return r.env;if(r.parentEnv!=null)return MYe(r.parentEnv,e)}function pzt(r){return r.preset!=null?r.preset:r.parentEnv!=null?pzt(r.parentEnv):"NONE"}function Tkn(r,e,i){let a=ukn(r.startingNode,i),u=ukn(e,i);if(a?.pos===u?.pos)return r;if(r.parentEnv!=null)return Tkn(r.parentEnv,e,i)}function BI(r,e,i){let[a]=i.split(".");if(RW.default.has(e.env,a)){let u=RW.default.get(e.env,i);switch(i){case"__dirname":case"__filename":{let d=pzt(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&r!=null?{literal:u(r.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=pzt(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&r!=null?{literal:{url:u.url(r.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return BI(r,e.parentEnv,i)}function ST(r,e,i,...a){return a.some(u=>{let d=BI(r,e,u);return d==null?!1:d.literal===i})}function lzt(r){switch(r){case Vx:case uF:case G7:case z7:case T1e:return!0;default:return!1}}function IB({environment:r,path:e,value:i,reporting:a,node:u,newBinding:d=!1}){let[h]=e.split(".");if(RW.default.has(r.env,h)||d||r.parentEnv==null){if(RW.default.has(r.env,e)&&RW.default.get(r.env,e)===i)return;RW.default.set(r.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})}else{let b=r.parentEnv;for(;b!=null;)if(RW.default.has(b.env,h)){if(RW.default.has(b.env,e)&&RW.default.get(b.env,e)===i)return;RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u});return}else b.parentEnv==null?(RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})):b=b.parentEnv}}function amr({inputEnvironment:{extra:r,preset:e},startingNode:i,policy:a}){let u;switch(e){case"NONE":u=Epe(r);break;case"ECMA":u=Epe(sbt(),r);break;case"NODE":case"NODE_CJS":u=Epe(Wdr(),r);break;case"NODE_ESM":u=Epe(Udr(),r);break;case"BROWSER":u=Epe(Vdr(),r);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:i,env:smr({policy:a,env:u})}}function Akn(r,e){return r.kind===e.SyntaxKind.TrueKeyword||r.kind===e.SyntaxKind.FalseKeyword}function kkn(r,e){return r.kind===e.SyntaxKind.NullKeyword}function lmr(r,e){var i;return e.isStringLiteralLike(r)?{success:!0,value:r.text}:Akn(r,e)?{success:!0,value:r.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(r)?{success:!0,value:new Function(`return ${r.text}`)()}:e.isNumericLiteral(r)?{success:!0,value:Number(r.text)}:!((i=e.isBigIntLiteral)===null||i===void 0)&&i.call(e,r)?{success:!0,value:BigInt(r.text)}:e.isIdentifier(r)&&r.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(r)&&r.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(r)&&r.text==="null"?{success:!0,value:null}:e.isIdentifier(r)&&r.text==="undefined"?{success:!0,value:void 0}:kkn(r,e)?{success:!0,value:null}:{success:!1}}var dzt=class extends Dpe{constructor({ops:e,node:i,environment:a,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:i,environment:a}),this.ops=e}};function Ikn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,throwError:b,getCurrentError:x}=r,w=e??(i.initializer==null?void 0:u.expression(i.initializer,r));if(x()==null){if(w==null&&!h.isIdentifier(i.name))return b(new j7({node:i,environment:a}));u.nodeWithArgument(i.name,w,r),x()==null&&d.push(w)}}function wkn(r,e){return r.kind===e.SyntaxKind.ThisKeyword}function lbt(r,e){return r.kind===e.SyntaxKind.SuperKeyword}function MRe(r){var e,i;let{node:a,evaluate:u,typescript:d}=r;if(d.isIdentifier(a))return a.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,a))return a.text;if(wkn(a,d))return z7;if(lbt(a,d))return T1e;if(d.isParenthesizedExpression(a))return MRe({...r,node:a.expression});if(!((i=d.isTypeAssertionExpression)===null||i===void 0)&&i.call(d,a)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(a))return MRe({...r,node:a.expression});if(d.isPropertyAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=MRe({...r,node:a.name});return b==null&&(b=u.expression(a.name,r)),h==null||b==null?void 0:`${h}.${b}`}else if(d.isElementAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=u.expression(a.argumentExpression,r);return h==null||b==null?void 0:`${h}.${b}`}else if(d.isFunctionDeclaration(a))return a.name==null?void 0:a.name.text}var mzt=class extends j7{constructor({node:e,environment:i,message:a="'No leftValue could be determined'"}){super({message:a,environment:i,node:e})}};function Q1t(r,e){var i;return e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?Q1t(r.expression,e):r}function Pkn(r){return r!=null&&typeof r=="object"&&"kind"in r&&"flags"in r&&"pos"in r&&"end"in r}function cmr(r){var e;let{node:i,environment:a,evaluate:u,logger:d,throwError:h,typeChecker:b,typescript:x,getCurrentError:w}=r,L=u.expression(i.left,r);if(w()!=null)return;let q=u.expression(i.right,r);if(w()!=null)return;let te=MRe({...r,node:i.left}),me=i.operatorToken.kind;switch(me){case x.SyntaxKind.AmpersandToken:return L&q;case x.SyntaxKind.AmpersandAmpersandToken:return L&&q;case x.SyntaxKind.AmpersandEqualsToken:case x.SyntaxKind.CaretEqualsToken:case x.SyntaxKind.BarEqualsToken:case x.SyntaxKind.MinusEqualsToken:case x.SyntaxKind.PlusEqualsToken:case x.SyntaxKind.PercentEqualsToken:case x.SyntaxKind.SlashEqualsToken:case x.SyntaxKind.AsteriskEqualsToken:case x.SyntaxKind.AsteriskAsteriskEqualsToken:case x.SyntaxKind.LessThanLessThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case x.SyntaxKind.QuestionQuestionEqualsToken:case x.SyntaxKind.BarBarEqualsToken:case x.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ee=L;switch(me){case x.SyntaxKind.AmpersandEqualsToken:Ee&=q;break;case x.SyntaxKind.CaretEqualsToken:Ee^=q;break;case x.SyntaxKind.BarEqualsToken:Ee|=q;break;case x.SyntaxKind.AsteriskEqualsToken:Ee*=q;break;case x.SyntaxKind.AsteriskAsteriskEqualsToken:Ee**=q;break;case x.SyntaxKind.LessThanLessThanEqualsToken:Ee<<=q;break;case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ee>>=q;break;case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ee>>>=q;break;case x.SyntaxKind.MinusEqualsToken:Ee-=q;break;case x.SyntaxKind.PlusEqualsToken:Ee+=q;break;case x.SyntaxKind.PercentEqualsToken:Ee%=q;break;case x.SyntaxKind.SlashEqualsToken:Ee/=q;break;case x.SyntaxKind.QuestionQuestionEqualsToken:Ee=L??q;break;case x.SyntaxKind.BarBarEqualsToken:L||(Ee=q);break;case x.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ee=q);break}return te!=null&&IB({...r,path:te,value:Ee}),Ee}case x.SyntaxKind.AsteriskToken:return L*q;case x.SyntaxKind.AsteriskAsteriskToken:return L**q;case x.SyntaxKind.BarToken:return L|q;case x.SyntaxKind.BarBarToken:return L||q;case x.SyntaxKind.CaretToken:return L^q;case x.SyntaxKind.CommaToken:return q;case x.SyntaxKind.MinusToken:return L-q;case x.SyntaxKind.PlusToken:return d.logResult(L+q,"BinaryExpression (PlusToken)"),L+q;case x.SyntaxKind.PercentToken:return L%q;case x.SyntaxKind.SlashToken:return L/q;case x.SyntaxKind.EqualsToken:{if(te!=null){let Ee=Q1t(i.left,x),ke=b?.getSymbolAtLocation(Ee),Ue=ke?.valueDeclaration;if(Ue==null&&b==null&&x.isIdentifier(Ee)){let We=yzt(Ee.parent,Ee.text,r);Pkn(We)&&(Ue=We)}let Fe=Ue==null?a:(e=Tkn(a,Ue,x))!==null&&e!==void 0?e:a;IB({...r,environment:Fe,path:te,value:q}),d.logBinding(te,q,"Assignment")}else return h(new mzt({node:i.left,environment:a}));return q}case x.SyntaxKind.EqualsEqualsToken:return L==q;case x.SyntaxKind.EqualsEqualsEqualsToken:return L===q;case x.SyntaxKind.ExclamationEqualsToken:return L!=q;case x.SyntaxKind.ExclamationEqualsEqualsToken:return L!==q;case x.SyntaxKind.GreaterThanToken:return L>q;case x.SyntaxKind.GreaterThanEqualsToken:return L>=q;case x.SyntaxKind.LessThanToken:return L<q;case x.SyntaxKind.LessThanEqualsToken:return L<=q;case x.SyntaxKind.InKeyword:return L in q;case x.SyntaxKind.QuestionQuestionToken:return L??q;case x.SyntaxKind.InstanceOfKeyword:return L instanceof q}return h(new mR({node:i.operatorToken,typescript:x,environment:a}))}var vzt="___lazyCallFlag";function umr(r){return r!=null&&typeof r=="object"&&vzt in r}function bzt(r){return r===void 0?"undefined":r===null?"null":typeof r=="string"?`"${r}"`:r.toString()}var rbt=class extends j7{constructor({value:e,node:i,environment:a,message:u=`${bzt(e)} is not a function'`}){super({message:u,environment:a,node:i}),this.value=e}};function xpe(r,e){var i;return lbt(r,e)?!0:e.isPropertyAccessExpression(r)?xpe(r.expression,e)||xpe(r.name,e):e.isElementAccessExpression(r)?xpe(r.expression,e)||xpe(r.argumentExpression,e):e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?xpe(r.expression,e):!1}function fmr(r){let{node:e,environment:i,evaluate:a,throwError:u,typescript:d,logger:h,getCurrentError:b}=r,x=[];for(let L=0;L<e.arguments.length;L++)if(x[L]=a.expression(e.arguments[L],r),b()!=null)return;let w=a.expression(e.expression,r);if(b()==null)if(umr(w)){let L=xpe(e.expression,d)?BI(e,i,z7):void 0,q=w.invoke(L?.literal,...x);return b()!=null?void 0:(h.logResult(q,"CallExpression"),q)}else{if(e.questionDotToken==null&&typeof w!="function")return u(new rbt({value:w,node:e.expression,environment:i}));let L=typeof w!="function"?void 0:abt(e,r,w(...x));return b()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function pmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function i6(r,e){return{parentEnv:r,startingNode:e,env:{}}}function NQ(r,e){let i=Array.isArray(r)?r:r.modifiers;return i!=null&&i.some(a=>a.kind===e)}function RQ(r,e,i){let{node:a,evaluate:u,environment:d,typescript:h,getCurrentError:b}=r,x=a.filter(w=>!(h.isIdentifier(w.name)&&w.name.text==="this"));for(let w=0;w<x.length;w++){let L=x[w];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(w),r),b()!=null)return;break}else{if(u.nodeWithArgument(L,e[w],r),b()!=null)return;if(i!=null&&h.isIdentifier(L.name)&&(NQ(L,h.SyntaxKind.PublicKeyword)||NQ(L,h.SyntaxKind.ProtectedKeyword)||NQ(L,h.SyntaxKind.PrivateKeyword))){let q=BI(L,d,L.name.text);q!=null&&(i[L.name.text]=q.literal)}}}}function dmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=NQ(e,d.SyntaxKind.AsyncKeyword)?async(...x)=>{let w=i6(i,e),L={...r,environment:w};if(IB({...L,path:Vx,value:!1,newBinding:!0}),IB({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:w},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,w,!0,Vx)?u.pop():void 0):a.expression(e.body,L)}:(...x)=>{let w=i6(i,e),L={...r,environment:w};if(IB({...L,path:Vx,value:!1,newBinding:!0}),IB({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:w},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,w,!0,Vx)?u.pop():void 0):a.expression(e.body,L)};return b.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(b,BI(e,i,"Function").literal),b}function mmr({node:r}){return r.text}function _mr({node:r}){return Number(r.text)}function hmr({node:r,typescript:e}){return r.kind===e.SyntaxKind.TrueKeyword}function Bmr({node:r,environment:e}){let i=BI(r,e,"Function").literal;return new i(`return ${r.text}`)()}function gmr(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r,d=BI(e,a,"Object").literal,h=d.create(d.prototype);IB({...r,path:z7,value:h,newBinding:!0});for(let b of e.properties)if(i.nodeWithArgument(b,h,r),u()!=null)return;return h}function ymr(r){return r!=null&&r[Symbol.iterator]!=null}function Cmr(r){let{node:e,environment:i,evaluate:a,typescript:u,getCurrentError:d}=r,b=BI(e,i,"Array").literal.of();for(let x of e.elements){let w=a.expression(x,r);if(d()!=null)return;u.isSpreadElement(x)&&ymr(w)?b.push(...w):b.push(w)}return b}var ibt=class extends j7{constructor({node:e,environment:i,message:a=`'${e.text}' is not defined'`}){super({message:a,environment:i,node:e})}};function _kn(r){let{node:e,environment:i,typeChecker:a,evaluate:u,stack:d,logger:h,reporting:b,typescript:x,throwError:w,getCurrentError:L}=r,q=BI(e,i,e.text);if(q!=null)return h.logBinding(e.text,q.literal,"Lexical Environment match"),q.literal;let te=x.isShorthandPropertyAssignment(e.parent)?a?.getShorthandAssignmentValueSymbol(e.parent):a?.getSymbolAtLocation(e),me=te?.valueDeclaration;if(te!=null&&me==null)try{let Ee=a?.getAliasedSymbol(te);me=Ee?.valueDeclaration}catch{}if(me==null){let Ee=yzt(e.parent,e.text,r);if(L()!=null)return;if(Pkn(Ee)&&!x.isIdentifier(Ee))me=Ee;else if(Ee!=null)return IB({...r,path:e.text,value:Ee}),h.logBinding(e.text,Ee,"Discovered declaration value"),Ee}if(me!=null){if(me.getSourceFile().isDeclarationFile){let ke=ebt({...r,node:me});return L()!=null?void 0:(IB({environment:i,path:e.text,value:ke,reporting:b,node:me}),h.logBinding(e.text,ke,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),ke)}if(x.isVariableDeclaration(me)&&me.getSourceFile().fileName===e.getSourceFile().fileName&&me.pos>e.pos)if(x.isVariableDeclarationList(me.parent)&&vkn(me.parent,x)){IB({...r,path:e.text,value:void 0,newBinding:!0,node:me}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return w(new ibt({node:e,environment:i}));if(u.declaration(me,r),L()!=null)return;let Ee=d.pop();return IB({...r,path:e.text,value:Ee,node:me}),h.logBinding(e.text,Ee,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),Ee}return w(new ibt({node:e,environment:i}))}function vmr(r){let{node:e,environment:i,typescript:a,evaluate:u,getCurrentError:d}=r,h=i6(i,e);for(let b=0;b<e.statements.length;b++){let x=e.statements[b];if(!(a.isConstructorDeclaration(e.parent)&&b===0&&a.isExpressionStatement(x)&&a.isCallExpression(x.expression)&&lbt(x.expression.expression,a))&&(u.statement(x,{...r,environment:h}),d()!=null||ST(e,h,!0,uF,G7,Vx)))break}}function bmr({node:r,evaluate:e,stack:i,...a}){let{getCurrentError:u}=a;if(IB({...a,environment:a.environment,path:Vx,value:!0,node:r}),r.expression==null)i.push(void 0);else{let d=e.expression(r.expression,a);if(u()!=null)return;i.push(d)}}function Nkn({node:r,evaluate:e,...i}){for(let a of r.declarations)if(e.declaration(a,i),i.getCurrentError()!=null)return}function Smr({node:r,...e}){Nkn({node:r.declarationList,...e})}function xmr(r){var e,i;let{node:a,environment:u,evaluate:d,reporting:h,typescript:b,throwError:x,getCurrentError:w}=r,L=d.expression(a.operand,r);if(w()==null)switch(a.operator){case b.SyntaxKind.PlusToken:return+L;case b.SyntaxKind.MinusToken:return-L;case b.SyntaxKind.TildeToken:return~L;case b.SyntaxKind.ExclamationToken:return!L;case b.SyntaxKind.PlusPlusToken:{if(!b.isIdentifier(a.operand)&&!(!((e=b.isPrivateIdentifier)===null||e===void 0)&&e.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=++q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}case b.SyntaxKind.MinusMinusToken:{if(!b.isIdentifier(a.operand)&&!(!((i=b.isPrivateIdentifier)===null||i===void 0)&&i.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=--q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}}}function Emr(r){let{evaluate:e,node:i,statementTraversalStack:a,environment:u,typescript:d,getCurrentError:h}=r,b=e.expression(i.expression,r);if(b==null||h()!=null)return;let x=i.questionDotToken!=null&&b==null?void 0:b[i.name.text];return typeof x=="function"&&a.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(w,...L)=>abt(i,r,w!=null&&!Czt(x,u)?b[i.name.text].call(w,...L):b[i.name.text](...L))}:x}function Dmr(r){let{node:e,environment:i,evaluate:a,statementTraversalStack:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()!=null)return;let x=a.expression(e.argumentExpression,r);if(h()!=null)return;let w=e.questionDotToken!=null&&b==null?void 0:b[x];return typeof w=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(L,...q)=>abt(e,r,L!=null&&!Czt(w,i)?b[x].call(L,...q):b[x](...q))}:w}function Tmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Amr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...r,node:e.parameters,environment:q},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};b!=null&&IB({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,BI(e,i,"Function").literal),u.push(x)}function kmr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.expression,i);if(a()==null){if(u){if(e.statement(r.thenStatement,i),a()!=null)return}else if(r.elseStatement!=null)return e.statement(r.elseStatement,i)}}function Imr({node:r,evaluate:e,stack:i,...a}){let u=e.expression(r.expression,a);a.getCurrentError()==null&&i.push(u)}function wmr({node:r,evaluate:e,...i}){let a="";a+=r.head.text;for(let u of r.templateSpans){let d=e.expression(u.expression,i);if(i.getCurrentError()!=null)return;a+=d,a+=u.literal.text}return a}function Pmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Nmr(r){var e,i;let{evaluate:a,node:u,environment:d,typescript:h,throwError:b,reporting:x}=r;switch(a.expression(u.operand,r),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let w=MYe(d,u.operand.text)[u.operand.text]++;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:w,node:u}),w}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((i=h.isPrivateIdentifier)===null||i===void 0)&&i.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let w=MYe(d,u.operand.text)[u.operand.text]--;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:w,node:u}),w}}}function Rmr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=[];if(r.arguments!=null){for(let h=0;h<r.arguments.length;h++)if(u[h]=e.expression(r.arguments[h],i),a()!=null)return}let d=e.expression(r.expression,i);if(a()==null)return typeof d=="function"&&IB({...i,node:r,path:"[[NewTarget]]",value:d,newBinding:!0}),abt(r,i,new d(...u))}function Lmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Mmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Fmr({node:r,evaluate:e,...i}){let a=e.expression(r.expression,i);i.getCurrentError()==null&&e.nodeWithArgument(r.caseBlock,a,i)}var _zt=class extends j7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:i,environment:a}){var u,d;super({message:e,environment:a,node:(d=(u=i.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:i.createEmptyStatement()})}};function Omr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));if(e.awaitModifier!=null)return h(new _zt({typescript:d,environment:i}));for(let w of x){let L=i6(i,e),q={...r,environment:L};if(IB({...q,path:uF,value:!1,newBinding:!0}),IB({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],w,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,uF)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Wmr({node:r,environment:e}){let i=BI(r,e,z7);return i?.literal}function Gmr(r){IB({...r,path:uF,value:!0})}function zmr(r){IB({...r,path:G7,value:!0})}function jmr({environment:r,evaluate:e,typescript:i,...a}){let{node:u,getCurrentError:d}=a,h=i6(r,u),b={...a,environment:h};if(u.initializer!==void 0){if(i.isVariableDeclarationList(u.initializer)){for(let x of u.initializer.declarations)if(e.declaration(x,b),d()!=null)return}else if(e.expression(u.initializer,b),d()!=null)return}for(;;){let x=i6(h,u),w={...a,environment:x};if(IB({...w,path:uF,value:!1,newBinding:!0}),IB({...w,path:G7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,b))||d()!=null||(e.statement(u.statement,w),d()!=null))return;if(ST(u,x,!0,uF))break;if(ST(u,x,!0,Vx))return;if(u.incrementor!=null){if(e.expression(u.incrementor,b),d()!=null)return}else if(ST(u,x,!0,G7))continue}}function Vmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()==null)for(;b;){let x=i6(i,e),w={...r,environment:x};if(IB({...w,path:uF,value:!1,newBinding:!0}),IB({...w,path:G7,value:!1,newBinding:!0}),a.statement(e.statement,w),h()!=null)return;if(ST(e,x,!0,uF)){u.logBreak(e,d);break}else if(ST(e,x,!0,Vx)){u.logReturn(e,d);return}if(b=a.expression(e.expression,r),h()!=null)return;if(ST(e,x,!0,G7)){u.logContinue(e,d);continue}}}function Umr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));for(let w in x){let L=i6(i,e),q={...r,environment:L};if(IB({...q,path:uF,value:!1,newBinding:!0}),IB({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],w,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,uF)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Hmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};return b!=null&&IB({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,BI(e,i,"Function").literal),x}var hzt=class extends j7{constructor({node:e,environment:i,message:a="Missing catch or finally after try"}){super({node:e,environment:i,message:a})}};function Jmr(r){let{node:e,evaluate:i,environment:a,throwError:u}=r,d,h=()=>{try{return i.statement(e.tryBlock,{...r,throwError:w=>(d=w,w),getCurrentError:()=>d})}catch(w){d=w}},b=w=>{i.nodeWithArgument(e.catchClause,w,r)},x=()=>{let w;i.statement(e.finallyBlock,{...r,throwError:L=>(w=L,r.throwError(L),L),getCurrentError:()=>w})};if(e.catchClause==null&&e.finallyBlock==null)return u(new hzt({node:e,environment:a}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&b(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&b(d),x()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),x())}function Rkn({name:r,extendedType:e,ctor:i=()=>{}}){return e==null?new Function("ctor",`return class ${r??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(i):new Function("extendedType","ctor",`return class ${r??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,i)}function FYe(r,e){return"canHaveDecorators"in e?e.canHaveDecorators(r):!0}function OYe(r,e){var i;if("getDecorators"in e)return e.getDecorators(r);{let a="decorators"in r&&Array.isArray(r.decorators)?r.decorators:void 0,u=(i=r.modifiers)===null||i===void 0?void 0:i.filter(d=>"expression"in d);return[...a??[],...u??[]]}}function qmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,w=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(w!=null){if(a.declaration(w,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Rkn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&IB({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;d.logHeritage(me),u.push(me),d.logStack(u)}function Kmr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r;function h(...b){let x=i6(i,e),w={...r,environment:x};if(IB({...w,path:Vx,value:!1,newBinding:!0}),IB({...w,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...w,path:z7,value:this,newBinding:!0}),RQ({...w,node:e.parameters},b,this),!(e.body==null||d()!=null)&&(a.statement(e.body,w),d()==null&&ST(e,x,!0,Vx)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Xmr({node:r,environment:e}){let i=BI(r,e,T1e);return i?.literal}function Ymr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Qmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,w=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(w!=null){if(a.declaration(w,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Rkn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&IB({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;return d.logHeritage(me),me}function $mr(r){return null}function Zmr({node:r,evaluate:e,...i}){e.expression(r.expression,i)}function e_r({evaluate:r,node:e,...i}){let a=r.expression(e.expression,i);if(i.getCurrentError()==null)return typeof a}function t_r({node:r,environment:e}){let i=BI(r,e,"BigInt").literal;return i(r.text.endsWith("n")?r.text.slice(0,-1):r.text)}function n_r(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r,h=BI(e,i,"Object").literal,b=h.create(h.prototype),x=e.name.text;IB({...r,path:x,value:b,newBinding:!0});for(let w of e.members)if(a.nodeWithArgument(w,b,r),d()!=null)return;b.toString=()=>`[Enum: ${x}]`,u.push(b)}function r_r(r){let{node:e,evaluate:i,environment:a,typeChecker:u,stack:d,getCurrentError:h}=r,b=BI(e,a,"Object").literal,x=b.create(b.prototype),w=u?.getSymbolAtLocation(e);if(w!=null){let L=w.exports;if(L!=null)for(let[q,te]of L.entries()){let me=te.valueDeclaration;if(me==null||(i.declaration(me,r),h()!=null))return;x[q]=d.pop()}}d.push(x)}function i_r(r){let{getCurrentError:e,stack:i}=r,a=ebt(r);e()==null&&i.push(a)}function o_r({node:r,evaluate:e,...i}){r.importClause!=null&&e.declaration(r.importClause,i)}function s_r({node:r,evaluate:e,...i}){let{getCurrentError:a,throwError:u}=i,d=e.expression(r.expression,i);if(a()==null)return u(d)}var Bzt=class extends Dpe{constructor({duration:e,environment:i,node:a,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:a,environment:i}),this.duration=e}};async function a_r(r){let{node:e,environment:i,evaluate:a,policy:u,throwError:d,getCurrentError:h}=r,b=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new Bzt({duration:u.maxOpDuration,node:e,environment:i}))},u.maxOpDuration),x=a.expression(e.expression,r);if(b!=null&&clearTimeout(b),h()==null)return x}function l_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.condition,i);if(a()==null)return u?e.expression(r.whenTrue,i):e.expression(r.whenFalse,i)}function cbt(r,e){let i=r;for(;i!=null&&!e.isSourceFile(i);){if(NQ(i,e.SyntaxKind.StaticKeyword))return!0;i=i.parent}return!1}function Lkn(r,e){var i,a;let{node:u,environment:d,evaluate:h,stack:b,typescript:x,getCurrentError:w}=r,L=h.nodeWithValue(u.name,r);if(w()!=null)return;let q=cbt(u,x);if(e==null){let me;if(x.isClassLike(u.parent)){if(h.declaration(u.parent,r),w()!=null)return;me=b.pop()}else if(me=h.expression(u.parent,r),w()!=null)return;b.push(q?me[L]:me.prototype[L]);return}let te=NQ(u,x.SyntaxKind.AsyncKeyword)?async function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(IB({...Ue,path:Vx,value:!1,newBinding:!0}),IB({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...Ue,path:z7,value:this,newBinding:!0}),IB({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||w()!=null)&&(h.statement(u.body,Ue),w()==null&&ST(u,ke,!0,Vx)))return b.pop()}:function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(IB({...Ue,path:Vx,value:!1,newBinding:!0}),IB({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...Ue,path:z7,value:this,newBinding:!0}),IB({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||w()!=null)&&(h.statement(u.body,Ue),w()==null&&ST(u,ke,!0,Vx)))return b.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,BI(u,d,"Function").literal),e[L]=te,FYe(u,x))for(let me of(i=OYe(u,x))!==null&&i!==void 0?i:[]){if(h.nodeWithArgument(me,[e,L],r),w()!=null)return;b.pop()}if(u.parameters!=null){let me=u.parameters.filter(Ee=>!(x.isIdentifier(Ee.name)&&Ee.name.text==="this"));for(let Ee=0;Ee<me.length;Ee++){let ke=me[Ee];if(FYe(ke,x))for(let Ue of(a=OYe(ke,x))!==null&&a!==void 0?a:[]){if(h.nodeWithArgument(Ue,[e,L,Ee],r),w()!=null)return;b.pop()}}}}function Mkn({node:r,evaluate:e,typescript:i,stack:a,...u},d){var h;let{getCurrentError:b}=u,x=e.nodeWithValue(r.name,u);if(b()==null){if(d==null){if(e.declaration(r.parent,u),b()!=null)return;let w=a.pop(),L=cbt(r,i);a.push(L?w[x]:w.prototype[x]);return}if(d[x]=r.initializer==null?void 0:e.expression(r.initializer,u),b()==null&&FYe(r,i))for(let w of(h=OYe(r,i))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(w,[d,x],u),b()!=null)return;a.pop()}}}function Fkn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,getCurrentError:b}=r;if(h.isTypeLiteralNode(i.parent)||h.isInterfaceDeclaration(i.parent))return;let x=u.nodeWithValue(i.name,r);if(b()!=null)return;let w=cbt(i,h);if(e==null){let te;if(h.isClassLike(i.parent)){if(u.declaration(i.parent,r),b()!=null)return;te=d.pop()}else if(te=u.expression(i.parent,r),b()!=null)return;d.push(w?te[x]:te.prototype[x]);return}function L(){let te=i6(a,i),me={...r,environment:te};if(IB({...me,path:Vx,value:!1,newBinding:!0}),IB({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...me,path:z7,value:this,newBinding:!0}),IB({...me,path:T1e,value:w?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),i.body!=null&&(u.statement(i.body,me),b()==null&&ST(i,te,!0,Vx)))return d.pop()}L.toString=()=>`[Get: ${x}]`;let q=Object.getOwnPropertyDescriptor(e,x);q==null&&(q={}),Object.defineProperty(e,x,{...q,configurable:!0,get:L})}function c_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i;if(!(r.name!=null&&(e.declaration(r.name,i),a()!=null))&&r.namedBindings!=null)if("elements"in r.namedBindings){for(let u of r.namedBindings.elements)if(e.declaration(u,i),a()!=null)return}else e.declaration(r.namedBindings.name,i)}function u_r({node:r,evaluate:e,...i}){var a;e.declaration((a=r.propertyName)!==null&&a!==void 0?a:r.name,i)}function f_r({node:r,evaluate:e,...i}){e.declaration(r.name,i)}var obt=class extends j7{constructor({node:e,environment:i,message:a="'SyntaxError'"}){super({message:a,environment:i,node:e})}};function p_r({node:r,typescript:e,throwError:i,environment:a}){var u,d;switch(r.keywordToken){case e.SyntaxKind.NewKeyword:switch(r.name.text){case"target":return(u=BI(r,a,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return i(new obt({node:r.name,environment:a}))}case e.SyntaxKind.ImportKeyword:switch(r.name.text){case"meta":return(d=BI(r,a,"import.meta"))===null||d===void 0?void 0:d.literal;default:return i(new obt({node:r.name,environment:a}))}}}function Szt({node:r,...e}){var i,a,u,d,h,b;return e.typescript.isIdentifier(r)?_kn({node:r,...e}):!((a=(i=e.typescript).isPrivateIdentifier)===null||a===void 0)&&a.call(i,r)?_kn({node:r,...e}):e.typescript.isStringLiteralLike(r)?mmr({node:r,...e}):e.typescript.isNumericLiteral(r)?_mr({node:r,...e}):Akn(r,e.typescript)?hmr({node:r,...e}):e.typescript.isForOfStatement(r)?Omr({node:r,...e}):e.typescript.isForInStatement(r)?Umr({node:r,...e}):e.typescript.isForStatement(r)?jmr({node:r,...e}):e.typescript.isWhileStatement(r)?Vmr({node:r,...e}):e.typescript.isRegularExpressionLiteral(r)?Bmr({node:r,...e}):e.typescript.isObjectLiteralExpression(r)?gmr({node:r,...e}):e.typescript.isAwaitExpression(r)?a_r({node:r,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,r)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(r)?Pmr({node:r,...e}):e.typescript.isTemplateExpression(r)?wmr({node:r,...e}):e.typescript.isMethodDeclaration(r)?Lkn({node:r,...e}):e.typescript.isPropertyDeclaration(r)?Mkn({node:r,...e}):e.typescript.isGetAccessorDeclaration(r)?Fkn({node:r,...e}):e.typescript.isArrayLiteralExpression(r)?Cmr({node:r,...e}):e.typescript.isSourceFile(r)?r_r({node:r,...e}):e.typescript.isModuleDeclaration(r)?i_r({node:r,...e}):e.typescript.isPrefixUnaryExpression(r)?xmr({node:r,...e}):e.typescript.isPostfixUnaryExpression(r)?Nmr({node:r,...e}):e.typescript.isVariableStatement(r)?Smr({node:r,...e}):e.typescript.isComputedPropertyName(r)?Tmr({node:r,...e}):e.typescript.isVariableDeclarationList(r)?Nkn({node:r,...e}):e.typescript.isImportDeclaration(r)?o_r({node:r,...e}):e.typescript.isImportClause(r)?c_r({node:r,...e}):e.typescript.isImportSpecifier(r)?u_r({node:r,...e}):e.typescript.isNamespaceImport(r)?f_r({node:r,...e}):e.typescript.isImportEqualsDeclaration(r)?({...e},void 0):e.typescript.isMetaProperty(r)?p_r({node:r,...e}):e.typescript.isThrowStatement(r)?s_r({node:r,...e}):e.typescript.isVariableDeclaration(r)?Ikn({node:r,...e}):e.typescript.isEnumDeclaration(r)?n_r({node:r,...e}):e.typescript.isConstructorDeclaration(r)?Kmr({node:r,...e}):e.typescript.isBinaryExpression(r)?cmr({node:r,...e}):e.typescript.isParenthesizedExpression(r)?pmr({node:r,...e}):e.typescript.isExpressionStatement(r)?Imr({node:r,...e}):e.typescript.isArrowFunction(r)?dmr({node:r,...e}):e.typescript.isFunctionDeclaration(r)?Amr({node:r,...e}):e.typescript.isFunctionExpression(r)?Hmr({node:r,...e}):e.typescript.isClassDeclaration(r)?qmr({node:r,...e}):e.typescript.isIfStatement(r)?kmr({node:r,...e}):e.typescript.isConditionalExpression(r)?l_r({node:r,...e}):e.typescript.isPropertyAccessExpression(r)?Emr({node:r,...e}):e.typescript.isElementAccessExpression(r)?Dmr({node:r,...e}):e.typescript.isCallExpression(r)?fmr({node:r,...e}):e.typescript.isSwitchStatement(r)?Fmr({node:r,...e}):e.typescript.isNewExpression(r)?Rmr({node:r,...e}):e.typescript.isNonNullExpression(r)?Lmr({node:r,...e}):e.typescript.isAsExpression(r)?Mmr({node:r,...e}):e.typescript.isBlock(r)?vmr({node:r,...e}):e.typescript.isClassExpression(r)?Qmr({node:r,...e}):e.typescript.isSpreadElement(r)?Ymr({node:r,...e}):e.typescript.isTryStatement(r)?Jmr({node:r,...e}):e.typescript.isReturnStatement(r)?bmr({node:r,...e}):wkn(r,e.typescript)?Wmr({node:r,...e}):e.typescript.isVoidExpression(r)?Zmr({node:r,...e}):e.typescript.isTypeOfExpression(r)?e_r({node:r,...e}):lbt(r,e.typescript)?Xmr({node:r,...e}):kkn(r,e.typescript)?$mr({node:r,...e}):!((b=(h=e.typescript).isBigIntLiteral)===null||b===void 0)&&b.call(h,r)?t_r({node:r,...e}):e.typescript.isBreakStatement(r)?Gmr({node:r,...e}):e.typescript.isContinueStatement(r)?zmr({node:r,...e}):e.typescript.isTypeAliasDeclaration(r)?({...e},void 0):e.typescript.isInterfaceDeclaration(r)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new mR({node:r,environment:e.environment,typescript:e.typescript}))}function xzt(){return[]}function d_r(r){r.logger.logNode(r.node,r.typescript),r.statementTraversalStack=xzt(),Szt(r)}function m_r(r){let{getCurrentError:e}=r;r.logger.logNode(r.node,r.typescript);let i=Szt(r);if(e()==null)return r.reporting.reportIntermediateResults!=null&&r.reporting.reportIntermediateResults({node:r.node,value:i}),i}function __r(r){r.logger.logNode(r.node,r.typescript),Szt(r)}function h_r({node:r,evaluate:e,typescript:i,logger:a,...u},d){var h;i.isIdentifier(r)||!((h=i.isPrivateIdentifier)===null||h===void 0)&&h.call(i,r)?(IB({...u,node:r,path:r.text,value:d,newBinding:!0}),a.logBinding(r.text,d,"evaluateBindingName")):e.nodeWithArgument(r,d,u)}function B_r(r,e){let{node:i,environment:a,evaluate:u,typescript:d,getCurrentError:h}=r,b=u.nodeWithValue(i.name,r);if(h()!=null)return;let x=cbt(i,d);function w(...q){let te=i6(a,i),me={...r,environment:te};IB({...me,path:Vx,value:!1,newBinding:!0}),IB({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...me,path:z7,value:this,newBinding:!0}),IB({...me,path:T1e,value:x?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...me,node:i.parameters},q),!(i.body==null||h()!=null)&&(u.statement(i.body,me),h()==null)}w.toString=()=>`[Set: ${b}]`;let L=Object.getOwnPropertyDescriptor(e,b);L==null&&(L={}),Object.defineProperty(e,b,{...L,configurable:!0,set:w})}function g_r({node:r,evaluate:e,...i},a){let u=e.expression(r.initializer,i);if(i.getCurrentError()!=null)return;let d=e.nodeWithValue(r.name,i);i.getCurrentError()==null&&(a[d]=u)}function y_r({node:r,evaluate:e,logger:i,...a},u){let d=u!=null||r.initializer===void 0?u:e.expression(r.initializer,a);a.getCurrentError()==null&&(i.logBinding(r.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(r.name,d,a))}function C_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i,d=r.name.text,h=e.expression(r.name,i);u()==null&&(a[d]=h)}function v_r({node:r,evaluate:e,...i},a){let u=e.expression(r.expression,i);i.getCurrentError()==null&&Object.assign(a,u)}function b_r({node:r,evaluate:e,...i},a){let u=a[Symbol.iterator](),d=0;for(;d<r.elements.length;){let{done:h,value:b}=u.next();if(h===!0)break;if(e.nodeWithArgument(r.elements[d++],b,i),i.getCurrentError()!=null)return}}function S_r(r,e){var i,a,u,d;let{node:h,evaluate:b,logger:x,typescript:w,getCurrentError:L}=r,q=h.initializer==null?void 0:b.expression(h.initializer,r);if(L()==null){if((w.isIdentifier(h.name)||!((i=w.isPrivateIdentifier)===null||i===void 0)&&i.call(w,h.name))&&h.propertyName!=null){let te=h.name.text,me=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let Ee=w.isArrayBindingPattern(h.parent)?e:e[me];IB({...r,path:te,value:Ee??q,newBinding:!0})}else if((w.isIdentifier(h.name)||!((a=w.isPrivateIdentifier)===null||a===void 0)&&a.call(w,h.name))&&h.propertyName==null){let te=h.name.text,me=w.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;x.logBinding(h.name.text,Ee),IB({...r,path:h.name.text,value:Ee,newBinding:!0})}else if(!w.isIdentifier(h.name)&&!(!((u=w.isPrivateIdentifier)===null||u===void 0)&&u.call(w,h.name))&&h.propertyName!=null){let te=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let me=w.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;if(b.nodeWithArgument(h.name,Ee,r),L()!=null)return}else if(!w.isIdentifier(h.name)&&!(!((d=w.isPrivateIdentifier)===null||d===void 0)&&d.call(w,h.name))&&h.propertyName==null){let te=e??q;if(b.nodeWithArgument(h.name,te,r),L()!=null)return}}}function x_r({node:r,evaluate:e,...i},a){for(let u of r.elements)if(e.nodeWithArgument(u,a,i),i.getCurrentError()!=null)return}function E_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i6(u,i),b={...r,environment:h};IB({...b,path:uF,value:!1,newBinding:!0});for(let x of i.clauses){if(a.nodeWithArgument(x,e,b),d()!=null)return;if(ST(i,h,!0,uF,G7,Vx))break}}function D_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i;if(!(e.expression(r.expression,i)!==a||u()!=null))for(let h of r.statements){if(e.statement(h,i),u()!=null)return;if(ST(r,i.environment,!0,uF,G7,Vx))break}}function T_r(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r;for(let d of e.statements){if(i.statement(d,r),u()!=null)return;if(ST(e,a,!0,uF,G7,Vx))break}}function A_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i.variableDeclaration==null?u:i6(u,i),b={...r,environment:h};i.variableDeclaration!=null&&(a.nodeWithArgument(i.variableDeclaration,e,b),d()!=null)||a.statement(i.block,b)}function k_r(r,e,i,a){let u=arguments.length,d=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a,h;for(let b=r.length-1;b>=0;b--)(h=r[b])&&(d=(u<3?h(d):u>3?h(e,i,d):h(e,i))||d);return u>3&&d&&Object.defineProperty(e,i,d),d}function I_r(r,e){return function(i,a){e(i,a,r)}}function w_r(r,[e,i,a]){let{node:u,evaluate:d,environment:h,throwError:b,stack:x,getCurrentError:w}=r,L=d.expression(u.expression,r);if(w()==null){if(typeof L!="function")return b(new rbt({node:u,environment:h,value:L,message:`${bzt(L)} is not a valid decorator implementation'`}));x.push(k_r([a!=null?I_r(a,L):L],e,i))}}function P_r(r,e){let{node:i,typeChecker:a,evaluate:u,getCurrentError:d}=r,h=a?.getConstantValue(i);if(h==null)if(i.initializer!=null){if(h=u.expression(i.initializer,r),d()!=null)return}else{let x=i.parent.members,w=x.findIndex(te=>te===i),L=x.slice(0,w),q=0;for(let te of[...L].reverse())if(q++,te.initializer!=null){let me=u.expression(te.initializer,r);if(d()!=null)return;if(typeof me=="number"){h=me+q;break}}h==null&&(h=w)}let b=u.nodeWithValue(i.name,r);d()==null&&(typeof h=="string"?e[b]=h:e[e[b]=h??0]=b)}function N_r(r,e){r.logger.logNode(r.node,r.typescript,"nodeWithArgument");let{node:i,...a}=r;if(a.typescript.isGetAccessorDeclaration(i))Fkn({node:i,...a},e);else if(a.typescript.isSetAccessorDeclaration(i))B_r({node:i,...a},e);else if(a.typescript.isPropertyAssignment(i))g_r({node:i,...a},e);else if(a.typescript.isPropertyDeclaration(i))Mkn({node:i,...a},e);else if(a.typescript.isParameter(i))y_r({node:i,...a},e);else if(a.typescript.isEnumMember(i))P_r({node:i,...a},e);else if(a.typescript.isShorthandPropertyAssignment(i))C_r({node:i,...a},e);else if(a.typescript.isDecorator(i))w_r({node:i,...a},e);else if(a.typescript.isSpreadAssignment(i))v_r({node:i,...a},e);else if(a.typescript.isMethodDeclaration(i))Lkn({node:i,...a},e);else if(a.typescript.isArrayBindingPattern(i))b_r({node:i,...a},e);else if(a.typescript.isBindingElement(i))S_r({node:i,...a},e);else if(a.typescript.isObjectBindingPattern(i))x_r({node:i,...a},e);else if(a.typescript.isVariableDeclaration(i))Ikn({node:i,...a},e);else if(a.typescript.isCaseBlock(i))E_r({node:i,...a},e);else if(a.typescript.isCaseClause(i))D_r({node:i,...a},e);else if(a.typescript.isDefaultClause(i))T_r({node:i,...a});else if(a.typescript.isCatchClause(i))A_r({node:i,...a},e);else if(a.typescript.isBindingName(i))h_r({node:i,...a},e);else if(a.typescript.isOmittedExpression(i))({...a});else{if(r.getCurrentError()!=null)return;a.throwError(new mR({node:i,environment:a.environment,typescript:a.typescript}))}}function R_r({node:r,evaluate:e,typescript:i,...a}){var u;return i.isComputedPropertyName(r)?e.expression(r.expression,a):i.isIdentifier(r)||!((u=i.isPrivateIdentifier)===null||u===void 0)&&u.call(i,r)?r.text:e.expression(r,a)}function L_r(r){r.logger.logNode(r.node,r.typescript,"nodeWithValue");let{node:e,...i}=r;return r.typescript.isPropertyName(e)||r.typescript.isPrivateIdentifier(e)?R_r({node:e,...i}):r.throwError(new mR({node:e,environment:r.environment,typescript:r.typescript}))}function M_r(r){let e=0,{policy:i,reporting:a}=r,u=(b,x)=>{let{environment:w=r.environment,statementTraversalStack:L=r.statementTraversalStack,getCurrentError:q=r.getCurrentError,throwError:te=r.throwError}=x??{},me=q();if(me!=null)return me;if(e++,e>=i.maxOps)return te(new dzt({ops:e,environment:w,node:b}));L.push(b.kind),a.reportTraversal!=null&&a.reportTraversal({node:b})},d={statement:(b,x)=>{let w={...x,statementTraversalStack:xzt()},L=u(b,w);if(!Ire(L))return d_r(h(b,w))},declaration:(b,x)=>{let w=u(b,x);if(!Ire(w))return __r(h(b,x))},nodeWithArgument:(b,x,w)=>{let L=u(b,w);if(!Ire(L))return N_r(h(b,w),x)},expression:(b,x)=>{let w=u(b,x);return Ire(w)?w:m_r(h(b,x))},nodeWithValue:(b,x)=>{let w=u(b,x);return Ire(w)?w:L_r(h(b,x))}};function h(b,x){return{...r,...x,evaluate:d,node:b}}return d}function LYe(r,e){return r===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[r]}var gzt=class{constructor(e={}){let{logLevel:i=0,color:{info:a="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:i,color:{info:a,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logBreak(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logReturn(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logResult(e,i){this.options.logLevel<1||(i!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${i}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,i,a){if(this.options.logLevel<3)return;let u=`[${LYe(e.kind,i)}]`.padEnd(25);a!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${a})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),b=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(b)}logBinding(e,i,a){this.options.logLevel<2||console.log(`${a==null?"":this.formatWithColor(this.options.color.verbose,`(${a}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(i)))}logHeritage(e){if(this.options.logLevel<3)return;let i=Object.getPrototypeOf(e);i.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,i.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${bzt(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,i){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(a=>LYe(a,i)).join(", ")}]`))}compactValue(e){return(0,Bkn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,i){return gkn.default[e](i)}};function F_r(r,e){var i;return e.isExpressionNode(r)||e.isIdentifier(r)||((i=e.isPrivateIdentifier)===null||i===void 0?void 0:i.call(e,r))}function O_r(r,e){return e.isStatementButNotDeclaration(r)}function W_r(){let r=[];return{[Symbol.iterator](){return r[Symbol.iterator]()},get length(){return r.length},get lastItem(){return r[r.length-1]},push(...e){return r.push(...e)},pop(){return r.pop()}}}function G_r(r,e,i){r.reportErrors!=null&&!r.reportedErrorSet.has(e)&&(r.reportedErrorSet.add(e),r.reportErrors({error:e,node:e instanceof j7?e.node:i}))}function z_r(){return new WeakSet}function Okn({typeChecker:r,node:e,environment:{preset:i="NODE",extra:a={}}={},moduleOverrides:u={},typescript:d=Odr,logLevel:h=0,policy:{deterministic:b=!1,network:x=!1,console:w=!1,maxOps:L=1/0,maxOpDuration:q=1/0,io:te={read:!0,write:!1},process:me={exit:!1,spawnChild:!1}}={},reporting:Ee={}}){let ke=lmr(e,d);if(ke.success)return ke;let Ue={deterministic:b,maxOps:L,maxOpDuration:q,network:x,console:w,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof me=="boolean"?me:me.exit,spawnChild:typeof me=="boolean"?me:me.spawnChild}},Fe={...Ee,reportedErrorSet:z_r()},We,Tt=new gzt(h),Vt=ur=>(G_r(Fe,ur,ur.node),We=ur,We),un=amr({inputEnvironment:{preset:i,extra:a},startingNode:e,policy:Ue}),Jn=W_r(),Dn=xzt(),mn={policy:Ue,typeChecker:r,typescript:d,logger:Tt,stack:Jn,moduleOverrides:u,reporting:Fe,throwError:Vt,environment:un,statementTraversalStack:Dn,getCurrentError:()=>We},qn=M_r(mn);try{let ur;return F_r(e,d)?ur=qn.expression(e,mn):O_r(e,d)?(qn.statement(e,mn),ur=Jn.pop()):Ckn(e,d)?(qn.declaration(e,mn),ur=Jn.pop()):Vt(new mR({node:e,environment:un,typescript:d})),We!=null?{success:!1,reason:We}:(Tt.logResult(ur),{success:!0,value:ur})}catch(ur){return Vt(ur),{success:!1,reason:ur}}}var Jkn=b_(NW(),1),V7=b_(NW(),1),GYe=b_(NW(),1);var I1e=b_(NW(),1);var FJ=b_(NW(),1);var Tzt=b_(NW(),1);var Azt=b_(NW(),1);var j_r=r=>{if(Array.isArray(r))return"array";if(typeof r=="string")return"string";if(typeof r=="number")return"number";if(typeof r=="boolean")return"boolean";if(r===null)return"null";if(r===void 0)return"undefined";throw new Error(`Unexpected literal type: ${r}`)},o6=r=>r!=null,Vkn=r=>r==null,Ukn=r=>r!=null&&typeof r=="object",V_r=r=>Array.isArray(r),U_r=r=>{let e=typeof r;return e==="string"||e==="number"||e==="boolean"||r===null||r===void 0},Ux=r=>FRe.Node.isAsExpression(r)||FRe.Node.isParenthesizedExpression(r)||FRe.Node.isNonNullExpression(r)||FRe.Node.isTypeAssertion(r)||FRe.Node.isSatisfiesExpression(r)?Ux(r.getExpression()):r,H_r=r=>r.getTagNameNode().getText(),J_r=/\s+/g,Hkn=r=>r.replaceAll(J_r," "),q_r=r=>{let e=r.getSourceFile(),[i,a]=[r.getStart(),r.getEnd()],u=e.getLineAndColumnAtPos(i),d=e.getLineAndColumnAtPos(a);return{startPosition:i,startLineNumber:u.line,startColumn:u.column,endPosition:a,endLineNumber:d.line,endColumn:d.column}},Ape=class{type;stack=[];node;constructor(r){this.type=r.type,this.node=r.node,this.stack=[...r.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>q_r(this.node);toJSON(){let r=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:r.startLineNumber,column:r.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},Wkn=class extends Ape{value;isEmpty;constructor(r){super(r),this.value=r.value,this.isEmpty=r.isEmpty}},K_r=class extends Ape{value;kind;constructor(r){super(r),this.value=r.value,this.kind=r.kind}},X_r=class extends Ape{value;spreadConditions;constructor(r){super(r),this.value=r.value}},Y_r=class extends Ape{value;constructor(r){super(r),this.value=r.value}},Q_r=class extends Ape{},$_r=class extends Ape{whenTrue;whenFalse;constructor(r){super(r),this.whenTrue=r.whenTrue,this.whenFalse=r.whenFalse}},Z_r=class extends Ape{},ORe=r=>r instanceof Ape;function Dzt(r,e,i){return Sg(r).when(Vkn,()=>{}).when(ORe,a=>a).when(Ukn,a=>hf.object(a,e,i)).when(V_r,a=>a.length===1?Dzt(a[0],e,i):a.map(u=>Dzt(u,e,i))).when(U_r,a=>hf.literal(a,e,i)).otherwise(()=>{})}var hf={object(r,e,i){return new Wkn({type:"object",value:r,node:e,stack:i})},literal(r,e,i){return new K_r({type:"literal",value:r,kind:j_r(r),node:e,stack:i})},map(r,e,i){return new X_r({type:"map",value:r,node:e,stack:i})},array(r,e,i){return new Y_r({type:"array",value:r,node:e,stack:i})},conditional(r,e,i,a){return new $_r({type:"conditional",whenTrue:r,whenFalse:e,node:i,stack:a})},from:Dzt,emptyObject:(r,e)=>new Wkn({type:"object",value:{},isEmpty:!0,node:r,stack:e}),emptyInitializer:(r,e)=>new Z_r({type:"empty-initializer",node:r,stack:e}),unresolvable:(r,e)=>new Q_r({type:"unresolvable",node:r,stack:e}),isObject(r){return r?.type==="object"},isLiteral(r){return r?.type==="literal"},isMap(r){return r?.type==="map"},isArray(r){return r?.type==="array"},isUnresolvable(r){return r?.type==="unresolvable"},isConditional(r){return r?.type==="conditional"},isEmptyInitializer(r){return r?.type==="empty-initializer"},isNumberLiteral(r){return hf.isLiteral(r)&&r.kind==="number"},hasValue:r=>hf.isObject(r)||hf.isLiteral(r)||hf.isMap(r)||hf.isArray(r)},qkn=Symbol("EvalError"),Ezt=new WeakMap,ehr=(r,e,i)=>{if(i.flags?.skipEvaluate||i.canEval&&!i.canEval?.(r,e))return;if(Ezt.has(r))return Ezt.get(r);let a=Okn({policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...i.getEvaluateOptions?.(r,e),node:r.compilerNode,typescript:Jkn.ts}),u=a.success?a.value:qkn;return Ezt.set(r,u),u},ubt=(r,e,i)=>{let a=ehr(r,e,i);if(a!==qkn)return a};function thr(r){return V7.Node.isFunctionDeclaration(r)||V7.Node.isFunctionExpression(r)||V7.Node.isArrowFunction(r)||V7.Node.isSourceFile(r)}function nhr(r,e,i){let a=r.getParent();if(!a)return;let u=[],d;if((V7.Node.isVariableDeclaration(a)||V7.Node.isParameterDeclaration(a)||V7.Node.isFunctionDeclaration(a)||V7.Node.isBindingElement(a))&&a.getNameNode()==r)u.push(a),d=a;else if(V7.Node.isImportSpecifier(a)&&a.getNameNode()==r){if(i.flags?.skipTraverseFiles)return;let h=Zkn(a.getImportDeclaration());if(h){let b=[a,h],x=$kn(r.getText(),h,b,i);x&&(u.push(...b.concat(x)),d=x)}}return d&&e.push(...u),d}var rhr=r=>{let e=r.getParent();for(;e&&!thr(e);)e=e.getParent();return e};function mbt(r,e,i,a=new Map){let u=r,d,h=!1,b=0,x=[];do{if(u=rhr(u),b++,!u)return;let w=r.getText();if(u.forEachDescendant((L,q)=>{if(a.has(L)){q.skip(),x.push(...a.get(L));return}if(L!=r&&(a.set(L,x),V7.Node.isIdentifier(L)&&L.getText()==w)){let te=[L],me=nhr(L,te,i);if(me){if(V7.Node.isParameterDeclaration(me)){let Ee=me.getInitializer(),ke=me.getTypeNode();Ee?(x.push(...te.concat(Ee)),d=me):ke&&V7.Node.isTypeLiteral(ke)?(x.push(...te.concat(ke)),d=me):h=!0,q.stop();return}x.push(...te),d=me,q.stop()}}}),d||h)return d&&e.push(...x),d}while(u&&!V7.Node.isSourceFile(u)&&!d&&!h&&b<100)}var ihr=(r,e,i)=>Sg(r).when(I1e.Node.isPropertyAssignment,a=>{let u=Ux(a.getNameNode());return Sg(u).when(I1e.Node.isIdentifier,d=>hf.from(d.getText(),d,e)).when(I1e.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),MQ(h,e,i)}).when(Z3.or(I1e.Node.isStringLiteral,I1e.Node.isNumericLiteral),d=>hf.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when(I1e.Node.isShorthandPropertyAssignment,a=>{let u=a.getName();if(u!=null)return hf.from(u,a,e)}).otherwise(()=>{}),ohr=(r,e,i,a)=>{let u=r.getProperties();if(u.length===0)return hf.emptyObject(r,e);let d=[],h=[];u.forEach(w=>{let L=[...e];if(L.push(w),GYe.Node.isPropertyAssignment(w)||GYe.Node.isShorthandPropertyAssignment(w)){let q=ihr(w,L,i);if(!q)return;let te=q.value;if(Vkn(te)||a&&!a?.({propName:te,propNode:w}))return;if(GYe.Node.isShorthandPropertyAssignment(w)){let Ue=w.getNameNode();L.push(Ue);let Fe=rE(Ue,L,i);if(Fe){d.push([te.toString(),Fe]);return}}let me=w.getInitializer();if(!me)return;let Ee=Ux(me);L.push(Ee);let ke=rE(Ee,L,i);if(ke){d.push([te.toString(),ke]);return}}if(GYe.Node.isSpreadAssignment(w)){let q=Ux(w.getExpression());L.push(q);let te=rE(q,L,i,a);if(!te)return;if(hf.isObject(te)){Object.entries(te.value).forEach(([me,Ee])=>{let ke=hf.from(Ee,q,L);ke&&d.push([me,ke])});return}if(hf.isMap(te)){te.value.forEach((me,Ee)=>{d.push([Ee,me])});return}hf.isConditional(te)&&h.push(te)}});let b=new Map;d.forEach(([w,L])=>{b.has(w)&&b.delete(w),b.set(w,L)});let x=hf.map(b,r,e);return h.length>0&&(x.spreadConditions=h),x},kzt=new WeakMap,shr=r=>kzt.has(r),ahr=r=>kzt.get(r),lhr=r=>r===tm.ts.SyntaxKind.PlusToken,chr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken||r===tm.ts.SyntaxKind.AmpersandAmpersandToken||r===tm.ts.SyntaxKind.EqualsEqualsEqualsToken||r===tm.ts.SyntaxKind.EqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsToken||r===tm.ts.SyntaxKind.GreaterThanEqualsToken||r===tm.ts.SyntaxKind.GreaterThanToken||r===tm.ts.SyntaxKind.LessThanEqualsToken||r===tm.ts.SyntaxKind.LessThanToken||r===tm.ts.SyntaxKind.InstanceOfKeyword||r===tm.ts.SyntaxKind.InKeyword,uhr=r=>r===tm.ts.SyntaxKind.AsteriskToken||r===tm.ts.SyntaxKind.SlashToken||r===tm.ts.SyntaxKind.PercentToken||r===tm.ts.SyntaxKind.AsteriskAsteriskToken||r===tm.ts.SyntaxKind.MinusToken,fhr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken;function rE(r,e,i,a){let u=d=>(kzt.set(r,d),d);return Sg(r).when(shr,ahr).when(Z3.or(tm.Node.isStringLiteral,tm.Node.isNoSubstitutionTemplateLiteral),d=>{let h=Hkn(d.getLiteralValue());return u(hf.literal(h,d,e))}).when(tm.Node.isObjectLiteralExpression,d=>u(ohr(d,e,i,a))).when(Z3.or(tm.Node.isTrueLiteral,tm.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(hf.literal(h,d,e))}).when(tm.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(hf.literal(h,d,e))}).when(tm.Node.isNullLiteral,d=>u(hf.literal(null,d,e))).when(tm.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),b=d.getOperatorToken(),x=rE(h,e,i);if(hf.isNumberLiteral(x))return u(b===tm.ts.SyntaxKind.MinusToken?hf.literal(-Number(x.value),d,e):x)}).when(tm.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(b=>rE(b,e,i)??u(hf.unresolvable(b,e)));return u(hf.array(h,d,e))}).when(tm.Node.isIdentifier,d=>Sg(d.getText()).with("undefined",()=>u(hf.literal(void 0,d,e))).otherwise(()=>u(Chr(d,e,i)))).when(tm.Node.isTemplateHead,d=>u(hf.literal(d.getLiteralText(),d,e))).when(tm.Node.isTemplateExpression,d=>{let h=Xkn(d,e,i);return u(hf.literal(h,d,e))}).when(tm.Node.isTaggedTemplateExpression,d=>u(rE(d.getTemplate(),e,i))).when(tm.Node.isElementAccessExpression,d=>u(pbt(d,e,i))).when(tm.Node.isPropertyAccessExpression,d=>u(dbt(d,[],e,i))).when(tm.Node.isConditionalExpression,d=>{if(i.flags?.skipConditions)return u(hf.unresolvable(d,e));let h=Ux(d.getCondition()),b=(tm.Node.isIdentifier(h)?rE(h,[],i):ubt(h,e,i))??hf.unresolvable(h,e),x=ORe(b)?b:hf.from(b,d,e);if(hf.isEmptyInitializer(x))return;let w=x.getStack().some(me=>tm.Node.isBindingElement(me));if(hf.isUnresolvable(x)||hf.isConditional(x)||w){let me=Ux(d.getWhenTrue()),Ee=Ux(d.getWhenFalse());return u(Gkn({whenTrueExpr:me,whenFalseExpr:Ee,node:d,stack:e},i))}if(x.value){let me=Ux(d.getWhenTrue()),Ee=[...e],ke=rE(me,Ee,i);return u(ke??hf.unresolvable(me,e))}let L=Ux(d.getWhenFalse()),q=[...e],te=rE(L,q,i);return u(te??hf.unresolvable(d,e))}).when(tm.Node.isCallExpression,d=>{let h=ubt(d,e,i);if(h)return u(hf.from(h,d,e))}).when(tm.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return Sg(h).when(lhr,()=>{let b=eIn(d,e,i)??ubt(d,e,i);if(b)return u(hf.from(b,d,e))}).when(chr,b=>{let x=Ux(d.getLeft()),w=Ux(d.getRight()),L={whenTrueExpr:x,whenFalseExpr:w,node:d,stack:e,canReturnWhenTrue:fhr(b)};return u(Gkn(L,i))}).when(uhr,()=>u(hf.literal(ubt(d,e,i),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var Kkn=r=>{if(r&&ORe(r)&&hf.isLiteral(r)&&typeof r.value=="string")return r},phr=r=>{if(r&&ORe(r)&&hf.isLiteral(r)&&typeof r.value=="number")return r},dhr=(r,e,i)=>Kkn(rE(r,e,i)),MQ=(r,e,i)=>{let a=rE(r,e,i),u=Kkn(a);if(u)return u;let d=phr(a);if(d)return d},Gkn=({whenTrueExpr:r,whenFalseExpr:e,node:i,stack:a,canReturnWhenTrue:u},d)=>{let h=rE(r,a,d),b=rE(e,a,d);if(u&&h&&!hf.isUnresolvable(h))return h;if(tm.Node.isBinaryExpression(i)&&i.getOperatorToken().getKind()===tm.ts.SyntaxKind.AmpersandAmpersandToken&&h&&b&&hf.isLiteral(h)&&h.value===!0)return b;if(!h&&!b)return;if(h&&!b)return h;if(!h&&b)return b;let x=h,w=b;return hf.isLiteral(x)&&hf.isLiteral(w)&&x.value===w.value?x:hf.conditional(x,w,i,a)},mhr=(r,e,i,a)=>{let u=[...i];if(tm.Node.isPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r;if(tm.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(tm.Node.isComputedPropertyName(d)){let h=Ux(d.getExpression()),b=MQ(h,u,a);if(!b)return;if(String(b.value)===e)return u.push(d,h),r}}if(tm.Node.isShorthandPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r}},Izt=(r,e,i,a)=>{let u=[...i],d=e.pop(),h=r.getProperty(d)??r.getProperties().find(b=>mhr(b,d,u,a));if(h){if(u.push(h),tm.Node.isPropertyAssignment(h)){let b=h.getInitializer();if(!b)return;if(tm.Node.isObjectLiteralExpression(b))return e.length>0?Izt(b,e,u,a):rE(b,u,a);let x=rE(b,u,a);if(x)return x}if(tm.Node.isShorthandPropertyAssignment(h)){let b=h.getNameNode();if(e.length>0)return LQ(b,e,u,a);let x=rE(b,u,a);if(x)return x}}},Xkn=(r,e,i)=>{let a=r.getHead(),u=r.getTemplateSpans(),d=dhr(a,e,i);if(!d)return;let h=u.map(b=>{let x=b.getExpression(),w=MQ(x,e,i);if(!w)return;let L=b.getLiteral();return w.value+L.getLiteralText()});if(h.every(o6))return d.value+h.join("")},Ykn=(r,e,i,a)=>{let u=r.getParent();if(!u)return;let d=u.getParent();if(d){if(tm.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(tm.Node.isVariableDeclaration(d)){let b=d.getInitializer();if(!b)return;let x=Ux(b);if(!tm.Node.isArrayLiteralExpression(x))return;let w=x.getElements()[h+1];if(!w)return;let L=[...e,x,w],q=rE(w,L,a);if(!q)return;if(hf.isObject(q)){let me=q.value[i];return hf.from(me,w,L)}if(!hf.isMap(q))return q;let te=q.value.get(i);return te||void 0}}tm.Node.isObjectBindingPattern(u)}};function _hr(r,e,i,a){let u=e.at(-1);if(tm.Node.isVariableDeclaration(r)){let d=r.getInitializer();if(!d){let w=r.getTypeNode();if(!w)return;if(tm.Node.isTypeLiteral(w)){if(e.length>0){let q=[...i];q.push(w);let te=e.pop(),me=w.getProperty(te),Ee=me?.getTypeNode();for(;me&&e.length>0&&Ee&&tm.Node.isTypeLiteral(Ee);)q.push(me,Ee),te=e.pop(),me=Ee.getProperty(te),Ee=me?.getTypeNode();if(!Ee)return;let ke=wzt(Ee,q,a);return hf.from(ke,Ee,q)}let L=Qkn(w,u,i,a);return i.push(w),hf.from(L,w,i)}return}let h=Ux(d);if(tm.Node.isObjectLiteralExpression(h)){let w=Izt(h,e,i,a);return w?(i.push(h),w):void 0}if(tm.Node.isArrayLiteralExpression(h)){let w=Number(u);if(Number.isNaN(w))return;let L=h.getElements()[w];if(!L)return;i.push(h);let q=rE(L,i,a);if(q&&ORe(q)&&hf.isLiteral(q))return q}let b=[...i,h],x=rE(h,b,a);if(x)return x}if(tm.Node.isBindingElement(r)){let d=Ykn(r,i,u,a);if(d)return d}}var LQ=(r,e,i,a)=>{let u=mbt(r,i,a);if(!u)return hf.unresolvable(r,i);let d=_hr(u,e,i,a);return d||hf.unresolvable(r,i)},k1e=new WeakMap,Qkn=(r,e,i,a)=>{if(k1e.has(r)){let h=k1e.get(r);if(h===null)return;if(h?.has(e))return h.get(e)}let d=r.getMembers().find(h=>tm.Node.isPropertySignature(h)&&h.getName()===e);if(tm.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){k1e.set(r,null);return}let b=wzt(h,i,a);if(o6(b))return k1e.has(r)||k1e.set(r,new Map),k1e.get(r).set(e,b),b}k1e.set(r,null)};function hhr(r){return tm.Node.isStringLiteral(r)?r.getLiteralText():r.getText()}var WYe=new WeakMap,wzt=(r,e,i)=>{if(WYe.has(r))return WYe.get(r);if(tm.Node.isLiteralTypeNode(r)){let a=r.getLiteral();if(tm.Node.isStringLiteral(a)){let u=a.getLiteralText();return WYe.set(r,u),u}}if(tm.Node.isTypeLiteral(r)){let a=r.getMembers();if(!a.some(u=>!tm.Node.isPropertySignature(u)||!u.isReadonly())){let d=a.map(b=>{let x=b.getNameNode(),w=x.getText(),L=hhr(x);if(!L)return;let q=Qkn(r,w,e,i);return[L,q]}).filter(o6),h=Object.fromEntries(d);return WYe.set(r,h),h}}WYe.set(r,void 0)},Bhr=(r,e,i)=>{if(tm.Node.isShorthandPropertyAssignment(r)){let a=r.getNameNode();return LQ(a,[a.getText()],e,i)}if(tm.Node.isVariableDeclaration(r)){let a=r.getInitializer();if(!a){let b=r.getTypeNode();if(!b)return;if(tm.Node.isTypeLiteral(b)){e.push(b);let x=wzt(b,e,i);if(o6(x))return hf.from(x,r,e)}return hf.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}if(tm.Node.isBindingElement(r)){let a=r.getInitializer();if(!a){let b=r.getPropertyNameNode()??r.getNameNode(),x=b.getText(),w=[...e,b],L=Ykn(r,w,x,i);return L||hf.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}},$kn=(r,e,i,a)=>{let u=e.getVariableDeclaration(r);if(u)return u;let d=yhr(r,e,i,a);if(d)return d},ghr=(r,e)=>{let i=e.getNamedExports();if(i.length===0)return!0;for(let a of i)if(a.getNameNode().getText()===r)return!0},Zkn=r=>{let e=r.getProject(),i=r.getModuleSpecifierValue();if(!i)return;let a=r.getSourceFile().getFilePath(),u=tm.ts.resolveModuleName(i,a,e.getCompilerOptions(),e.getModuleResolutionHost());return u.resolvedModule?e.addSourceFileAtPath(u.resolvedModule.resolvedFileName):void 0};function yhr(r,e,i,a){for(let u of e.getExportDeclarations()){let d=[u];if(!ghr(r,u))continue;let h=Zkn(u);if(!h)continue;d.push(h);let b=$kn(r,h,i,a);if(b)return i.push(...d.concat(b)),b}}var Chr=(r,e,i)=>{let a=mbt(r,e,i);if(!a)return hf.unresolvable(r,e);let u=Ux(a),d=[...e],h=Bhr(u,d,i);return h||hf.unresolvable(r,d)},eIn=(r,e,i)=>{let a=Ux(r.getLeft()),u=Ux(r.getRight()),d=MQ(a,e,i),h=MQ(u,e,i);if(!(!d||!h)&&o6(d.value)&&o6(h.value))return hf.literal(String(d.value)+String(h.value),r,e)},pbt=(r,e,i)=>{let a=Ux(r.getExpression()),u=r.getArgumentExpression();if(!u)return;let d=Ux(u),h=[...e,a,d],b=MQ(d,h,i);if(tm.Node.isIdentifier(a)&&b)return o6(b.value)?LQ(a,[b.value.toString()],h,i):void 0;if(tm.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==tm.ts.SyntaxKind.PlusToken)return;let x=eIn(d,h,i)??MQ(d,h,i);if(x&&tm.Node.isIdentifier(a))return o6(x.value)?LQ(a,[x.value.toString()],h,i):void 0}if(tm.Node.isTemplateExpression(d)){let x=Xkn(d,h,i);if(x&&tm.Node.isIdentifier(a))return LQ(a,[x],h,i)}if(tm.Node.isObjectLiteralExpression(a)&&b)return o6(b.value)?Izt(a,[b.value.toString()],h,i):void 0;if(tm.Node.isPropertyAccessExpression(d))return dbt(d,[],h,i);if(tm.Node.isPropertyAccessExpression(a)&&b&&o6(b.value)){let x=dbt(a,[],h,i);if(!x)return hf.unresolvable(a,h);let w=b.value.toString();if(hf.isObject(x)){let L=x.value[w];return hf.from(L,d,h)}if(hf.isMap(x)){let L=x.value.get(w);return hf.from(L,d,h)}if(hf.isArray(x)){let L=x.value[Number(w)];return hf.from(L,d,h)}return hf.unresolvable(a,h)}if(tm.Node.isIdentifier(a)&&tm.Node.isElementAccessExpression(d)){let x=pbt(d,h,i);if(typeof x=="string"&&o6(x))return LQ(a,[x],h,i)}if(tm.Node.isElementAccessExpression(a)&&b&&o6(b.value)){let x=pbt(a,h,i);if(Ukn(x)){let w=b.value.toString();if(hf.isMap(x))return x.value.get(w);if(hf.isObject(x)){let L=x.value[w];return L?hf.from(L,r,h):void 0}}}if(tm.Node.isArrayLiteralExpression(a)&&b)return vhr(a,Number(b.value),h,i);if(tm.Node.isConditionalExpression(d)){if(i.flags?.skipConditions)return hf.unresolvable(d,h);let x=MQ(d,h,i);if(o6(x)&&o6(x.value)&&tm.Node.isIdentifier(a))return LQ(a,[x.value.toString()],h,i);let w=Ux(d.getWhenTrue()),L=Ux(d.getWhenFalse()),q=MQ(w,h,i),te=MQ(L,h,i);if(tm.Node.isIdentifier(a)){let me=q&&o6(q.value)?LQ(a,[q.value.toString()],h,i):void 0,Ee=te&&o6(te.value)?LQ(a,[te.value.toString()],h,i):void 0;return!me&&!Ee?void 0:me&&!Ee?me:!me&&Ee?Ee:hf.conditional(me,Ee,d,h)}}},vhr=(r,e,i,a)=>{let u=r.getElements()[e];if(!u)return;let d=rE(u,i,a);if(o6(d))return d},dbt=(r,e,i,a)=>{let u=r.getName(),d=Ux(r.getExpression()),h=e.concat(u);if(i.push(d),tm.Node.isIdentifier(d))return LQ(d,h,i,a);if(tm.Node.isPropertyAccessExpression(d))return dbt(d,h,i,a);if(tm.Node.isElementAccessExpression(d)){let b=pbt(d,i,a);if(!b)return;if(hf.isObject(b)){let x=b.value[u];return hf.from(x,r,i)}if(hf.isMap(b)){let x=b.value.get(u);return hf.from(x,r,i)}}},zkn=()=>!0,_bt=(r,e,i=zkn,a=zkn)=>{let u=r.getArguments(),d=r.getExpression().getText();return u.length===0?hf.array([],r,[]):hf.array(u.map((h,b)=>{let x=Ux(h),w=[r,x];return Sg(x).when(L=>a({fnNode:r,fnName:d,argNode:L,index:b}),L=>rE(L,w,e,i)??hf.unresolvable(L,w)).otherwise(()=>hf.unresolvable(x,w))}),r,[])},hbt=(r,e)=>{let i=r.getInitializer(),a=[r,i];return Sg(i).with(xD.nullish,()=>{let u=r.getNameNode();return hf.emptyInitializer(u,a)}).when(Tzt.Node.isStringLiteral,u=>{let d=u.getLiteralText();return hf.literal(Hkn(d),u,a)}).when(Tzt.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=Ux(d);if(!h)return;a.push(h);let b=rE(h,a,e);if(b)return b}).otherwise(()=>{})},tIn=(r,e,i)=>{let a=Ux(r.getExpression());return rE(a,[],e,i)},jkn=(r,e)=>r?ORe(r)?hf.isUnresolvable(r)||hf.isConditional(r)?new Map:hf.isMap(r)?r.value:new Map(Object.entries(r.value).map(([i,a])=>{let u=hf.from(a,r.getNode()??e,r.getStack()??[]);return[i,u||null]}).filter(([,i])=>i!==null)):new Map(Object.entries(r)):new Map,bhr=Z3.or(FJ.Node.isImportDeclaration,FJ.Node.isExportDeclaration),nIn=({ast:r,...e})=>{let{components:i,functions:a,taggedTemplates:u}=e,d=new Map,h=new Map,b,x,w,L,q;return r.forEachDescendant((te,me)=>{if(bhr(te)){me.skip();return}if(i){if(FJ.Node.isJsxOpeningElement(te)||FJ.Node.isJsxSelfClosingElement(te)){if(b=te,x=H_r(b),w=x.includes("."),!i.matchTag({tagNode:b,tagName:x,isFactory:w})){b=void 0;return}d.has(x)||d.set(x,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(x).nodesByProp,h.has(b)||h.set(b,{name:x,props:new Map,conditionals:[]}),q=h.get(b)}if(FJ.Node.isJsxSpreadAttribute(te)){if(!b||!q)return;let Ee=({propName:We,propNode:Tt})=>i.matchProp({tagNode:b,tagName:x,propName:We,propNode:Tt}),ke=tIn(te,e,dQ(Ee));if(!ke)return;let Ue=We=>{let Tt=jkn(We,te),Vt=hf.isMap(We),un=hf.map(Tt,te,[b]);Vt&&We.spreadConditions?.length&&(un.spreadConditions=We.spreadConditions),Tt.forEach((Jn,Dn)=>{Ee({propName:Dn,propNode:te})&&(q.props.set(Dn,Jn),L.set(Dn,(L.get(Dn)??[]).concat(Jn)))})};(We=>Sg(We).when(hf.isConditional,Tt=>{q.conditionals.push(Tt)}).when(Z3.or(hf.isObject,hf.isMap),Tt=>Ue(Tt)).otherwise(BBt))(ke);return}if(FJ.Node.isJsxAttribute(te)){if(!b||!q)return;let Ee=te.getNameNode().getText();if(!i.matchProp({tagNode:b,tagName:x,propName:Ee,propNode:te}))return;GN(hbt(te,e),NXe.fromNullable,NXe.tap(ke=>{q.props.set(Ee,ke),L.set(Ee,(L.get(Ee)??[]).concat(ke))}))}}if(a&&FJ.Node.isCallExpression(te)){let Ee=te.getExpression(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!a.matchFn({fnNode:te,fnName:ke}))return;let Ue=({propName:Jn,propNode:Dn})=>a.matchProp({fnNode:te,fnName:ke,propName:Jn,propNode:Dn});d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Fe=d.get(ke),We=Fe.nodesByProp,Tt=_bt(te,e,Ue,a.matchArg),Vt=GN(Tt.value,Aj.map(Jn=>Sg(Jn).when(Z3.or(hf.isObject,hf.isMap),Dn=>{let mn=jkn(Dn,te),qn=hf.isMap(Dn);mn.forEach((nn,ha)=>{(qn||Ue({propName:ha,propNode:te}))&&We.set(ha,(We.get(ha)??[]).concat(nn))});let ur=hf.map(mn,te,Dn.getStack());return hf.isMap(Dn)&&Dn.spreadConditions?.length&&(ur.spreadConditions=Dn.spreadConditions),ur}).otherwise(Dn=>Dn))),un={kind:"call-expression",name:ke,box:hf.array(Vt,te,[])};Fe.queryList.push(un)}if(u&&FJ.Node.isTaggedTemplateExpression(te)){let Ee=te.getTag(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:ke}))return;d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Ue=d.get(ke),Fe={kind:"tagged-template",name:ke,box:rE(te,[],e)};Ue.queryList.push(Fe)}}),h.forEach((te,me)=>{let Ee=h.get(me);if(!Ee)return;let ke=dQ({name:te.name,box:hf.map(Ee.props,me,[])});Ee.conditionals?.length&&(ke.box.spreadConditions=Ee.conditionals);let Ue=te.name;d.get(Ue).queryList.push(ke)}),d},Shr=Z3.or(hf.isObject,hf.isMap),rIn=(r,e)=>{let i=r.getTagNameNode().getText(),a=r.getAttributes(),u=new Map;return a.forEach(d=>{if(Azt.Node.isJsxAttribute(d)){let h=d.getNameNode(),b=hbt(d,e);if(!b)return;u.set(h.getText(),b);return}if(Azt.Node.isJsxSpreadAttribute(d)){let h=tIn(d,e,()=>!0);if(!Shr(h))return;hf.isMap(h)&&h.value.forEach((b,x)=>{u.set(x,b)}),hf.isObject(h)&&Object.entries(h.value).forEach(([b,x])=>{u.set(b,hf.literal(x,r,[]))})}}),{name:i,props:u}},fbt=(r,e)=>{if(!r.length)return e;let i={};return r.reduce((a,u,d)=>{let h=d===r.length-1;return a[u]=h?e:{},h?i:a[u]},i),i},Tpe=(r,e)=>Sg(r).with(xD.nullish,()=>{}).when(hf.isConditional,i=>{let a=e.path,u=Tpe(i.whenTrue,Object.assign({},e,{path:a,parent:i})),d=Tpe(i.whenFalse,Object.assign({},e,{path:a,parent:i}));u&&e.conditions.push(fbt(a,u)),d&&e.conditions.push(fbt(a,d))}).when(Z3.or(hf.isLiteral,hf.isObject),i=>i.value).when(hf.isEmptyInitializer,()=>!0).when(hf.isMap,i=>{if(i.spreadConditions){let a=e.path;i.spreadConditions.forEach(u=>{let d=Tpe(u.whenTrue,Object.assign({},e,{path:a,parent:i})),h=Tpe(u.whenFalse,Object.assign({},e,{path:a,parent:i}));d&&e.spreadConditions.push(fbt(a,d)),h&&e.spreadConditions.push(fbt(a,h))})}return GN(Aj.from(i.value.entries()),Aj.map(([a,u])=>[a,Tpe(u,Object.assign({},e,{path:e.path.concat(a),parent:i}))]),Aj.filter(([,a])=>o6(a)),Object.fromEntries)}).when(hf.isArray,i=>{let a=0;return GN(i.value,Aj.map(u=>Tpe(u,Object.assign({},e,{path:e.path.concat(String(a++)),parent:i}))),u=>u.flat())}).otherwise(()=>{}),xhr=new WeakMap,Ehr=r=>({value:r,has:e=>r.has(e),get:e=>r.get(e),set:(e,i)=>r.set(e,i)}),OJ=(r,e)=>{let i={cache:e?.cache??xhr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},a=Ehr(i.cache);return{raw:Sg(r).with(xD.nullish,()=>{}).when(a.has,a.get).when(Array.isArray,d=>{let h=GN(d,Aj.map(b=>Tpe(b,i)),Aj.filter(o6),Aj.head);return a.set(d,h),h}).otherwise(d=>{let h=Tpe(d,i);return a.set(d,h),h})??{},conditions:i.conditions,spreadConditions:i.spreadConditions}};ae();ae();ae();ae();function zYe(r){return Object.prototype.toString.call(r).slice(8,-1)}function Dhr(r){return zYe(r)==="Undefined"}function Thr(r){return zYe(r)==="Null"}function jYe(r){if(zYe(r)!=="Object")return!1;let e=Object.getPrototypeOf(r);return e.constructor===Object&&e===Object.prototype}function Pzt(r){return zYe(r)==="Array"}function Nzt(r){return zYe(r)==="Symbol"}var Xvi=Ahr(Thr,Dhr);function Ahr(r,e,i,a,u){return d=>r(d)||e(d)||!!i&&i(d)||!!a&&a(d)||!!u&&u(d)}function khr(r,e){return Pzt(r)&&Pzt(e)?r.concat(e):e}function iIn(r,e,i,a){let u={}.propertyIsEnumerable.call(a,e)?"enumerable":"nonenumerable";u==="enumerable"&&(r[e]=i),u==="nonenumerable"&&Object.defineProperty(r,e,{value:i,enumerable:!1,writable:!0,configurable:!0})}function oIn(r,e,i){if(!jYe(e))return e;let a={};if(jYe(r)){let b=Object.getOwnPropertyNames(r),x=Object.getOwnPropertySymbols(r);a=[...b,...x].reduce((w,L)=>{let q=r[L];return(!Nzt(L)&&!Object.getOwnPropertyNames(e).includes(L)||Nzt(L)&&!Object.getOwnPropertySymbols(e).includes(L))&&iIn(w,L,q,r),w},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((b,x)=>{let w=e[x],L=jYe(r)?r[x]:void 0;L!==void 0&&jYe(w)&&(w=oIn(L,w,i));let q=i?i(L,w,x):w;return iIn(b,x,q,e),b},a)}function sIn(r,...e){return e.reduce((i,a)=>oIn(i,a,khr),r)}var aIn=r=>Object.prototype.toString.call(r)==="[object Object]";function Rzt(r,...e){let i=e.pop();for(let a of e)for(let u in a){let d=i(r[u],a[u]);d===void 0?aIn(r[u])&&aIn(a[u])?r[u]=Rzt({},r[u],a[u],i):r[u]=a[u]:r[u]=d}return r}function lIn(r,...e){for(let i of e)for(let a in i)r?.hasOwnProperty?.(a)||(r[a]=i[a]);return r}function Ihr(r){return r.reduce((e,{extend:i})=>i?Rzt(e,i,(a,u)=>u===void 0?a??[]:a===void 0?[u]:Array.isArray(a)?[u,...a]:[u,a]):e,{})}function whr(r){return{...r.reduce((e,i)=>lIn(e,i),{}),extend:Ihr(r)}}function VYe(r){let{extend:e=[],...i}=whr(r);return Rzt(i,e,(a,u)=>sIn({},a,...u))}var Phr=r=>typeof r=="object"&&Object.keys(r).length===0,Nhr=r=>Object.keys(r).reduce((e,i)=>(r[i]!==void 0&&!Phr(r[i])&&(e[i]=r[i]),e),{});function cIn(r){let e=lIn({conditions:VYe(r.map(i=>i.conditions??{})),theme:VYe(r.map(i=>i.theme??{})),patterns:VYe(r.map(i=>i.patterns??{})),utilities:VYe(r.map(i=>i.utilities??{})),globalCss:VYe(r.map(i=>i.globalCss??{}))},...r);return Nhr(e)}ae();var Bbt=require("path"),UYe=(r,e)=>{for(let i of r){let a=e.match(i.pattern);if(a)for(let u of i.paths){let d=0;return u.replace(/\*/g,()=>{let b=Math.min(++d,a.length-1);return a[b]}).split(Bbt.sep).join(Bbt.posix.sep)}}};ae();var WRe=require("path"),gbt=require("fs");function uIn(r,e){let i=(0,WRe.resolve)(".",r),a;for((0,gbt.statSync)(i).isDirectory()||(i=(0,WRe.dirname)(i));;){if(a=e(i,(0,gbt.readdirSync)(i)),a)return(0,WRe.resolve)(i,a);if(i=(0,WRe.dirname)(a=i),a===i)break}}var BIn=require("path"),HYe=b_(require("fs"),1),GRe=b_(require("path"),1),gIn=require("path"),Lzt=b_(nzt(),1);ae();var fIn=require("esbuild"),pIn=b_(require("path"),1),ybt=b_(require("fs"),1),FQ=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});function Rhr(r){let e=ybt.default.realpathSync(r);delete FQ.cache[r];let i=FQ(e);return{mod:i.default??i,dependencies:[e],code:ybt.default.readFileSync(e,"utf-8")}}async function Lhr(r,e){let i=await(0,fIn.build)({absWorkingDir:e,entryPoints:[r],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:a}=i.outputFiles[0];return{code:a,dependencies:i.metafile?Object.keys(i.metafile.inputs):[]}}function Mhr(r,e){let i=pIn.default.extname(r),a=ybt.default.realpathSync(r),u=FQ.extensions[i];FQ.extensions[i]=(b,x)=>{x===a?b._compile(e,x):u(b,x)},delete FQ.cache[FQ.resolve(r)];let d=FQ(r),h=d.default??d;return FQ.extensions[i]=u,h}async function dIn(r,e={}){let{cwd:i=process.cwd()}=e,a=FQ.resolve(r,{paths:[i]});try{return Rhr(a)}catch{let u=await Lhr(a,i);try{u.mod=await Mhr(a,u.code)}catch{u.mod=FQ("node-eval")(u.code).default}return u}}ae();var mIn=class extends Error{code;hint;constructor(r,e,i){super(e),this.code=`ERR_PANDA_${r}`,this.hint=i?.hint}};var Cbt=class extends mIn{constructor(){let r="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs/mts/cts. Did you forget to run `panda init`?";super("NO_CONFIG",r)}},_In=class extends mIn{constructor(r){super("CONFIG_ERROR",r)}};var Mzt=require("@pandacss/preset-base"),bbt=require("@pandacss/preset-panda"),Fhr=[".ts",".js",".mts",".mjs",".cts",".cjs"],Ohr=new RegExp(`panda.config(${Fhr.join("|")})$`),Whr=r=>Ohr.test(r);function Ghr({cwd:r,file:e}){return e?(0,BIn.resolve)(r,e):uIn(r,(i,a)=>a.find(Whr))}function yIn(r,e){let i=Object.keys(r).sort((u,d)=>hIn(d)-hIn(u)),a=[];for(let u of i){let d=r[u];u=zhr(u).replace(/\*/g,"(.+)"),a.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,gIn.resolve)(e,h))})}return a}function hIn(r){let e=r.indexOf("*");return r.substr(0,e).length}function zhr(r){return r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var jhr=[".js",".cjs",".mjs"],Vhr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Uhr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Hhr(r,e){for(let i of e){let a=`${r}${i}`;if(HYe.default.existsSync(a)&&HYe.default.statSync(a).isFile())return a}for(let i of e){let a=`${r}/index${i}`;if(HYe.default.existsSync(a))return a}return null}var Jhr=/import[\s\S]*?['"](.{3,}?)['"]/gi,qhr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,Khr=/require\(['"`](.+)['"`]\)/gi,Xhr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function vbt(r,e){let{filename:i,seen:a}=r,{moduleResolution:u,...d}=r.compilerOptions??{},h=Hhr(GRe.default.resolve(r.cwd,i),jhr.includes(r.ext)?Vhr:Uhr);if(h===null||(e&&r.foundModuleAliases.set(e,h),a.size>1&&a.has(h)))return;a.add(h);let b=HYe.default.readFileSync(h,"utf-8"),x=[...b.matchAll(Jhr),...b.matchAll(qhr),...b.matchAll(Khr),...b.matchAll(Xhr)];if(!x.length)return;let w={cwd:GRe.default.dirname(h),ext:GRe.default.extname(h),seen:a,baseUrl:r.baseUrl,pathMappings:r.pathMappings,foundModuleAliases:r.foundModuleAliases};x.forEach(L=>{let q=L[1];if(q[0]==="."){vbt(Object.assign({},w,{filename:q}));return}try{let te=Lzt.default.resolveModuleName(q,h,d,Lzt.default.sys).resolvedModule;if(te&&te.extension===".ts"){vbt(Object.assign({},w,{filename:te.resolvedFileName}));return}if(!r.pathMappings)return;let me=UYe(r.pathMappings,q);if(!me)return;vbt(Object.assign({},w,{filename:me}),q)}catch{}})}function CIn(r,e={pathMappings:[]},i){if(r===null)return{deps:new Set,aliases:new Map};let a=new Map,u=new Set;return u.add(r),vbt({filename:r,ext:GRe.default.extname(r),cwd:GRe.default.dirname(r),seen:u,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:a,compilerOptions:i}),{deps:u,aliases:a}}async function vIn(r,e){let{mod:i,dependencies:a}=await dIn(r,{cwd:e,interopDefault:!0});return{config:i?.default??i,dependencies:a}}async function Yhr(r,e){let i=r.presets??[],a=[r];for(;i.length>0;){let u=await i.shift();if(typeof u=="string"){let d=await vIn(u,e);a.unshift(await d.config),i.unshift(...await d.config.presets??[])}else a.unshift(u),i.unshift(...u.presets??[])}return cIn(a)}var bIn={"@pandacss/preset-base":Mzt.preset,"@pandacss/preset-panda":bbt.preset,"@pandacss/dev/presets":bbt.preset},Qhr=Object.keys(bIn),$hr=r=>Qhr.includes(r);async function SIn(r){let e=await eBr(r);return Zhr(e,r.cwd)}async function Zhr(r,e){let i=new Set;r.config.eject||i.add(Mzt.preset),r.config.presets?r.config.presets.forEach(u=>{typeof u=="string"&&$hr(u)?i.add(bIn[u]):i.add(u)}):r.config.eject||i.add(bbt.preset),r.config.presets=Array.from(i);let a=await Yhr(r.config,e);return{...r,config:a}}async function eBr(r){let{cwd:e,file:i}=r,a=Ghr({cwd:e,file:i});if(!a)throw new Cbt;v2.debug("config:path",a);let u=await vIn(a,e);if(typeof u.config!="object")throw new _In("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:a}}var g5n=require("fs"),kqt=b_(ejt(),1),F2t=require("path");ae();var HRe=require("path"),tjt=require("fs");var vPn=r=>r===(0,HRe.dirname)(r),ayr=Symbol("stop"),lyr=r=>r===ayr;var Rbt=(r,e=process.cwd())=>{if(typeof r=="function"&&r(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof r=="string"){let a=(0,HRe.join)(e,r);return(0,tjt.existsSync)(a)?a:vPn(e)?null:Rbt(r,(0,HRe.dirname)(e))}let i=r(e);return lyr(i)?null:i??(vPn(e)?null:Rbt(r,(0,HRe.dirname)(e)))};ae();var JRe=b_(require("path"),1),kPn=require("fs"),IPn=b_(require("path"),1);var zJ=b_(require("path"),1),PPn=require("fs"),sjt=require("module"),Ew=b_(require("path"),1),NPn=require("fs");async function bPn(r,e){let i=JRe.default.dirname(JRe.default.resolve(r)),a=e?.root?JRe.default.resolve(e.root):null;for(;i;){let u=await cyr(i,e);if(u)return u;{if(a===i)break;let d=JRe.default.dirname(i);if(d===i)break;i=d}}throw new Error(`no tsconfig file found for ${r}`)}async function cyr(r,e){let i=JRe.default.join(r,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(i)?i:void 0;try{let a=await kPn.promises.stat(i);if(a.isFile()||a.isFIFO())return i}catch(a){if(a.code!=="ENOENT")throw a}}var Wbi=IPn.default.sep;function uyr(r){let e=fyr(pyr(dyr(r)));return e.trim()===""?"{}":e}function fyr(r){let e=!1,i=0,a="",u=null;for(let d=0;d<r.length;d++){let h=r[d];if(h==='"'&&(wPn(r,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(a+=r.slice(i,u)+" ",i=u+1,u=null):h.match(/\s/)||(u=null))}return a+r.substring(i)}function wPn(r,e){let i=e-1,a=0;for(;r[i]==="\\";)i-=1,a+=1;return!!(a%2)}function Lbt(r,e,i){return r.slice(e,i).replace(/\S/g," ")}var njt=Symbol("singleComment"),SPn=Symbol("multiComment");function pyr(r){let e=!1,i=!1,a=0,u="";for(let d=0;d<r.length;d++){let h=r[d],b=r[d+1];!i&&h==='"'&&(wPn(r,d)||(e=!e)),!e&&(!i&&h+b==="//"?(u+=r.slice(a,d),a=d,i=njt,d++):i===njt&&h+b===`\r
30776
+ ${u}`),r?dgt(u,{minify:e}):u}catch(i){throw i instanceof WZt&&(v2.error("sheet",i.message),i.plugin&&v2.error("sheet",`By plugin: ${i.plugin}:`),i.source&&(v2.error("sheet",`Line ${i.line}:${i.column}, in:`),v2.error("sheet",i.source))),i}};append=(...r)=>{this.context.root.append(...r)};prepend=(...r)=>{this.context.root.prepend(...r)}},Axn=class{tokens;classNames=new Map;styles=new Map;shorthands=new Map;types=new Map;propertyKeys=new Map;config={};customValues=new Map;transforms=new Map;configs=new Map;separator="_";prefix="";strictTokens=!1;constructor(r){let{tokens:e,config:i={},separator:a,prefix:u,shorthands:d,strictTokens:h}=r;this.tokens=e,this.config=i,a&&(this.separator=a),u&&(this.prefix=u),h&&(this.strictTokens=h),d&&this.assignShorthands(),this.assignColorPaletteProperty(),this.assignProperties(),this.assignPropertyTypes()}register=(r,e)=>{this.assignProperty(r,e),this.assignPropertyType(r,e),this.config[r]=e};assignShorthands=()=>{for(let[r,e]of Object.entries(this.config)){let{shorthand:i}=this.normalize(e)??{};if(!i)continue;(Array.isArray(i)?i:[i]).forEach(u=>{this.shorthands.set(u,r)})}};assignColorPaletteProperty=()=>{let r=this.tokens.colorPalettes;this.config.colorPalette={values:Object.keys(r),transform(e){return r[e]}}};resolveShorthand=r=>this.shorthands.get(r)??r;get hasShorthand(){return this.shorthands.size>0}get isEmpty(){return Object.keys(this.config).length===0}entries=()=>Object.entries(this.config).filter(([,e])=>!!e?.className).map(([e,i])=>[e,i.className]);getPropKey=(r,e)=>`(${r} = ${e})`;hash=(r,e)=>`${r}${this.separator}${e}`;getPropertyValues=(r,e)=>{let{values:i}=r,a=u=>{let d=e?.(u);return d?{[d]:d}:void 0};return bj(i)?a?.(i)??this.tokens.getValue(i)??{}:Array.isArray(i)?i.reduce((u,d)=>(u[d]=d,u),{}):cFt(i)?i(e?a:this.getToken.bind(this)):i};getToken=r=>this.tokens.get(r);normalize=r=>r;assignProperty=(r,e)=>{let i=this.normalize(e);if(this.setTransform(r,i?.transform),!i)return;this.configs.set(r,i);let a=this.getPropertyValues(i);if(a)for(let[u,d]of Object.entries(a)){let h=this.getPropKey(r,u);this.setStyles(r,d,u,h),this.setClassName(r,u)}};assignProperties=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignProperty(r,e)};getPropertyKeys=r=>{let e=this.propertyKeys.get(r);return e?Array.from(e):[]};assignPropertyType=(r,e)=>{let i=this.normalize(e);if(!i)return;let a=this.getPropertyValues(i,d=>`type:Tokens["${d}"]`);if(typeof a=="object"&&a.type){this.types.set(r,new Set([`type:${a.type}`]));return}if(a){let d=new Set(Object.keys(a));this.types.set(r,d),this.propertyKeys.set(r,d)}let u=this.types.get(r)??new Set;!this.strictTokens&&i.property&&this.types.set(r,u.add(`CssProperties["${i.property}"]`))};assignPropertyTypes=()=>{for(let[r,e]of Object.entries(this.config))e&&this.assignPropertyType(r,e)};getTypes=()=>{let r=new Map;for(let[e,i]of this.types.entries()){if(i.size===0){r.set(e,["string"]);continue}let a=Array.from(i).map(u=>u.startsWith("CssProperties")?u:u.startsWith("type:")?u.replace("type:",""):JSON.stringify(u));r.set(e,a)}return r};defaultTransform=zE((r,e)=>{if(e.startsWith("--")){let a=this.tokens.getTokenVar(r);r=typeof a=="string"?a:r}return{[e]:r}});setTransform=(r,e)=>{let a=e??(u=>this.defaultTransform(u,r));return this.transforms.set(r,a),this};setStyles=(r,e,i,a)=>{a=a??this.getPropKey(r,e);let u=x=>this.defaultTransform(x,r),d=this.transforms.get(r)??u,h=Object.assign(this.getToken.bind(this),{raw:x=>this.tokens.getByName(x)}),b=d(e,{token:h,raw:i});return this.styles.set(a,b??{}),this};formatClassName=r=>[this.prefix,r].filter(Boolean).join("-");setClassName=(r,e)=>{let i=this.getPropKey(r,e),a=this.configs.get(r),u;return!a||!a.className?u=this.hash(Fve(r),e):u=this.hash(a.className,e),this.classNames.set(i,u),this};isProperty=r=>this.configs.has(r);getOrCreateClassName=(r,e)=>((a,u)=>{let d=this.getPropKey(a,u);return this.classNames.has(d)||(this.isProperty(a)&&this.customValues.set(a,u),this.setClassName(a,u)),this.classNames.get(d)})(r,e);getOrCreateStyle=(r,e)=>{let i=this.getPropKey(r,e);return this.styles.get(i)??this.setStyles(r,e,e,i),this.styles.get(i)};transform=(r,e)=>{if(e==null)return{className:"",styles:{}};let i=this.resolveShorthand(r);return Ufe({layer:this.configs.get(i)?.layer,className:this.getOrCreateClassName(i,NKe(e)),styles:this.getOrCreateStyle(i,e)})};keys=()=>{let r=Array.from(this.shorthands.keys()),e=Object.keys(this.config);return[...r,...e]};getPropShorthandsMap=()=>{let r=new Map;return this.shorthands.forEach((e,i)=>{let a=r.get(e)??[];a.push(i),r.set(e,a)}),r};getPropShorthands=r=>this.getPropShorthandsMap().get(r)??[]};ae();ae();var FRe=b_(NW(),1);var tm=b_(NW(),1);ae();var Odr=b_(nzt(),1),RW=b_(YAn(),1);ae();var Mj=b_(require("path"),1),$An=b_(require("os"),1),Bdr=/(^\/\w:\/)|(^\/\w:\\)/,QAn=Mj.default.parse(process.cwd()).root,ZAn=/^\w:/,gdr=$An.default.platform();function ydr(r){return/\\/.test(r)||ZAn.test(r)}function ekn(r){let e=/^\\\\\?\\/.test(r),i=/[^\u0000-\u0080]+/.test(r);return e||i?r:r.replace(/\\/g,"/")}function Cdr(r){let e=typeof r=="string"?r:r.pathname;return e.startsWith("file:")&&(e.startsWith("file://")&&(e=e.slice(7)),Bdr.test(e)&&(e=e.slice(1))),rzt(e)}function tkn(r){return[...r].some(e=>typeof e=="string"&&ydr(e))?Mj.default.win32:Mj.default}function Spe(r,e){return ekn(tkn(e)[r](...e))}function nkn(r,e){return Mj.default.posix[r](...[...e].map(i=>typeof i=="string"?ekn(i):i))}function vdr(r){return nkn("parse",arguments)}function bdr(r){return nkn("extname",arguments)}function Sdr(r){return tkn(arguments).isAbsolute(r)}function xdr(...r){return Spe("join",arguments)}function rzt(r){let e=Spe("normalize",arguments);return r.startsWith("./")&&!e.startsWith("./")?"./"+e:e}function Edr(r,e){return Spe("relative",arguments)}function Ddr(...r){return Spe("resolve",arguments)}function Tdr(r){return Spe("dirname",arguments)}function Adr(r,e){return Spe("basename",arguments)}function kdr(r){return Spe("format",arguments)}function Idr(r){return Spe("toNamespacedPath",arguments)}function wdr(r){return gdr!=="win32"||ZAn.test(r)||r.startsWith(QAn)||!Mj.default.win32.isAbsolute(Mj.default.win32.normalize(r))?r:Mj.default.win32.join(QAn,r)}var izt={sep:Mj.default.posix.sep,delimiter:Mj.default.posix.delimiter,parse:vdr,isAbsolute:Sdr,join:xdr,extname:bdr,normalize:rzt,relative:Edr,resolve:Ddr,dirname:Tdr,basename:Adr,format:kdr,toNamespacedPath:Idr,get posix(){return this},get win32(){return rkn}},rkn={...Mj.default.win32,get posix(){return izt},get win32(){return this}},Pdr=Mj.default,D1e={...izt,posix:izt,win32:rkn,native:Pdr,includeDriveLetter:wdr,urlToFilename:Cdr};var hkn=require("module"),Bkn=require("util"),gkn=b_(ckn(),1),sbt=()=>{let r={Infinity:1/0,NaN:NaN,undefined:void 0,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Array,Boolean,Date,Error,EvalError,Number,Object,RangeError,ReferenceError,RegExp,String,SyntaxError,TypeError,URIError,JSON,Math,escape,unescape,eval,Function};try{r.AggregateError=AggregateError}catch{}try{r.FinalizationRegistry=FinalizationRegistry}catch{}try{r.WeakRef=WeakRef}catch{}try{r.BigInt=BigInt}catch{}try{r.Reflect=Reflect}catch{}try{r.WeakMap=WeakMap}catch{}try{r.WeakSet=WeakSet}catch{}try{r.Set=Set}catch{}try{r.Map=Map}catch{}try{r.Uint8Array=Uint8Array}catch{}try{r.BigUint64Array=BigUint64Array}catch{}try{r.BigInt64Array=BigInt64Array}catch{}try{r.Atomics=Atomics}catch{}try{r.SharedArrayBuffer=SharedArrayBuffer}catch{}try{r.WebAssembly=WebAssembly}catch{}try{r.Uint8ClampedArray=Uint8ClampedArray}catch{}try{r.Uint16Array=Uint16Array}catch{}try{r.Uint32Array=Uint32Array}catch{}try{r.Intl=Intl}catch{}try{r.Int8Array=Int8Array}catch{}try{r.Int16Array=Int16Array}catch{}try{r.Int32Array=Int32Array}catch{}try{r.Float32Array=Float32Array}catch{}try{r.Float64Array=Float64Array}catch{}try{r.ArrayBuffer=ArrayBuffer}catch{}try{r.DataView=DataView}catch{}try{r.isFinite=isFinite}catch{}try{r.Promise=Promise}catch{}try{r.Proxy=Proxy}catch{}try{r.Symbol=Symbol}catch{}return r};function Epe(r,e,i){let a={};return[r,e??{},i??{}].forEach(h=>Object.defineProperties(a,Object.getOwnPropertyDescriptors(h))),a}function $1t(r,e){let i={};return Object.getOwnPropertyNames(r).forEach(a=>{a in e||Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(r,a))}),i}var ykn=(0,hkn.createRequire)(dt),Wdr=()=>{let r=sbt(),e=Epe($1t(global,r),r,{require:ykn,process,__dirname:i=>D1e.native.normalize(D1e.native.dirname(i)),__filename:i=>D1e.native.normalize(i)});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Gdr(r){let e=0;return{requestAnimationFrame:function(d){let h=new Date().getTime(),b=Math.max(0,16-(h-e)),x=r.setTimeout(function(){d(h+b)},b);return e=h+b,x},cancelAnimationFrame:function(d){clearTimeout(d)}}}var X1t;function zdr(r=!1){return X1t??(X1t=jdr("evaluate against a browser environment",r,"jsdom"))}function jdr(r,e,i=r){try{return ykn(i)}catch{if(e)throw new ReferenceError(`You must install the peer dependency '${i}' in order to ${r} with ts-evaluator`);return}}var Vdr=()=>{let{JSDOM:r}=zdr(!0),{window:e}=new r("",{url:"https://example.com"}),i=sbt(),a=Gdr(e),u=Epe($1t(e,i),$1t(a,e),i);return Object.defineProperties(u,{window:{get(){return u}},globalThis:{get(){return u}}}),u},Vx="[return]",uF="[break]",G7="[continue]",z7="this",T1e="super",Udr=()=>{let r=sbt(),e=Epe($1t(global,r),r,{import:{meta:{url:i=>{let a=D1e.normalize(i);return`file:///${a.startsWith("/")?a.slice(1):a}`}}},process});return Object.defineProperties(e,{global:{get(){return e}},globalThis:{get(){return e}}}),e};function Ckn(r,e){return e.isDeclaration(r)}function Hdr(r,e){return e.isPropertyAccessExpression(r)?!1:"name"in r&&r.name!=null}function vkn(r,e){return r.flags!==e.NodeFlags.Const&&r.flags!==e.NodeFlags.Let}var j7=class extends Error{constructor({node:e,environment:i,message:a}){super(a),Error.captureStackTrace(this,this.constructor),this.node=e,this.environment=i}};function Ire(r){return typeof r=="object"&&r!=null&&r instanceof j7}var Z1t=class extends j7{constructor({path:e,node:i,environment:a,message:u=`Module '${e}' could not be resolved'`}){super({message:u,environment:a,node:i}),this.path=e}},mR=class extends j7{constructor({node:e,environment:i,typescript:a,message:u=`Unexpected Node: '${a.SyntaxKind[e.kind]}'`}){super({message:u,node:e,environment:i})}};function Jdr(r){var e;let{node:i,evaluate:a,environment:u,typescript:d,throwError:h}=r,b=d.getNameOfDeclaration(i);if(b!=null)return d.isIdentifier(b)||!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,b)||d.isStringLiteralLike(b)?b.text:d.isNumericLiteral(b)?Number(b.text):d.isComputedPropertyName(b)?a.expression(b.expression,r):h(new mR({node:b,environment:u,typescript:d}))}function bkn(r,e){let{node:i,typescript:a}=e;if(!a.isExternalModuleNameRelative(r))return r;let u=i.getSourceFile().fileName;return D1e.join(D1e.dirname(u),r)}function ebt(r){var e,i,a,u,d;let{node:h,typescript:b,throwError:x,environment:w}=r,L=Jdr(r);if(Ire(L))return L;if(L==null)return x(new mR({node:h,environment:w,typescript:b}));let q=BI(h,r.environment,L);if(q!=null&&q.literal!=null)return q.literal;let te=BI(h,r.environment,"require").literal,me=b.isModuleDeclaration(h)?h:qdr(h,b.SyntaxKind.ModuleDeclaration,b);if(me==null)return x(new mR({node:h,environment:w,typescript:b}));let Ee=me.name.text,ke=bkn(Ee,r);try{let Ue=(u=(i=(e=r.moduleOverrides)===null||e===void 0?void 0:e[Ee])!==null&&i!==void 0?i:(a=r.moduleOverrides)===null||a===void 0?void 0:a[ke])!==null&&u!==void 0?u:te(ke);return b.isModuleDeclaration(h)?Ue:(d=Ue[L])!==null&&d!==void 0?d:Ue}catch(Ue){return Ire(Ue)?Ue:x(new Z1t({node:me,environment:w,path:ke}))}}function Y1t(r,e,i){var a,u,d,h,b,x;let{node:w,throwError:L,environment:q}=i,te=BI(w,i.environment,"require").literal,me=bkn(e,i);try{let Ee=(h=(u=(a=i.moduleOverrides)===null||a===void 0?void 0:a[e])!==null&&u!==void 0?u:(d=i.moduleOverrides)===null||d===void 0?void 0:d[me])!==null&&h!==void 0?h:te(me);return(x=(b=Ee[r])!==null&&b!==void 0?b:Ee.default)!==null&&x!==void 0?x:Ee}catch(Ee){return Ire(Ee)?Ee:L(new Z1t({node:w,environment:q,path:me}))}}function qdr(r,e,i){let a=r;for(;;){if(a=a.parent,a==null)return;if(a.kind===e){let u=i.getCombinedNodeFlags(a);if(!((u&i.NodeFlags.Namespace)!==0||(u&i.NodeFlags.NestedNamespace)!==0))return a}if(i.isSourceFile(a))return}}function yzt(r,e,i,a=new WeakSet){let{typescript:u}=i,d;function h(x,w=0){var L,q,te,me,Ee;if(a.has(x))return!1;if(a.add(x),u.isIdentifier(x)){if(x.text===e)return d=x,!0}else{if(u.isShorthandPropertyAssignment(x))return!1;if(u.isPropertyAssignment(x))return!1;if(u.isImportDeclaration(x)){if(x.importClause!=null){if(x.importClause.name!=null&&h(x.importClause.name)){let ke=x.moduleSpecifier;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}else if(x.importClause.namedBindings!=null&&h(x.importClause.namedBindings))return!0}return!1}else if(u.isImportEqualsDeclaration(x)){if(x.name!=null&&h(x.name)){if(u.isIdentifier(x.moduleReference))return d=yzt(x.parent,x.moduleReference.text,i,a),d!=null;if(u.isQualifiedName(x.moduleReference))return!1;{let ke=x.moduleReference.expression;if(ke!=null&&u.isStringLiteralLike(ke))return d=Y1t(e,ke.text,i),!0}}return!1}else if(u.isNamespaceImport(x)){if(h(x.name)){let ke=(q=(L=x.parent)===null||L===void 0?void 0:L.parent)===null||q===void 0?void 0:q.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isNamedImports(x)){for(let ke of x.elements)if(h(ke))return!0}else if(u.isImportSpecifier(x)){if(h(x.name)){let ke=(Ee=(me=(te=x.parent)===null||te===void 0?void 0:te.parent)===null||me===void 0?void 0:me.parent)===null||Ee===void 0?void 0:Ee.moduleSpecifier;return ke==null||!u.isStringLiteralLike(ke)?!1:(d=Y1t(e,ke.text,i),!0)}}else if(u.isSourceFile(x)){for(let ke of x.statements)if(h(ke))return!0}else if(u.isVariableStatement(x)){for(let ke of x.declarationList.declarations)if(h(ke)&&(vkn(x.declarationList,u)||w<1))return!0}else if(u.isBlock(x)){for(let ke of x.statements)if(h(ke,w+1))return!0}else if(Hdr(x,u)&&x.name!=null&&h(x.name))return d=x,!0}return!1}return u.findAncestor(r,x=>h(x))?d:void 0}function ukn(r,e){let i=r;for(;;){if(i=i.parent,i==null)return;if(Ckn(i,e)||e.isSourceFile(i))return i}}function Kdr(r){return r!=null&&(typeof r=="function"||typeof r=="object")}function fkn(r){return Kdr(r)}function Czt(r,e){switch(r){case Function.prototype.bind:case Function.prototype.call:case Function.prototype.apply:return!0}if(e!=null){let i=BI(void 0,e,"Function").literal;switch(r){case i.prototype.bind:case i.prototype.call:case i.prototype.apply:return!0}}return!1}var kre=class{constructor(e){this.intent=e}construct(e,i){return this.intent(e,i)}};function Skn(r){return typeof r=="object"&&r!=null&&r instanceof kre}function abt(r,e,i){return Skn(i)?e.throwError(i.construct(r,e)):i}function azt(r){return r.map(e=>typeof e=="symbol"?e.description:e).join(".")}function pkn({hook:r,item:e,scope:i,policy:a}){function u(d,h){let b=(x,w)=>{if(x!==!1)return Skn(x)||Ire(x)?x:w()};return!fkn(h)||Czt(h)?h:new Proxy(h,{construct(x,w,L){return b(r({kind:"__$$_PROXY_CONSTRUCT",policy:a,newTarget:L,argArray:w,target:x,path:azt(d)}),()=>Reflect.construct(x,w,L))},apply(x,w,L=[]){return b(r({kind:"__$$_PROXY_APPLY",policy:a,thisArg:w,argArray:L,target:x,path:azt(d)}),()=>Reflect.apply(x,w,L))},get(x,w,L){let q=[...d,w];return b(r({kind:"__$$_PROXY_GET",policy:a,path:azt(q),target:x}),()=>{let te=Reflect.get(x,w,L),me=Reflect.getOwnPropertyDescriptor(h,w);return me!=null&&me.configurable===!1&&me.writable===!1?h[w]:u(q,te)})}})}return fkn(e)?u([i],e):e}function dkn(r,e){switch(r){case"__$$_PROXY_GET":return`get ${e}`;case"__$$_PROXY_APPLY":return`${e}(...)`;case"__$$_PROXY_CONSTRUCT":return`new ${e}(...)`}}var xkn={"node:http2":"http2",http2:{connect:{__$$_PROXY_APPLY:!0},createSecureServer:{__$$_PROXY_APPLY:!0},createServer:{__$$_PROXY_APPLY:!0}},"node:https":"https",https:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:http":"http",http:{createServer:{__$$_PROXY_APPLY:!0},request:{__$$_PROXY_APPLY:!0},get:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},ClientRequest:{__$$_PROXY_CONSTRUCT:!0},globalAgent:{destroy:{__$$_PROXY_APPLY:!0}},Agent:{__$$_PROXY_CONSTRUCT:!0}},"node:dgram":"dgram",dgram:{createSocket:{__$$_PROXY_APPLY:!0}},"node:dns":"dns",dns:{lookup:{__$$_PROXY_APPLY:!0},lookupService:{__$$_PROXY_APPLY:!0},resolve:{__$$_PROXY_APPLY:!0},resolve4:{__$$_PROXY_APPLY:!0},resolve6:{__$$_PROXY_APPLY:!0},resolveAny:{__$$_PROXY_APPLY:!0},resolveCname:{__$$_PROXY_APPLY:!0},resolveMx:{__$$_PROXY_APPLY:!0},resolveNaptr:{__$$_PROXY_APPLY:!0},resolveNs:{__$$_PROXY_APPLY:!0},resolvePtr:{__$$_PROXY_APPLY:!0},resolveSoa:{__$$_PROXY_APPLY:!0},resolveSrv:{__$$_PROXY_APPLY:!0},resolveTxt:{__$$_PROXY_APPLY:!0},reverse:{__$$_PROXY_APPLY:!0},Resolver:{__$$_PROXY_CONSTRUCT:!0}},"node:net":"net",net:{createServer:{__$$_PROXY_APPLY:!0},createConnection:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0}},"node:tls":"tls",tls:{createServer:{__$$_PROXY_APPLY:!0},createSecureContext:{__$$_PROXY_APPLY:!0},connect:{__$$_PROXY_APPLY:!0},Server:{__$$_PROXY_CONSTRUCT:!0},TLSSocket:{__$$_PROXY_CONSTRUCT:!0}}},Xdr={...xkn,Math:{random:{__$$_PROXY_APPLY:!0}},Date:{now:{__$$_PROXY_APPLY:!0},__$$_PROXY_CONSTRUCT:(...r)=>r.length===0&&!(r[0]instanceof Date)}};function Ydr(r,e){return typeof r==typeof e||typeof r=="function"}function Qdr(r){return typeof r=="function"}function A1e(r,e,i){let a=i.path.split(".");return czt(r,e,i,a)}function czt(r,e,i,a){let[u,...d]=a;if(u==null)return!1;let h=r[u];if(h==null)return!1;if(typeof h=="string")return czt(r,e,i,[h,...d]);if(Ydr(h,e))return mkn(h,e,i);{let b=h[i.kind];return b!=null?mkn(b,e,i):czt(h,e,i,d)}}function mkn(r,e,i){if(Qdr(r)){let a=i;return a.argArray!=null&&r(...a.argArray)===e}else return r===e}function $dr(r){return A1e(Xdr,!0,r)}var Dpe=class extends j7{constructor({violation:e,node:i,environment:a,message:u}){super({node:i,environment:a,message:`[${e}]: ${u}`}),this.violation=e}},uzt=class extends Dpe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is nondeterministic. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Ekn={"node:fs":"fs",fs:{readFile:{__$$_PROXY_APPLY:"read"},readFileSync:{__$$_PROXY_APPLY:"read"},readdir:{__$$_PROXY_APPLY:"read"},readdirSync:{__$$_PROXY_APPLY:"read"},read:{__$$_PROXY_APPLY:"read"},readSync:{__$$_PROXY_APPLY:"read"},exists:{__$$_PROXY_APPLY:"read"},existsSync:{__$$_PROXY_APPLY:"read"},access:{__$$_PROXY_APPLY:"read"},accessSync:{__$$_PROXY_APPLY:"read"},close:{__$$_PROXY_APPLY:"read"},closeSync:{__$$_PROXY_APPLY:"read"},createReadStream:{__$$_PROXY_APPLY:"read"},stat:{__$$_PROXY_APPLY:"read"},statSync:{__$$_PROXY_APPLY:"read"},watch:{__$$_PROXY_APPLY:"read"},watchFile:{__$$_PROXY_APPLY:"read"},unwatchFile:{__$$_PROXY_APPLY:"read"},realpath:{__$$_PROXY_APPLY:"read"},realpathSync:{__$$_PROXY_APPLY:"read"},fstat:{__$$_PROXY_APPLY:"read"},fstatSync:{__$$_PROXY_APPLY:"read"},createWriteStream:{__$$_PROXY_APPLY:"write"},copyFile:{__$$_PROXY_APPLY:"write"},copyFileSync:{__$$_PROXY_APPLY:"write"},unlink:{__$$_PROXY_APPLY:"write"},unlinkSync:{__$$_PROXY_APPLY:"write"},rmdir:{__$$_PROXY_APPLY:"write"},rmdirSync:{__$$_PROXY_APPLY:"write"},symlink:{__$$_PROXY_APPLY:"write"},symlinkSync:{__$$_PROXY_APPLY:"write"},truncate:{__$$_PROXY_APPLY:"write"},truncateSync:{__$$_PROXY_APPLY:"write"},utimes:{__$$_PROXY_APPLY:"write"},utimesSync:{__$$_PROXY_APPLY:"write"},appendFile:{__$$_PROXY_APPLY:"write"},appendFileSync:{__$$_PROXY_APPLY:"write"},write:{__$$_PROXY_APPLY:"write"},writeSync:{__$$_PROXY_APPLY:"write"},writeFile:{__$$_PROXY_APPLY:"write"},writeFileSync:{__$$_PROXY_APPLY:"write"},chmod:{__$$_PROXY_APPLY:"write"},chmodSync:{__$$_PROXY_APPLY:"write"},chown:{__$$_PROXY_APPLY:"write"},chownSync:{__$$_PROXY_APPLY:"write"},mkdir:{__$$_PROXY_APPLY:"write"},mkdirSync:{__$$_PROXY_APPLY:"write"},rename:{__$$_PROXY_APPLY:"write"},renameSync:{__$$_PROXY_APPLY:"write"},futimes:{__$$_PROXY_APPLY:"write"},futimesSync:{__$$_PROXY_APPLY:"write"},link:{__$$_PROXY_APPLY:"write"},linkSync:{__$$_PROXY_APPLY:"write"},mkdtemp:{__$$_PROXY_APPLY:"write"},open:{__$$_PROXY_APPLY:"write"},openSync:{__$$_PROXY_APPLY:"write"},fchmod:{__$$_PROXY_APPLY:"write"},fchmodSync:{__$$_PROXY_APPLY:"write"},fchown:{__$$_PROXY_APPLY:"write"},fchownSync:{__$$_PROXY_APPLY:"write"},ftruncate:{__$$_PROXY_APPLY:"write"},ftruncateSync:{__$$_PROXY_APPLY:"write"},fsync:{__$$_PROXY_APPLY:"write"},fsyncSync:{__$$_PROXY_APPLY:"write"},fdatasync:{__$$_PROXY_APPLY:"write"},fdatasyncSync:{__$$_PROXY_APPLY:"write"},lchmod:{__$$_PROXY_APPLY:"write"},lchmodSync:{__$$_PROXY_APPLY:"write"}}};function Zdr(r){return A1e(Ekn,"read",r)}var tbt=class extends Dpe{constructor({node:e,environment:i,kind:a,message:u=`${a} operations are in violation of the policy`}){super({violation:"io",message:u,environment:i,node:e}),this.kind=a}};function emr(r){return A1e(Ekn,"write",r)}function tmr(r){return A1e(xkn,!0,r)}var fzt=class extends Dpe{constructor({operation:e,node:i,environment:a,message:u=`The operation: '${e}' is performing network activity. That is in violation of the policy`}){super({violation:"deterministic",message:u,node:i,environment:a}),this.operation=e}},Dkn={"node:process":"process",process:{exit:{__$$_PROXY_APPLY:"exit"}},"node:child_process":"child_process",child_process:{__$$_PROXY_APPLY:"spawnChild"},"node:cluster":"cluster",cluster:{Worker:{__$$_PROXY_CONSTRUCT:"spawnChild"}}};function nmr(r){return A1e(Dkn,"exit",r)}var nbt=class extends Dpe{constructor({kind:e,node:i,environment:a,message:u=`${e} operations are in violation of the policy`}){super({violation:"process",message:u,node:i,environment:a}),this.kind=e}};function rmr(r){return A1e(Dkn,"spawnChild",r)}var imr={"node:console":"console",console:{__$$_PROXY_APPLY:!0}};function omr(r){return A1e(imr,!0,r)}function smr({policy:r,env:e}){let i=h=>!r.console&&omr(h)?!1:!r.io.read&&Zdr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"read"})):!r.io.write&&emr(h)?new kre((b,x)=>new tbt({...x,node:b,kind:"write"})):!r.process.exit&&nmr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"exit"})):!r.process.exit&&rmr(h)?new kre((b,x)=>new nbt({...x,node:b,kind:"spawnChild"})):!r.network&&tmr(h)?new kre((b,x)=>new fzt({...x,node:b,operation:dkn(h.kind,h.path)})):r.deterministic&&$dr(h)?new kre((b,x)=>new uzt({...x,node:b,operation:dkn(h.kind,h.path)})):!0,a=Object.entries(Object.getOwnPropertyDescriptors(e)),u=Object.assign({},...a.filter(([,h])=>!("value"in h)).map(([h,b])=>({[h]:b}))),d=Object.assign({},...a.filter(([,h])=>"value"in h).map(([h,b])=>({[h]:h==="require"?new Proxy(b.value,{apply(x,w,L=[]){let[q]=L;return pkn({policy:r,item:Reflect.apply(x,w,L),scope:q,hook:i})}}):pkn({policy:r,item:b.value,scope:h,hook:i})})));return Object.defineProperties(d,{...u})}function MYe(r,e){let[i]=e.split(".");if(RW.default.has(r.env,i))return r.env;if(r.parentEnv!=null)return MYe(r.parentEnv,e)}function pzt(r){return r.preset!=null?r.preset:r.parentEnv!=null?pzt(r.parentEnv):"NONE"}function Tkn(r,e,i){let a=ukn(r.startingNode,i),u=ukn(e,i);if(a?.pos===u?.pos)return r;if(r.parentEnv!=null)return Tkn(r.parentEnv,e,i)}function BI(r,e,i){let[a]=i.split(".");if(RW.default.has(e.env,a)){let u=RW.default.get(e.env,i);switch(i){case"__dirname":case"__filename":{let d=pzt(e);return(d==="NODE"||d==="NODE_CJS")&&typeof u=="function"&&r!=null?{literal:u(r.getSourceFile().fileName)}:{literal:u}}case"import.meta":{let d=pzt(e);return(d==="NODE_ESM"||d==="BROWSER"||d==="ECMA")&&typeof u=="object"&&u!=null&&typeof u.url=="function"&&r!=null?{literal:{url:u.url(r.getSourceFile().fileName)}}:{literal:u}}default:return{literal:u}}}if(e.parentEnv!=null)return BI(r,e.parentEnv,i)}function ST(r,e,i,...a){return a.some(u=>{let d=BI(r,e,u);return d==null?!1:d.literal===i})}function lzt(r){switch(r){case Vx:case uF:case G7:case z7:case T1e:return!0;default:return!1}}function IB({environment:r,path:e,value:i,reporting:a,node:u,newBinding:d=!1}){let[h]=e.split(".");if(RW.default.has(r.env,h)||d||r.parentEnv==null){if(RW.default.has(r.env,e)&&RW.default.get(r.env,e)===i)return;RW.default.set(r.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})}else{let b=r.parentEnv;for(;b!=null;)if(RW.default.has(b.env,h)){if(RW.default.has(b.env,e)&&RW.default.get(b.env,e)===i)return;RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u});return}else b.parentEnv==null?(RW.default.set(b.env,e,i),a.reportBindings!=null&&!lzt(e)&&a.reportBindings({path:e,value:i,node:u})):b=b.parentEnv}}function amr({inputEnvironment:{extra:r,preset:e},startingNode:i,policy:a}){let u;switch(e){case"NONE":u=Epe(r);break;case"ECMA":u=Epe(sbt(),r);break;case"NODE":case"NODE_CJS":u=Epe(Wdr(),r);break;case"NODE_ESM":u=Epe(Udr(),r);break;case"BROWSER":u=Epe(Vdr(),r);break;default:u={};break}return{parentEnv:void 0,preset:e,startingNode:i,env:smr({policy:a,env:u})}}function Akn(r,e){return r.kind===e.SyntaxKind.TrueKeyword||r.kind===e.SyntaxKind.FalseKeyword}function kkn(r,e){return r.kind===e.SyntaxKind.NullKeyword}function lmr(r,e){var i;return e.isStringLiteralLike(r)?{success:!0,value:r.text}:Akn(r,e)?{success:!0,value:r.kind===e.SyntaxKind.TrueKeyword}:e.isRegularExpressionLiteral(r)?{success:!0,value:new Function(`return ${r.text}`)()}:e.isNumericLiteral(r)?{success:!0,value:Number(r.text)}:!((i=e.isBigIntLiteral)===null||i===void 0)&&i.call(e,r)?{success:!0,value:BigInt(r.text)}:e.isIdentifier(r)&&r.text==="Infinity"?{success:!0,value:1/0}:e.isIdentifier(r)&&r.text==="NaN"?{success:!0,value:NaN}:e.isIdentifier(r)&&r.text==="null"?{success:!0,value:null}:e.isIdentifier(r)&&r.text==="undefined"?{success:!0,value:void 0}:kkn(r,e)?{success:!0,value:null}:{success:!1}}var dzt=class extends Dpe{constructor({ops:e,node:i,environment:a,message:u=`Maximum ops exceeded: ${e}`}){super({violation:"maxOps",message:u,node:i,environment:a}),this.ops=e}};function Ikn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,throwError:b,getCurrentError:x}=r,w=e??(i.initializer==null?void 0:u.expression(i.initializer,r));if(x()==null){if(w==null&&!h.isIdentifier(i.name))return b(new j7({node:i,environment:a}));u.nodeWithArgument(i.name,w,r),x()==null&&d.push(w)}}function wkn(r,e){return r.kind===e.SyntaxKind.ThisKeyword}function lbt(r,e){return r.kind===e.SyntaxKind.SuperKeyword}function MRe(r){var e,i;let{node:a,evaluate:u,typescript:d}=r;if(d.isIdentifier(a))return a.text;if(!((e=d.isPrivateIdentifier)===null||e===void 0)&&e.call(d,a))return a.text;if(wkn(a,d))return z7;if(lbt(a,d))return T1e;if(d.isParenthesizedExpression(a))return MRe({...r,node:a.expression});if(!((i=d.isTypeAssertionExpression)===null||i===void 0)&&i.call(d,a)||!("isTypeAssertionExpression"in d)&&d.isTypeAssertion(a))return MRe({...r,node:a.expression});if(d.isPropertyAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=MRe({...r,node:a.name});return b==null&&(b=u.expression(a.name,r)),h==null||b==null?void 0:`${h}.${b}`}else if(d.isElementAccessExpression(a)){let h=MRe({...r,node:a.expression});h==null&&(h=u.expression(a.expression,r));let b=u.expression(a.argumentExpression,r);return h==null||b==null?void 0:`${h}.${b}`}else if(d.isFunctionDeclaration(a))return a.name==null?void 0:a.name.text}var mzt=class extends j7{constructor({node:e,environment:i,message:a="'No leftValue could be determined'"}){super({message:a,environment:i,node:e})}};function Q1t(r,e){var i;return e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?Q1t(r.expression,e):r}function Pkn(r){return r!=null&&typeof r=="object"&&"kind"in r&&"flags"in r&&"pos"in r&&"end"in r}function cmr(r){var e;let{node:i,environment:a,evaluate:u,logger:d,throwError:h,typeChecker:b,typescript:x,getCurrentError:w}=r,L=u.expression(i.left,r);if(w()!=null)return;let q=u.expression(i.right,r);if(w()!=null)return;let te=MRe({...r,node:i.left}),me=i.operatorToken.kind;switch(me){case x.SyntaxKind.AmpersandToken:return L&q;case x.SyntaxKind.AmpersandAmpersandToken:return L&&q;case x.SyntaxKind.AmpersandEqualsToken:case x.SyntaxKind.CaretEqualsToken:case x.SyntaxKind.BarEqualsToken:case x.SyntaxKind.MinusEqualsToken:case x.SyntaxKind.PlusEqualsToken:case x.SyntaxKind.PercentEqualsToken:case x.SyntaxKind.SlashEqualsToken:case x.SyntaxKind.AsteriskEqualsToken:case x.SyntaxKind.AsteriskAsteriskEqualsToken:case x.SyntaxKind.LessThanLessThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:case x.SyntaxKind.QuestionQuestionEqualsToken:case x.SyntaxKind.BarBarEqualsToken:case x.SyntaxKind.AmpersandAmpersandEqualsToken:{let Ee=L;switch(me){case x.SyntaxKind.AmpersandEqualsToken:Ee&=q;break;case x.SyntaxKind.CaretEqualsToken:Ee^=q;break;case x.SyntaxKind.BarEqualsToken:Ee|=q;break;case x.SyntaxKind.AsteriskEqualsToken:Ee*=q;break;case x.SyntaxKind.AsteriskAsteriskEqualsToken:Ee**=q;break;case x.SyntaxKind.LessThanLessThanEqualsToken:Ee<<=q;break;case x.SyntaxKind.GreaterThanGreaterThanEqualsToken:Ee>>=q;break;case x.SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken:Ee>>>=q;break;case x.SyntaxKind.MinusEqualsToken:Ee-=q;break;case x.SyntaxKind.PlusEqualsToken:Ee+=q;break;case x.SyntaxKind.PercentEqualsToken:Ee%=q;break;case x.SyntaxKind.SlashEqualsToken:Ee/=q;break;case x.SyntaxKind.QuestionQuestionEqualsToken:Ee=L??q;break;case x.SyntaxKind.BarBarEqualsToken:L||(Ee=q);break;case x.SyntaxKind.AmpersandAmpersandEqualsToken:L&&(Ee=q);break}return te!=null&&IB({...r,path:te,value:Ee}),Ee}case x.SyntaxKind.AsteriskToken:return L*q;case x.SyntaxKind.AsteriskAsteriskToken:return L**q;case x.SyntaxKind.BarToken:return L|q;case x.SyntaxKind.BarBarToken:return L||q;case x.SyntaxKind.CaretToken:return L^q;case x.SyntaxKind.CommaToken:return q;case x.SyntaxKind.MinusToken:return L-q;case x.SyntaxKind.PlusToken:return d.logResult(L+q,"BinaryExpression (PlusToken)"),L+q;case x.SyntaxKind.PercentToken:return L%q;case x.SyntaxKind.SlashToken:return L/q;case x.SyntaxKind.EqualsToken:{if(te!=null){let Ee=Q1t(i.left,x),ke=b?.getSymbolAtLocation(Ee),Ue=ke?.valueDeclaration;if(Ue==null&&b==null&&x.isIdentifier(Ee)){let We=yzt(Ee.parent,Ee.text,r);Pkn(We)&&(Ue=We)}let Fe=Ue==null?a:(e=Tkn(a,Ue,x))!==null&&e!==void 0?e:a;IB({...r,environment:Fe,path:te,value:q}),d.logBinding(te,q,"Assignment")}else return h(new mzt({node:i.left,environment:a}));return q}case x.SyntaxKind.EqualsEqualsToken:return L==q;case x.SyntaxKind.EqualsEqualsEqualsToken:return L===q;case x.SyntaxKind.ExclamationEqualsToken:return L!=q;case x.SyntaxKind.ExclamationEqualsEqualsToken:return L!==q;case x.SyntaxKind.GreaterThanToken:return L>q;case x.SyntaxKind.GreaterThanEqualsToken:return L>=q;case x.SyntaxKind.LessThanToken:return L<q;case x.SyntaxKind.LessThanEqualsToken:return L<=q;case x.SyntaxKind.InKeyword:return L in q;case x.SyntaxKind.QuestionQuestionToken:return L??q;case x.SyntaxKind.InstanceOfKeyword:return L instanceof q}return h(new mR({node:i.operatorToken,typescript:x,environment:a}))}var vzt="___lazyCallFlag";function umr(r){return r!=null&&typeof r=="object"&&vzt in r}function bzt(r){return r===void 0?"undefined":r===null?"null":typeof r=="string"?`"${r}"`:r.toString()}var rbt=class extends j7{constructor({value:e,node:i,environment:a,message:u=`${bzt(e)} is not a function'`}){super({message:u,environment:a,node:i}),this.value=e}};function xpe(r,e){var i;return lbt(r,e)?!0:e.isPropertyAccessExpression(r)?xpe(r.expression,e)||xpe(r.name,e):e.isElementAccessExpression(r)?xpe(r.expression,e)||xpe(r.argumentExpression,e):e.isParenthesizedExpression(r)||e.isAsExpression(r)||!((i=e.isTypeAssertionExpression)===null||i===void 0)&&i.call(e,r)||!("isTypeAssertionExpression"in e)&&e.isTypeAssertion(r)?xpe(r.expression,e):!1}function fmr(r){let{node:e,environment:i,evaluate:a,throwError:u,typescript:d,logger:h,getCurrentError:b}=r,x=[];for(let L=0;L<e.arguments.length;L++)if(x[L]=a.expression(e.arguments[L],r),b()!=null)return;let w=a.expression(e.expression,r);if(b()==null)if(umr(w)){let L=xpe(e.expression,d)?BI(e,i,z7):void 0,q=w.invoke(L?.literal,...x);return b()!=null?void 0:(h.logResult(q,"CallExpression"),q)}else{if(e.questionDotToken==null&&typeof w!="function")return u(new rbt({value:w,node:e.expression,environment:i}));let L=typeof w!="function"?void 0:abt(e,r,w(...x));return b()!=null?void 0:(h.logResult(L,"CallExpression"),L)}}function pmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function i6(r,e){return{parentEnv:r,startingNode:e,env:{}}}function NQ(r,e){let i=Array.isArray(r)?r:r.modifiers;return i!=null&&i.some(a=>a.kind===e)}function RQ(r,e,i){let{node:a,evaluate:u,environment:d,typescript:h,getCurrentError:b}=r,x=a.filter(w=>!(h.isIdentifier(w.name)&&w.name.text==="this"));for(let w=0;w<x.length;w++){let L=x[w];if(L.dotDotDotToken!=null){if(u.nodeWithArgument(L,e.slice(w),r),b()!=null)return;break}else{if(u.nodeWithArgument(L,e[w],r),b()!=null)return;if(i!=null&&h.isIdentifier(L.name)&&(NQ(L,h.SyntaxKind.PublicKeyword)||NQ(L,h.SyntaxKind.ProtectedKeyword)||NQ(L,h.SyntaxKind.PrivateKeyword))){let q=BI(L,d,L.name.text);q!=null&&(i[L.name.text]=q.literal)}}}}function dmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=NQ(e,d.SyntaxKind.AsyncKeyword)?async(...x)=>{let w=i6(i,e),L={...r,environment:w};if(IB({...L,path:Vx,value:!1,newBinding:!0}),IB({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:w},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,w,!0,Vx)?u.pop():void 0):a.expression(e.body,L)}:(...x)=>{let w=i6(i,e),L={...r,environment:w};if(IB({...L,path:Vx,value:!1,newBinding:!0}),IB({...L,path:"arguments",value:arguments,newBinding:!0}),RQ({...r,node:e.parameters,environment:w},x),h()==null)return d.isBlock(e.body)?(a.statement(e.body,L),h()!=null?void 0:ST(e,w,!0,Vx)?u.pop():void 0):a.expression(e.body,L)};return b.toString=()=>"[Function: anonymous]",Object.setPrototypeOf(b,BI(e,i,"Function").literal),b}function mmr({node:r}){return r.text}function _mr({node:r}){return Number(r.text)}function hmr({node:r,typescript:e}){return r.kind===e.SyntaxKind.TrueKeyword}function Bmr({node:r,environment:e}){let i=BI(r,e,"Function").literal;return new i(`return ${r.text}`)()}function gmr(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r,d=BI(e,a,"Object").literal,h=d.create(d.prototype);IB({...r,path:z7,value:h,newBinding:!0});for(let b of e.properties)if(i.nodeWithArgument(b,h,r),u()!=null)return;return h}function ymr(r){return r!=null&&r[Symbol.iterator]!=null}function Cmr(r){let{node:e,environment:i,evaluate:a,typescript:u,getCurrentError:d}=r,b=BI(e,i,"Array").literal.of();for(let x of e.elements){let w=a.expression(x,r);if(d()!=null)return;u.isSpreadElement(x)&&ymr(w)?b.push(...w):b.push(w)}return b}var ibt=class extends j7{constructor({node:e,environment:i,message:a=`'${e.text}' is not defined'`}){super({message:a,environment:i,node:e})}};function _kn(r){let{node:e,environment:i,typeChecker:a,evaluate:u,stack:d,logger:h,reporting:b,typescript:x,throwError:w,getCurrentError:L}=r,q=BI(e,i,e.text);if(q!=null)return h.logBinding(e.text,q.literal,"Lexical Environment match"),q.literal;let te=x.isShorthandPropertyAssignment(e.parent)?a?.getShorthandAssignmentValueSymbol(e.parent):a?.getSymbolAtLocation(e),me=te?.valueDeclaration;if(te!=null&&me==null)try{let Ee=a?.getAliasedSymbol(te);me=Ee?.valueDeclaration}catch{}if(me==null){let Ee=yzt(e.parent,e.text,r);if(L()!=null)return;if(Pkn(Ee)&&!x.isIdentifier(Ee))me=Ee;else if(Ee!=null)return IB({...r,path:e.text,value:Ee}),h.logBinding(e.text,Ee,"Discovered declaration value"),Ee}if(me!=null){if(me.getSourceFile().isDeclarationFile){let ke=ebt({...r,node:me});return L()!=null?void 0:(IB({environment:i,path:e.text,value:ke,reporting:b,node:me}),h.logBinding(e.text,ke,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),ke)}if(x.isVariableDeclaration(me)&&me.getSourceFile().fileName===e.getSourceFile().fileName&&me.pos>e.pos)if(x.isVariableDeclarationList(me.parent)&&vkn(me.parent,x)){IB({...r,path:e.text,value:void 0,newBinding:!0,node:me}),h.logBinding(e.text,void 0,"Hoisted var declaration");return}else return w(new ibt({node:e,environment:i}));if(u.declaration(me,r),L()!=null)return;let Ee=d.pop();return IB({...r,path:e.text,value:Ee,node:me}),h.logBinding(e.text,Ee,`Discovered declaration value${me.getSourceFile()===e.getSourceFile()?"":` (imported into '${e.getSourceFile().fileName}' from '${me.getSourceFile().fileName}')`}`),Ee}return w(new ibt({node:e,environment:i}))}function vmr(r){let{node:e,environment:i,typescript:a,evaluate:u,getCurrentError:d}=r,h=i6(i,e);for(let b=0;b<e.statements.length;b++){let x=e.statements[b];if(!(a.isConstructorDeclaration(e.parent)&&b===0&&a.isExpressionStatement(x)&&a.isCallExpression(x.expression)&&lbt(x.expression.expression,a))&&(u.statement(x,{...r,environment:h}),d()!=null||ST(e,h,!0,uF,G7,Vx)))break}}function bmr({node:r,evaluate:e,stack:i,...a}){let{getCurrentError:u}=a;if(IB({...a,environment:a.environment,path:Vx,value:!0,node:r}),r.expression==null)i.push(void 0);else{let d=e.expression(r.expression,a);if(u()!=null)return;i.push(d)}}function Nkn({node:r,evaluate:e,...i}){for(let a of r.declarations)if(e.declaration(a,i),i.getCurrentError()!=null)return}function Smr({node:r,...e}){Nkn({node:r.declarationList,...e})}function xmr(r){var e,i;let{node:a,environment:u,evaluate:d,reporting:h,typescript:b,throwError:x,getCurrentError:w}=r,L=d.expression(a.operand,r);if(w()==null)switch(a.operator){case b.SyntaxKind.PlusToken:return+L;case b.SyntaxKind.MinusToken:return-L;case b.SyntaxKind.TildeToken:return~L;case b.SyntaxKind.ExclamationToken:return!L;case b.SyntaxKind.PlusPlusToken:{if(!b.isIdentifier(a.operand)&&!(!((e=b.isPrivateIdentifier)===null||e===void 0)&&e.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=++q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}case b.SyntaxKind.MinusMinusToken:{if(!b.isIdentifier(a.operand)&&!(!((i=b.isPrivateIdentifier)===null||i===void 0)&&i.call(b,a.operand)))return x(new mR({node:a.operand,environment:u,typescript:b}));let q=MYe(u,a.operand.text),te=--q[a.operand.text];return h.reportBindings!=null&&h.reportBindings({path:a.operand.text,value:te,node:a}),te}}}function Emr(r){let{evaluate:e,node:i,statementTraversalStack:a,environment:u,typescript:d,getCurrentError:h}=r,b=e.expression(i.expression,r);if(b==null||h()!=null)return;let x=i.questionDotToken!=null&&b==null?void 0:b[i.name.text];return typeof x=="function"&&a.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(w,...L)=>abt(i,r,w!=null&&!Czt(x,u)?b[i.name.text].call(w,...L):b[i.name.text](...L))}:x}function Dmr(r){let{node:e,environment:i,evaluate:a,statementTraversalStack:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()!=null)return;let x=a.expression(e.argumentExpression,r);if(h()!=null)return;let w=e.questionDotToken!=null&&b==null?void 0:b[x];return typeof w=="function"&&u.includes(d.SyntaxKind.CallExpression)?{[vzt]:0,invoke:(L,...q)=>abt(e,r,L!=null&&!Czt(w,i)?b[x].call(L,...q):b[x](...q))}:w}function Tmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Amr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...r,node:e.parameters,environment:q},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),h()!=null)return;let me=e.getSourceFile();if(b!=null&&me.isDeclarationFile)return ebt(r)(...L);if(e.body!=null&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};b!=null&&IB({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,BI(e,i,"Function").literal),u.push(x)}function kmr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.expression,i);if(a()==null){if(u){if(e.statement(r.thenStatement,i),a()!=null)return}else if(r.elseStatement!=null)return e.statement(r.elseStatement,i)}}function Imr({node:r,evaluate:e,stack:i,...a}){let u=e.expression(r.expression,a);a.getCurrentError()==null&&i.push(u)}function wmr({node:r,evaluate:e,...i}){let a="";a+=r.head.text;for(let u of r.templateSpans){let d=e.expression(u.expression,i);if(i.getCurrentError()!=null)return;a+=d,a+=u.literal.text}return a}function Pmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Nmr(r){var e,i;let{evaluate:a,node:u,environment:d,typescript:h,throwError:b,reporting:x}=r;switch(a.expression(u.operand,r),u.operator){case h.SyntaxKind.PlusPlusToken:{if(!h.isIdentifier(u.operand)&&!(!((e=h.isPrivateIdentifier)===null||e===void 0)&&e.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let w=MYe(d,u.operand.text)[u.operand.text]++;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:w,node:u}),w}case h.SyntaxKind.MinusMinusToken:{if(!h.isIdentifier(u.operand)&&!(!((i=h.isPrivateIdentifier)===null||i===void 0)&&i.call(h,u.operand)))return b(new mR({node:u.operand,environment:d,typescript:h}));let w=MYe(d,u.operand.text)[u.operand.text]--;return x.reportBindings!=null&&x.reportBindings({path:u.operand.text,value:w,node:u}),w}}}function Rmr({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=[];if(r.arguments!=null){for(let h=0;h<r.arguments.length;h++)if(u[h]=e.expression(r.arguments[h],i),a()!=null)return}let d=e.expression(r.expression,i);if(a()==null)return typeof d=="function"&&IB({...i,node:r,path:"[[NewTarget]]",value:d,newBinding:!0}),abt(r,i,new d(...u))}function Lmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Mmr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Fmr({node:r,evaluate:e,...i}){let a=e.expression(r.expression,i);i.getCurrentError()==null&&e.nodeWithArgument(r.caseBlock,a,i)}var _zt=class extends j7{constructor({message:e="It is not possible to evaluate an async iterator'",typescript:i,environment:a}){var u,d;super({message:e,environment:a,node:(d=(u=i.factory)===null||u===void 0?void 0:u.createEmptyStatement())!==null&&d!==void 0?d:i.createEmptyStatement()})}};function Omr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));if(e.awaitModifier!=null)return h(new _zt({typescript:d,environment:i}));for(let w of x){let L=i6(i,e),q={...r,environment:L};if(IB({...q,path:uF,value:!1,newBinding:!0}),IB({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],w,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,uF)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Wmr({node:r,environment:e}){let i=BI(r,e,z7);return i?.literal}function Gmr(r){IB({...r,path:uF,value:!0})}function zmr(r){IB({...r,path:G7,value:!0})}function jmr({environment:r,evaluate:e,typescript:i,...a}){let{node:u,getCurrentError:d}=a,h=i6(r,u),b={...a,environment:h};if(u.initializer!==void 0){if(i.isVariableDeclarationList(u.initializer)){for(let x of u.initializer.declarations)if(e.declaration(x,b),d()!=null)return}else if(e.expression(u.initializer,b),d()!=null)return}for(;;){let x=i6(h,u),w={...a,environment:x};if(IB({...w,path:uF,value:!1,newBinding:!0}),IB({...w,path:G7,value:!1,newBinding:!0}),!(u.condition==null?!0:e.expression(u.condition,b))||d()!=null||(e.statement(u.statement,w),d()!=null))return;if(ST(u,x,!0,uF))break;if(ST(u,x,!0,Vx))return;if(u.incrementor!=null){if(e.expression(u.incrementor,b),d()!=null)return}else if(ST(u,x,!0,G7))continue}}function Vmr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,getCurrentError:h}=r,b=a.expression(e.expression,r);if(h()==null)for(;b;){let x=i6(i,e),w={...r,environment:x};if(IB({...w,path:uF,value:!1,newBinding:!0}),IB({...w,path:G7,value:!1,newBinding:!0}),a.statement(e.statement,w),h()!=null)return;if(ST(e,x,!0,uF)){u.logBreak(e,d);break}else if(ST(e,x,!0,Vx)){u.logReturn(e,d);return}if(b=a.expression(e.expression,r),h()!=null)return;if(ST(e,x,!0,G7)){u.logContinue(e,d);continue}}}function Umr(r){let{node:e,environment:i,evaluate:a,logger:u,typescript:d,throwError:h,getCurrentError:b}=r,x=a.expression(e.expression,r);if(b()==null){if(d.isVariableDeclarationList(e.initializer)){if(e.initializer.declarations.length>1)return h(new mR({node:e.initializer.declarations[1],environment:i,typescript:d}))}else return h(new mR({node:e.initializer,environment:i,typescript:d}));for(let w in x){let L=i6(i,e),q={...r,environment:L};if(IB({...q,path:uF,value:!1,newBinding:!0}),IB({...q,path:G7,value:!1,newBinding:!0}),a.nodeWithArgument(e.initializer.declarations[0],w,q),b()!=null||(a.statement(e.statement,q),b()!=null))return;if(ST(e,L,!0,uF)){u.logBreak(e,d);break}else if(ST(e,L,!0,G7)){u.logContinue(e,d);continue}else if(ST(e,L,!0,Vx)){u.logReturn(e,d);return}}}}function Hmr(r){let{node:e,environment:i,evaluate:a,stack:u,typescript:d,getCurrentError:h}=r,b=e.name==null?void 0:e.name.text,x=NQ(e,d.SyntaxKind.AsyncKeyword)?async function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()}:function(...L){let q=i6(i,e),te={...r,environment:q};if(IB({...te,path:Vx,value:!1,newBinding:!0}),IB({...te,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...te,path:z7,value:this,newBinding:!0}),RQ({...te,node:e.parameters},L),!(e.body==null||h()!=null)&&(a.statement(e.body,te),h()==null&&ST(e,q,!0,Vx)))return u.pop()};return b!=null&&IB({...r,path:b,value:x.bind(x)}),x.toString=()=>`[Function${b==null?"":`: ${b}`}]`,Object.setPrototypeOf(x,BI(e,i,"Function").literal),x}var hzt=class extends j7{constructor({node:e,environment:i,message:a="Missing catch or finally after try"}){super({node:e,environment:i,message:a})}};function Jmr(r){let{node:e,evaluate:i,environment:a,throwError:u}=r,d,h=()=>{try{return i.statement(e.tryBlock,{...r,throwError:w=>(d=w,w),getCurrentError:()=>d})}catch(w){d=w}},b=w=>{i.nodeWithArgument(e.catchClause,w,r)},x=()=>{let w;i.statement(e.finallyBlock,{...r,throwError:L=>(w=L,r.throwError(L),L),getCurrentError:()=>w})};if(e.catchClause==null&&e.finallyBlock==null)return u(new hzt({node:e,environment:a}));e.catchClause!=null&&e.finallyBlock==null?(h(),d!=null&&b(d)):e.catchClause!=null&&e.finallyBlock!=null?(h(),d!=null&&b(d),x()):e.catchClause==null&&e.finallyBlock!=null&&(h(),d!=null&&u(d),x())}function Rkn({name:r,extendedType:e,ctor:i=()=>{}}){return e==null?new Function("ctor",`return class ${r??""} {constructor () {const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(i):new Function("extendedType","ctor",`return class ${r??""} extends extendedType {constructor () {super(...arguments); const ctorReturnValue = ctor.call(this, ...arguments); if (ctorReturnValue != null) return ctorReturnValue;}}`)(e,i)}function FYe(r,e){return"canHaveDecorators"in e?e.canHaveDecorators(r):!0}function OYe(r,e){var i;if("getDecorators"in e)return e.getDecorators(r);{let a="decorators"in r&&Array.isArray(r.decorators)?r.decorators:void 0,u=(i=r.modifiers)===null||i===void 0?void 0:i.filter(d=>"expression"in d);return[...a??[],...u??[]]}}function qmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,w=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(w!=null){if(a.declaration(w,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Rkn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&IB({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;d.logHeritage(me),u.push(me),d.logStack(u)}function Kmr(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r;function h(...b){let x=i6(i,e),w={...r,environment:x};if(IB({...w,path:Vx,value:!1,newBinding:!0}),IB({...w,path:"arguments",value:arguments,newBinding:!0}),this!=null&&IB({...w,path:z7,value:this,newBinding:!0}),RQ({...w,node:e.parameters},b,this),!(e.body==null||d()!=null)&&(a.statement(e.body,w),d()==null&&ST(e,x,!0,Vx)))return u.pop()}h.toString=()=>"[Function: constructor]",u.push(h)}function Xmr({node:r,environment:e}){let i=BI(r,e,T1e);return i?.literal}function Ymr({node:r,evaluate:e,...i}){return e.expression(r.expression,i)}function Qmr(r){var e;let{node:i,evaluate:a,stack:u,logger:d,typescript:h,getCurrentError:b}=r,x,w=i.members.find(h.isConstructorDeclaration),L=i.members.filter(Ee=>!h.isConstructorDeclaration(Ee)),q;if(w!=null){if(a.declaration(w,r),b()!=null)return;q=u.pop()}if(i.heritageClauses!=null){let Ee=i.heritageClauses.find(ke=>ke.token===h.SyntaxKind.ExtendsKeyword);if(Ee!=null){let[ke]=Ee.types;if(ke!=null&&(x=a.expression(ke.expression,r),b()!=null))return}}let te=i.name==null?void 0:i.name.text,me=Rkn({name:te,extendedType:x,ctor:q});if(FYe(i,h))for(let Ee of(e=OYe(i,h))!==null&&e!==void 0?e:[]){if(a.nodeWithArgument(Ee,[me],r),b()!=null)return;me=u.pop()}me.toString=()=>`[Class${te==null?"":`: ${te}`}]`,te!=null&&IB({...r,path:te,value:me,newBinding:!0});for(let Ee of L)if(a.nodeWithArgument(Ee,NQ(Ee,h.SyntaxKind.StaticKeyword)?me:me.prototype,r),b()!=null)return;return d.logHeritage(me),me}function $mr(r){return null}function Zmr({node:r,evaluate:e,...i}){e.expression(r.expression,i)}function e_r({evaluate:r,node:e,...i}){let a=r.expression(e.expression,i);if(i.getCurrentError()==null)return typeof a}function t_r({node:r,environment:e}){let i=BI(r,e,"BigInt").literal;return i(r.text.endsWith("n")?r.text.slice(0,-1):r.text)}function n_r(r){let{node:e,environment:i,evaluate:a,stack:u,getCurrentError:d}=r,h=BI(e,i,"Object").literal,b=h.create(h.prototype),x=e.name.text;IB({...r,path:x,value:b,newBinding:!0});for(let w of e.members)if(a.nodeWithArgument(w,b,r),d()!=null)return;b.toString=()=>`[Enum: ${x}]`,u.push(b)}function r_r(r){let{node:e,evaluate:i,environment:a,typeChecker:u,stack:d,getCurrentError:h}=r,b=BI(e,a,"Object").literal,x=b.create(b.prototype),w=u?.getSymbolAtLocation(e);if(w!=null){let L=w.exports;if(L!=null)for(let[q,te]of L.entries()){let me=te.valueDeclaration;if(me==null||(i.declaration(me,r),h()!=null))return;x[q]=d.pop()}}d.push(x)}function i_r(r){let{getCurrentError:e,stack:i}=r,a=ebt(r);e()==null&&i.push(a)}function o_r({node:r,evaluate:e,...i}){r.importClause!=null&&e.declaration(r.importClause,i)}function s_r({node:r,evaluate:e,...i}){let{getCurrentError:a,throwError:u}=i,d=e.expression(r.expression,i);if(a()==null)return u(d)}var Bzt=class extends Dpe{constructor({duration:e,environment:i,node:a,message:u=`Maximum operation duration exceeded: ${e}`}){super({violation:"maxOpDuration",message:u,node:a,environment:i}),this.duration=e}};async function a_r(r){let{node:e,environment:i,evaluate:a,policy:u,throwError:d,getCurrentError:h}=r,b=u.maxOpDuration===1/0?void 0:setTimeout(()=>{d(new Bzt({duration:u.maxOpDuration,node:e,environment:i}))},u.maxOpDuration),x=a.expression(e.expression,r);if(b!=null&&clearTimeout(b),h()==null)return x}function l_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i,u=e.expression(r.condition,i);if(a()==null)return u?e.expression(r.whenTrue,i):e.expression(r.whenFalse,i)}function cbt(r,e){let i=r;for(;i!=null&&!e.isSourceFile(i);){if(NQ(i,e.SyntaxKind.StaticKeyword))return!0;i=i.parent}return!1}function Lkn(r,e){var i,a;let{node:u,environment:d,evaluate:h,stack:b,typescript:x,getCurrentError:w}=r,L=h.nodeWithValue(u.name,r);if(w()!=null)return;let q=cbt(u,x);if(e==null){let me;if(x.isClassLike(u.parent)){if(h.declaration(u.parent,r),w()!=null)return;me=b.pop()}else if(me=h.expression(u.parent,r),w()!=null)return;b.push(q?me[L]:me.prototype[L]);return}let te=NQ(u,x.SyntaxKind.AsyncKeyword)?async function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(IB({...Ue,path:Vx,value:!1,newBinding:!0}),IB({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...Ue,path:z7,value:this,newBinding:!0}),IB({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||w()!=null)&&(h.statement(u.body,Ue),w()==null&&ST(u,ke,!0,Vx)))return b.pop()}:function(...Ee){let ke=i6(d,u),Ue={...r,environment:ke};if(IB({...Ue,path:Vx,value:!1,newBinding:!0}),IB({...Ue,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...Ue,path:z7,value:this,newBinding:!0}),IB({...Ue,path:T1e,value:q?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...r,node:u.parameters,environment:ke},Ee),!(u.body==null||w()!=null)&&(h.statement(u.body,Ue),w()==null&&ST(u,ke,!0,Vx)))return b.pop()};if(te.toString=()=>`[Method: ${L}]`,Object.setPrototypeOf(te,BI(u,d,"Function").literal),e[L]=te,FYe(u,x))for(let me of(i=OYe(u,x))!==null&&i!==void 0?i:[]){if(h.nodeWithArgument(me,[e,L],r),w()!=null)return;b.pop()}if(u.parameters!=null){let me=u.parameters.filter(Ee=>!(x.isIdentifier(Ee.name)&&Ee.name.text==="this"));for(let Ee=0;Ee<me.length;Ee++){let ke=me[Ee];if(FYe(ke,x))for(let Ue of(a=OYe(ke,x))!==null&&a!==void 0?a:[]){if(h.nodeWithArgument(Ue,[e,L,Ee],r),w()!=null)return;b.pop()}}}}function Mkn({node:r,evaluate:e,typescript:i,stack:a,...u},d){var h;let{getCurrentError:b}=u,x=e.nodeWithValue(r.name,u);if(b()==null){if(d==null){if(e.declaration(r.parent,u),b()!=null)return;let w=a.pop(),L=cbt(r,i);a.push(L?w[x]:w.prototype[x]);return}if(d[x]=r.initializer==null?void 0:e.expression(r.initializer,u),b()==null&&FYe(r,i))for(let w of(h=OYe(r,i))!==null&&h!==void 0?h:[]){if(e.nodeWithArgument(w,[d,x],u),b()!=null)return;a.pop()}}}function Fkn(r,e){let{node:i,environment:a,evaluate:u,stack:d,typescript:h,getCurrentError:b}=r;if(h.isTypeLiteralNode(i.parent)||h.isInterfaceDeclaration(i.parent))return;let x=u.nodeWithValue(i.name,r);if(b()!=null)return;let w=cbt(i,h);if(e==null){let te;if(h.isClassLike(i.parent)){if(u.declaration(i.parent,r),b()!=null)return;te=d.pop()}else if(te=u.expression(i.parent,r),b()!=null)return;d.push(w?te[x]:te.prototype[x]);return}function L(){let te=i6(a,i),me={...r,environment:te};if(IB({...me,path:Vx,value:!1,newBinding:!0}),IB({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...me,path:z7,value:this,newBinding:!0}),IB({...me,path:T1e,value:w?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),i.body!=null&&(u.statement(i.body,me),b()==null&&ST(i,te,!0,Vx)))return d.pop()}L.toString=()=>`[Get: ${x}]`;let q=Object.getOwnPropertyDescriptor(e,x);q==null&&(q={}),Object.defineProperty(e,x,{...q,configurable:!0,get:L})}function c_r({node:r,evaluate:e,...i}){let{getCurrentError:a}=i;if(!(r.name!=null&&(e.declaration(r.name,i),a()!=null))&&r.namedBindings!=null)if("elements"in r.namedBindings){for(let u of r.namedBindings.elements)if(e.declaration(u,i),a()!=null)return}else e.declaration(r.namedBindings.name,i)}function u_r({node:r,evaluate:e,...i}){var a;e.declaration((a=r.propertyName)!==null&&a!==void 0?a:r.name,i)}function f_r({node:r,evaluate:e,...i}){e.declaration(r.name,i)}var obt=class extends j7{constructor({node:e,environment:i,message:a="'SyntaxError'"}){super({message:a,environment:i,node:e})}};function p_r({node:r,typescript:e,throwError:i,environment:a}){var u,d;switch(r.keywordToken){case e.SyntaxKind.NewKeyword:switch(r.name.text){case"target":return(u=BI(r,a,"[[NewTarget]]"))===null||u===void 0?void 0:u.literal;default:return i(new obt({node:r.name,environment:a}))}case e.SyntaxKind.ImportKeyword:switch(r.name.text){case"meta":return(d=BI(r,a,"import.meta"))===null||d===void 0?void 0:d.literal;default:return i(new obt({node:r.name,environment:a}))}}}function Szt({node:r,...e}){var i,a,u,d,h,b;return e.typescript.isIdentifier(r)?_kn({node:r,...e}):!((a=(i=e.typescript).isPrivateIdentifier)===null||a===void 0)&&a.call(i,r)?_kn({node:r,...e}):e.typescript.isStringLiteralLike(r)?mmr({node:r,...e}):e.typescript.isNumericLiteral(r)?_mr({node:r,...e}):Akn(r,e.typescript)?hmr({node:r,...e}):e.typescript.isForOfStatement(r)?Omr({node:r,...e}):e.typescript.isForInStatement(r)?Umr({node:r,...e}):e.typescript.isForStatement(r)?jmr({node:r,...e}):e.typescript.isWhileStatement(r)?Vmr({node:r,...e}):e.typescript.isRegularExpressionLiteral(r)?Bmr({node:r,...e}):e.typescript.isObjectLiteralExpression(r)?gmr({node:r,...e}):e.typescript.isAwaitExpression(r)?a_r({node:r,...e}):!((d=(u=e.typescript).isTypeAssertionExpression)===null||d===void 0)&&d.call(u,r)||!("isTypeAssertionExpression"in e.typescript)&&e.typescript.isTypeAssertion(r)?Pmr({node:r,...e}):e.typescript.isTemplateExpression(r)?wmr({node:r,...e}):e.typescript.isMethodDeclaration(r)?Lkn({node:r,...e}):e.typescript.isPropertyDeclaration(r)?Mkn({node:r,...e}):e.typescript.isGetAccessorDeclaration(r)?Fkn({node:r,...e}):e.typescript.isArrayLiteralExpression(r)?Cmr({node:r,...e}):e.typescript.isSourceFile(r)?r_r({node:r,...e}):e.typescript.isModuleDeclaration(r)?i_r({node:r,...e}):e.typescript.isPrefixUnaryExpression(r)?xmr({node:r,...e}):e.typescript.isPostfixUnaryExpression(r)?Nmr({node:r,...e}):e.typescript.isVariableStatement(r)?Smr({node:r,...e}):e.typescript.isComputedPropertyName(r)?Tmr({node:r,...e}):e.typescript.isVariableDeclarationList(r)?Nkn({node:r,...e}):e.typescript.isImportDeclaration(r)?o_r({node:r,...e}):e.typescript.isImportClause(r)?c_r({node:r,...e}):e.typescript.isImportSpecifier(r)?u_r({node:r,...e}):e.typescript.isNamespaceImport(r)?f_r({node:r,...e}):e.typescript.isImportEqualsDeclaration(r)?({...e},void 0):e.typescript.isMetaProperty(r)?p_r({node:r,...e}):e.typescript.isThrowStatement(r)?s_r({node:r,...e}):e.typescript.isVariableDeclaration(r)?Ikn({node:r,...e}):e.typescript.isEnumDeclaration(r)?n_r({node:r,...e}):e.typescript.isConstructorDeclaration(r)?Kmr({node:r,...e}):e.typescript.isBinaryExpression(r)?cmr({node:r,...e}):e.typescript.isParenthesizedExpression(r)?pmr({node:r,...e}):e.typescript.isExpressionStatement(r)?Imr({node:r,...e}):e.typescript.isArrowFunction(r)?dmr({node:r,...e}):e.typescript.isFunctionDeclaration(r)?Amr({node:r,...e}):e.typescript.isFunctionExpression(r)?Hmr({node:r,...e}):e.typescript.isClassDeclaration(r)?qmr({node:r,...e}):e.typescript.isIfStatement(r)?kmr({node:r,...e}):e.typescript.isConditionalExpression(r)?l_r({node:r,...e}):e.typescript.isPropertyAccessExpression(r)?Emr({node:r,...e}):e.typescript.isElementAccessExpression(r)?Dmr({node:r,...e}):e.typescript.isCallExpression(r)?fmr({node:r,...e}):e.typescript.isSwitchStatement(r)?Fmr({node:r,...e}):e.typescript.isNewExpression(r)?Rmr({node:r,...e}):e.typescript.isNonNullExpression(r)?Lmr({node:r,...e}):e.typescript.isAsExpression(r)?Mmr({node:r,...e}):e.typescript.isBlock(r)?vmr({node:r,...e}):e.typescript.isClassExpression(r)?Qmr({node:r,...e}):e.typescript.isSpreadElement(r)?Ymr({node:r,...e}):e.typescript.isTryStatement(r)?Jmr({node:r,...e}):e.typescript.isReturnStatement(r)?bmr({node:r,...e}):wkn(r,e.typescript)?Wmr({node:r,...e}):e.typescript.isVoidExpression(r)?Zmr({node:r,...e}):e.typescript.isTypeOfExpression(r)?e_r({node:r,...e}):lbt(r,e.typescript)?Xmr({node:r,...e}):kkn(r,e.typescript)?$mr({node:r,...e}):!((b=(h=e.typescript).isBigIntLiteral)===null||b===void 0)&&b.call(h,r)?t_r({node:r,...e}):e.typescript.isBreakStatement(r)?Gmr({node:r,...e}):e.typescript.isContinueStatement(r)?zmr({node:r,...e}):e.typescript.isTypeAliasDeclaration(r)?({...e},void 0):e.typescript.isInterfaceDeclaration(r)?({...e},void 0):e.getCurrentError()!=null?void 0:e.throwError(new mR({node:r,environment:e.environment,typescript:e.typescript}))}function xzt(){return[]}function d_r(r){r.logger.logNode(r.node,r.typescript),r.statementTraversalStack=xzt(),Szt(r)}function m_r(r){let{getCurrentError:e}=r;r.logger.logNode(r.node,r.typescript);let i=Szt(r);if(e()==null)return r.reporting.reportIntermediateResults!=null&&r.reporting.reportIntermediateResults({node:r.node,value:i}),i}function __r(r){r.logger.logNode(r.node,r.typescript),Szt(r)}function h_r({node:r,evaluate:e,typescript:i,logger:a,...u},d){var h;i.isIdentifier(r)||!((h=i.isPrivateIdentifier)===null||h===void 0)&&h.call(i,r)?(IB({...u,node:r,path:r.text,value:d,newBinding:!0}),a.logBinding(r.text,d,"evaluateBindingName")):e.nodeWithArgument(r,d,u)}function B_r(r,e){let{node:i,environment:a,evaluate:u,typescript:d,getCurrentError:h}=r,b=u.nodeWithValue(i.name,r);if(h()!=null)return;let x=cbt(i,d);function w(...q){let te=i6(a,i),me={...r,environment:te};IB({...me,path:Vx,value:!1,newBinding:!0}),IB({...me,path:"arguments",value:arguments,newBinding:!0}),this!=null&&(IB({...me,path:z7,value:this,newBinding:!0}),IB({...me,path:T1e,value:x?Object.getPrototypeOf(this):Object.getPrototypeOf(this.constructor).prototype,newBinding:!0})),RQ({...me,node:i.parameters},q),!(i.body==null||h()!=null)&&(u.statement(i.body,me),h()==null)}w.toString=()=>`[Set: ${b}]`;let L=Object.getOwnPropertyDescriptor(e,b);L==null&&(L={}),Object.defineProperty(e,b,{...L,configurable:!0,set:w})}function g_r({node:r,evaluate:e,...i},a){let u=e.expression(r.initializer,i);if(i.getCurrentError()!=null)return;let d=e.nodeWithValue(r.name,i);i.getCurrentError()==null&&(a[d]=u)}function y_r({node:r,evaluate:e,logger:i,...a},u){let d=u!=null||r.initializer===void 0?u:e.expression(r.initializer,a);a.getCurrentError()==null&&(i.logBinding(r.name.getText(),d,"evaluateParameterDeclaration"),e.nodeWithArgument(r.name,d,a))}function C_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i,d=r.name.text,h=e.expression(r.name,i);u()==null&&(a[d]=h)}function v_r({node:r,evaluate:e,...i},a){let u=e.expression(r.expression,i);i.getCurrentError()==null&&Object.assign(a,u)}function b_r({node:r,evaluate:e,...i},a){let u=a[Symbol.iterator](),d=0;for(;d<r.elements.length;){let{done:h,value:b}=u.next();if(h===!0)break;if(e.nodeWithArgument(r.elements[d++],b,i),i.getCurrentError()!=null)return}}function S_r(r,e){var i,a,u,d;let{node:h,evaluate:b,logger:x,typescript:w,getCurrentError:L}=r,q=h.initializer==null?void 0:b.expression(h.initializer,r);if(L()==null){if((w.isIdentifier(h.name)||!((i=w.isPrivateIdentifier)===null||i===void 0)&&i.call(w,h.name))&&h.propertyName!=null){let te=h.name.text,me=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let Ee=w.isArrayBindingPattern(h.parent)?e:e[me];IB({...r,path:te,value:Ee??q,newBinding:!0})}else if((w.isIdentifier(h.name)||!((a=w.isPrivateIdentifier)===null||a===void 0)&&a.call(w,h.name))&&h.propertyName==null){let te=h.name.text,me=w.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;x.logBinding(h.name.text,Ee),IB({...r,path:h.name.text,value:Ee,newBinding:!0})}else if(!w.isIdentifier(h.name)&&!(!((u=w.isPrivateIdentifier)===null||u===void 0)&&u.call(w,h.name))&&h.propertyName!=null){let te=b.nodeWithValue(h.propertyName,r);if(L()!=null)return;let me=w.isArrayBindingPattern(h.parent)?e:e[te],Ee=me??q;if(b.nodeWithArgument(h.name,Ee,r),L()!=null)return}else if(!w.isIdentifier(h.name)&&!(!((d=w.isPrivateIdentifier)===null||d===void 0)&&d.call(w,h.name))&&h.propertyName==null){let te=e??q;if(b.nodeWithArgument(h.name,te,r),L()!=null)return}}}function x_r({node:r,evaluate:e,...i},a){for(let u of r.elements)if(e.nodeWithArgument(u,a,i),i.getCurrentError()!=null)return}function E_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i6(u,i),b={...r,environment:h};IB({...b,path:uF,value:!1,newBinding:!0});for(let x of i.clauses){if(a.nodeWithArgument(x,e,b),d()!=null)return;if(ST(i,h,!0,uF,G7,Vx))break}}function D_r({node:r,evaluate:e,...i},a){let{getCurrentError:u}=i;if(!(e.expression(r.expression,i)!==a||u()!=null))for(let h of r.statements){if(e.statement(h,i),u()!=null)return;if(ST(r,i.environment,!0,uF,G7,Vx))break}}function T_r(r){let{node:e,evaluate:i,environment:a,getCurrentError:u}=r;for(let d of e.statements){if(i.statement(d,r),u()!=null)return;if(ST(e,a,!0,uF,G7,Vx))break}}function A_r(r,e){let{node:i,evaluate:a,environment:u,getCurrentError:d}=r,h=i.variableDeclaration==null?u:i6(u,i),b={...r,environment:h};i.variableDeclaration!=null&&(a.nodeWithArgument(i.variableDeclaration,e,b),d()!=null)||a.statement(i.block,b)}function k_r(r,e,i,a){let u=arguments.length,d=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a,h;for(let b=r.length-1;b>=0;b--)(h=r[b])&&(d=(u<3?h(d):u>3?h(e,i,d):h(e,i))||d);return u>3&&d&&Object.defineProperty(e,i,d),d}function I_r(r,e){return function(i,a){e(i,a,r)}}function w_r(r,[e,i,a]){let{node:u,evaluate:d,environment:h,throwError:b,stack:x,getCurrentError:w}=r,L=d.expression(u.expression,r);if(w()==null){if(typeof L!="function")return b(new rbt({node:u,environment:h,value:L,message:`${bzt(L)} is not a valid decorator implementation'`}));x.push(k_r([a!=null?I_r(a,L):L],e,i))}}function P_r(r,e){let{node:i,typeChecker:a,evaluate:u,getCurrentError:d}=r,h=a?.getConstantValue(i);if(h==null)if(i.initializer!=null){if(h=u.expression(i.initializer,r),d()!=null)return}else{let x=i.parent.members,w=x.findIndex(te=>te===i),L=x.slice(0,w),q=0;for(let te of[...L].reverse())if(q++,te.initializer!=null){let me=u.expression(te.initializer,r);if(d()!=null)return;if(typeof me=="number"){h=me+q;break}}h==null&&(h=w)}let b=u.nodeWithValue(i.name,r);d()==null&&(typeof h=="string"?e[b]=h:e[e[b]=h??0]=b)}function N_r(r,e){r.logger.logNode(r.node,r.typescript,"nodeWithArgument");let{node:i,...a}=r;if(a.typescript.isGetAccessorDeclaration(i))Fkn({node:i,...a},e);else if(a.typescript.isSetAccessorDeclaration(i))B_r({node:i,...a},e);else if(a.typescript.isPropertyAssignment(i))g_r({node:i,...a},e);else if(a.typescript.isPropertyDeclaration(i))Mkn({node:i,...a},e);else if(a.typescript.isParameter(i))y_r({node:i,...a},e);else if(a.typescript.isEnumMember(i))P_r({node:i,...a},e);else if(a.typescript.isShorthandPropertyAssignment(i))C_r({node:i,...a},e);else if(a.typescript.isDecorator(i))w_r({node:i,...a},e);else if(a.typescript.isSpreadAssignment(i))v_r({node:i,...a},e);else if(a.typescript.isMethodDeclaration(i))Lkn({node:i,...a},e);else if(a.typescript.isArrayBindingPattern(i))b_r({node:i,...a},e);else if(a.typescript.isBindingElement(i))S_r({node:i,...a},e);else if(a.typescript.isObjectBindingPattern(i))x_r({node:i,...a},e);else if(a.typescript.isVariableDeclaration(i))Ikn({node:i,...a},e);else if(a.typescript.isCaseBlock(i))E_r({node:i,...a},e);else if(a.typescript.isCaseClause(i))D_r({node:i,...a},e);else if(a.typescript.isDefaultClause(i))T_r({node:i,...a});else if(a.typescript.isCatchClause(i))A_r({node:i,...a},e);else if(a.typescript.isBindingName(i))h_r({node:i,...a},e);else if(a.typescript.isOmittedExpression(i))({...a});else{if(r.getCurrentError()!=null)return;a.throwError(new mR({node:i,environment:a.environment,typescript:a.typescript}))}}function R_r({node:r,evaluate:e,typescript:i,...a}){var u;return i.isComputedPropertyName(r)?e.expression(r.expression,a):i.isIdentifier(r)||!((u=i.isPrivateIdentifier)===null||u===void 0)&&u.call(i,r)?r.text:e.expression(r,a)}function L_r(r){r.logger.logNode(r.node,r.typescript,"nodeWithValue");let{node:e,...i}=r;return r.typescript.isPropertyName(e)||r.typescript.isPrivateIdentifier(e)?R_r({node:e,...i}):r.throwError(new mR({node:e,environment:r.environment,typescript:r.typescript}))}function M_r(r){let e=0,{policy:i,reporting:a}=r,u=(b,x)=>{let{environment:w=r.environment,statementTraversalStack:L=r.statementTraversalStack,getCurrentError:q=r.getCurrentError,throwError:te=r.throwError}=x??{},me=q();if(me!=null)return me;if(e++,e>=i.maxOps)return te(new dzt({ops:e,environment:w,node:b}));L.push(b.kind),a.reportTraversal!=null&&a.reportTraversal({node:b})},d={statement:(b,x)=>{let w={...x,statementTraversalStack:xzt()},L=u(b,w);if(!Ire(L))return d_r(h(b,w))},declaration:(b,x)=>{let w=u(b,x);if(!Ire(w))return __r(h(b,x))},nodeWithArgument:(b,x,w)=>{let L=u(b,w);if(!Ire(L))return N_r(h(b,w),x)},expression:(b,x)=>{let w=u(b,x);return Ire(w)?w:m_r(h(b,x))},nodeWithValue:(b,x)=>{let w=u(b,x);return Ire(w)?w:L_r(h(b,x))}};function h(b,x){return{...r,...x,evaluate:d,node:b}}return d}function LYe(r,e){return r===e.SyntaxKind.NumericLiteral?"NumericLiteral":e.SyntaxKind[r]}var gzt=class{constructor(e={}){let{logLevel:i=0,color:{info:a="white",verbose:u="yellow",debug:d="magenta"}={}}=typeof e=="object"?e:{logLevel:e};this.options={logLevel:i,color:{info:a,verbose:u,debug:d}}}logInfo(e){this.options.logLevel<1||console.log(this.formatWithColor(this.options.color.info,e))}logVerbose(e){this.options.logLevel<2||console.log(this.formatWithColor(this.options.color.verbose,e))}logDebug(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,e))}logContinue(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"continue")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logBreak(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"break")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logReturn(e,i){this.options.logLevel<3||console.log(`${this.formatWithColor(this.options.color.debug,"return")} encountered within ${this.formatWithColor(this.options.color.debug,LYe(e.kind,i))}`)}logResult(e,i){this.options.logLevel<1||(i!=null?console.log(this.formatWithColor(this.options.color.info,`(intermediate value from context '${i}'):`),this.formatWithColor(this.options.color.info,"[RESULT]:"),this.compactValue(e)):console.log(this.formatWithColor(this.options.color.info,"[RESULT]:"),e))}logNode(e,i,a){if(this.options.logLevel<3)return;let u=`[${LYe(e.kind,i)}]`.padEnd(25);a!=null&&(u+=this.formatWithColor(this.options.color.debug,`(${a})`));let d=e.getText(),h=this.formatWithColor(this.options.color.debug,u),b=this.formatWithColor(this.options.color.debug,d);console.log(h),console.log(b)}logBinding(e,i,a){this.options.logLevel<2||console.log(`${a==null?"":this.formatWithColor(this.options.color.verbose,`(${a}): `)}${this.formatWithColor(this.options.color.verbose,`${e} ->`)}`,this.formatWithColor(this.options.color.verbose,this.compactValue(i)))}logHeritage(e){if(this.options.logLevel<3)return;let i=Object.getPrototypeOf(e);i.toString().includes("[Class")&&console.log(`${this.formatWithColor(this.options.color.debug,e.toString())} ${this.formatWithColor(this.options.color.debug,"extends")} ${this.formatWithColor(this.options.color.debug,i.toString())}`)}logStack(e){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`Stack value: ${bzt(this.compactValue(e.lastItem))}`))}logStatementTraversalStack(e,i){this.options.logLevel<3||console.log(this.formatWithColor(this.options.color.debug,`[${e.map(a=>LYe(a,i)).join(", ")}]`))}compactValue(e){return(0,Bkn.inspect)(e,{depth:0,colors:!0,compact:!0,maxArrayLength:5})}formatWithColor(e,i){return gkn.default[e](i)}};function F_r(r,e){var i;return e.isExpressionNode(r)||e.isIdentifier(r)||((i=e.isPrivateIdentifier)===null||i===void 0?void 0:i.call(e,r))}function O_r(r,e){return e.isStatementButNotDeclaration(r)}function W_r(){let r=[];return{[Symbol.iterator](){return r[Symbol.iterator]()},get length(){return r.length},get lastItem(){return r[r.length-1]},push(...e){return r.push(...e)},pop(){return r.pop()}}}function G_r(r,e,i){r.reportErrors!=null&&!r.reportedErrorSet.has(e)&&(r.reportedErrorSet.add(e),r.reportErrors({error:e,node:e instanceof j7?e.node:i}))}function z_r(){return new WeakSet}function Okn({typeChecker:r,node:e,environment:{preset:i="NODE",extra:a={}}={},moduleOverrides:u={},typescript:d=Odr,logLevel:h=0,policy:{deterministic:b=!1,network:x=!1,console:w=!1,maxOps:L=1/0,maxOpDuration:q=1/0,io:te={read:!0,write:!1},process:me={exit:!1,spawnChild:!1}}={},reporting:Ee={}}){let ke=lmr(e,d);if(ke.success)return ke;let Ue={deterministic:b,maxOps:L,maxOpDuration:q,network:x,console:w,io:{read:typeof te=="boolean"?te:te.read,write:typeof te=="boolean"?te:te.write},process:{exit:typeof me=="boolean"?me:me.exit,spawnChild:typeof me=="boolean"?me:me.spawnChild}},Fe={...Ee,reportedErrorSet:z_r()},We,Tt=new gzt(h),Vt=ur=>(G_r(Fe,ur,ur.node),We=ur,We),un=amr({inputEnvironment:{preset:i,extra:a},startingNode:e,policy:Ue}),Jn=W_r(),Dn=xzt(),mn={policy:Ue,typeChecker:r,typescript:d,logger:Tt,stack:Jn,moduleOverrides:u,reporting:Fe,throwError:Vt,environment:un,statementTraversalStack:Dn,getCurrentError:()=>We},qn=M_r(mn);try{let ur;return F_r(e,d)?ur=qn.expression(e,mn):O_r(e,d)?(qn.statement(e,mn),ur=Jn.pop()):Ckn(e,d)?(qn.declaration(e,mn),ur=Jn.pop()):Vt(new mR({node:e,environment:un,typescript:d})),We!=null?{success:!1,reason:We}:(Tt.logResult(ur),{success:!0,value:ur})}catch(ur){return Vt(ur),{success:!1,reason:ur}}}var Jkn=b_(NW(),1),V7=b_(NW(),1),GYe=b_(NW(),1);var I1e=b_(NW(),1);var FJ=b_(NW(),1);var Tzt=b_(NW(),1);var Azt=b_(NW(),1);var j_r=r=>{if(Array.isArray(r))return"array";if(typeof r=="string")return"string";if(typeof r=="number")return"number";if(typeof r=="boolean")return"boolean";if(r===null)return"null";if(r===void 0)return"undefined";throw new Error(`Unexpected literal type: ${r}`)},o6=r=>r!=null,Vkn=r=>r==null,Ukn=r=>r!=null&&typeof r=="object",V_r=r=>Array.isArray(r),U_r=r=>{let e=typeof r;return e==="string"||e==="number"||e==="boolean"||r===null||r===void 0},Ux=r=>FRe.Node.isAsExpression(r)||FRe.Node.isParenthesizedExpression(r)||FRe.Node.isNonNullExpression(r)||FRe.Node.isTypeAssertion(r)||FRe.Node.isSatisfiesExpression(r)?Ux(r.getExpression()):r,H_r=r=>r.getTagNameNode().getText(),J_r=/\s+/g,Hkn=r=>r.replaceAll(J_r," "),q_r=r=>{let e=r.getSourceFile(),[i,a]=[r.getStart(),r.getEnd()],u=e.getLineAndColumnAtPos(i),d=e.getLineAndColumnAtPos(a);return{startPosition:i,startLineNumber:u.line,startColumn:u.column,endPosition:a,endLineNumber:d.line,endColumn:d.column}},Ape=class{type;stack=[];node;constructor(r){this.type=r.type,this.node=r.node,this.stack=[...r.stack??[]]}getNode(){return this.node}getStack(){return this.stack}getRange=()=>q_r(this.node);toJSON(){let r=this.getRange();return{type:this.type,value:this.value,node:this.node.getKindName(),line:r.startLineNumber,column:r.startColumn}}toString(){return JSON.stringify(this.toJSON(),null,2)}},Wkn=class extends Ape{value;isEmpty;constructor(r){super(r),this.value=r.value,this.isEmpty=r.isEmpty}},K_r=class extends Ape{value;kind;constructor(r){super(r),this.value=r.value,this.kind=r.kind}},X_r=class extends Ape{value;spreadConditions;constructor(r){super(r),this.value=r.value}},Y_r=class extends Ape{value;constructor(r){super(r),this.value=r.value}},Q_r=class extends Ape{},$_r=class extends Ape{whenTrue;whenFalse;constructor(r){super(r),this.whenTrue=r.whenTrue,this.whenFalse=r.whenFalse}},Z_r=class extends Ape{},ORe=r=>r instanceof Ape;function Dzt(r,e,i){return Sg(r).when(Vkn,()=>{}).when(ORe,a=>a).when(Ukn,a=>hf.object(a,e,i)).when(V_r,a=>a.length===1?Dzt(a[0],e,i):a.map(u=>Dzt(u,e,i))).when(U_r,a=>hf.literal(a,e,i)).otherwise(()=>{})}var hf={object(r,e,i){return new Wkn({type:"object",value:r,node:e,stack:i})},literal(r,e,i){return new K_r({type:"literal",value:r,kind:j_r(r),node:e,stack:i})},map(r,e,i){return new X_r({type:"map",value:r,node:e,stack:i})},array(r,e,i){return new Y_r({type:"array",value:r,node:e,stack:i})},conditional(r,e,i,a){return new $_r({type:"conditional",whenTrue:r,whenFalse:e,node:i,stack:a})},from:Dzt,emptyObject:(r,e)=>new Wkn({type:"object",value:{},isEmpty:!0,node:r,stack:e}),emptyInitializer:(r,e)=>new Z_r({type:"empty-initializer",node:r,stack:e}),unresolvable:(r,e)=>new Q_r({type:"unresolvable",node:r,stack:e}),isObject(r){return r?.type==="object"},isLiteral(r){return r?.type==="literal"},isMap(r){return r?.type==="map"},isArray(r){return r?.type==="array"},isUnresolvable(r){return r?.type==="unresolvable"},isConditional(r){return r?.type==="conditional"},isEmptyInitializer(r){return r?.type==="empty-initializer"},isNumberLiteral(r){return hf.isLiteral(r)&&r.kind==="number"},hasValue:r=>hf.isObject(r)||hf.isLiteral(r)||hf.isMap(r)||hf.isArray(r)},qkn=Symbol("EvalError"),Ezt=new WeakMap,ehr=(r,e,i)=>{if(i.flags?.skipEvaluate||i.canEval&&!i.canEval?.(r,e))return;if(Ezt.has(r))return Ezt.get(r);let a=Okn({policy:{deterministic:!0,network:!1,console:!1,maxOps:Number.POSITIVE_INFINITY,maxOpDuration:1e3,io:{read:!0,write:!1},process:{exit:!1,spawnChild:!1}},...i.getEvaluateOptions?.(r,e),node:r.compilerNode,typescript:Jkn.ts}),u=a.success?a.value:qkn;return Ezt.set(r,u),u},ubt=(r,e,i)=>{let a=ehr(r,e,i);if(a!==qkn)return a};function thr(r){return V7.Node.isFunctionDeclaration(r)||V7.Node.isFunctionExpression(r)||V7.Node.isArrowFunction(r)||V7.Node.isSourceFile(r)}function nhr(r,e,i){let a=r.getParent();if(!a)return;let u=[],d;if((V7.Node.isVariableDeclaration(a)||V7.Node.isParameterDeclaration(a)||V7.Node.isFunctionDeclaration(a)||V7.Node.isBindingElement(a))&&a.getNameNode()==r)u.push(a),d=a;else if(V7.Node.isImportSpecifier(a)&&a.getNameNode()==r){if(i.flags?.skipTraverseFiles)return;let h=Zkn(a.getImportDeclaration());if(h){let b=[a,h],x=$kn(r.getText(),h,b,i);x&&(u.push(...b.concat(x)),d=x)}}return d&&e.push(...u),d}var rhr=r=>{let e=r.getParent();for(;e&&!thr(e);)e=e.getParent();return e};function mbt(r,e,i,a=new Map){let u=r,d,h=!1,b=0,x=[];do{if(u=rhr(u),b++,!u)return;let w=r.getText();if(u.forEachDescendant((L,q)=>{if(a.has(L)){q.skip(),x.push(...a.get(L));return}if(L!=r&&(a.set(L,x),V7.Node.isIdentifier(L)&&L.getText()==w)){let te=[L],me=nhr(L,te,i);if(me){if(V7.Node.isParameterDeclaration(me)){let Ee=me.getInitializer(),ke=me.getTypeNode();Ee?(x.push(...te.concat(Ee)),d=me):ke&&V7.Node.isTypeLiteral(ke)?(x.push(...te.concat(ke)),d=me):h=!0,q.stop();return}x.push(...te),d=me,q.stop()}}}),d||h)return d&&e.push(...x),d}while(u&&!V7.Node.isSourceFile(u)&&!d&&!h&&b<100)}var ihr=(r,e,i)=>Sg(r).when(I1e.Node.isPropertyAssignment,a=>{let u=Ux(a.getNameNode());return Sg(u).when(I1e.Node.isIdentifier,d=>hf.from(d.getText(),d,e)).when(I1e.Node.isComputedPropertyName,d=>{let h=d.getExpression();return e.push(h),MQ(h,e,i)}).when(Z3.or(I1e.Node.isStringLiteral,I1e.Node.isNumericLiteral),d=>hf.from(d.getLiteralText(),d,e)).otherwise(()=>{})}).when(I1e.Node.isShorthandPropertyAssignment,a=>{let u=a.getName();if(u!=null)return hf.from(u,a,e)}).otherwise(()=>{}),ohr=(r,e,i,a)=>{let u=r.getProperties();if(u.length===0)return hf.emptyObject(r,e);let d=[],h=[];u.forEach(w=>{let L=[...e];if(L.push(w),GYe.Node.isPropertyAssignment(w)||GYe.Node.isShorthandPropertyAssignment(w)){let q=ihr(w,L,i);if(!q)return;let te=q.value;if(Vkn(te)||a&&!a?.({propName:te,propNode:w}))return;if(GYe.Node.isShorthandPropertyAssignment(w)){let Ue=w.getNameNode();L.push(Ue);let Fe=rE(Ue,L,i);if(Fe){d.push([te.toString(),Fe]);return}}let me=w.getInitializer();if(!me)return;let Ee=Ux(me);L.push(Ee);let ke=rE(Ee,L,i);if(ke){d.push([te.toString(),ke]);return}}if(GYe.Node.isSpreadAssignment(w)){let q=Ux(w.getExpression());L.push(q);let te=rE(q,L,i,a);if(!te)return;if(hf.isObject(te)){Object.entries(te.value).forEach(([me,Ee])=>{let ke=hf.from(Ee,q,L);ke&&d.push([me,ke])});return}if(hf.isMap(te)){te.value.forEach((me,Ee)=>{d.push([Ee,me])});return}hf.isConditional(te)&&h.push(te)}});let b=new Map;d.forEach(([w,L])=>{b.has(w)&&b.delete(w),b.set(w,L)});let x=hf.map(b,r,e);return h.length>0&&(x.spreadConditions=h),x},kzt=new WeakMap,shr=r=>kzt.has(r),ahr=r=>kzt.get(r),lhr=r=>r===tm.ts.SyntaxKind.PlusToken,chr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken||r===tm.ts.SyntaxKind.AmpersandAmpersandToken||r===tm.ts.SyntaxKind.EqualsEqualsEqualsToken||r===tm.ts.SyntaxKind.EqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsEqualsToken||r===tm.ts.SyntaxKind.ExclamationEqualsToken||r===tm.ts.SyntaxKind.GreaterThanEqualsToken||r===tm.ts.SyntaxKind.GreaterThanToken||r===tm.ts.SyntaxKind.LessThanEqualsToken||r===tm.ts.SyntaxKind.LessThanToken||r===tm.ts.SyntaxKind.InstanceOfKeyword||r===tm.ts.SyntaxKind.InKeyword,uhr=r=>r===tm.ts.SyntaxKind.AsteriskToken||r===tm.ts.SyntaxKind.SlashToken||r===tm.ts.SyntaxKind.PercentToken||r===tm.ts.SyntaxKind.AsteriskAsteriskToken||r===tm.ts.SyntaxKind.MinusToken,fhr=r=>r===tm.ts.SyntaxKind.BarBarToken||r===tm.ts.SyntaxKind.QuestionQuestionToken;function rE(r,e,i,a){let u=d=>(kzt.set(r,d),d);return Sg(r).when(shr,ahr).when(Z3.or(tm.Node.isStringLiteral,tm.Node.isNoSubstitutionTemplateLiteral),d=>{let h=Hkn(d.getLiteralValue());return u(hf.literal(h,d,e))}).when(tm.Node.isObjectLiteralExpression,d=>u(ohr(d,e,i,a))).when(Z3.or(tm.Node.isTrueLiteral,tm.Node.isFalseLiteral),d=>{let h=d.getLiteralValue();return u(hf.literal(h,d,e))}).when(tm.Node.isNumericLiteral,d=>{let h=d.getLiteralValue();return u(hf.literal(h,d,e))}).when(tm.Node.isNullLiteral,d=>u(hf.literal(null,d,e))).when(tm.Node.isPrefixUnaryExpression,d=>{let h=d.getOperand(),b=d.getOperatorToken(),x=rE(h,e,i);if(hf.isNumberLiteral(x))return u(b===tm.ts.SyntaxKind.MinusToken?hf.literal(-Number(x.value),d,e):x)}).when(tm.Node.isArrayLiteralExpression,d=>{let h=d.getElements().map(b=>rE(b,e,i)??u(hf.unresolvable(b,e)));return u(hf.array(h,d,e))}).when(tm.Node.isIdentifier,d=>Sg(d.getText()).with("undefined",()=>u(hf.literal(void 0,d,e))).otherwise(()=>u(Chr(d,e,i)))).when(tm.Node.isTemplateHead,d=>u(hf.literal(d.getLiteralText(),d,e))).when(tm.Node.isTemplateExpression,d=>{let h=Xkn(d,e,i);return u(hf.literal(h,d,e))}).when(tm.Node.isTaggedTemplateExpression,d=>u(rE(d.getTemplate(),e,i))).when(tm.Node.isElementAccessExpression,d=>u(pbt(d,e,i))).when(tm.Node.isPropertyAccessExpression,d=>u(dbt(d,[],e,i))).when(tm.Node.isConditionalExpression,d=>{if(i.flags?.skipConditions)return u(hf.unresolvable(d,e));let h=Ux(d.getCondition()),b=(tm.Node.isIdentifier(h)?rE(h,[],i):ubt(h,e,i))??hf.unresolvable(h,e),x=ORe(b)?b:hf.from(b,d,e);if(hf.isEmptyInitializer(x))return;let w=x.getStack().some(me=>tm.Node.isBindingElement(me));if(hf.isUnresolvable(x)||hf.isConditional(x)||w){let me=Ux(d.getWhenTrue()),Ee=Ux(d.getWhenFalse());return u(Gkn({whenTrueExpr:me,whenFalseExpr:Ee,node:d,stack:e},i))}if(x.value){let me=Ux(d.getWhenTrue()),Ee=[...e],ke=rE(me,Ee,i);return u(ke??hf.unresolvable(me,e))}let L=Ux(d.getWhenFalse()),q=[...e],te=rE(L,q,i);return u(te??hf.unresolvable(d,e))}).when(tm.Node.isCallExpression,d=>{let h=ubt(d,e,i);if(h)return u(hf.from(h,d,e))}).when(tm.Node.isBinaryExpression,d=>{let h=d.getOperatorToken().getKind();return Sg(h).when(lhr,()=>{let b=eIn(d,e,i)??ubt(d,e,i);if(b)return u(hf.from(b,d,e))}).when(chr,b=>{let x=Ux(d.getLeft()),w=Ux(d.getRight()),L={whenTrueExpr:x,whenFalseExpr:w,node:d,stack:e,canReturnWhenTrue:fhr(b)};return u(Gkn(L,i))}).when(uhr,()=>u(hf.literal(ubt(d,e,i),d,e))).otherwise(()=>{})}).otherwise(()=>{})}var Kkn=r=>{if(r&&ORe(r)&&hf.isLiteral(r)&&typeof r.value=="string")return r},phr=r=>{if(r&&ORe(r)&&hf.isLiteral(r)&&typeof r.value=="number")return r},dhr=(r,e,i)=>Kkn(rE(r,e,i)),MQ=(r,e,i)=>{let a=rE(r,e,i),u=Kkn(a);if(u)return u;let d=phr(a);if(d)return d},Gkn=({whenTrueExpr:r,whenFalseExpr:e,node:i,stack:a,canReturnWhenTrue:u},d)=>{let h=rE(r,a,d),b=rE(e,a,d);if(u&&h&&!hf.isUnresolvable(h))return h;if(tm.Node.isBinaryExpression(i)&&i.getOperatorToken().getKind()===tm.ts.SyntaxKind.AmpersandAmpersandToken&&h&&b&&hf.isLiteral(h)&&h.value===!0)return b;if(!h&&!b)return;if(h&&!b)return h;if(!h&&b)return b;let x=h,w=b;return hf.isLiteral(x)&&hf.isLiteral(w)&&x.value===w.value?x:hf.conditional(x,w,i,a)},mhr=(r,e,i,a)=>{let u=[...i];if(tm.Node.isPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r;if(tm.Node.isStringLiteral(d)&&d.getLiteralText()===e)return u.push(d),d.getLiteralText();if(tm.Node.isComputedPropertyName(d)){let h=Ux(d.getExpression()),b=MQ(h,u,a);if(!b)return;if(String(b.value)===e)return u.push(d,h),r}}if(tm.Node.isShorthandPropertyAssignment(r)){let d=r.getNameNode();if(tm.Node.isIdentifier(d)&&d.getText()===e)return u.push(d),r}},Izt=(r,e,i,a)=>{let u=[...i],d=e.pop(),h=r.getProperty(d)??r.getProperties().find(b=>mhr(b,d,u,a));if(h){if(u.push(h),tm.Node.isPropertyAssignment(h)){let b=h.getInitializer();if(!b)return;if(tm.Node.isObjectLiteralExpression(b))return e.length>0?Izt(b,e,u,a):rE(b,u,a);let x=rE(b,u,a);if(x)return x}if(tm.Node.isShorthandPropertyAssignment(h)){let b=h.getNameNode();if(e.length>0)return LQ(b,e,u,a);let x=rE(b,u,a);if(x)return x}}},Xkn=(r,e,i)=>{let a=r.getHead(),u=r.getTemplateSpans(),d=dhr(a,e,i);if(!d)return;let h=u.map(b=>{let x=b.getExpression(),w=MQ(x,e,i);if(!w)return;let L=b.getLiteral();return w.value+L.getLiteralText()});if(h.every(o6))return d.value+h.join("")},Ykn=(r,e,i,a)=>{let u=r.getParent();if(!u)return;let d=u.getParent();if(d){if(tm.Node.isArrayBindingPattern(u)){let h=u.getChildIndex();if(Number.isNaN(h))return;if(tm.Node.isVariableDeclaration(d)){let b=d.getInitializer();if(!b)return;let x=Ux(b);if(!tm.Node.isArrayLiteralExpression(x))return;let w=x.getElements()[h+1];if(!w)return;let L=[...e,x,w],q=rE(w,L,a);if(!q)return;if(hf.isObject(q)){let me=q.value[i];return hf.from(me,w,L)}if(!hf.isMap(q))return q;let te=q.value.get(i);return te||void 0}}tm.Node.isObjectBindingPattern(u)}};function _hr(r,e,i,a){let u=e.at(-1);if(tm.Node.isVariableDeclaration(r)){let d=r.getInitializer();if(!d){let w=r.getTypeNode();if(!w)return;if(tm.Node.isTypeLiteral(w)){if(e.length>0){let q=[...i];q.push(w);let te=e.pop(),me=w.getProperty(te),Ee=me?.getTypeNode();for(;me&&e.length>0&&Ee&&tm.Node.isTypeLiteral(Ee);)q.push(me,Ee),te=e.pop(),me=Ee.getProperty(te),Ee=me?.getTypeNode();if(!Ee)return;let ke=wzt(Ee,q,a);return hf.from(ke,Ee,q)}let L=Qkn(w,u,i,a);return i.push(w),hf.from(L,w,i)}return}let h=Ux(d);if(tm.Node.isObjectLiteralExpression(h)){let w=Izt(h,e,i,a);return w?(i.push(h),w):void 0}if(tm.Node.isArrayLiteralExpression(h)){let w=Number(u);if(Number.isNaN(w))return;let L=h.getElements()[w];if(!L)return;i.push(h);let q=rE(L,i,a);if(q&&ORe(q)&&hf.isLiteral(q))return q}let b=[...i,h],x=rE(h,b,a);if(x)return x}if(tm.Node.isBindingElement(r)){let d=Ykn(r,i,u,a);if(d)return d}}var LQ=(r,e,i,a)=>{let u=mbt(r,i,a);if(!u)return hf.unresolvable(r,i);let d=_hr(u,e,i,a);return d||hf.unresolvable(r,i)},k1e=new WeakMap,Qkn=(r,e,i,a)=>{if(k1e.has(r)){let h=k1e.get(r);if(h===null)return;if(h?.has(e))return h.get(e)}let d=r.getMembers().find(h=>tm.Node.isPropertySignature(h)&&h.getName()===e);if(tm.Node.isPropertySignature(d)&&d.isReadonly()){let h=d.getTypeNode();if(!h){k1e.set(r,null);return}let b=wzt(h,i,a);if(o6(b))return k1e.has(r)||k1e.set(r,new Map),k1e.get(r).set(e,b),b}k1e.set(r,null)};function hhr(r){return tm.Node.isStringLiteral(r)?r.getLiteralText():r.getText()}var WYe=new WeakMap,wzt=(r,e,i)=>{if(WYe.has(r))return WYe.get(r);if(tm.Node.isLiteralTypeNode(r)){let a=r.getLiteral();if(tm.Node.isStringLiteral(a)){let u=a.getLiteralText();return WYe.set(r,u),u}}if(tm.Node.isTypeLiteral(r)){let a=r.getMembers();if(!a.some(u=>!tm.Node.isPropertySignature(u)||!u.isReadonly())){let d=a.map(b=>{let x=b.getNameNode(),w=x.getText(),L=hhr(x);if(!L)return;let q=Qkn(r,w,e,i);return[L,q]}).filter(o6),h=Object.fromEntries(d);return WYe.set(r,h),h}}WYe.set(r,void 0)},Bhr=(r,e,i)=>{if(tm.Node.isShorthandPropertyAssignment(r)){let a=r.getNameNode();return LQ(a,[a.getText()],e,i)}if(tm.Node.isVariableDeclaration(r)){let a=r.getInitializer();if(!a){let b=r.getTypeNode();if(!b)return;if(tm.Node.isTypeLiteral(b)){e.push(b);let x=wzt(b,e,i);if(o6(x))return hf.from(x,r,e)}return hf.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}if(tm.Node.isBindingElement(r)){let a=r.getInitializer();if(!a){let b=r.getPropertyNameNode()??r.getNameNode(),x=b.getText(),w=[...e,b],L=Ykn(r,w,x,i);return L||hf.unresolvable(r,e)}let u=Ux(a),d=[...e,u],h=rE(u,d,i);if(h)return h}},$kn=(r,e,i,a)=>{let u=e.getVariableDeclaration(r);if(u)return u;let d=yhr(r,e,i,a);if(d)return d},ghr=(r,e)=>{let i=e.getNamedExports();if(i.length===0)return!0;for(let a of i)if(a.getNameNode().getText()===r)return!0},Zkn=r=>{let e=r.getProject(),i=r.getModuleSpecifierValue();if(!i)return;let a=r.getSourceFile().getFilePath(),u=tm.ts.resolveModuleName(i,a,e.getCompilerOptions(),e.getModuleResolutionHost());return u.resolvedModule?e.addSourceFileAtPath(u.resolvedModule.resolvedFileName):void 0};function yhr(r,e,i,a){for(let u of e.getExportDeclarations()){let d=[u];if(!ghr(r,u))continue;let h=Zkn(u);if(!h)continue;d.push(h);let b=$kn(r,h,i,a);if(b)return i.push(...d.concat(b)),b}}var Chr=(r,e,i)=>{let a=mbt(r,e,i);if(!a)return hf.unresolvable(r,e);let u=Ux(a),d=[...e],h=Bhr(u,d,i);return h||hf.unresolvable(r,d)},eIn=(r,e,i)=>{let a=Ux(r.getLeft()),u=Ux(r.getRight()),d=MQ(a,e,i),h=MQ(u,e,i);if(!(!d||!h)&&o6(d.value)&&o6(h.value))return hf.literal(String(d.value)+String(h.value),r,e)},pbt=(r,e,i)=>{let a=Ux(r.getExpression()),u=r.getArgumentExpression();if(!u)return;let d=Ux(u),h=[...e,a,d],b=MQ(d,h,i);if(tm.Node.isIdentifier(a)&&b)return o6(b.value)?LQ(a,[b.value.toString()],h,i):void 0;if(tm.Node.isBinaryExpression(d)){if(d.getOperatorToken().getKind()!==tm.ts.SyntaxKind.PlusToken)return;let x=eIn(d,h,i)??MQ(d,h,i);if(x&&tm.Node.isIdentifier(a))return o6(x.value)?LQ(a,[x.value.toString()],h,i):void 0}if(tm.Node.isTemplateExpression(d)){let x=Xkn(d,h,i);if(x&&tm.Node.isIdentifier(a))return LQ(a,[x],h,i)}if(tm.Node.isObjectLiteralExpression(a)&&b)return o6(b.value)?Izt(a,[b.value.toString()],h,i):void 0;if(tm.Node.isPropertyAccessExpression(d))return dbt(d,[],h,i);if(tm.Node.isPropertyAccessExpression(a)&&b&&o6(b.value)){let x=dbt(a,[],h,i);if(!x)return hf.unresolvable(a,h);let w=b.value.toString();if(hf.isObject(x)){let L=x.value[w];return hf.from(L,d,h)}if(hf.isMap(x)){let L=x.value.get(w);return hf.from(L,d,h)}if(hf.isArray(x)){let L=x.value[Number(w)];return hf.from(L,d,h)}return hf.unresolvable(a,h)}if(tm.Node.isIdentifier(a)&&tm.Node.isElementAccessExpression(d)){let x=pbt(d,h,i);if(typeof x=="string"&&o6(x))return LQ(a,[x],h,i)}if(tm.Node.isElementAccessExpression(a)&&b&&o6(b.value)){let x=pbt(a,h,i);if(Ukn(x)){let w=b.value.toString();if(hf.isMap(x))return x.value.get(w);if(hf.isObject(x)){let L=x.value[w];return L?hf.from(L,r,h):void 0}}}if(tm.Node.isArrayLiteralExpression(a)&&b)return vhr(a,Number(b.value),h,i);if(tm.Node.isConditionalExpression(d)){if(i.flags?.skipConditions)return hf.unresolvable(d,h);let x=MQ(d,h,i);if(o6(x)&&o6(x.value)&&tm.Node.isIdentifier(a))return LQ(a,[x.value.toString()],h,i);let w=Ux(d.getWhenTrue()),L=Ux(d.getWhenFalse()),q=MQ(w,h,i),te=MQ(L,h,i);if(tm.Node.isIdentifier(a)){let me=q&&o6(q.value)?LQ(a,[q.value.toString()],h,i):void 0,Ee=te&&o6(te.value)?LQ(a,[te.value.toString()],h,i):void 0;return!me&&!Ee?void 0:me&&!Ee?me:!me&&Ee?Ee:hf.conditional(me,Ee,d,h)}}},vhr=(r,e,i,a)=>{let u=r.getElements()[e];if(!u)return;let d=rE(u,i,a);if(o6(d))return d},dbt=(r,e,i,a)=>{let u=r.getName(),d=Ux(r.getExpression()),h=e.concat(u);if(i.push(d),tm.Node.isIdentifier(d))return LQ(d,h,i,a);if(tm.Node.isPropertyAccessExpression(d))return dbt(d,h,i,a);if(tm.Node.isElementAccessExpression(d)){let b=pbt(d,i,a);if(!b)return;if(hf.isObject(b)){let x=b.value[u];return hf.from(x,r,i)}if(hf.isMap(b)){let x=b.value.get(u);return hf.from(x,r,i)}}},zkn=()=>!0,_bt=(r,e,i=zkn,a=zkn)=>{let u=r.getArguments(),d=r.getExpression().getText();return u.length===0?hf.array([],r,[]):hf.array(u.map((h,b)=>{let x=Ux(h),w=[r,x];return Sg(x).when(L=>a({fnNode:r,fnName:d,argNode:L,index:b}),L=>rE(L,w,e,i)??hf.unresolvable(L,w)).otherwise(()=>hf.unresolvable(x,w))}),r,[])},hbt=(r,e)=>{let i=r.getInitializer(),a=[r,i];return Sg(i).with(xD.nullish,()=>{let u=r.getNameNode();return hf.emptyInitializer(u,a)}).when(Tzt.Node.isStringLiteral,u=>{let d=u.getLiteralText();return hf.literal(Hkn(d),u,a)}).when(Tzt.Node.isJsxExpression,u=>{let d=u.getExpression();if(!d)return;let h=Ux(d);if(!h)return;a.push(h);let b=rE(h,a,e);if(b)return b}).otherwise(()=>{})},tIn=(r,e,i)=>{let a=Ux(r.getExpression());return rE(a,[],e,i)},jkn=(r,e)=>r?ORe(r)?hf.isUnresolvable(r)||hf.isConditional(r)?new Map:hf.isMap(r)?r.value:new Map(Object.entries(r.value).map(([i,a])=>{let u=hf.from(a,r.getNode()??e,r.getStack()??[]);return[i,u||null]}).filter(([,i])=>i!==null)):new Map(Object.entries(r)):new Map,bhr=Z3.or(FJ.Node.isImportDeclaration,FJ.Node.isExportDeclaration),nIn=({ast:r,...e})=>{let{components:i,functions:a,taggedTemplates:u}=e,d=new Map,h=new Map,b,x,w,L,q;return r.forEachDescendant((te,me)=>{if(bhr(te)){me.skip();return}if(i){if(FJ.Node.isJsxOpeningElement(te)||FJ.Node.isJsxSelfClosingElement(te)){if(b=te,x=H_r(b),w=x.includes("."),!i.matchTag({tagNode:b,tagName:x,isFactory:w})){b=void 0;return}d.has(x)||d.set(x,{kind:"component",nodesByProp:new Map,queryList:[]}),L=d.get(x).nodesByProp,h.has(b)||h.set(b,{name:x,props:new Map,conditionals:[]}),q=h.get(b)}if(FJ.Node.isJsxSpreadAttribute(te)){if(!b||!q)return;let Ee=({propName:We,propNode:Tt})=>i.matchProp({tagNode:b,tagName:x,propName:We,propNode:Tt}),ke=tIn(te,e,dQ(Ee));if(!ke)return;let Ue=We=>{let Tt=jkn(We,te),Vt=hf.isMap(We),un=hf.map(Tt,te,[b]);Vt&&We.spreadConditions?.length&&(un.spreadConditions=We.spreadConditions),Tt.forEach((Jn,Dn)=>{Ee({propName:Dn,propNode:te})&&(q.props.set(Dn,Jn),L.set(Dn,(L.get(Dn)??[]).concat(Jn)))})};(We=>Sg(We).when(hf.isConditional,Tt=>{q.conditionals.push(Tt)}).when(Z3.or(hf.isObject,hf.isMap),Tt=>Ue(Tt)).otherwise(BBt))(ke);return}if(FJ.Node.isJsxAttribute(te)){if(!b||!q)return;let Ee=te.getNameNode().getText();if(!i.matchProp({tagNode:b,tagName:x,propName:Ee,propNode:te}))return;GN(hbt(te,e),NXe.fromNullable,NXe.tap(ke=>{q.props.set(Ee,ke),L.set(Ee,(L.get(Ee)??[]).concat(ke))}))}}if(a&&FJ.Node.isCallExpression(te)){let Ee=te.getExpression(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!a.matchFn({fnNode:te,fnName:ke}))return;let Ue=({propName:Jn,propNode:Dn})=>a.matchProp({fnNode:te,fnName:ke,propName:Jn,propNode:Dn});d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Fe=d.get(ke),We=Fe.nodesByProp,Tt=_bt(te,e,Ue,a.matchArg),Vt=GN(Tt.value,Aj.map(Jn=>Sg(Jn).when(Z3.or(hf.isObject,hf.isMap),Dn=>{let mn=jkn(Dn,te),qn=hf.isMap(Dn);mn.forEach((nn,ha)=>{(qn||Ue({propName:ha,propNode:te}))&&We.set(ha,(We.get(ha)??[]).concat(nn))});let ur=hf.map(mn,te,Dn.getStack());return hf.isMap(Dn)&&Dn.spreadConditions?.length&&(ur.spreadConditions=Dn.spreadConditions),ur}).otherwise(Dn=>Dn))),un={kind:"call-expression",name:ke,box:hf.array(Vt,te,[])};Fe.queryList.push(un)}if(u&&FJ.Node.isTaggedTemplateExpression(te)){let Ee=te.getTag(),ke=FJ.Node.isCallExpression(Ee)?Ee.getExpression().getText():Ee.getText();if(!u.matchTaggedTemplate({taggedTemplateNode:te,fnName:ke}))return;d.has(ke)||d.set(ke,{kind:"function",nodesByProp:new Map,queryList:[]});let Ue=d.get(ke),Fe={kind:"tagged-template",name:ke,box:rE(te,[],e)};Ue.queryList.push(Fe)}}),h.forEach((te,me)=>{let Ee=h.get(me);if(!Ee)return;let ke=dQ({name:te.name,box:hf.map(Ee.props,me,[])});Ee.conditionals?.length&&(ke.box.spreadConditions=Ee.conditionals);let Ue=te.name;d.get(Ue).queryList.push(ke)}),d},Shr=Z3.or(hf.isObject,hf.isMap),rIn=(r,e)=>{let i=r.getTagNameNode().getText(),a=r.getAttributes(),u=new Map;return a.forEach(d=>{if(Azt.Node.isJsxAttribute(d)){let h=d.getNameNode(),b=hbt(d,e);if(!b)return;u.set(h.getText(),b);return}if(Azt.Node.isJsxSpreadAttribute(d)){let h=tIn(d,e,()=>!0);if(!Shr(h))return;hf.isMap(h)&&h.value.forEach((b,x)=>{u.set(x,b)}),hf.isObject(h)&&Object.entries(h.value).forEach(([b,x])=>{u.set(b,hf.literal(x,r,[]))})}}),{name:i,props:u}},fbt=(r,e)=>{if(!r.length)return e;let i={};return r.reduce((a,u,d)=>{let h=d===r.length-1;return a[u]=h?e:{},h?i:a[u]},i),i},Tpe=(r,e)=>Sg(r).with(xD.nullish,()=>{}).when(hf.isConditional,i=>{let a=e.path,u=Tpe(i.whenTrue,Object.assign({},e,{path:a,parent:i})),d=Tpe(i.whenFalse,Object.assign({},e,{path:a,parent:i}));u&&e.conditions.push(fbt(a,u)),d&&e.conditions.push(fbt(a,d))}).when(Z3.or(hf.isLiteral,hf.isObject),i=>i.value).when(hf.isEmptyInitializer,()=>!0).when(hf.isMap,i=>{if(i.spreadConditions){let a=e.path;i.spreadConditions.forEach(u=>{let d=Tpe(u.whenTrue,Object.assign({},e,{path:a,parent:i})),h=Tpe(u.whenFalse,Object.assign({},e,{path:a,parent:i}));d&&e.spreadConditions.push(fbt(a,d)),h&&e.spreadConditions.push(fbt(a,h))})}return GN(Aj.from(i.value.entries()),Aj.map(([a,u])=>[a,Tpe(u,Object.assign({},e,{path:e.path.concat(a),parent:i}))]),Aj.filter(([,a])=>o6(a)),Object.fromEntries)}).when(hf.isArray,i=>{let a=0;return GN(i.value,Aj.map(u=>Tpe(u,Object.assign({},e,{path:e.path.concat(String(a++)),parent:i}))),u=>u.flat())}).otherwise(()=>{}),xhr=new WeakMap,Ehr=r=>({value:r,has:e=>r.has(e),get:e=>r.get(e),set:(e,i)=>r.set(e,i)}),OJ=(r,e)=>{let i={cache:e?.cache??xhr,...e,path:[],parent:void 0,conditions:[],spreadConditions:[]},a=Ehr(i.cache);return{raw:Sg(r).with(xD.nullish,()=>{}).when(a.has,a.get).when(Array.isArray,d=>{let h=GN(d,Aj.map(b=>Tpe(b,i)),Aj.filter(o6),Aj.head);return a.set(d,h),h}).otherwise(d=>{let h=Tpe(d,i);return a.set(d,h),h})??{},conditions:i.conditions,spreadConditions:i.spreadConditions}};ae();ae();ae();ae();function zYe(r){return Object.prototype.toString.call(r).slice(8,-1)}function Dhr(r){return zYe(r)==="Undefined"}function Thr(r){return zYe(r)==="Null"}function jYe(r){if(zYe(r)!=="Object")return!1;let e=Object.getPrototypeOf(r);return e.constructor===Object&&e===Object.prototype}function Pzt(r){return zYe(r)==="Array"}function Nzt(r){return zYe(r)==="Symbol"}var Xvi=Ahr(Thr,Dhr);function Ahr(r,e,i,a,u){return d=>r(d)||e(d)||!!i&&i(d)||!!a&&a(d)||!!u&&u(d)}function khr(r,e){return Pzt(r)&&Pzt(e)?r.concat(e):e}function iIn(r,e,i,a){let u={}.propertyIsEnumerable.call(a,e)?"enumerable":"nonenumerable";u==="enumerable"&&(r[e]=i),u==="nonenumerable"&&Object.defineProperty(r,e,{value:i,enumerable:!1,writable:!0,configurable:!0})}function oIn(r,e,i){if(!jYe(e))return e;let a={};if(jYe(r)){let b=Object.getOwnPropertyNames(r),x=Object.getOwnPropertySymbols(r);a=[...b,...x].reduce((w,L)=>{let q=r[L];return(!Nzt(L)&&!Object.getOwnPropertyNames(e).includes(L)||Nzt(L)&&!Object.getOwnPropertySymbols(e).includes(L))&&iIn(w,L,q,r),w},{})}let u=Object.getOwnPropertyNames(e),d=Object.getOwnPropertySymbols(e);return[...u,...d].reduce((b,x)=>{let w=e[x],L=jYe(r)?r[x]:void 0;L!==void 0&&jYe(w)&&(w=oIn(L,w,i));let q=i?i(L,w,x):w;return iIn(b,x,q,e),b},a)}function sIn(r,...e){return e.reduce((i,a)=>oIn(i,a,khr),r)}var aIn=r=>Object.prototype.toString.call(r)==="[object Object]";function Rzt(r,...e){let i=e.pop();for(let a of e)for(let u in a){let d=i(r[u],a[u]);d===void 0?aIn(r[u])&&aIn(a[u])?r[u]=Rzt({},r[u],a[u],i):r[u]=a[u]:r[u]=d}return r}function lIn(r,...e){for(let i of e)for(let a in i)r?.hasOwnProperty?.(a)||(r[a]=i[a]);return r}function Ihr(r){return r.reduce((e,{extend:i})=>i?Rzt(e,i,(a,u)=>u===void 0?a??[]:a===void 0?[u]:Array.isArray(a)?[u,...a]:[u,a]):e,{})}function whr(r){return{...r.reduce((e,i)=>lIn(e,i),{}),extend:Ihr(r)}}function VYe(r){let{extend:e=[],...i}=whr(r);return Rzt(i,e,(a,u)=>sIn({},a,...u))}var Phr=r=>typeof r=="object"&&Object.keys(r).length===0,Nhr=r=>Object.keys(r).reduce((e,i)=>(r[i]!==void 0&&!Phr(r[i])&&(e[i]=r[i]),e),{});function cIn(r){let e=lIn({conditions:VYe(r.map(i=>i.conditions??{})),theme:VYe(r.map(i=>i.theme??{})),patterns:VYe(r.map(i=>i.patterns??{})),utilities:VYe(r.map(i=>i.utilities??{})),globalCss:VYe(r.map(i=>i.globalCss??{}))},...r);return Nhr(e)}ae();var Bbt=require("path"),UYe=(r,e)=>{for(let i of r){let a=e.match(i.pattern);if(a)for(let u of i.paths){let d=0;return u.replace(/\*/g,()=>{let b=Math.min(++d,a.length-1);return a[b]}).split(Bbt.sep).join(Bbt.posix.sep)}}};ae();var WRe=require("path"),gbt=require("fs");function uIn(r,e){let i=(0,WRe.resolve)(".",r),a;for((0,gbt.statSync)(i).isDirectory()||(i=(0,WRe.dirname)(i));;){if(a=e(i,(0,gbt.readdirSync)(i)),a)return(0,WRe.resolve)(i,a);if(i=(0,WRe.dirname)(a=i),a===i)break}}var BIn=require("path"),HYe=b_(require("fs"),1),GRe=b_(require("path"),1),gIn=require("path"),Lzt=b_(nzt(),1);ae();var fIn=require("esbuild"),pIn=b_(require("path"),1),ybt=b_(require("fs"),1),FQ=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,i)=>(typeof require<"u"?require:e)[i]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});function Rhr(r){let e=ybt.default.realpathSync(r);delete FQ.cache[r];let i=FQ(e);return{mod:i.default??i,dependencies:[e],code:ybt.default.readFileSync(e,"utf-8")}}async function Lhr(r,e){let i=await(0,fIn.build)({absWorkingDir:e,entryPoints:[r],outfile:"out.js",write:!1,platform:"node",bundle:!0,format:"cjs",sourcemap:!1,metafile:!0,mainFields:["module","main"]}),{text:a}=i.outputFiles[0];return{code:a,dependencies:i.metafile?Object.keys(i.metafile.inputs):[]}}function Mhr(r,e){let i=pIn.default.extname(r),a=ybt.default.realpathSync(r),u=FQ.extensions[i];FQ.extensions[i]=(b,x)=>{x===a?b._compile(e,x):u(b,x)},delete FQ.cache[FQ.resolve(r)];let d=FQ(r),h=d.default??d;return FQ.extensions[i]=u,h}async function dIn(r,e={}){let{cwd:i=process.cwd()}=e,a=FQ.resolve(r,{paths:[i]});try{return Rhr(a)}catch{let u=await Lhr(a,i);try{u.mod=await Mhr(a,u.code)}catch{u.mod=FQ("node-eval")(u.code).default}return u}}ae();var mIn=class extends Error{code;hint;constructor(r,e,i){super(e),this.code=`ERR_PANDA_${r}`,this.hint=i?.hint}};var Cbt=class extends mIn{constructor(){let r="Cannot find config file: panda.config.ts or panda.config.js/cjs/mjs/mts/cts. Did you forget to run `panda init`?";super("NO_CONFIG",r)}},_In=class extends mIn{constructor(r){super("CONFIG_ERROR",r)}};var Mzt=require("@pandacss/preset-base"),bbt=require("@pandacss/preset-panda"),Fhr=[".ts",".js",".mts",".mjs",".cts",".cjs"],Ohr=new RegExp(`panda.config(${Fhr.join("|")})$`),Whr=r=>Ohr.test(r);function Ghr({cwd:r,file:e}){return e?(0,BIn.resolve)(r,e):uIn(r,(i,a)=>a.find(Whr))}function yIn(r,e){let i=Object.keys(r).sort((u,d)=>hIn(d)-hIn(u)),a=[];for(let u of i){let d=r[u];u=zhr(u).replace(/\*/g,"(.+)"),a.push({pattern:new RegExp("^"+u+"$"),paths:d.map(h=>(0,gIn.resolve)(e,h))})}return a}function hIn(r){let e=r.indexOf("*");return r.substr(0,e).length}function zhr(r){return r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/-/g,"\\x2d")}var jhr=[".js",".cjs",".mjs"],Vhr=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Uhr=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];function Hhr(r,e){for(let i of e){let a=`${r}${i}`;if(HYe.default.existsSync(a)&&HYe.default.statSync(a).isFile())return a}for(let i of e){let a=`${r}/index${i}`;if(HYe.default.existsSync(a))return a}return null}var Jhr=/import[\s\S]*?['"](.{3,}?)['"]/gi,qhr=/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,Khr=/require\(['"`](.+)['"`]\)/gi,Xhr=/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi;function vbt(r,e){let{filename:i,seen:a}=r,{moduleResolution:u,...d}=r.compilerOptions??{},h=Hhr(GRe.default.resolve(r.cwd,i),jhr.includes(r.ext)?Vhr:Uhr);if(h===null||(e&&r.foundModuleAliases.set(e,h),a.size>1&&a.has(h)))return;a.add(h);let b=HYe.default.readFileSync(h,"utf-8"),x=[...b.matchAll(Jhr),...b.matchAll(qhr),...b.matchAll(Khr),...b.matchAll(Xhr)];if(!x.length)return;let w={cwd:GRe.default.dirname(h),ext:GRe.default.extname(h),seen:a,baseUrl:r.baseUrl,pathMappings:r.pathMappings,foundModuleAliases:r.foundModuleAliases};x.forEach(L=>{let q=L[1];if(q[0]==="."){vbt(Object.assign({},w,{filename:q}));return}try{let te=Lzt.default.resolveModuleName(q,h,d,Lzt.default.sys).resolvedModule;if(te&&te.extension===".ts"){vbt(Object.assign({},w,{filename:te.resolvedFileName}));return}if(!r.pathMappings)return;let me=UYe(r.pathMappings,q);if(!me)return;vbt(Object.assign({},w,{filename:me}),q)}catch{}})}function CIn(r,e={pathMappings:[]},i){if(r===null)return{deps:new Set,aliases:new Map};let a=new Map,u=new Set;return u.add(r),vbt({filename:r,ext:GRe.default.extname(r),cwd:GRe.default.dirname(r),seen:u,baseUrl:e.baseUrl,pathMappings:e.pathMappings??[],foundModuleAliases:a,compilerOptions:i}),{deps:u,aliases:a}}async function vIn(r,e){let{mod:i,dependencies:a}=await dIn(r,{cwd:e,interopDefault:!0});return{config:i?.default??i,dependencies:a}}async function Yhr(r,e){let i=r.presets??[],a=[];for(;i.length>0;){let u=await i.shift();if(typeof u=="string"){let d=await vIn(u,e);a.unshift(await d.config),i.unshift(...await d.config.presets??[])}else a.unshift(u),i.unshift(...u.presets??[])}return a.unshift(r),cIn(a)}var bIn={"@pandacss/preset-base":Mzt.preset,"@pandacss/preset-panda":bbt.preset,"@pandacss/dev/presets":bbt.preset},Qhr=Object.keys(bIn),$hr=r=>Qhr.includes(r);async function SIn(r){let e=await eBr(r);return Zhr(e,r.cwd)}async function Zhr(r,e){let i=new Set;r.config.eject||i.add(Mzt.preset),r.config.presets?r.config.presets.forEach(u=>{typeof u=="string"&&$hr(u)?i.add(bIn[u]):i.add(u)}):r.config.eject||i.add(bbt.preset),r.config.presets=Array.from(i);let a=await Yhr(r.config,e);return{...r,config:a}}async function eBr(r){let{cwd:e,file:i}=r,a=Ghr({cwd:e,file:i});if(!a)throw new Cbt;v2.debug("config:path",a);let u=await vIn(a,e);if(typeof u.config!="object")throw new _In("\u{1F4A5} Config must export or return an object.");return{...u,config:u.config,path:a}}var g5n=require("fs"),kqt=b_(ejt(),1),F2t=require("path");ae();var HRe=require("path"),tjt=require("fs");var vPn=r=>r===(0,HRe.dirname)(r),ayr=Symbol("stop"),lyr=r=>r===ayr;var Rbt=(r,e=process.cwd())=>{if(typeof r=="function"&&r(e)instanceof Promise)throw new Error("Async matcher can not be used in 'lookItUpSync'");if(typeof r=="string"){let a=(0,HRe.join)(e,r);return(0,tjt.existsSync)(a)?a:vPn(e)?null:Rbt(r,(0,HRe.dirname)(e))}let i=r(e);return lyr(i)?null:i??(vPn(e)?null:Rbt(r,(0,HRe.dirname)(e)))};ae();var JRe=b_(require("path"),1),kPn=require("fs"),IPn=b_(require("path"),1);var zJ=b_(require("path"),1),PPn=require("fs"),sjt=require("module"),Ew=b_(require("path"),1),NPn=require("fs");async function bPn(r,e){let i=JRe.default.dirname(JRe.default.resolve(r)),a=e?.root?JRe.default.resolve(e.root):null;for(;i;){let u=await cyr(i,e);if(u)return u;{if(a===i)break;let d=JRe.default.dirname(i);if(d===i)break;i=d}}throw new Error(`no tsconfig file found for ${r}`)}async function cyr(r,e){let i=JRe.default.join(r,"tsconfig.json");if(e?.tsConfigPaths)return e.tsConfigPaths.has(i)?i:void 0;try{let a=await kPn.promises.stat(i);if(a.isFile()||a.isFIFO())return i}catch(a){if(a.code!=="ENOENT")throw a}}var Wbi=IPn.default.sep;function uyr(r){let e=fyr(pyr(dyr(r)));return e.trim()===""?"{}":e}function fyr(r){let e=!1,i=0,a="",u=null;for(let d=0;d<r.length;d++){let h=r[d];if(h==='"'&&(wPn(r,d)||(e=!e)),e){u=null;continue}if(h===","){u=d;continue}u&&(h==="}"||h==="]"?(a+=r.slice(i,u)+" ",i=u+1,u=null):h.match(/\s/)||(u=null))}return a+r.substring(i)}function wPn(r,e){let i=e-1,a=0;for(;r[i]==="\\";)i-=1,a+=1;return!!(a%2)}function Lbt(r,e,i){return r.slice(e,i).replace(/\S/g," ")}var njt=Symbol("singleComment"),SPn=Symbol("multiComment");function pyr(r){let e=!1,i=!1,a=0,u="";for(let d=0;d<r.length;d++){let h=r[d],b=r[d+1];!i&&h==='"'&&(wPn(r,d)||(e=!e)),!e&&(!i&&h+b==="//"?(u+=r.slice(a,d),a=d,i=njt,d++):i===njt&&h+b===`\r
30777
30777
  `?(d++,i=!1,u+=Lbt(r,a,d),a=d):i===njt&&h===`
30778
30778
  `?(i=!1,u+=Lbt(r,a,d),a=d):!i&&h+b==="/*"?(u+=r.slice(a,d),a=d,i=SPn,d++):i===SPn&&h+b==="*/"&&(d++,i=!1,u+=Lbt(r,a,d+1),a=d+1))}return u+(i?Lbt(r.slice(a)):r.slice(a))}function dyr(r){return r.charCodeAt(0)===65279?r.slice(1):r}var myr=new RegExp("\\"+Ew.default.posix.sep,"g"),_yr=new RegExp("\\"+Ew.default.sep,"g"),rjt=new Map,RPn="**/*",ljt=[".ts",".tsx",".mts",".cts"],hyr=`\\.(?:${ljt.map(r=>r.substring(1)).join("|")})`,Gbi=new Function("path","return import(path).then(m => m.default)");async function xPn(r){if(Ew.default.extname(r)!==".json")return;let e=Ew.default.resolve(r);try{let i=await NPn.promises.stat(e);if(i.isFile()||i.isFIFO())return e}catch(i){if(i.code!=="ENOENT")throw i}throw new Error(`no tsconfig file found for ${r}`)}function ijt(r){return Ew.default.posix.sep!==Ew.default.sep&&r.includes(Ew.default.posix.sep)?r.replace(myr,Ew.default.sep):r}function cjt(r){return Ew.default.posix.sep!==Ew.default.sep&&r.includes(Ew.default.sep)?r.replace(_yr,Ew.default.posix.sep):r}function eQe(r,e){return Ew.default.sep===Ew.default.posix.sep?r?Ew.default.resolve(r,e):Ew.default.resolve(e):cjt(r?Ew.default.resolve(ijt(r),ijt(e)):Ew.default.resolve(ijt(e)))}function Byr(r){let e=Ew.default.dirname(r.tsconfigFile);return r.tsconfig.references.map(i=>{let a=i.path.endsWith(".json")?i.path:Ew.default.join(i.path,"tsconfig.json");return eQe(e,a)})}function gyr(r,e){if(e.referenced&&ljt.some(i=>r.endsWith(i))&&!EPn(r,e)){let i=e.referenced.find(a=>EPn(r,a));if(i)return{...i,solution:e}}return e}function EPn(r,e){let i=cjt(Ew.default.dirname(e.tsconfigFile)),a=(e.tsconfig.files||[]).map(h=>eQe(i,h)),u=eQe(null,r);return a.includes(r)?!0:DPn(u,i,e.tsconfig.include||(e.tsconfig.files?[]:[RPn]))?!DPn(u,i,e.tsconfig.exclude||[]):!1}function DPn(r,e,i){return i.some(a=>{let u=a.length,d=!1;for(let w=a.length-1;w>-1;w--)if(a[w]==="*"||a[w]==="?"){u=w,d=!0;break}if(u<a.length-1&&!r.endsWith(a.slice(u+1))||a.endsWith("*")&&!ljt.some(w=>r.endsWith(w)))return!1;if(a===RPn)return r.startsWith(`${e}/`);let h=eQe(e,a),b=-1;for(let w=0;w<h.length;w++)if(h[w]==="*"||h[w]==="?"){b=w,d=!0;break}if(b>1&&!r.startsWith(h.slice(0,b-1)))return!1;if(!d)return r===h;if(rjt.has(h))return rjt.get(h).test(r);let x=yyr(h);return rjt.set(h,x),x.test(r)})}function yyr(r){let e="^";for(let i=0;i<r.length;i++){let a=r[i];if(a==="?"){e+="[^\\/]";continue}if(a==="*"){if(r[i+1]==="*"&&r[i+2]==="/"){i+=2,e+="(?:[^\\/]*\\/)*";continue}e+="[^\\/]*";continue}"/.+^${}()|[]\\".includes(a)&&(e+="\\"),e+=a}return r.endsWith("*")&&(e+=hyr),e+="$",new RegExp(e)}async function LPn(r,e){let i=e?.cache;if(i?.has(r))return i.get(r);let a;if(e?.resolveWithEmptyIfConfigNotFound)try{a=await xPn(r)||await bPn(r,e)}catch{let h={tsconfigFile:"no_tsconfig_file_found",tsconfig:{}};return i?.set(r,h),h}else a=await xPn(r)||await bPn(r,e);let u;return i?.has(a)?u=i.get(a):(u=await ujt(a,i),await Promise.all([MPn(u,i),vyr(u,i)]),i?.set(a,u)),u=gyr(r,u),i?.set(r,u),u}async function ujt(r,e){if(e?.has(r))return e.get(r);try{let i=await PPn.promises.readFile(r,"utf-8"),a=uyr(i),u={tsconfigFile:r,tsconfig:Cyr(JSON.parse(a),zJ.default.dirname(r))};return e?.set(r,u),u}catch(i){throw new fjt(`parsing ${r} failed: ${i}`,"PARSE_FILE",r,i)}}function Cyr(r,e){var i;return(i=r.compilerOptions)!=null&&i.baseUrl&&!zJ.default.isAbsolute(r.compilerOptions.baseUrl)&&(r.compilerOptions.baseUrl=eQe(e,r.compilerOptions.baseUrl)),r}async function vyr(r,e){if(!r.tsconfig.references)return;let i=Byr(r),a=await Promise.all(i.map(u=>ujt(u,e)));await Promise.all(a.map(u=>MPn(u,e))),r.referenced=a}async function MPn(r,e){if(!r.tsconfig.extends)return;let i=[{tsconfigFile:r.tsconfigFile,tsconfig:JSON.parse(JSON.stringify(r.tsconfig))}],a=0,u=[],d=0;for(;a<i.length;){let h=i[a];if(u.push(h.tsconfigFile),h.tsconfig.extends){d+=1;let b;Array.isArray(h.tsconfig.extends)?b=h.tsconfig.extends.reverse().map(w=>TPn(w,h.tsconfigFile)):b=[TPn(h.tsconfig.extends,h.tsconfigFile)];let x=b.find(w=>u.includes(w));if(x){let w=u.concat([x]).join(" -> ");throw new fjt(`Circular dependency in "extends": ${w}`,"EXTENDS_CIRCULAR",r.tsconfigFile)}i.splice(a+1,0,...await Promise.all(b.map(w=>ujt(w,e))))}else u.splice(-d),d=0;a=a+1}r.extended=i;for(let h of r.extended.slice(1))Syr(r,h)}function TPn(r,e){let i;try{return(0,sjt.createRequire)(e).resolve(r)}catch(a){i=a}if(!zJ.default.isAbsolute(r)&&!r.startsWith("./")&&!r.startsWith("../"))try{let a=zJ.default.join(r,"tsconfig.json");return(0,sjt.createRequire)(e).resolve(a)}catch(a){i=a}throw new fjt(`failed to resolve "extends":"${r}" in ${e}`,"EXTENDS_RESOLVE",e,i)}var byr=["compilerOptions","files","include","exclude","watchOptions","compileOnSave","typeAcquisition","buildOptions"];function Syr(r,e){let i=r.tsconfig,a=e.tsconfig,u=cjt(zJ.default.relative(zJ.default.dirname(r.tsconfigFile),zJ.default.dirname(e.tsconfigFile)));for(let d of Object.keys(a).filter(h=>byr.includes(h)))if(d==="compilerOptions"){i.compilerOptions||(i.compilerOptions={});for(let h of Object.keys(a.compilerOptions))Object.prototype.hasOwnProperty.call(i.compilerOptions,h)||(i.compilerOptions[h]=ojt(h,a.compilerOptions[h],u))}else if(i[d]===void 0)if(d==="watchOptions"){i.watchOptions={};for(let h of Object.keys(a.watchOptions))i.watchOptions[h]=ojt(h,a.watchOptions[h],u)}else i[d]=ojt(d,a[d],u)}var xyr=["files","include","exclude","baseUrl","rootDir","rootDirs","typeRoots","outDir","outFile","declarationDir","excludeDirectories","excludeFiles"];function ojt(r,e,i){return xyr.includes(r)?Array.isArray(e)?e.map(a=>APn(a,i)):APn(e,i):e}function APn(r,e){return zJ.default.isAbsolute(r)?r:zJ.default.posix.normalize(zJ.default.posix.join(e,r))}var fjt=class ajt extends Error{constructor(e,i,a,u){super(e),Object.setPrototypeOf(this,ajt.prototype),this.name=ajt.name,this.code=i,this.cause=u,this.tsconfigFile=a}};ae();ae();function Mbt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e]}function FPn(){return typeof WeakMap<"u"?new WeakMap:Eyr()}function Eyr(){return{add:Mbt,delete:Mbt,get:Mbt,set:Mbt,has:function(r){return!1}}}var Dyr=Object.prototype.hasOwnProperty,djt=function(r,e){return Dyr.call(r,e)};function pjt(r,e){for(var i in e)djt(e,i)&&(r[i]=e[i]);return r}var Tyr=/^[ \t]*(?:\r\n|\r|\n)/,Ayr=/(?:\r\n|\r|\n)[ \t]*$/,kyr=/^(?:[\r\n]|$)/,Iyr=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,wyr=/^[ \t]*[\r\n][ \t\r\n]*$/;function OPn(r,e,i){var a=0,u=r[0].match(Iyr);u&&(a=u[1].length);var d="(\\r\\n|\\r|\\n).{0,"+a+"}",h=new RegExp(d,"g");e&&(r=r.slice(1));var b=i.newline,x=i.trimLeadingNewline,w=i.trimTrailingNewline,L=typeof b=="string",q=r.length,te=r.map(function(me,Ee){return me=me.replace(h,"$1"),Ee===0&&x&&(me=me.replace(Tyr,"")),Ee===q-1&&w&&(me=me.replace(Ayr,"")),L&&(me=me.replace(/\r\n|\n|\r/g,function(ke){return b})),me});return te}function Pyr(r,e){for(var i="",a=0,u=r.length;a<u;a++)i+=r[a],a<u-1&&(i+=e[a]);return i}function Nyr(r){return djt(r,"raw")&&djt(r,"length")}function WPn(r){var e=FPn(),i=FPn();function a(d){for(var h=[],b=1;b<arguments.length;b++)h[b-1]=arguments[b];if(Nyr(d)){var x=d,w=(h[0]===a||h[0]===pf)&&wyr.test(x[0])&&kyr.test(x[1]),L=w?i:e,q=L.get(x);if(q||(q=OPn(x,w,r),L.set(x,q)),h.length===0)return q[0];var te=Pyr(q,w?h.slice(1):h);return te}else return WPn(pjt(pjt({},r),d||{}))}var u=pjt(a,{string:function(d){return OPn([d],!1,r)[0]}});return u}var pf=WPn({trimLeadingNewline:!0,trimTrailingNewline:!0}),xT=pf;if(typeof module<"u")try{module.exports=pf,Object.defineProperty(pf,"__esModule",{value:!0}),pf.default=pf,pf.outdent=pf}catch{}fx();fx();var yNn=b_(KPn(),1);fx();ae();var sCr="",aCr=sCr.split(","),lCr="WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationTimingFunction,animationTimeline,appearance,aspectRatio,azimuth,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockOverflow,blockSize,border,borderBlock,borderBlockColor,borderBlockStyle,borderBlockWidth,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineEnd,borderInlineColor,borderInlineStyle,borderInlineWidth,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,color,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicSize,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,direction,display,emptyCells,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontVariationSettings,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inputSecurity,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,printColorAdjust,quotes,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,scale,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockStart,scrollMarginBlockEnd,scrollMarginBottom,scrollMarginInline,scrollMarginInlineStart,scrollMarginInlineEnd,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineStart,scrollPaddingInlineEnd,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,shapeImageThreshold,shapeMargin,shapeOutside,tabSize,tableLayout,textAlign,textAlignLast,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textTransform,textUnderlineOffset,textUnderlinePosition,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,verticalAlign,viewTransitionName,visibility,whiteSpace,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,zIndex,zoom,alignmentBaseline,baselineShift,clipRule,colorInterpolation,colorRendering,dominantBaseline,fill,fillOpacity,fillRule,floodColor,floodOpacity,glyphOrientationVertical,lightingColor,marker,markerEnd,markerMid,markerStart,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,textAnchor,vectorEffect",Bjt=lCr.split(",").concat(aCr),cCr=new Map(Bjt.map(r=>[r,!0]));function uCr(r){let e=Object.create(null);return i=>(e[i]===void 0&&(e[i]=r(i)),e[i])}var fCr=/&|@/,XPn=uCr(r=>cCr.has(r)||r.startsWith("--")||fCr.test(r));fx();var vNn=b_(YPn(),1);ae();fx();ae();fx();fx();fx();fx();fx();fx();fx();var ZPn=/(\$[^\s,]+\w)|({([^}]*)})/g,pCr=/[{}]/g;function Sjt(r){if(typeof r!="string")return[];let e=r.match(ZPn);return e?e.map(i=>i.replace(pCr,"")).map(i=>i.trim()):[]}function dCr(r){return ZPn.test(r)}function mCr(r){let e={};return r.forEach((i,a)=>{i instanceof Map?e[a]=Object.fromEntries(i):e[a]=i}),e}var vjt=r=>EW(r)&&"value"in r;function QPn(r){if(!vjt(r))throw new Error(`Invalid token format: ${JSON.stringify(r)}`)}var jbt=class eNn{name;value;originalValue;path;type;description;extensions;constructor(e){this.name=e.name,this.value=e.value,this.originalValue=e.value,this.path=e.path??[],e.type&&(this.type=e.type),e.description&&(this.description=e.description),this.extensions=e.extensions??{},this.extensions.condition=e.extensions?.condition??"base",this.setType()}get id(){return Rve(`${this.name}-${this.extensions.condition}-${this.value}`)}get isConditional(){return!!this.extensions?.conditions}get hasReference(){return!!this.extensions?.references}get isComposite(){return EW(this.originalValue)||Array.isArray(this.originalValue)}expandReferences(){if(!this.hasReference)return this.extensions.varRef??this.value;let e=this.extensions.references??{};return this.value=Object.keys(e).reduce((i,a)=>{let u=e[a];if(u.isConditional)return i;let d=u.expandReferences();return i.replace(`{${a}}`,d)},this.value),delete this.extensions.references,this.value}get isReference(){return dCr(this.originalValue)}get references(){return Sjt(this.originalValue)}clone(){return new eNn({name:this.name,value:this.value,type:this.type,path:[...this.path],description:this.description,extensions:bjt(this.extensions)})}getConditionTokens(){if(!this.isConditional)return;let e=this.extensions.conditions??{},i=[];return jL(e,(a,u)=>{let d=u.filter(b=>!A6e(b));if(!d.length)return;let h=this.clone();h.value=a,h.extensions.condition=d.join(":"),i.push(h)}),i}setExtensions(e){return this.extensions={...this.extensions,...e},this.setType(),this}setType(){this.type||this.extensions.category&&(this.type=_Cr[this.extensions.category])}};function bjt(r){return r instanceof jbt?r.clone():Array.isArray(r)?r.map(e=>bjt(e)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([e,i])=>[e,bjt(i)])):r}var _Cr={colors:"color",spacing:"dimension",sizing:"dimension",shadows:"shadow",fonts:"fontFamily",fontSizes:"fontSize",fontWeights:"fontWeight",letterSpacings:"letterSpacing",durations:"duration",transitions:"transition",radii:"borderRadius",gradients:"gradient",easings:"cubicBezier",borders:"border",components:"cti",assets:"asset"};function hCr(r){return r?{breakpoints:Lve(r,e=>({value:e})),sizes:Object.fromEntries(Object.entries(r).map(([e,i])=>[`breakpoint-${e}`,{value:i}]))}:{breakpoints:{},sizes:{}}}function $Pn(r){return r[0]==="DEFAULT"?r:r.filter(e=>e!=="DEFAULT")}var BCr=class{allTokens=[];prefix;hash;get allNames(){return Array.from(new Set(this.allTokens.map(r=>r.name)))}constructor(r){let{tokens:e={},semanticTokens:i={},breakpoints:a,prefix:u,hash:d}=r,h=hCr(a),b=Ufe({...e,breakpoints:h.breakpoints,sizes:{...e.sizes,...h.sizes}});this.prefix=u,this.hash=d,jL(b,(x,w)=>{w=$Pn(w),QPn(x);let L=w[0],q=w.join("."),te=new jbt({...x,name:q,path:w});te.setExtensions({category:L,prop:w.slice(1).join(".")}),this.allTokens.push(te)},{stop:vjt}),jL(i,(x,w)=>{w=$Pn(w),QPn(x);let L=w[0],q=w.join("."),te=bj(x.value)?{value:{base:x.value}}:x,{value:me,...Ee}=te,ke=new jbt({...Ee,name:q,value:me.base||"",path:w});ke.setExtensions({category:L,conditions:me,prop:w.slice(1).join(".")}),this.allTokens.push(ke)},{stop:vjt})}getByName=zE(r=>{for(let e of this.allTokens)if(e.name===r)return e});transforms=new Map;registerTransform(...r){return r.forEach(e=>{e.type||="value",e.enforce||="pre",this.transforms.set(e.name,e)}),this}execTransform(r){let e=this.transforms.get(r);e&&this.allTokens.forEach(i=>{if(i.extensions.hasReference||typeof e.match=="function"&&!e.match(i))return;let a=e.transform(i,{prefix:this.prefix,hash:this.hash});Sg(e).with({type:"extensions"},()=>{i.setExtensions(a)}).with({type:"value"},()=>{i.value=a,i.isComposite&&(i.originalValue=a)}).otherwise(()=>{i[e.type]=a})})}transformTokens(r){return this.transforms.forEach(e=>{e.enforce===r&&this.execTransform(e.name)}),this}middlewares=[];registerMiddleware(...r){for(let e of r)e.enforce||="pre",this.middlewares.push(e);return this}applyMiddlewares(r){this.middlewares.forEach(e=>{e.enforce===r&&e.transform(this,{prefix:this.prefix,hash:this.hash})})}getReferences(r){return Sjt(r).map(i=>this.getByName(i)).filter(Boolean)}usesReference(r){return bj(r)?this.getReferences(r).length>0:!1}addReferences(){return this.allTokens.forEach(r=>{if(!this.usesReference(r.value))return;let e=this.getReferences(r.value);r.setExtensions({references:e.reduce((i,a)=>(i[a.name]=a,i),{})})}),this}filter(r){let e=typeof r=="function"?r:$fe(r);return this.allTokens.filter(e)}addConditionalTokens(){let r=[];return this.allTokens.forEach(e=>{r.push(e);let i=e.getConditionTokens();i&&i.length>0&&r.push(...i)}),this.allTokens=r,this}expandReferences(){return this.allTokens.forEach(r=>{r.expandReferences()}),this}build(){this.applyMiddlewares("pre"),this.transformTokens("pre"),this.addConditionalTokens(),this.addReferences(),this.expandReferences(),this.applyMiddlewares("post"),this.transformTokens("post")}get isEmpty(){return this.allTokens.length===0}},Pre={groupByCondition(r){let e=new Map;return r.allTokens.forEach(i=>{let{condition:a}=i.extensions;a&&(e.get(a)||e.set(a,new Set),e.set(a,e.get(a).add(i)))}),e},groupByColorPalette(r){let e=new Map;return r.allTokens.forEach(i=>{let{colorPalette:a,colorPaletteRoots:u}=i.extensions;!a||i.extensions.isVirtual||u.forEach(d=>{e.get(d)||e.set(d,new Map);let h=i.name.replace(d,"colorPalette"),b=r.getByName(h);if(!b)return;let x=b.extensions.var;e.get(d).set(x,i.extensions.varRef)})}),e},groupByCategory(r){let e=new Map;return r.allTokens.forEach(i=>{let{category:a,prop:u}=i.extensions;a&&(e.get(a)||e.set(a,new Map),e.set(a,e.get(a).set(u,i)))}),e},getFlattenedValues(r){let e=Pre.groupByCategory(r),i=new Map;return e.forEach((a,u)=>{i.get(u)||i.set(u,new Map),a.forEach(d=>{let{prop:h,varRef:b,isNegative:x}=d.extensions,w=x?d.isConditional?d.originalValue:d.value:b;i.set(u,i.get(u).set(h,w))})}),i},getVars(r){let e=Pre.groupByCondition(r),i=new Map;return e.forEach((a,u)=>{i.get(u)||i.set(u,new Map),a.forEach(d=>{d.extensions.isNegative||d.extensions.isVirtual||i.get(u).set(d.extensions.var,d.value)})}),i},createVarGetter(r){let e=mCr(Pre.getFlattenedValues(r));return function(a,u){return N6e(e,a,u)}},getColorPaletteValues(r){let e=new Set;return r.allTokens.forEach(i=>{let{colorPalette:a}=i.extensions;!a||i.extensions.isVirtual||e.add(a)}),e}},gCr={enforce:"pre",transform(r,{prefix:e,hash:i}){r.filter({extensions:{category:"spacing"}}).forEach(u=>{let d=[...u.path],h=P6e(d.join("-"),{prefix:e,hash:i});if(u.value==="0rem")return;let b=u.clone();b.setExtensions({isNegative:!0,prop:`-${u.extensions.prop}`,originalPath:d}),b.value=uFt.negate(h);let x=b.path.at(-1);x!=null&&(b.path[b.path.length-1]=`-${x}`),b.path&&(b.name=b.path.join(".")),r.allTokens.push(b)})}},yCr=new Set(["spacing","sizes","borderWidths","fontSizes","radii"]),CCr={enforce:"post",transform(r){r.filter(i=>yCr.has(i.extensions.category)&&!i.extensions.isNegative).forEach(i=>{i.setExtensions({pixelValue:Mve(i.value)})})}},vCr={enforce:"post",transform(r){let e=r.filter({extensions:{category:"colors"}}),i=new Set,a=new Map;e.forEach(u=>{let{colorPalette:d,colorPaletteRoots:h,colorPaletteTokenKeys:b}=u.extensions;d&&(b.forEach(i.add,i),h.forEach(x=>{let w=a.get(x)||[];w.push(u),a.set(x,w)}))}),i.forEach(u=>{let d=new jbt({name:`colors.colorPalette.${u}`,value:`{colors.colorPalette.${u}}`,path:["colors","colorPalette",...u.split(".")]});d.setExtensions({category:"colors",prop:`colorPalette.${u}`,isVirtual:!0}),r.allTokens.push(d)}),r.transformTokens("pre")}},bCr={enforce:"post",transform(r){r.allTokens=r.allTokens.filter(e=>e.value!=="")}},SCr=[gCr,vCr,bCr,CCr],Cjt={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},xjt={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function xCr(r){return r.trim().replace(xjt.whitespace," ")}function ECr(r){return encodeURIComponent(r).replace(xjt.urlHexPairs,TCr)}function DCr(r){return kCr(Cjt).forEach(e=>{Cjt[e].test(r)&&(r=r.replace(Cjt[e],e))}),r}function TCr(r){switch(r){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return r.toLowerCase()}}function ACr(r){if(typeof r!="string")throw new TypeError("Expected a string, but received "+typeof r);r.charCodeAt(0)===65279&&(r=r.slice(1));let e=DCr(xCr(r)).replace(xjt.quotes,"'");return"data:image/svg+xml,"+ECr(e)}var kCr=r=>Object.keys(r),ICr=$fe({inset:xD.optional(xD.boolean),offsetX:xD.number,offsetY:xD.number,blur:xD.number,spread:xD.number,color:xD.string}),wCr={name:"tokens/shadow",match:r=>r.extensions.category==="shadows",transform(r,{prefix:e}){if(bj(r.value))return r.value;if(Array.isArray(r.value)){if(r.extensions.conditions){let i=r.extensions.conditions;for(let[a,u]of Object.entries(i))Array.isArray(u)&&(i[a]=u.map(d=>this.transform({value:d},{prefix:e})).join(", "));if(r.extensions.conditions?.base&&Array.isArray(r.originalValue))return r.extensions.conditions.base}return r.value.map(i=>this.transform({value:i},{prefix:e})).join(", ")}if(ICr(r.value)){let{offsetX:i,offsetY:a,blur:u,spread:d,color:h,inset:b}=r.value;return`${b?"inset ":""}${i}px ${a}px ${u}px ${d}px ${h}`}return r.value}},PCr=$fe({type:xD.string,placement:xD.string,stops:xD.union(xD.array(xD.string),xD.array({color:xD.string,position:xD.number}))}),NCr={name:"tokens/gradient",match:r=>r.extensions.category==="gradients",transform(r){if(bj(r.value))return r.value;if(PCr(r.value)){let{type:e,stops:i,placement:a}=r.value,u=i.map(d=>{if(bj(d))return d;let{color:h,position:b}=d;return`${h} ${b}px`});return`${e}-gradient(${a}, ${u.join(", ")})`}return r.value}},RCr={name:"tokens/fonts",match:r=>r.extensions.category==="fonts",transform(r){return Array.isArray(r.value)?r.value.join(", "):r.value}},LCr={name:"tokens/easings",match:r=>r.extensions.category==="easings",transform(r){return bj(r.value)?r.value:`cubic-bezier(${r.value.join(", ")})`}},MCr={name:"tokens/borders",match:r=>r.extensions.category==="borders",transform(r){if(bj(r.value))return r.value;let{width:e,style:i,color:a}=r.value;return`${e}px ${i} ${a}`}},FCr={name:"tokens/assets",match:r=>r.extensions.category==="assets",transform(r){let e=r.value;return Sg(e).with(xD.string,i=>i).with({type:"url"},({value:i})=>`url('${i}')`).with({type:"svg"},({value:i})=>`url('${ACr(i)})'`).exhaustive()}},OCr={type:"extensions",name:"tokens/css-var",transform(r,{prefix:e,hash:i}){let{isNegative:a,originalPath:u}=r.extensions,d=a?u:r.path,h=P6e(d.join("-"),{prefix:e,hash:i});return{var:h.var,varRef:h.ref}}},WCr={enforce:"post",name:"tokens/conditionals",transform(r,{prefix:e,hash:i}){let a=Sjt(r.value);return a.length&&a.forEach(u=>{let d=P6e(u.split(".").join("-"),{prefix:e,hash:i}).ref;r.value=r.value.replace(`{${u}}`,d)}),r.value}},GCr={type:"extensions",name:"tokens/colors/colorPalette",match(r){return r.extensions.category==="colors"&&!r.extensions.isVirtual},transform(r){let e=[...r.path];if(e.pop(),e.shift(),e.length===0)return{};let i=e.reduce((h,b,x,w)=>(h.push(w.slice(0,x+1).join(".")),h),[]),a=e.at(0),u=e.join("."),d=r.path.slice(r.path.indexOf(a)+1).reduce((h,b,x,w)=>(h.push(w.slice(x).join(".")),h),[]);return{colorPalette:u,colorPaletteRoots:i,colorPaletteTokenKeys:d}}},zCr=[wCr,NCr,RCr,LCr,MCr,FCr,OCr,WCr,GCr],tNn=class extends BCr{constructor(r){super(r),this.registerTransform(...zCr),this.registerMiddleware(...SCr),this.build()}get get(){return Pre.createVarGetter(this)}get conditionMap(){return Pre.groupByCondition(this)}get categoryMap(){return Pre.groupByCategory(this)}get values(){return Pre.getFlattenedValues(this)}get colorPalettes(){return xht(Pre.groupByColorPalette(this))}get vars(){return Pre.getVars(this)}getValue(r){let e=this.values.get(r);if(e!=null)return Object.fromEntries(e)}getTokenVar(r){let e=xht(this.values);return N6e(e,r)}};fx();fx();var jCr=Object.defineProperty,VCr=(r,e)=>{for(var i in e)jCr(r,i,{get:e[i],enumerable:!0})},UCr={};VCr(UCr,{artifactsGenerated:()=>iNn,buildComplete:()=>fNn,codegenComplete:()=>aNn,configExists:()=>oNn,configWatch:()=>uNn,getMessages:()=>pNn,noExtract:()=>lNn,thankYou:()=>sNn,watch:()=>cNn});var nQe=fR.green().bold("\u2714\uFE0F"),iNn=r=>{let{config:{outdir:e},recipes:i,patterns:a,tokens:u,jsx:d}=r;return()=>[pf`
30779
30779
  ${nQe} ${hre(e,"/css")}: the css function to author styles
@@ -32057,7 +32057,7 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32057
32057
  const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva)
32058
32058
 
32059
32059
  const ${i} = function ${i}(props) {
32060
- const { as: Element = Dynamic, ...restProps } = props
32060
+ const { as: Element = Dynamic, className, ...restProps } = props
32061
32061
 
32062
32062
  const [variantProps, styleProps, htmlProps, elementProps] =
32063
32063
  splitProps(restProps, cvaFn.variantKeys, isCssProperty, normalizeHTMLProps.keys)
@@ -32066,12 +32066,12 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32066
32066
 
32067
32067
  function recipeClass() {
32068
32068
  const compoundVariantStyles = cvaFn.__getCompoundVariantCss__?.(variantProps);
32069
- return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), elementProps.class)
32069
+ return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), elementProps.class, className)
32070
32070
  }
32071
32071
 
32072
32072
  function cvaClass() {
32073
32073
  const cvaStyles = cvaFn.raw(variantProps)
32074
- return cx(css(cvaStyles, propStyles, cssStyles), elementProps.class)
32074
+ return cx(css(cvaStyles, propStyles, cssStyles), elementProps.class, className)
32075
32075
  }
32076
32076
 
32077
32077
  const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
@@ -32471,7 +32471,7 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32471
32471
 
32472
32472
  const [localProps, variantProps, styleProps, htmlProps, elementProps] = splitProps(
32473
32473
  mergedProps,
32474
- ['as', 'class'],
32474
+ ['as', 'class', 'className'],
32475
32475
  cvaFn.variantKeys,
32476
32476
  allCssProperties,
32477
32477
  normalizeHTMLProps.keys
@@ -32479,13 +32479,14 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32479
32479
 
32480
32480
  function recipeClass() {
32481
32481
  const { css: cssStyles, ...propStyles } = styleProps
32482
- return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), localProps.class)
32482
+ const compoundVariantStyles = cvaFn.__getCompoundVariantCss__?.(variantProps);
32483
+ return cx(cvaFn(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), localProps.class, localProps.className)
32483
32484
  }
32484
32485
 
32485
32486
  function cvaClass() {
32486
32487
  const { css: cssStyles, ...propStyles } = styleProps
32487
32488
  const cvaStyles = cvaFn.raw(variantProps)
32488
- return cx(css(cvaStyles, propStyles, cssStyles), localProps.class)
32489
+ return cx(css(cvaStyles, propStyles, cssStyles), localProps.class, localProps.className)
32489
32490
  }
32490
32491
 
32491
32492
  const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
@@ -32493,6 +32494,8 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32493
32494
  return createComponent(
32494
32495
  Dynamic,
32495
32496
  mergeProps(
32497
+ elementProps,
32498
+ normalizeHTMLProps(htmlProps),
32496
32499
  {
32497
32500
  get component() {
32498
32501
  return localProps.as
@@ -32501,8 +32504,6 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32501
32504
  return classes()
32502
32505
  }
32503
32506
  },
32504
- elementProps,
32505
- normalizeHTMLProps(htmlProps)
32506
32507
  )
32507
32508
  )
32508
32509
  }
@@ -32684,7 +32685,8 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32684
32685
  const cvaClass = computed(() => {
32685
32686
  const [variantProps, styleProps, _htmlProps, elementProps] = splittedProps.value
32686
32687
  const { css: cssStyles, ...propStyles } = styleProps
32687
- return cx(cvaFn(variantProps), css(propStyles, cssStyles), elementProps.className)
32688
+ const cvaStyles = cvaFn.raw(variantProps)
32689
+ return cx(css(cvaStyles, propStyles, cssStyles), elementProps.className)
32688
32690
  })
32689
32691
 
32690
32692
  const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
@@ -32695,9 +32697,9 @@ export type ${d}<T extends ElementType> = ComponentProps<T>
32695
32697
  return h(
32696
32698
  props.as,
32697
32699
  {
32698
- class: classes.value,
32699
32700
  ...elementProps,
32700
32701
  ...normalizeHTMLProps(htmlProps),
32702
+ class: classes.value,
32701
32703
  },
32702
32704
  slots.default && slots.default(),
32703
32705
  )
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pandacss/language-server",
3
3
  "displayName": "Panda CSS",
4
4
  "description": "🐼 The official Panda language server",
5
- "version": "0.0.0-dev-20230927192702",
5
+ "version": "0.0.0-dev-20230928093358",
6
6
  "main": "dist/index.js",
7
7
  "repository": {
8
8
  "url": "https://github.com/chakra-ui/panda",
@@ -32,14 +32,14 @@
32
32
  "vscode-languageserver": "^8.1.0",
33
33
  "vscode-languageserver-textdocument": "^1.0.8",
34
34
  "vscode-uri": "^3.0.7",
35
- "@pandacss/core": "0.0.0-dev-20230927192702",
36
- "@pandacss/extension-shared": "0.0.0-dev-20230927192702",
37
- "@pandacss/extractor": "0.0.0-dev-20230927192702",
38
- "@pandacss/node": "0.0.0-dev-20230927192702",
39
- "@pandacss/parser": "0.0.0-dev-20230927192702",
40
- "@pandacss/shared": "0.0.0-dev-20230927192702",
41
- "@pandacss/token-dictionary": "0.0.0-dev-20230927192702",
42
- "@pandacss/types": "0.0.0-dev-20230927192702"
35
+ "@pandacss/core": "0.0.0-dev-20230928093358",
36
+ "@pandacss/extension-shared": "0.0.0-dev-20230928093358",
37
+ "@pandacss/extractor": "0.0.0-dev-20230928093358",
38
+ "@pandacss/node": "0.0.0-dev-20230928093358",
39
+ "@pandacss/parser": "0.0.0-dev-20230928093358",
40
+ "@pandacss/shared": "0.0.0-dev-20230928093358",
41
+ "@pandacss/token-dictionary": "0.0.0-dev-20230928093358",
42
+ "@pandacss/types": "0.0.0-dev-20230928093358"
43
43
  },
44
44
  "dependencies": {
45
45
  "fast-glob": "^3.3.1"