site/node_modules/tsx/dist/index-BsW12Ot9.cjs

17 lines
64 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
"use strict";var Pt=Object.defineProperty;var l=(n,e)=>Pt(n,"name",{value:e,configurable:!0});var Tt=require("node:url"),ie=require("esbuild"),Zt=require("node:crypto"),x=require("node:fs"),Z=require("node:path"),$t=require("node:os"),Vt=require("./temporary-directory-B83uKxJF.cjs");const Je=l(n=>Zt.createHash("sha1").update(n).digest("hex"),"sha1"),Re=44,Wt=59,Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ve=new Uint8Array(64),xe=new Uint8Array(128);for(let n=0;n<Ue.length;n++){const e=Ue.charCodeAt(n);ve[n]=e,xe[e]=n}const we=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(n){return Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString()}}:{decode(n){let e="";for(let A=0;A<n.length;A++)e+=String.fromCharCode(n[A]);return e}};function zt(n){const e=new Int32Array(5),A=[];let i=0;do{const s=eA(n,i),a=[];let c=!0,C=0;e[0]=0;for(let Q=i;Q<s;Q++){let g;Q=$(n,Q,e,0);const f=e[0];f<C&&(c=!1),C=f,Fe(n,Q,s)?(Q=$(n,Q,e,1),Q=$(n,Q,e,2),Q=$(n,Q,e,3),Fe(n,Q,s)?(Q=$(n,Q,e,4),g=[f,e[1],e[2],e[3],e[4]]):g=[f,e[1],e[2],e[3]]):g=[f],a.push(g)}c||tA(a),A.push(a),i=s+1}while(i<=n.length);return A}l(zt,"decode");function eA(n,e){const A=n.indexOf(";",e);return A===-1?n.length:A}l(eA,"indexOf");function $(n,e,A,i){let s=0,a=0,c=0;do{const Q=n.charCodeAt(e++);c=xe[Q],s|=(c&31)<<a,a+=5}while(c&32);const C=s&1;return s>>>=1,C&&(s=-2147483648|-s),A[i]+=s,e}l($,"decodeInteger");function Fe(n,e,A){return e>=A?!1:n.charCodeAt(e)!==Re}l(Fe,"hasMoreVlq");function tA(n){n.sort(AA)}l(tA,"sort");function AA(n,e){return n[0]-e[0]}l(AA,"sortComparator$1");function Me(n){const e=new Int32Array(5),A=1024*16,i=A-36,s=new Uint8Array(A),a=s.subarray(0,i);let c=0,C="";for(let Q=0;Q<n.length;Q++){const g=n[Q];if(Q>0&&(c===A&&(C+=we.decode(s),c=0),s[c++]=Wt),g.length!==0){e[0]=0;for(let f=0;f<g.length;f++){const r=g[f];c>i&&(C+=we.decode(a),s.copyWithin(0,i,c),c-=i),f>0&&(s[c++]=Re),c=V(s,c,e,r,0),r.length!==1&&(c=V(s,c,e,r,1),c=V(s,c,e,r,2),c=V(s,c,e,r,3),r.length!==4&&(c=V(s,c,e,r,4)))}}}return C+we.decode(s.subarray(0,c))}l(Me,"encode");function V(n,e,A,i,s){const a=i[s];let c=a-A[s];A[s]=a,c=c<0?-c<<1|1:c<<1;do{let C=c&31;c>>>=5,c>0&&(C|=32),n[e++]=ve[C]}while(c>0);return e}l(V,"encodeInteger");class ce{static{l(this,"BitSet")}constructor(e){this.bits=e instanceof ce?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class te{static{l(this,"Chunk")}constructor(e,A,i){this.start=e,this.end=A,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new te(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let A=this;for(;A;)e(A),A=A.next}eachPrevious(e){let A=this;for(;A;)e(A),A=A.previous}edit(e,A,i){return this.content=e,i||(this.intro="",this.outro=""),this.storeName=A,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const A=e-this.start,i=this.original.slice(0,A),s=this.original.slice(A);this.original=i;const a=new te(e,this.end,s);return a.outro=this.outro,this.outro="",this.end=e,this.edited?(a.edit("",!1),this.content=""):this.content=i,a.next=this.next,a.next&&(a.next.previous=a),a.previous=this,this.next=a,a}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const A=this.content.replace(e,"");if(A.length)return A!==this.content&&(this.split(this.start+A.length).edit("",void 0,!0),this.edited&&this.edit(A,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const A=this.content.r
`),A=e.filter(a=>/^\t+/.test(a)),i=e.filter(a=>/^ {2,}/.test(a));if(A.length===0&&i.length===0)return null;if(A.length>=i.length)return" ";const s=i.reduce((a,c)=>{const C=/^ +/.exec(c)[0].length;return Math.min(C,a)},1/0);return new Array(s+1).join(" ")}l(sA,"guessIndent");function oA(n,e){const A=n.split(/[/\\]/),i=e.split(/[/\\]/);for(A.pop();A[0]===i[0];)A.shift(),i.shift();if(A.length){let s=A.length;for(;s--;)A[s]=".."}return A.concat(i).join("/")}l(oA,"getRelativePath");const aA=Object.prototype.toString;function cA(n){return aA.call(n)==="[object Object]"}l(cA,"isObject");function Ge(n){const e=n.split(`
`),A=[];for(let i=0,s=0;i<e.length;i++)A.push(s),s+=e[i].length+1;return l(function(s){let a=0,c=A.length;for(;a<c;){const g=a+c>>1;s<A[g]?c=g:a=g+1}const C=a-1,Q=s-A[C];return{line:C,column:Q}},"locate")}l(Ge,"getLocator");const uA=/\w/;class hA{static{l(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,A,i,s){if(A.length){const a=A.length-1;let c=A.indexOf(`
`,0),C=-1;for(;c>=0&&a>c;){const g=[this.generatedCodeColumn,e,i.line,i.column];s>=0&&g.push(s),this.rawSegments.push(g),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,C=c,c=A.indexOf(`
`,c+1)}const Q=[this.generatedCodeColumn,e,i.line,i.column];s>=0&&Q.push(s),this.rawSegments.push(Q),this.advance(A.slice(C+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(A));this.pending=null}addUneditedChunk(e,A,i,s,a){let c=A.start,C=!0,Q=!1;for(;c<A.end;){if(this.hires||C||a.has(c)){const g=[this.generatedCodeColumn,e,s.line,s.column];this.hires==="boundary"?uA.test(i[c])?Q||(this.rawSegments.push(g),Q=!0):(this.rawSegments.push(g),Q=!1):this.rawSegments.push(g)}i[c]===`
`?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,C=!0):(s.column+=1,this.generatedCodeColumn+=1,C=!1),c+=1}this.pending=null}advance(e){if(!e)return;const A=e.split(`
`);if(A.length>1){for(let i=0;i<A.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=A[A.length-1].length}}const W=`
`,_={insertLeft:!1,insertRight:!1,storeName:!1};class De{static{l(this,"MagicString")}constructor(e,A={}){const i=new te(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:A.filename},indentExclusionRanges:{writable:!0,value:A.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ce},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:A.ignoreList}}),this.byStart[0]=i,this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.appendLeft(A):this.intro+=A,this}appendRight(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.appendRight(A):this.outro+=A,this}clone(){const e=new De(this.original,{filename:this.filename});let A=this.firstChunk,i=e.firstChunk=e.lastSearchedChunk=A.clone();for(;A;){e.byStart[i.start]=i,e.byEnd[i.end]=i;const s=A.next,a=s&&s.clone();a&&(i.next=a,a.previous=i,i=a),A=s}return e.lastChunk=i,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ce(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const A=0,i=Object.keys(this.storedNames),s=new hA(e.hires),a=Ge(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(c=>{const C=a(c.start);c.intro.length&&s.advance(c.intro),c.edited?s.addEdit(A,c.content,C,c.storeName?i.indexOf(c.original):-1):s.addUneditedChunk(A,c,this.original,C,this.sourcemapLocations),c.outro.length&&s.advance(c.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?oA(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:s.raw,x_google_ignoreList:this.ignoreList?[A]:void 0}}generateMap(e){return new nA(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=sA(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,A){const i=/^[^\r\n]/gm;if(cA(e)&&(A=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;A=A||{};const s={};A.exclude&&(typeof A.exclude[0]=="number"?[A.exclude]:A.exclude).forEach(f=>{for(let r=f[0];r<f[1];r+=1)s[r]=!0});let a=A.indentStart!==!1;const c=l(g=>a?`${e}${g}`:(a=!0,g),"replacer");this.intro=this.intro.replace(i,c);let C=0,Q=this.firstChunk;for(;Q;){const g=Q.end;if(Q.edited)s[C]||(Q.content=Q.content.replace(i,c),Q.content.length&&(a=Q.content[Q.content.length-1]===`
`));else for(C=Q.start;C<g;){if(!s[C]){const f=this.original[C];f===`
`?a=!0:f!=="\r"&&a&&(a=!1,C===Q.start||(this._splitChunk(Q,C),Q=Q.next),Q.prependRight(e))}C+=1}C=Q.end,Q=Q.next}return this.outro=this.outro.replace(i,c),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,A){return _.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),_.insertLeft=!0),this.appendLeft(e,A)}insertRight(e,A){return _.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),_.insertRight=!0),this.prependRight(e,A)}move(e,A,i){if(i>=e&&i<=A)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(A),this._split(i);const s=this.byStart[e],a=this.byEnd[A],c=s.previous,C=a.next,Q=this.byStart[i];if(!Q&&a===this.lastChunk)return this;const g=Q?Q.previous:this.lastChunk;return c&&(c.next=C),C&&(C.previous=c),g&&(g.next=s),Q&&(Q.previous=a),s.previous||(this.firstChunk=a.next),a.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=g,a.next=Q||null,g||(this.firstChunk=s),Q||(this.lastChunk=a),this}overwrite(e,A,i,s){return s=s||{},this.update(e,A,i,{...s,overwrite:!s.contentOnly})}update(e,A,i,s){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(A>this.original.length)throw new Error("end is out of bounds");if(e===A)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(A),s===!0&&(_.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),_.storeName=!0),s={storeName:!0});const a=s!==void 0?s.storeName:!1,c=s!==void 0?s.overwrite:!1;if(a){const g=this.original.slice(e,A);Object.defineProperty(this.storedNames,g,{writable:!0,value:!0,enumerable:!0})}const C=this.byStart[e],Q=this.byEnd[A];if(C){let g=C;for(;g!==Q;){if(g.next!==this.byStart[g.end])throw new Error("Cannot overwrite across a split point");g=g.next,g.edit("",!1)}C.edit(i,a,!c)}else{const g=new te(e,A,"").edit(i,a);Q.next=g,g.previous=Q}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(A):this.intro=A+this.intro,this}prependRight(e,A){if(typeof A!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(A):this.outro=A+this.outro,this}remove(e,A){for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(e===A)return this;if(e<0||A>this.original.length)throw new Error("Character is out of bounds");if(e>A)throw new Error("end must be greater than start");this._split(e),this._split(A);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=A>i.end?this.byStart[i.end]:null;return this}reset(e,A){for(;e<0;)e+=this.original.length;for(;A<0;)A+=this.original.length;if(e===A)return this;if(e<0||A>this.original.length)throw new Error("Character is out of bounds");if(e>A)throw new Error("end must be greater than start");this._split(e),this._split(A);let i=this.byStart[e];for(;i;)i.reset(),i=A>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(W);if(e!==-1)return this.outro.substr(e+1);let A=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(W),e!==-1)return i.outro.substr(e+1)+A;A=i.outro+A}if(i.content.length>0){if(e=i.content.lastIndexOf(W),e!==
`).length}:${w.e()-n.lastIndexOf(`
`,w.e()-1)}`),{idx:w.e()});const a=[],c=[];for(;w.ri();){const Q=w.is(),g=w.ie(),f=w.it(),r=w.ai(),m=w.id(),K=w.ss(),p=w.se();let S;w.ip()&&(S=C(n.slice(m===-1?Q-1:Q,m===-1?g+1:g))),a.push({n:S,t:f,s:Q,e:g,ss:K,se:p,d:m,a:r})}for(;w.re();){const Q=w.es(),g=w.ee(),f=w.els(),r=w.ele(),m=n.slice(Q,g),K=m[0],p=f<0?void 0:n.slice(f,r),S=p?p[0]:"";c.push({s:Q,e:g,ls:f,le:r,n:K==='"'||K==="'"?C(m):m,ln:S==='"'||S==="'"?C(p):p})}function C(Q){try{return(0,eval)(Q)}catch{}}return l(C,"k"),[a,c,!!w.f(),!!w.ms()]}l(He,"parse$1");function fA(n,e){const A=n.length;let i=0;for(;i<A;){const s=n.charCodeAt(i);e[i++]=(255&s)<<8|s>>>8}}l(fA,"Q");function QA(n,e){const A=n.length;let i=0;for(;i<A;)e[i]=n.charCodeAt(i++)}l(QA,"B");let w;const qe=WebAssembly.compile((ke="AGFzbQEAAAABKwhgAX8Bf2AEf39/fwBgAAF/YAAAYAF/AGADf39/AX9gAn9/AX9gA39/fwADMTAAAQECAgICAgICAgICAgICAgICAgIAAwMDBAQAAAUAAAAAAAMDAwAGAAAABwAGAgUEBQFwAQEBBQMBAAEGDwJ/AUHA8gALfwBBwPIACwd6FQZtZW1vcnkCAAJzYQAAAWUAAwJpcwAEAmllAAUCc3MABgJzZQAHAml0AAgCYWkACQJpZAAKAmlwAAsCZXMADAJlZQANA2VscwAOA2VsZQAPAnJpABACcmUAEQFmABICbXMAEwVwYXJz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GooAgBBBUcNDAJAIAJBAnRBACgCqApqQXxqKAIAIgMoAgQNACADQQAoApwKQQJqNgIEC0EAIAJBf2o7AZYKIAMgAUEEajYCDAwMCwJAQQAoApwKIgEvAQBBKUcNAEEAKALwCSIDRQ0AIAMoAgQgAUcNAEEAQQAoAvQJIgM2AvAJAkAgA0UNACADQQA2AiAMAQtBAEEANgLgCQtBAEEALwGYCiIDQQFqOwGYCkEAKAKkCiADQQN0aiIDQQZBAkEALQCsChs2AgAgAyABNgIEQQBBADoArAoMCwtBAC8BmAoiAUUNB0EAIAFBf2oiATsBmApBACgCpAogAUH//wNxQQN0aigCAEEERg0EDAoLQScQGgwJC0EiEBoMCAsgAkEvRw0HAkACQCABLwEEIgFBKkYNACABQS9HDQEQGAwKC0EBEBkMCQsCQAJAAkACQEEAKAKcCiIBLwEAIgMQG0UNAAJAAkAgA0FVag4EAAkBAwkLIAFBfmovAQBBK0YNAwwICyABQX5qLwEAQS1GDQIMBwsgA0EpRw0BQQAoAqQKQQAvAZgKIgJBA3RqKAIEEBxFDQIMBgsgAUF+ai8BAEFQakH//wNxQQpPDQULQQAvAZgKIQILAkACQCACQf//A3EiAkUNACADQeYARw0AQQAoAqQKIAJBf2pBA3RqIgQoAgBBAUcNACABQX5qLwEAQe8ARw0BIAQoAgRBlghBAxAdRQ0BDAULIANB/QBHDQBBACgCpAogAkEDdGoiAigCBBAeDQQgAigCAEEGRg0ECyABEB8NAyADRQ0DIANBL0ZBAC0AoApBAEdxDQ
`;case 114:return"\r";case 120:return String.fromCharCode(be(2));case 117:return function(){const e=L.charCodeAt(k);let A;return e===123?(++k,A=be(L.indexOf("}",k)-k),++k,A>1114111&&M()):A=be(4),A<=65535?String.fromCharCode(A):(A-=65536,String.fromCharCode(55296+(A>>10),56320+(1023&A)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:L.charCodeAt(k)===10&&++k;case 10:return"";case 56:case 57:M();default:if(n>=48&&n<=55){let e=L.substr(k-1,3).match(/^[0-7]+/)[0],A=parseInt(e,8);return A>255&&(e=e.slice(0,-1),A=parseInt(e,8)),k+=e.length-1,n=L.charCodeAt(k),e==="0"&&n!==56&&n!==57||M(),String.fromCharCode(A)}return je(n)?"":String.fromCharCode(n)}}l(EA,"k");function be(n){const e=k;let A=0,i=0;for(let s=0;s<n;++s,++k){let a,c=L.charCodeAt(k);if(c!==95){if(c>=97)a=c-97+10;else if(c>=65)a=c-65+10;else{if(!(c>=48&&c<=57))break;a=c-48}if(a>=16)break;i=c,A=16*A+a}else i!==95&&s!==0||M(),i=c}return i!==95&&k-e===n||M(),A}l(be,"l");function je(n){return n===13||n===10}l(je,"u");function M(){throw Object.assign(Error(`Parse error ${_e}:${L.slice(0,k).split(`
`).length}:${k-L.lastIndexOf(`
`,k-1)}`),{idx:k})}l(M,"o");let Xe=!1;qe.then(()=>{Xe=!0});const Pe=l((n,e)=>Xe?He(n,e):CA(n,e),"parseEsm"),BA=l(n=>{if(!n.includes("import")&&!n.includes("export"))return!1;try{return Pe(n)[3]}catch{return!0}},"isESM"),Te="2",dA=(n=>{const e="default";return n[e]&&typeof n[e]=="object"&&"__esModule"in n[e]?n[e]:n}).toString(),wA=`.then(${dA})`,me=l((n,e,A)=>{if(A){if(!e.includes("import("))return}else if(!e.includes("import"))return;const s=Pe(e,n)[0].filter(Q=>Q.d>-1);if(s.length===0)return;const a=new De(e);for(const Q of s)a.appendRight(Q.se,wA);const c=a.toString(),C=a.generateMap({source:n,includeContent:!1,hires:"boundary"});return{code:c,map:C}},"transformDynamicImport"),Ze=l(n=>{try{const e=x.readFileSync(n,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),$e=l(()=>{},"noop"),Ve=l(()=>Math.floor(Date.now()/1e8),"getTime");class kA extends Map{static{l(this,"FileCache")}cacheDirectory=Vt.tmpdir;oldCacheDirectory=Z.join($t.tmpdir(),"tsx");cacheFiles;constructor(){super(),x.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=x.readdirSync(this.cacheDirectory).map(e=>{const[A,i]=e.split("-");return{time:Number(A),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const A=super.get(e);if(A)return A;const i=this.cacheFiles.find(c=>c.key===e);if(!i)return;const s=Z.join(this.cacheDirectory,i.fileName),a=Ze(s);if(!a){x.promises.unlink(s).then(()=>{const c=this.cacheFiles.indexOf(i);this.cacheFiles.splice(c,1)},()=>{});return}return super.set(e,a),a}set(e,A){if(super.set(e,A),A){const i=Ve();x.promises.writeFile(Z.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(A)).catch($e)}return this}expireDiskCache(){const e=Ve();for(const A of this.cacheFiles)e-A.time>7&&x.promises.unlink(Z.join(this.cacheDirectory,A.fileName)).catch($e)}async removeOldCacheDirectory(){try{await x.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in x.promises?await x.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await x.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var se=process.env.TSX_DISABLE_CACHE?new Map:new kA;const IA=/^[\w+.-]+:\/\//,pA=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,bA=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function mA(n){return IA.test(n)}l(mA,"isAbsoluteUrl");function KA(n){return n.startsWith("//")}l(KA,"isSchemeRelativeUrl");function We(n){return n.startsWith("/")}l(We,"isAbsolutePath");function DA(n){return n.startsWith("file:")}l(DA,"isFileUrl");function ze(n){return/^[.?#]/.test(n)}l(ze,"isRelative");function oe(n){const e=pA.exec(n);return et(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}l(oe,"parseAbsoluteUrl");function yA(n){const e=bA.exec(n),A=e[2];return et("file:","",e[1]||"","",We(A)?A:"/"+A,e[3]||"",e[4]||"")}l(yA,"parseFileUrl");function et(n,e,A,i,s,a,c){return{scheme:n,user:e,host:A,port:i,path:s,query:a,hash:c,type:7}}l(et,"makeUrl");function tt(n){if(KA(n)){const A=oe("http:"+n);return A.scheme="",A.type=6,A}if(We(n)){const A=oe("http://foo.com"+n);return A.scheme="",A.host="",A.type=5,A}if(DA(n))return yA(n);if(mA(n))return oe(n);const e=oe("http://foo.com/"+n);return e.scheme="",e.host="",e.type=n?n.startsWith("?")?3:n.startsWith("#")?2:4:1,e}l(tt,"parseUrl");function LA(n){if(n.endsWith("/.."))return n;const e=n.lastIndexOf("/");return n.slice(0,e+1)}l(LA,"stripPathFilename");function NA(n,e){At(e,e.type),n.path==="/"?n.path=e.path:n.path=LA(e.path)+n.path}l(NA,"mergePaths");function At(n,e){const A=e<=4,i=n.path.split("/");let s=1,a=0,c=!1;for(let Q=1;Q<i.length;Q++){const g=i[Q];if(!g){c=!0;continue}if(c=!1,g!=="."){if(g===".."){a?(c=!0,a--,s--):A&&(i[s++]=g);continue}i[s++]=g,a++}}let C="";for(let Q=1;Q<s;Q++)C+="/"+i[Q];(!C||c&&!C.endsWith("/.."))&&(C+="/"),n.path=C}l(At,"normalizePath");function SA(n,e){if(!n&&!e)return"";const A=tt(n);let i=A.type;if(e&&i!==7){const a=tt(e),c=a.type;switch(i){case 1:A.hash=a.hash;case 2:A.query=a.query;case 3:case 4:NA(A,a);case 5:A.user=a.user,A.host=a.host,A.port=a.port;case 6:A.scheme
Did you specify these with the most recent transformation maps first?`);let s=Ct(i,e,"",0);for(let a=A.length-1;a>=0;a--)s=Qt(A[a],[s]);return s}l(ur,"buildSourceMapTree");function Ct(n,e,A,i){const{resolvedSources:s,sourcesContent:a,ignoreList:c}=n,C=i+1,Q=s.map((g,f)=>{const r={importer:A,depth:C,source:g||"",content:void 0,ignore:void 0},m=e(r.source,r),{source:K,content:p,ignore:S}=r;if(m)return Ct(new nt(m,K),e,K,C);const v=p!==void 0?p:a?a[f]:null,H=S!==void 0?S:c?c.includes(f):!1;return or(K,v,H)});return Qt(n,Q)}l(Ct,"build");class hr{static{l(this,"SourceMap")}constructor(e,A){const i=A.decodedMappings?ct(e):zA(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,A.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function Et(n,e,A){const i={excludeContent:!!A,decodedMappings:!1},s=ur(n,e);return new hr(ar(s),i)}l(Et,"remapping");const lr=l((n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Et(i,()=>null)}},"applyTransformersSync"),fr=l(async(n,e,A)=>{const i=[],s={code:e};for(const a of A){const c=await a(n,s.code);c&&(Object.assign(s,c),i.unshift(c.map))}return{...s,map:Et(i,()=>null)}},"applyTransformers"),Qr=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),Bt={...Qr,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE,minifyWhitespace:!0,keepNames:!0},dt=l(n=>{const e=n.sourcefile;if(e){const A=Z.extname(e.split("?")[0]);A?A===".cts"||A===".mts"?n.sourcefile=`${e.slice(0,-3)}ts`:A===".mjs"&&(n.sourcefile=`${e.slice(0,-3)}js`):n.sourcefile+=".js"}return A=>(A.map&&(n.sourcefile!==e&&(A.map=A.map.replace(JSON.stringify(n.sourcefile),JSON.stringify(e))),A.map=JSON.parse(A.map)),A)},"patchOptions"),wt=l(n=>{throw n.name="TransformError",delete n.errors,delete n.warnings,n},"formatEsbuildError"),gr=l((n,e,A)=>{const[i,s]=e.split("?"),a={};i.endsWith(".cjs")||i.endsWith(".cts")||(a["import.meta.url"]=JSON.stringify(Tt.pathToFileURL(i)+(s?`?${s}`:"")));const c={...Bt,format:"cjs",sourcefile:i,define:a,banner:"(()=>{",footer:"})()",platform:"node",...A},C=Je([n,JSON.stringify(c),ie.version,Te].join("-"));let Q=se.get(C);return Q||(Q=lr(e,n,[(g,f)=>{const r=dt(c);let m;try{m=ie.transformSync(f,c)}catch(K){throw wt(K)}return r(m)},(g,f)=>me(g,f,!0)]),se.set(C,Q)),Q},"transformSync"),Cr=l(async(n,e,A)=>{const i={...Bt,format:"esm",sourcefile:e,...A},s=Je([n,JSON.stringify(i),ie.version,Te].join("-"));let a=se.get(s);return a||(a=await fr(e,n,[async(c,C)=>{const Q=dt(i);let g;try{g=await ie.transform(C,i)}catch(f){throw wt(f)}return Q(g)},(c,C)=>me(c,C,!0)]),se.set(s,a)),a},"transform");exports.isESM=BA,exports.readJsonFile=Ze,exports.transform=Cr,exports.transformDynamicImport=me,exports.transformSync=gr;